Trait statrs::distribution::InverseCDF [−][src]
pub trait InverseCDF<T> {
fn inverse_cdf(&self, x: T) -> T;
}The InverseCDF trait is used to specify an interface for distributions
with a closed form solution to the inverse cumulative distribution function.
This trait will probably be merged into Univariate in a future release
when already implemented distributions have InverseCDF back ported
Required methods
fn inverse_cdf(&self, x: T) -> T[src]
Returns the inverse cumulative distribution function
calculated at x for a given distribution. May panic
depending on the implementor.
Examples
use statrs::distribution::InverseCDF; use statrs::distribution::Categorical; let n = Categorical::new(&[0.0, 1.0, 2.0]).unwrap(); assert_eq!(n.inverse_cdf(0.5), 2.0);
Implementors
impl InverseCDF<f64> for Categorical[src]
impl InverseCDF<f64> for Categorical[src]fn inverse_cdf(&self, x: f64) -> f64[src]
impl InverseCDF<f64> for Normal[src]
impl InverseCDF<f64> for Normal[src]