pub struct RelayDecoder<N: PartialEq + Default + Clone + Copy> { /* private fields */ }Expand description
An ensemble decoder which controls an inner BP min-sum decoder.
Implementations§
Source§impl<N> RelayDecoder<N>
impl<N> RelayDecoder<N>
pub fn new( check_matrix: Arc<SparseBitMatrix>, min_sum_config: Arc<MinSumDecoderConfig>, relay_config: Arc<RelayDecoderConfig>, ) -> RelayDecoder<N>
Trait Implementations§
Source§impl<N: Clone + PartialEq + Default + Clone + Copy> Clone for RelayDecoder<N>
impl<N: Clone + PartialEq + Default + Clone + Copy> Clone for RelayDecoder<N>
Source§fn clone(&self) -> RelayDecoder<N>
fn clone(&self) -> RelayDecoder<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<N> Decoder for RelayDecoder<N>
impl<N> Decoder for RelayDecoder<N>
fn check_matrix(&self) -> Arc<SparseBitMatrix>
fn log_prior_ratios(&mut self) -> Array1<f64>
fn decode_detailed(&mut self, detectors: ArrayView1<'_, Bit>) -> DecodeResult
fn get_decoding_quality(&mut self, errors: ArrayView1<'_, u8>) -> f64
Source§fn decode(&mut self, detectors: ArrayView1<'_, Bit>) -> Array1<Bit>
fn decode(&mut self, detectors: ArrayView1<'_, Bit>) -> Array1<Bit>
Decode a single input problem
fn decode_batch(&mut self, detectors: ArrayView2<'_, Bit>) -> Array2<Bit>
fn decode_detailed_batch( &mut self, detectors: ArrayView2<'_, Bit>, ) -> Vec<DecodeResult>
fn get_detectors(&self, errors: ArrayView1<'_, Bit>) -> Array1<Bit>
fn get_detectors_batch(&self, errors: ArrayView2<'_, Bit>) -> Array2<Bit>
Source§impl<N> DecoderRunner for RelayDecoder<N>
impl<N> DecoderRunner for RelayDecoder<N>
fn par_decode_batch(&mut self, detectors: ArrayView2<'_, Bit>) -> Array2<Bit>
fn par_decode_detailed_batch( &mut self, detectors: ArrayView2<'_, Bit>, ) -> Vec<DecodeResult>
Source§fn decode_batch_progress_bar(
&mut self,
detectors: ArrayView2<'_, Bit>,
leave_progress_bar_on_finish: bool,
) -> Array2<Bit>
fn decode_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Array2<Bit>
Decode a batch displaying a progress bar
Source§fn decode_detailed_batch_progress_bar(
&mut self,
detectors: ArrayView2<'_, Bit>,
leave_progress_bar_on_finish: bool,
) -> Vec<DecodeResult>
fn decode_detailed_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Vec<DecodeResult>
Decode a batch displaying a progress bar
fn par_decode_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Array2<Bit>
fn par_decode_detailed_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Vec<DecodeResult>
fn get_progress_bar_style(&self) -> ProgressStyle
Auto Trait Implementations§
impl<N> Freeze for RelayDecoder<N>where
N: Freeze,
impl<N> RefUnwindSafe for RelayDecoder<N>where
N: RefUnwindSafe,
impl<N> Send for RelayDecoder<N>where
N: Send,
impl<N> Sync for RelayDecoder<N>where
N: Sync,
impl<N> Unpin for RelayDecoder<N>where
N: Unpin,
impl<N> UnsafeUnpin for RelayDecoder<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for RelayDecoder<N>where
N: UnwindSafe + RefUnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
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>
Converts
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>
Converts
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 moreSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.