pub fn ber_differential(
m: usize,
ebn0_db: f64,
detection: Detection,
) -> Result<f64>Expand description
Bit error rate of $M$-DPSK over AWGN with the detection detection: ber_dpsk
for the noncoherent detection, ber_dbpsk_coherent for the coherent detection with
differential decoding (defined for $M = 2$).
§Errors
Error::Config for an order that is not a power of two ≥ 2, or the coherent
detection with $M \ne 2$.
§Examples
use comnum_mapping::differential::Detection;
use comnum_mapping::theory::{ber_dbpsk_coherent, ber_differential, ber_dpsk};
assert_eq!(ber_differential(4, 8.0, Detection::Noncoherent)?, ber_dpsk(4, 8.0)?);
assert_eq!(ber_differential(2, 6.0, Detection::Coherent)?, ber_dbpsk_coherent(6.0));
assert!(ber_differential(4, 6.0, Detection::Coherent).is_err());