Trait statrs::distribution::CheckedInverseCDF [−][src]
The CheckedInverseCDF
trait is used to specify an interface
for distributions with a closed form solution to the inverse
cumulative distribution function with possible failure modes.
This trait should be merged into a CheckedUnivarite
trait
alongside InverseCDF
in a future release.
Required methods
fn checked_inverse_cdf(&self, x: T) -> Result<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::CheckedInverseCDF; use statrs::distribution::Categorical; let n = Categorical::new(&[0.0, 1.0, 2.0]).unwrap(); assert!(n.checked_inverse_cdf(-1.0).is_err());