Struct extendr_api::prelude::stats::Normal
pub struct Normal<E>where
E: ComplexField,{
mean: E,
std_dev: <E as ComplexField>::Real,
}
Expand description
The normal distribution, N(mean, std_dev**2)
.
Fields§
§mean: E
§std_dev: <E as ComplexField>::Real
Implementations§
§impl<E> Normal<E>where
E: ComplexField,
impl<E> Normal<E>where
E: ComplexField,
pub 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)
pub 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