Trait statrs::distribution::DiscreteCDF
source · pub trait DiscreteCDF<K: Bounded + Clone + Num, T: Float>: Min<K> + Max<K> {
// Required method
fn cdf(&self, x: K) -> T;
// Provided method
fn inverse_cdf(&self, p: T) -> K { ... }
}
Expand description
The DiscreteCDF
trait is used to specify an interface for univariate
discrete distributions.
Required Methods§
Provided Methods§
sourcefn 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.