pub struct CcsdsLdpc { /* private fields */ }Expand description
The LDPC codes of CCSDS (see the module): the decoder of LdpcCode on the full
parity-check matrix, the encoder of the standard, the virtual zeros and the punctured
bits.
Implementations§
Source§impl CcsdsLdpc
impl CcsdsLdpc
Sourcepub fn c2() -> Result<CcsdsLdpc>
pub fn c2() -> Result<CcsdsLdpc>
The (8160, 7136) code of rate 223/255 (Sec. 7.3).
§Errors
Never: the tables are those of the standard.
Sourcepub fn ar4ja(k: usize, rate: Ar4jaRate) -> Result<CcsdsLdpc>
pub fn ar4ja(k: usize, rate: Ar4jaRate) -> Result<CcsdsLdpc>
The AR4JA code of k information bits (1024, 4096 or 16384) and rate rate
(Sec. 7.4). Building the code of $k = 16384$ and rate 1/2 inverts an $8192 \times
8192$ binary matrix (seconds in release).
§Errors
Error::Config for another $k$.
Sourcepub fn ldpc(&self) -> &LdpcCode
pub fn ldpc(&self) -> &LdpcCode
The code of the full parity-check matrix (its decoder settings are public fields).
Sourcepub fn ldpc_mut(&mut self) -> &mut LdpcCode
pub fn ldpc_mut(&mut self) -> &mut LdpcCode
The code of the full parity-check matrix, to change its decoder settings.
Sourcepub fn full_codeword(&self, info: &[u8]) -> Result<Vec<u8>>
pub fn full_codeword(&self, info: &[u8]) -> Result<Vec<u8>>
The codeword of the full parity-check matrix ($n$ = 8176 or $(K + 3) M$ bits) of
info: the 18 virtual zeros of the rate-7/8 code, the information, the parity
bits, the punctured ones of the AR4JA codes included; LdpcCode::is_codeword of
CcsdsLdpc::ldpc checks it.
§Errors
Error::Shape unless info has $k$ bits.
Trait Implementations§
Source§impl BlockCode for CcsdsLdpc
impl BlockCode for CcsdsLdpc
Source§fn encode_block(&self, info: &[u8]) -> Result<Vec<u8>>
fn encode_block(&self, info: &[u8]) -> Result<Vec<u8>>
Source§fn decode_block(&self, llr: &[f64]) -> Result<Vec<u8>>
fn decode_block(&self, llr: &[f64]) -> Result<Vec<u8>>
Source§fn encode_block_into(&self, info: &[u8], out: &mut [u8]) -> Result<()>
fn encode_block_into(&self, info: &[u8], out: &mut [u8]) -> Result<()>
out (ADR 0011: the default
copies BlockCode::encode_block; a code overrides it when a profile shows the
copy). Read moreSource§fn decode_block_into(&self, llr: &[f64], out: &mut [u8]) -> Result<()>
fn decode_block_into(&self, llr: &[f64], out: &mut [u8]) -> Result<()>
out (as
BlockCode::encode_block_into). Read more