Skip to main content

QuadrantQam

Struct QuadrantQam 

Source
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

Source

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.

Source

pub fn order(&self) -> usize

The order $M$.

Source

pub fn bits_per_symbol(&self) -> usize

Bits per symbol, $\log_{2} M$.

Source

pub fn points(&self) -> Vec<C64> ⓘ

The $M$ points (for the decisions of a carrier recovery).

Source

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$.

Source

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.

Trait Implementations§

Source§

impl Clone for QuadrantQam

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QuadrantQam

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for QuadrantQam

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QuadrantQam

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.