lace_stats/
entropy.rs

1use lace_data::Datum;
2use std::vec::Drain;
3
4/// Trait supporting the estimation of join entropies from Quasi Monte Carlo
5/// sequences.
6pub trait QmcEntropy {
7    /// Return the number of dimensions in a QMC sequence is required to
8    /// generate a `Datum`
9    fn us_needed(&self) -> usize;
10    /// Take `ndims` uniformly sample f64 in (0, 1) and convert them into a
11    /// `Datum`.
12    fn us_to_datum(&self, us: &mut Drain<f64>) -> Datum;
13    /// The reciprocal of the importance PDF/PMF.
14    fn q_recip(&self) -> f64;
15}