diff --git a/src/histogram_const.rs b/src/histogram_const.rs index e78e61a..466fd7e 100644 --- a/src/histogram_const.rs +++ b/src/histogram_const.rs @@ -197,6 +197,7 @@ where [u8; LEN + 1]: Sized { } /// Iterate over all `(range, count)` pairs in the histogram. +#[derive(Clone, Debug)] pub struct IterHistogram<'a> { remaining_bin: &'a [u64], remaining_range: &'a [f64], @@ -281,6 +282,7 @@ fn multinomal_variance(n: f64, n_tot_inv: f64) -> f64 { } /// Iterate over the bins normalized by bin width. +#[derive(Clone, Debug)] pub struct IterNormalized where T: Iterator { @@ -299,6 +301,7 @@ impl Iterator for IterNormalized } /// Iterate over the widths of the bins. +#[derive(Clone, Debug)] pub struct IterWidths where T: Iterator { @@ -317,6 +320,7 @@ impl Iterator for IterWidths } /// Iterate over the bin centers. +#[derive(Clone, Debug)] pub struct IterBinCenters where T: Iterator { @@ -335,6 +339,7 @@ impl Iterator for IterBinCenters } /// Iterate over the variances. +#[derive(Clone, Debug)] pub struct IterVariances where T: Iterator { @@ -352,4 +357,4 @@ impl Iterator for IterVariances self.histogram_iter.next() .map(|(_, n)| multinomal_variance(n as f64, self.sum_inv)) } -} \ No newline at end of file +} diff --git a/tests/integration/histogram_const.rs b/tests/integration/histogram_const.rs index 9627e03..c5d5869 100644 --- a/tests/integration/histogram_const.rs +++ b/tests/integration/histogram_const.rs @@ -4,7 +4,7 @@ use rand_distr::Distribution; use average::{Merge, assert_almost_eq}; use average::histogram_const::{Histogram, InvalidRangeError, -SampleOutOfRangeError}; + SampleOutOfRangeError}; type Histogram10 = Histogram<10>;