Struct rv::dist::Uniform [−][src]
pub struct Uniform { /* fields omitted */ }
Continuous uniform distribution, U(a, b) on the interval x in [a, b]
Example
The Uniform CDF is a line
use rv::prelude::*; let u = Uniform::new(2.0, 4.0).unwrap(); // A line representing the CDF let y = |x: f64| { 0.5 * x - 1.0 }; assert!((u.cdf(&3.0_f64) - y(3.0)).abs() < 1E-12); assert!((u.cdf(&3.2_f64) - y(3.2)).abs() < 1E-12);
Implementations
impl Uniform
[src]
impl Uniform
[src]Trait Implementations
impl Clone for Uniform
[src]
impl Clone for Uniform
[src]fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ContinuousDistr<f32> for Uniform
[src]
impl ContinuousDistr<f32> for Uniform
[src]impl ContinuousDistr<f64> for Uniform
[src]
impl ContinuousDistr<f64> for Uniform
[src]impl InverseCdf<f32> for Uniform
[src]
impl InverseCdf<f32> for Uniform
[src]impl InverseCdf<f64> for Uniform
[src]
impl InverseCdf<f64> for Uniform
[src]Auto Trait Implementations
impl RefUnwindSafe for Uniform
impl RefUnwindSafe for Uniform
impl UnwindSafe for Uniform
impl UnwindSafe for Uniform
Blanket Implementations
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,