Trait statrs::distribution::ContinuousCDF [−][src]
pub trait ContinuousCDF<K: Float, T: Float>: Min<K> + Max<K> { fn cdf(&self, x: K) -> T; fn inverse_cdf(&self, p: T) -> K { ... } }
Expand description
The ContinuousCDF
trait is used to specify an interface for univariate
distributions for which cdf float arguments are sensible.
Required methods
Provided methods
fn inverse_cdf(&self, p: T) -> K
fn inverse_cdf(&self, p: T) -> K
Due to issues with rounding and floating-point accuracy the default
implementation may be ill-behaved.
Specialized inverse cdfs should be used whenever possible.
Performs a binary search on the domain of cdf
to obtain an approximation
of F^-1(p) := inf { x | F(x) >= p }
. Needless to say, performance may
may be lacking.