More code deduplication
This commit is contained in:
parent
9313307ae9
commit
d5b3fc80ab
@ -76,8 +76,10 @@ mod weighted_mean;
|
|||||||
mod minmax;
|
mod minmax;
|
||||||
mod reduce;
|
mod reduce;
|
||||||
mod quantile;
|
mod quantile;
|
||||||
|
mod traits;
|
||||||
|
|
||||||
pub use moments::{Mean, Variance, Skewness, Kurtosis, MeanWithError};
|
pub use moments::{Mean, Variance, Skewness, Kurtosis, MeanWithError};
|
||||||
pub use weighted_mean::{WeightedMean, WeightedMeanWithError};
|
pub use weighted_mean::{WeightedMean, WeightedMeanWithError};
|
||||||
pub use minmax::{Min, Max};
|
pub use minmax::{Min, Max};
|
||||||
pub use quantile::Quantile;
|
pub use quantile::Quantile;
|
||||||
|
pub use traits::{Estimate, Merge};
|
||||||
|
@ -83,17 +83,7 @@ impl core::default::Default for Min {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl core::iter::FromIterator<f64> for Min {
|
impl_from_iterator!(Min);
|
||||||
fn from_iter<T>(iter: T) -> Min
|
|
||||||
where T: IntoIterator<Item=f64>
|
|
||||||
{
|
|
||||||
let mut a = Min::new();
|
|
||||||
for i in iter {
|
|
||||||
a.add(i);
|
|
||||||
}
|
|
||||||
a
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Estimate the maximum of a sequence of numbers ("population").
|
/// Estimate the maximum of a sequence of numbers ("population").
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user