pub trait Median<T> { fn median(&self) -> T; }
The Median trait returns the median of the distribution.
Median
Returns the median.
use statrs::statistics::Median; use statrs::distribution::Uniform; let n = Uniform::new(0.0, 1.0).unwrap(); assert_eq!(0.5, n.median());