pub fn correction_effect_threshold(ensemble: &RegularEnsemble) -> f64Expand description
The crossover probability below which a bit of the BSC that every one of its $t$ checks votes against is more likely in error than correct, the “correction effect” bound of MacKay’s simple decoder (MacKay 1999, eqs. (44), (54)–(57)): with $p_{z}(\tau) = \frac12 - \frac12(1 - 2f)^{\tau}$, $a = p_{z}(t_{r} - 1)^{t}$ and $b = (1 - p_{z}(t_{r} - 1))^{t}$, the root in $f$ of $a(1 - f) - b f$ ($t = d_{v}$, $t_{r} = d_{c}$; bisection to $10^{-12}$). It bounds the first iteration only.
§Examples
use comnum_fec::density_evolution::{correction_effect_threshold, RegularEnsemble};
// (4, 8): about 0.08 (MacKay 1999, Fig. 6(b))
let f = correction_effect_threshold(&RegularEnsemble::new(4, 8)?);
assert!((f - 0.0796).abs() < 1e-4, "{f}");