pub struct ObservableDecoderRunner<'a> { /* private fields */ }Implementations§
Source§impl<'a> ObservableDecoderRunner<'a>
impl<'a> ObservableDecoderRunner<'a>
pub fn new( decoder: Box<dyn Decoder + Send + 'a>, observable_error_matrix: Arc<SparseBitMatrix>, include_decode_result: bool, ) -> Self
pub fn get_decoder(&self) -> &dyn Decoder
pub fn get_decoder_mut(&mut self) -> &mut dyn Decoder
pub fn decode_observables( &mut self, detectors: ArrayView1<'_, Bit>, ) -> Array1<Bit>
pub fn decode_observables_detailed( &mut self, detectors: ArrayView1<'_, Bit>, ) -> ObservableDecodeResult
pub fn decode_observables_batch( &mut self, detectors: ArrayView2<'_, Bit>, ) -> Array2<Bit>
pub fn decode_observables_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Array2<Bit>
pub fn decode_observables_detailed_batch( &mut self, detectors: ArrayView2<'_, Bit>, ) -> Vec<ObservableDecodeResult>
pub fn par_decode_observables_batch( &mut self, detectors: ArrayView2<'_, Bit>, ) -> Array2<Bit>
pub fn par_decode_observables_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Array2<Bit>
pub fn par_decode_observables_detailed_batch( &mut self, detectors: ArrayView2<'_, Bit>, ) -> Vec<ObservableDecodeResult>
Sourcepub fn decode_observables_detailed_batch_progress_bar(
&mut self,
detectors: ArrayView2<'_, Bit>,
leave_progress_bar_on_finish: bool,
) -> Vec<ObservableDecodeResult>
pub fn decode_observables_detailed_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Vec<ObservableDecodeResult>
Decode a batch displaying a progress bar
pub fn par_decode_observables_detailed_batch_progress_bar( &mut self, detectors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Vec<ObservableDecodeResult>
pub fn from_errors_decode_observables( &mut self, errors: ArrayView1<'_, Bit>, ) -> Array1<Bit>
pub fn from_errors_decode_observables_detailed( &mut self, errors: ArrayView1<'_, Bit>, ) -> ObservableDecodeResult
pub fn from_errors_decode_observables_batch( &mut self, errors: ArrayView2<'_, Bit>, ) -> Array2<Bit>
pub fn par_from_errors_decode_observables_batch( &mut self, errors: ArrayView2<'_, Bit>, ) -> Array2<Bit>
pub fn from_errors_decode_observables_batch_progress_bar( &mut self, errors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Array2<Bit>
pub fn par_from_errors_decode_observables_batch_progress_bar( &mut self, errors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Array2<Bit>
pub fn from_errors_decode_observables_detailed_batch( &mut self, errors: ArrayView2<'_, Bit>, ) -> Vec<ObservableDecodeResult>
pub fn par_from_errors_decode_observables_detailed_batch( &mut self, errors: ArrayView2<'_, Bit>, ) -> Vec<ObservableDecodeResult>
Sourcepub fn from_errors_decode_observables_detailed_batch_progress_bar(
&mut self,
errors: ArrayView2<'_, Bit>,
leave_progress_bar_on_finish: bool,
) -> Vec<ObservableDecodeResult>
pub fn from_errors_decode_observables_detailed_batch_progress_bar( &mut self, errors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Vec<ObservableDecodeResult>
Decode a batch displaying a progress bar
pub fn par_from_errors_decode_observables_detailed_batch_progress_bar( &mut self, errors: ArrayView2<'_, Bit>, leave_progress_bar_on_finish: bool, ) -> Vec<ObservableDecodeResult>
Trait Implementations§
Source§impl<'a> Clone for ObservableDecoderRunner<'a>
impl<'a> Clone for ObservableDecoderRunner<'a>
Source§fn clone(&self) -> ObservableDecoderRunner<'a>
fn clone(&self) -> ObservableDecoderRunner<'a>
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 Decoder for ObservableDecoderRunner<'_>
impl Decoder for ObservableDecoderRunner<'_>
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 DecoderRunner for ObservableDecoderRunner<'_>
impl DecoderRunner for ObservableDecoderRunner<'_>
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
Source§impl ObservableDecoder for ObservableDecoderRunner<'_>
impl ObservableDecoder for ObservableDecoderRunner<'_>
Source§fn observable_error_matrix(&self) -> Arc<SparseBitMatrix>
fn observable_error_matrix(&self) -> Arc<SparseBitMatrix>
The logical action matrix of the underlying trait.
Source§fn compute_observables(&self, errors: ArrayView1<'_, Bit>) -> Array1<Bit>
fn compute_observables(&self, errors: ArrayView1<'_, Bit>) -> Array1<Bit>
Compute the logical errors from the logical action matrix.
fn decode_observables(&mut self, detectors: ArrayView1<'_, Bit>) -> Array1<Bit>
Auto Trait Implementations§
impl<'a> Freeze for ObservableDecoderRunner<'a>
impl<'a> !RefUnwindSafe for ObservableDecoderRunner<'a>
impl<'a> Send for ObservableDecoderRunner<'a>
impl<'a> Sync for ObservableDecoderRunner<'a>
impl<'a> Unpin for ObservableDecoderRunner<'a>
impl<'a> UnsafeUnpin for ObservableDecoderRunner<'a>
impl<'a> !UnwindSafe for ObservableDecoderRunner<'a>
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.