[−][src]Trait lpn::codes::BinaryCode
Generic binary linear code API
Required methods
fn name(&self) -> String
Name of the code
fn length(&self) -> usize
Length of the code
fn dimension(&self) -> usize
Dimension of the code
fn generator_matrix(&self) -> &BinMatrix
Generator Matrix
fn parity_check_matrix(&self) -> &BinMatrix
Parity check matrix
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
Decode a codeword to the message space
Provided methods
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
Decode a codeword to the codeword space
fn encode(&self, c: &BinVector) -> BinVector
Encode a codeword
fn bias(&self, delta: f64) -> f64
Get or compute the bc of a code
Trait Implementations
impl Debug for dyn BinaryCode
[src]
impl<'_> Serialize for &'_ dyn BinaryCode
[src]
Implementors
impl BinaryCode for BogosrndCode18_6
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for BogosrndCode19_6
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for BogosrndCode19_7
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for CustomCode5_3
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for GolayCode23_12
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn bias(&self, delta: f64) -> f64
[src]
We know how to give the bias directly for this code
impl BinaryCode for GolayCode24_12
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for HammingCode127_120
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn bias(&self, delta: f64) -> f64
[src]
We know how to give the bias directly for this code
impl BinaryCode for HammingCode15_11
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn encode(&self, c: &BinVector) -> BinVector
[src]
Encode using lookup table
fn bias(&self, delta: f64) -> f64
[src]
impl BinaryCode for HammingCode31_26
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn bias(&self, delta: f64) -> f64
[src]
We know how to give the bias directly for this code
impl BinaryCode for HammingCode3_1
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn encode(&self, c: &BinVector) -> BinVector
[src]
Encode using lookup table
fn bias(&self, delta: f64) -> f64
[src]
impl BinaryCode for HammingCode63_57
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn bias(&self, delta: f64) -> f64
[src]
We know how to give the bias directly for this code
impl BinaryCode for HammingCode7_4
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn encode(&self, c: &BinVector) -> BinVector
[src]
Encode using lookup table
fn bias(&self, delta: f64) -> f64
[src]
impl BinaryCode for IdentityCode
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn bias(&self, _delta: f64) -> f64
[src]
impl BinaryCode for MdsCode3_2
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for MdsCode4_3
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for MdsCode5_4
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
impl BinaryCode for RepetitionCode
[src]
fn name(&self) -> String
[src]
fn length(&self) -> usize
[src]
fn dimension(&self) -> usize
[src]
fn generator_matrix(&self) -> &BinMatrix
[src]
fn parity_check_matrix(&self) -> &BinMatrix
[src]
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
fn bias(&self, delta: f64) -> f64
[src]
Directly compute the bias of repetition codes using the formulae of Bogos / Tramer / Vaudenay (2015)
https://eprint.iacr.org/2015/049