diff --git a/src/quantile.rs b/src/quantile.rs index cb99440..505e2df 100644 --- a/src/quantile.rs +++ b/src/quantile.rs @@ -1,3 +1,4 @@ +use core; use core::cmp::min; use conv::{ApproxFrom, ConvAsUtil, ValueFrom}; @@ -163,6 +164,13 @@ impl Quantile { } } +impl core::default::Default for Quantile { + /// Create a new median estimator. + fn default() -> Quantile { + Quantile::new(0.5) + } +} + #[test] fn reference() { let observations = [