pub struct Demapping<'a> {
pub log_priors: Option<&'a [f64]>,
pub jacobian: Jacobian,
}Expand description
The a priori information and the approximation of a soft demapper
(Demap::demap_with_into). With the log-priors $\lambda_{x} = \ln P(x)$ of the
points $x$ of the alphabet and the variance $\sigma^{2}$ of the complex noise, the
LLR of a bit of the received symbol $y$ is
$$ L(b) = \ln \sum_{x:\, b = 0} e^{\lambda_{x} - |y - x|^{2} / \sigma^{2}} - \ln \sum_{x:\, b = 1} e^{\lambda_{x} - |y - x|^{2} / \sigma^{2}}, $$
each sum exact or max-log by Demapping::jacobian. A constant added to every
$\lambda_{x}$ cancels, so the log-priors need not be normalised. The default, uniform
priors and the exact logarithm, is that of Demap::demap_into.
§Examples
use comnum_core::traits::{Demapping, Jacobian};
let lp = [-0.5f64, -1.5];
let d = Demapping { log_priors: Some(&lp), jacobian: Jacobian::MaxLog };
assert_eq!(Demapping::default(), Demapping { log_priors: None, jacobian: Jacobian::Exact });
assert_ne!(d, Demapping::default());Fields§
§log_priors: Option<&'a [f64]>The a priori log-probabilities $\ln P(x)$, one per point in the order of the
labels (probabilistic shaping); None for uniform priors, which need no table.
jacobian: JacobianThe Jacobian logarithm of the sums over the labels: exact or max-log.