pub struct BerTest<Mod: Modulation, Dec = DecoderImplementation> { /* private fields */ }
Expand description
BER test.
This struct is used to configure and run a BER test.
Implementations§
Source§impl<Mod: Modulation, Dec: DecoderFactory> BerTest<Mod, Dec>
impl<Mod: Modulation, Dec: DecoderFactory> BerTest<Mod, Dec>
Sourcepub fn new(
h: SparseMatrix,
decoder_implementation: Dec,
puncturing_pattern: Option<&[bool]>,
interleaving_columns: Option<isize>,
max_frame_errors: u64,
max_iterations: usize,
ebn0s_db: &[f32],
reporter: Option<Reporter>,
bch_max_errors: u64,
) -> Result<BerTest<Mod, Dec>, Error>
pub fn new( h: SparseMatrix, decoder_implementation: Dec, puncturing_pattern: Option<&[bool]>, interleaving_columns: Option<isize>, max_frame_errors: u64, max_iterations: usize, ebn0s_db: &[f32], reporter: Option<Reporter>, bch_max_errors: u64, ) -> Result<BerTest<Mod, Dec>, Error>
Creates a new BER test.
The parameters required to define the test are the parity check matrix
h
, an optional puncturing pattern (which uses the semantics of
Puncturer
), an optional interleaving pattern, the maximum number of
frame errors at which to stop the simulation for each Eb/N0, the maximum
number of iterations of the LDPC decoder, a list of Eb/N0’s in dB units,
and an optional Reporter
to send messages about the test progress.
This function only defines the BER test. To run it it is necessary to
call the BerTest::run
method.
Trait Implementations§
Auto Trait Implementations§
impl<Mod, Dec> Freeze for BerTest<Mod, Dec>
impl<Mod, Dec> RefUnwindSafe for BerTest<Mod, Dec>
impl<Mod, Dec> Send for BerTest<Mod, Dec>where
Dec: Send,
impl<Mod, Dec> Sync for BerTest<Mod, Dec>
impl<Mod, Dec> Unpin for BerTest<Mod, Dec>
impl<Mod, Dec> UnwindSafe for BerTest<Mod, Dec>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more