/// Provide an iterator over the PMF corresponding to this CDF.
Provide an iterator over the PMF corresponding to this CDF.
Provide an iterator over the PMF corresponding to this CDF .
pub fn iter_pmf(&self) -> CDFPMFIter<'_, T> {
        fn cdf_to_pmf<'a, G: Ord>(
            last_prob: &mut LogProb,
            e: &'a Entry<G>,
        ) -> Option<Entry<&'a G>> {
            let prob = e.prob.ln_sub_exp(*last_prob);
            *last_prob = e.prob;
            Some(Entry::new(&e.value, prob))
        }
        self.inner.iter().scan(LogProb::ln_zero(), cdf_to_pmf)
    }
pub fn iter_pmf ( & self ) -> CDFPMFIter < ' _ , T > { fn cdf_to_pmf < ' a , G : Ord > ( last_prob : & mut LogProb , e : & ' a Entry < G > , ) -> Option < Entry < & ' a G > > { let prob = e . prob . ln_sub_exp ( * last_prob ) ; * last_prob = e . prob ; Some ( Entry :: new ( & e . value , prob ) ) } self . inner . iter ( ) . scan ( LogProb :: ln_zero ( ) , cdf_to_pmf ) }
Provide an iterator over the PMF corresponding to this CDF.
Provide an iterator over the PMF corresponding to this CDF .
&self