pub fn check_probability<T, S>(p: T, name: S) -> CoreResult<T>Expand description
Checks if a probability value is valid (between 0 and 1, inclusive)
§Arguments
p- The probability value to checkname- The name of the parameter being checked
§Returns
Ok(p)if the probability is validErr(CoreError::ValueError)if the probability is not valid
§Errors
Returns CoreError::ValueError if the probability is not between 0 and 1.