[][src]Struct believer::decoders::simulation_results::SimulationResult

pub struct SimulationResult { /* fields omitted */ }

An interface for simulation result.

Methods

impl SimulationResult[src]

pub fn new() -> Self[src]

Creates a new empty SimulationResult.

pub fn with_n_successes_and_failures(n_successes: u64, n_failures: u64) -> Self[src]

Creates a new SimulationResult from the number of successes and failures.

pub fn worse_result() -> Self[src]

Creates the worse SimulationResult. That is, a simulation with failure rate 1.

pub fn add_decoding_result<D: DecodingResult>(&mut self, result: D)[src]

pub fn has_not_at_least_one_success_and_one_failure(&self) -> bool[src]

pub fn is_better_than(&self, other: &Self) -> bool[src]

Checks if self has better performance than other.

pub fn combine_with(&self, other: SimulationResult) -> Self[src]

pub fn get_effective_failure_rate_for_code_dimension(
    &self,
    dimension: u32
) -> f64
[src]

Get the effective failure rate of self for a given code dimension.

This is the equivalent failure rate per bit if dimension similar bits without error correction where used.

Example

use believer::SimulationResult;
let result = SimulationResult::with_n_successes_and_failures(9, 16);
assert_eq!(result.get_effective_failure_rate_for_code_dimension(2), 0.4);

pub fn get_effective_success_rate_for_code_dimension(
    &self,
    dimension: u32
) -> f64
[src]

Get the effective success rate of self for a given code dimension.

This is the equivalent success rate per bit if dimension similar bits without error correction where used.

Example

use believer::SimulationResult;
let result = SimulationResult::with_n_successes_and_failures(9, 16);
assert_eq!(result.get_effective_success_rate_for_code_dimension(2), 0.6);

pub fn get_failure_rate(&self) -> f64[src]

Get the failure rate of self.

Example

use believer::SimulationResult;
let result = SimulationResult::with_n_successes_and_failures(9, 16);
assert_eq!(result.get_failure_rate(), 0.64);

pub fn get_success_rate(&self) -> f64[src]

Get the success rate of self.

Example

use believer::SimulationResult;
let result = SimulationResult::with_n_successes_and_failures(9, 16);
assert_eq!(result.get_success_rate(), 0.36);

pub fn get_n_iterations(&self) -> u64[src]

pub fn get_n_failures(&self) -> u64[src]

pub fn get_n_successes(&self) -> u64[src]

Trait Implementations

impl Clone for SimulationResult[src]

impl Copy for SimulationResult[src]

impl Eq for SimulationResult[src]

impl PartialEq<SimulationResult> for SimulationResult[src]

impl Debug for SimulationResult[src]

impl StructuralPartialEq for SimulationResult[src]

impl StructuralEq for SimulationResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,