pub enum ContinuousDistribution {
Normal {
mean: f64,
std_dev: f64,
},
StudentsT {
df: f64,
},
ChiSquared {
df: f64,
},
FisherSnedecor {
d1: f64,
d2: f64,
},
Exponential {
rate: f64,
},
Gamma {
shape: f64,
rate: f64,
},
Beta {
alpha: f64,
beta: f64,
},
LogNormal {
mu: f64,
sigma: f64,
},
Cauchy {
location: f64,
scale: f64,
},
Weibull {
shape: f64,
scale: f64,
},
Uniform {
lower: f64,
upper: f64,
},
}Expand description
Enum representing common continuous distributions
Variants§
Implementations§
Source§impl ContinuousDistribution
impl ContinuousDistribution
Sourcepub fn standard_normal() -> Self
pub fn standard_normal() -> Self
Create a standard normal distribution
Sourcepub fn normal(mean: f64, std_dev: f64) -> Result<Self>
pub fn normal(mean: f64, std_dev: f64) -> Result<Self>
Create a normal distribution with given parameters
Sourcepub fn students_t(df: f64) -> Result<Self>
pub fn students_t(df: f64) -> Result<Self>
Create a t-distribution
Sourcepub fn chi_squared(df: f64) -> Result<Self>
pub fn chi_squared(df: f64) -> Result<Self>
Create a chi-squared distribution
Sourcepub fn fisher_snedecor(d1: f64, d2: f64) -> Result<Self>
pub fn fisher_snedecor(d1: f64, d2: f64) -> Result<Self>
Create an F-distribution
Trait Implementations§
Source§impl Clone for ContinuousDistribution
impl Clone for ContinuousDistribution
Source§fn clone(&self) -> ContinuousDistribution
fn clone(&self) -> ContinuousDistribution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContinuousDistribution
impl RefUnwindSafe for ContinuousDistribution
impl Send for ContinuousDistribution
impl Sync for ContinuousDistribution
impl Unpin for ContinuousDistribution
impl UnsafeUnpin for ContinuousDistribution
impl UnwindSafe for ContinuousDistribution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.