pub trait Support<X> {
// Required method
fn supports(&self, x: &X) -> bool;
}
Expand description
Identifies the support of the Rv
Required Methods§
sourcefn supports(&self, x: &X) -> bool
fn supports(&self, x: &X) -> bool
Returns true
if x
is in the support of the Rv
§Example
use rv::dist::Uniform;
use rv::traits::Support;
// Create uniform with support on the interval [0, 1]
let u = Uniform::new(0.0, 1.0).unwrap();
assert!(u.supports(&0.5_f64));
assert!(!u.supports(&-0.1_f64));
assert!(!u.supports(&1.1_f64));