Searched refs:BernoulliError (Results 1 – 3 of 3) sorted by relevance
70 pub enum BernoulliError { enum75 impl fmt::Display for BernoulliError { implementation78 BernoulliError::InvalidProbability => "p is outside [0, 1] in Bernoulli distribution", in fmt()84 impl ::std::error::Error for BernoulliError {} implementation98 pub fn new(p: f64) -> Result<Bernoulli, BernoulliError> { in new() argument103 return Err(BernoulliError::InvalidProbability); in new()119 pub fn from_ratio(numerator: u32, denominator: u32) -> Result<Bernoulli, BernoulliError> { in from_ratio() argument121 return Err(BernoulliError::InvalidProbability); in from_ratio()
119 pub use self::bernoulli::{Bernoulli, BernoulliError};
123 - Implement `std::error::Error` for `BernoulliError` (#919)