Struct ldpc::RandomRegularCode[][src]

pub struct RandomRegularCode { /* fields omitted */ }

A random regular ldpc code sampler.

See LinearCode::random_regular_code.

Implementations

impl RandomRegularCode[src]

pub fn block_size(&mut self, block_size: usize) -> &mut Self[src]

Fixes the block size of the code.

Default is 0.

pub fn number_of_checks(&mut self, number_of_checks: usize) -> &mut Self[src]

Fixes the number of checks of the code.

Default is 0.

pub fn bit_degree(&mut self, bit_degree: usize) -> &mut Self[src]

Fixes the number of checks connected to each bit of the code.

Default is 0.

pub fn check_degree(&mut self, check_degree: usize) -> &mut Self[src]

Fixes the number of bits connected to each check of the code.

Default is 0.

pub fn sample_with<R: Rng>(
    &self,
    rng: &mut R
) -> Result<LinearCode, SamplingError>
[src]

Samples a random code with the given random number generator or returns an error if the n * b != m * c where n is the block size, b the bit's degree, m the number of checks and c the check's degree.

Trait Implementations

impl Clone for RandomRegularCode[src]

impl Copy for RandomRegularCode[src]

impl Debug for RandomRegularCode[src]

impl Default for RandomRegularCode[src]

impl Eq for RandomRegularCode[src]

impl Hash for RandomRegularCode[src]

impl PartialEq<RandomRegularCode> for RandomRegularCode[src]

impl StructuralEq for RandomRegularCode[src]

impl StructuralPartialEq for RandomRegularCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,