Struct CodeParams

Source
pub struct CodeParams {
    pub n: usize,
    pub k: usize,
    pub punctured_bits: usize,
    pub submatrix_size: usize,
    pub circulant_size: usize,
    pub paritycheck_sum: u32,
    pub decode_bf_working_len: usize,
    pub decode_ms_working_len: usize,
    pub decode_ms_working_u8_len: usize,
    pub output_len: usize,
}
Expand description

Parameters for a given LDPC code.

Fields§

§n: usize

Block length (number of bits transmitted/received, aka code length).

§k: usize

Data length (number of bits of user information, aka code dimension).

§punctured_bits: usize

Number of parity bits not transmitted.

§submatrix_size: usize

Sub-matrix size (used in parity check matrix construction).

§circulant_size: usize

Circulant block size (used in generator matrix construction).

§paritycheck_sum: u32

Sum of the parity check matrix (number of parity check edges).

§decode_bf_working_len: usize

Length of the working area required for the bit-flipping decoder. Equal to n+punctured_bits.

§decode_ms_working_len: usize

Length of the working area required for the message-passing decoder. Equal to 2 * paritycheck_sum + 3n + 3p - 2*k

§decode_ms_working_u8_len: usize

Length of the u8 working area required for the message-passing decoder. Equal to (n + punctured_bits - k)/8.

§output_len: usize

Length of output required from any decoder. Equal to (n+punctured_bits)/8.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.