Trait LdpcDecoder

Source
pub trait LdpcDecoder: Debug + Send {
    // Required method
    fn decode(
        &mut self,
        llrs: &[f64],
        max_iterations: usize,
    ) -> Result<DecoderOutput, DecoderOutput>;
}
Expand description

Generic LDPC decoder.

This trait is used to form LDPC decoder trait objects, abstracting over the internal implementation decoder.

Required Methods§

Source

fn decode( &mut self, llrs: &[f64], max_iterations: usize, ) -> Result<DecoderOutput, DecoderOutput>

Decodes a codeword.

The parameters are the LLRs for the received codeword and the maximum number of iterations to perform. If decoding is successful, the function returns an Ok containing the (hard decision) on the decoded codeword and the number of iterations used in decoding. If decoding is not successful, the function returns an Err containing the hard decision on the final decoder LLRs (which still has some bit errors) and the number of iterations used in decoding (which is equal to max_iterations).

Implementors§

Source§

impl<A: DecoderArithmetic> LdpcDecoder for ldpc_toolbox::decoder::flooding::Decoder<A>

Source§

impl<A: DecoderArithmetic> LdpcDecoder for ldpc_toolbox::decoder::horizontal_layered::Decoder<A>