pub enum FillPolicy {
Random,
Uniform,
}Expand description
Policy used to select the rows to fill when adding a new column in the MacKay-Neal algorith.
The Random policy chooses rows completely randomly, and only
imposes the maximum row weigth constraint of the configuration.
This has the drawback that near the end of the algorithm too
many rows can be full, while other rows have too many missing
items. Therefore, the algorithm will fail. Even if backtracking
is used, it is unlikely that the algorithm suceeds when the
matrix is large and the LDPC code is regular, so that all the
rows will necessarily end up with the same row weight.
The Uniform policy solves this problem by always picking
rows which have the lower weight possible. There is still some
randomness involved in the selection of rows, but the only
choices that are considered are those with the property that
it is not possible to exchange one of the choosen rows by
another row that was not chosen and has stricly less weight.
Variants§
Random
Choose randomly from the set of rows whose weight is less than the maximum row weight.
Uniform
Try to choose only among the rows which have lower weight.
Trait Implementations§
Source§impl Clone for FillPolicy
impl Clone for FillPolicy
Source§fn clone(&self) -> FillPolicy
fn clone(&self) -> FillPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FillPolicy
impl Debug for FillPolicy
Source§impl PartialEq for FillPolicy
impl PartialEq for FillPolicy
impl Copy for FillPolicy
impl Eq for FillPolicy
impl StructuralPartialEq for FillPolicy
Auto Trait Implementations§
impl Freeze for FillPolicy
impl RefUnwindSafe for FillPolicy
impl Send for FillPolicy
impl Sync for FillPolicy
impl Unpin for FillPolicy
impl UnwindSafe for FillPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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