Trait Ber

Source
pub trait Ber {
    // Required methods
    fn run(self: Box<Self>) -> Result<Vec<Statistics>, Box<dyn Error>>;
    fn n(&self) -> usize;
    fn n_cw(&self) -> usize;
    fn k(&self) -> usize;
    fn rate(&self) -> f64;
}
Expand description

BER test.

This trait is used to define trait objects that implement BER tests.

Required Methods§

Source

fn run(self: Box<Self>) -> Result<Vec<Statistics>, Box<dyn Error>>

Runs the BER test.

This function runs the BER test until completion. It returns a list of statistics for each Eb/N0, or an error.

Source

fn n(&self) -> usize

Returns the frame size of the code.

This corresponds to the frame size after puncturing.

Source

fn n_cw(&self) -> usize

Returns the codeword size of the code.

This corresponds to the codeword size before puncturing.

Source

fn k(&self) -> usize

Returns the number of information bits of the code.

Source

fn rate(&self) -> f64

Returns the rate of the code.

Implementors§

Source§

impl<Mod: Modulation, Dec: DecoderFactory> Ber for BerTest<Mod, Dec>