Implement Default
for Quantile
This commit is contained in:
parent
01157da831
commit
2b960310ce
@ -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 = [
|
||||
|
Loading…
Reference in New Issue
Block a user