[−][src]Struct believer::decoders::simulation_results::SimulationResult
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]
&self,
dimension: u32
) -> f64
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]
&self,
dimension: u32
) -> f64
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]
fn clone(&self) -> SimulationResult
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SimulationResult
[src]
impl Eq for SimulationResult
[src]
impl PartialEq<SimulationResult> for SimulationResult
[src]
fn eq(&self, other: &SimulationResult) -> bool
[src]
fn ne(&self, other: &SimulationResult) -> bool
[src]
impl Debug for SimulationResult
[src]
impl StructuralPartialEq for SimulationResult
[src]
impl StructuralEq for SimulationResult
[src]
Auto Trait Implementations
impl Send for SimulationResult
impl Sync for SimulationResult
impl Unpin for SimulationResult
impl UnwindSafe for SimulationResult
impl RefUnwindSafe for SimulationResult
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,