Trait lpn::codes::BinaryCode [−][src]
Generic binary linear code API
Required methods
fn name(&self) -> String
[src]
Name of the code
fn length(&self) -> usize
[src]
Length of the code
fn dimension(&self) -> usize
[src]
Dimension of the code
fn generator_matrix(&self) -> &BinMatrix
[src]
Generator Matrix
fn parity_check_matrix(&self) -> &BinMatrix
[src]
Parity check matrix
fn decode_to_message(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
Decode a codeword to the message space
Provided methods
fn decode_to_code(&self, c: &BinVector) -> Result<BinVector, &str>
[src]
Decode a codeword to the codeword space
fn encode(&self, c: &BinVector) -> BinVector
[src]
Encode a codeword
fn decode_sample(&self, c: &mut Sample)
[src]
fn decode_slice(&self, c: &mut [u64])
[src]
fn bias(&self, delta: f64) -> f64
[src]
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 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 decode_sample(&self, _: &mut Sample)
[src]
fn decode_slice(&self, _: &mut [u64])
[src]
fn bias(&self, _delta: f64) -> f64
[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 decode_sample(&self, c: &mut Sample)
[src]
fn decode_slice(&self, c: &mut [u64])
[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