Struct extendr_api::prelude::stats::Normal
source · pub struct Normal<E>where
E: ComplexField,{ /* private fields */ }Expand description
The normal distribution, N(mean, std_dev**2).
Implementations§
source§impl<E> Normal<E>where
E: ComplexField,
impl<E> Normal<E>where
E: ComplexField,
sourcepub fn new(
mean: E,
std_dev: <E as ComplexField>::Real,
) -> Result<Normal<E>, Error>
pub fn new( mean: E, std_dev: <E as ComplexField>::Real, ) -> Result<Normal<E>, Error>
Construct, from dimensions, mean and standard deviation.
Parameters:
- mean (
μ, unrestricted) - standard deviation (
σ, must be finite)
sourcepub fn from_mean_cv(
mean: E,
cv: <E as ComplexField>::Real,
) -> Result<Normal<E>, Error>
pub fn from_mean_cv( mean: E, cv: <E as ComplexField>::Real, ) -> Result<Normal<E>, Error>
Construct, from dimensions, mean and coefficient of variation.
Parameters:
- mean (
μ, unrestricted) - coefficient of variantion (
cv = abs(σ / μ))
Auto Trait Implementations§
impl<E> Freeze for Normal<E>
impl<E> RefUnwindSafe for Normal<E>
impl<E> Send for Normal<E>
impl<E> Sync for Normal<E>
impl<E> Unpin for Normal<E>
impl<E> UnwindSafe for Normal<E>
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more