pub fn detect(r: &[C64], m: usize) -> Result<Vec<usize>>Expand description
Noncoherent detection: the differential phase index nearest to $\arg(r_{k}
r_{k-1}^{\ast})$ for every pair of consecutive received symbols (n decisions for
n + 1 symbols).
§Errors
Error::Config unless m is a power of two ≥ 2; Error::Shape for an empty
input.
§Examples
use comnum_mapping::differential::detect;
use comnum_math::cis;
let r = [cis(0.3), cis(0.3 + std::f64::consts::FRAC_PI_2), cis(0.3 - std::f64::consts::FRAC_PI_2)];
assert_eq!(detect(&r, 4).unwrap(), vec![1, 2]);