comnum_mapping/lib.rs
1//! # comnum-mapping — constellations, mapping and demapping
2//!
3//! (OptiCommPy `optic.comm.modulation` and `optic.comm.sources`.)
4//!
5//! | Module | Content |
6//! |---|---|
7//! | [`bicm`] | cutoff rates of coded modulation and bit-interleaved coded modulation, over AWGN and Rayleigh fading (Caire, Taricco & Biglieri 1998); their capacities are in [`theory`] |
8//! | [`constellation`] | PAM, QAM, PSK and OOK constellations with Gray (or set-partitioning) labelling, mapping of bits to symbols, hard decisions |
9//! | [`demapper`] | log-likelihood ratios (exact and max-log); the [`Map`](comnum_core::traits::Map) and [`Demap`](comnum_core::traits::Demap) traits |
10//! | [`differential`] | differential coding of M-PSK (DBPSK, DQPSK, D8PSK): encoding and decoding of phase indices, noncoherent detection, Gray-labelled [`Dpsk`](differential::Dpsk) |
11//! | [`imperfect_csi`] | bit error rates over Rayleigh fading with an imperfect channel estimate (BPSK, QPSK, 16-QAM) and of differential detection over Jakes' fading (Chang & Su 2002) |
12//! | [`source`] | random bits, pseudo-random binary sequences (PRBS), random and shaped symbols |
13//! | [`theory`] | closed-form error rates over AWGN and Rayleigh fading, information rates over AWGN and Rayleigh fading (the CM and BICM capacities), the SER of orthogonal signals detected noncoherently |
14//!
15//! # Examples
16//! ```
17//! use comnum_mapping::{constellation::Constellation, source};
18//! use comnum_core::rng::Rng;
19//! let c = Constellation::qam(16).unwrap().normalized();
20//! let bits = source::bits(400, &mut Rng::new(1));
21//! let x = c.map_bits(&bits).unwrap();
22//! assert_eq!(x.len(), 100);
23//! assert_eq!(c.demap_bits(&x), bits);
24//! ```
25
26pub mod bicm;
27pub mod constellation;
28pub mod demapper;
29pub mod differential;
30pub mod imperfect_csi;
31pub mod source;
32pub mod theory;