pub struct Dpsk { /* private fields */ }Expand description
Differential M-PSK with Gray-labelled phase transitions: the differential phase
index $k$ carries the label $g(k)$ (comnum_math::gray).
Implementations§
Source§impl Dpsk
impl Dpsk
Sourcepub fn bits_per_symbol(&self) -> usize
pub fn bits_per_symbol(&self) -> usize
Bits per symbol, $\log_{2} M$.
Sourcepub fn indices(&self, bits: &[u8]) -> Result<Vec<usize>>
pub fn indices(&self, bits: &[u8]) -> Result<Vec<usize>>
The differential phase indices of a bit stream (most significant bit first).
§Errors
Error::Shape if the number of bits is not a multiple of $\log_{2} M$.
Sourcepub fn bits(&self, indices: &[usize]) -> Result<Vec<u8>>
pub fn bits(&self, indices: &[usize]) -> Result<Vec<u8>>
The bits of a sequence of differential phase indices.
§Errors
Error::Config if an index is not below $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 unit-energy PSK symbols carrying n bits (the reference first).
§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>>
Noncoherent demodulation (detect) of n + 1 received symbols into
n log2 M bits.
§Errors
Error::Shape for an empty input.
Sourcepub fn demodulate_coherent(&self, r: &[C64]) -> Result<Vec<u8>>
pub fn demodulate_coherent(&self, r: &[C64]) -> Result<Vec<u8>>
Coherent demodulation with differential decoding (detect_coherent then
decode) of n + 1 received symbols into n log2 M bits.
§Errors
Error::Shape for an empty input.