Skip to main content

Decoder

Trait Decoder 

Source
pub trait Decoder: DynClone + Sync {
    // Required methods
    fn check_matrix(&self) -> Arc<SparseBitMatrix>;
    fn log_prior_ratios(&mut self) -> Array1<f64>;
    fn decode_detailed(
        &mut self,
        detectors: ArrayView1<'_, Bit>,
    ) -> DecodeResult;

    // Provided methods
    fn decode(&mut self, detectors: ArrayView1<'_, Bit>) -> Array1<Bit> { ... }
    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> { ... }
    fn get_decoding_quality(&mut self, errors: ArrayView1<'_, u8>) -> f64 { ... }
}

Required Methods§

Provided Methods§

Source

fn decode(&mut self, detectors: ArrayView1<'_, Bit>) -> Array1<Bit>

Decode a single input problem

Source

fn decode_batch(&mut self, detectors: ArrayView2<'_, Bit>) -> Array2<Bit>

Source

fn decode_detailed_batch( &mut self, detectors: ArrayView2<'_, Bit>, ) -> Vec<DecodeResult>

Source

fn get_detectors(&self, errors: ArrayView1<'_, Bit>) -> Array1<Bit>

Source

fn get_detectors_batch(&self, errors: ArrayView2<'_, Bit>) -> Array2<Bit>

Source

fn get_decoding_quality(&mut self, errors: ArrayView1<'_, u8>) -> f64

Implementors§