Trait statrs::statistics::Median

source ·
pub trait Median<T> {
    // Required method
    fn median(&self) -> T;
}
Expand description

The Median trait returns the median of the distribution.

Required Methods§

source

fn median(&self) -> T

Returns the median.

Examples
use statrs::statistics::Median;
use statrs::distribution::Uniform;

let n = Uniform::new(0.0, 1.0).unwrap();
assert_eq!(0.5, n.median());

Implementors§