pub struct QuadrantQam { /* private fields */ }Expand description
Square M-QAM whose quadrant is differentially encoded and whose points inside a quadrant are Gray-labelled (Pfau et al. 2009, Sec. III-A; see the module): the bits are read by a coherent receiver after a carrier recovery with an ambiguity of a multiple of $\pi/2$.
Implementations§
Source§impl QuadrantQam
impl QuadrantQam
Sourcepub fn new(m: usize) -> Result<QuadrantQam>
pub fn new(m: usize) -> Result<QuadrantQam>
Square QAM of order m (4, 16, 64, …), of unit average energy.
§Errors
Error::Config unless m is an even power of two ≥ 4.
Sourcepub fn bits_per_symbol(&self) -> usize
pub fn bits_per_symbol(&self) -> usize
Bits per symbol, $\log_{2} M$.
Sourcepub fn map_bits(&self, bits: &[u8]) -> Result<Vec<C64>>
pub fn map_bits(&self, bits: &[u8]) -> Result<Vec<C64>>
The n / log2 M + 1 symbols carrying n bits, the reference first (quadrant 0,
inner label 0); the first two bits of every symbol select the quadrant transition.
§Errors
Error::Shape if the number of bits is not a multiple of $\log_{2} M$.
Sourcepub fn demap_bits(&self, r: &[C64]) -> Result<Vec<u8>>
pub fn demap_bits(&self, r: &[C64]) -> Result<Vec<u8>>
Hard decisions on n + 1 received symbols and differential decoding of their
quadrants: n log2 M bits, whatever multiple of $\pi/2$ rotates the symbols.
§Errors
Error::Shape for an empty input.