pub trait Histogram{
// Required method
fn bins(&self) -> &[u64];
// Provided methods
fn variance(&self, bin: usize) -> f64 { ... }
fn normalized_bins(
&self,
) -> IterNormalized<<&Self as IntoIterator>::IntoIter> { ... }
fn widths(&self) -> IterWidths<<&Self as IntoIterator>::IntoIter> { ... }
fn centers(&self) -> IterBinCenters<<&Self as IntoIterator>::IntoIter> { ... }
fn variances(&self) -> IterVariances<<&Self as IntoIterator>::IntoIter> { ... }
}
Expand description
Get the bins and ranges from a histogram.
Required Methods§
Provided Methods§
Sourcefn variance(&self, bin: usize) -> f64
fn variance(&self, bin: usize) -> f64
Estimate the variance for the given bin.
The square root of this estimates the error of the bin count.
Sourcefn normalized_bins(&self) -> IterNormalized<<&Self as IntoIterator>::IntoIter>
fn normalized_bins(&self) -> IterNormalized<<&Self as IntoIterator>::IntoIter>
Return an iterator over the bins normalized by the bin widths.
Sourcefn widths(&self) -> IterWidths<<&Self as IntoIterator>::IntoIter>
fn widths(&self) -> IterWidths<<&Self as IntoIterator>::IntoIter>
Return an iterator over the bin widths.
Sourcefn centers(&self) -> IterBinCenters<<&Self as IntoIterator>::IntoIter>
fn centers(&self) -> IterBinCenters<<&Self as IntoIterator>::IntoIter>
Return an iterator over the bin centers.
Sourcefn variances(&self) -> IterVariances<<&Self as IntoIterator>::IntoIter>
fn variances(&self) -> IterVariances<<&Self as IntoIterator>::IntoIter>
Return an iterator over the bin variances.
This is more efficient than calling variance()
for each bin.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.