Trait ldpc_toolbox::decoder::factory::DecoderFactory

source ·
pub trait DecoderFactory: Display + Clone + Sync + Send + 'static {
    // Required method
    fn build_decoder(&self, h: SparseMatrix) -> Box<dyn LdpcDecoder>;
}
Expand description

Decoder factory.

This trait is implemented by DecoderImplementation, which builds a suitable decoder depending on the value of an enum. Other factories can be implemented by the user in order to run a BER test with an LDPC decoder implemented externally to ldpc-toolbox (such decoder must be wrapped as a Box <dyn LdpcDecoder>).

Required Methods§

source

fn build_decoder(&self, h: SparseMatrix) -> Box<dyn LdpcDecoder>

Builds and LDPC decoder.

Given a parity check matrix, this function builds an LDPC decoder corresponding to this decoder implementation.

Object Safety§

This trait is not object safe.

Implementors§