Trait statrs::statistics::Median [−][src]
pub trait Median<T> { fn median(&self) -> T; }
The Median
trait specifies than an object has a closed form solution
for its median
Required methods
fn median(&self) -> T
[src]
Returns the median. May panic depending on the implementor.
Examples
use statrs::statistics::Median; use statrs::distribution::Uniform; let n = Uniform::new(0.0, 1.0).unwrap(); assert_eq!(0.5, n.median());
Implementations on Foreign Types
impl Median<f64> for [f64]
[src]
impl Median<f64> for [f64]
[src]Implementors
impl Median<f64> for Categorical
[src]
impl Median<f64> for Categorical
[src]impl Median<f64> for ChiSquared
[src]
impl Median<f64> for ChiSquared
[src]impl Median<f64> for DiscreteUniform
[src]
impl Median<f64> for DiscreteUniform
[src]impl Median<f64> for Exponential
[src]
impl Median<f64> for Exponential
[src]impl Median<f64> for Triangular
[src]
impl Median<f64> for Triangular
[src]