pub struct MultivariateNormal<S: State> where
    DefaultAllocator: Allocator<f64, S::Size> + Allocator<f64, S::Size, S::Size> + Allocator<usize, S::Size, S::Size> + Allocator<f64, S::VecLength> + Allocator<f64, <S::Size as DimMin<S::Size>>::Output> + Allocator<f64, <<S::Size as DimMin<S::Size>>::Output as DimSub<Const<1>>>::Output> + Allocator<f64, S::Size, <S::Size as DimMin<S::Size>>::Output> + Allocator<f64, <S::Size as DimMin<S::Size>>::Output, S::Size> + Allocator<f64, <S::Size as DimSub<Const<1>>>::Output> + Allocator<f64, S::Size, <S::Size as DimSub<Const<1>>>::Output>,
    <DefaultAllocator as Allocator<f64, S::VecLength>>::Buffer: Send,
    S::Size: DimMin<S::Size>,
    <S::Size as DimMin<S::Size>>::Output: DimSub<Const<1>>,
    S::Size: DimSub<Const<1>>, 
{ pub template: S, pub params: Vec<StateParameter>, pub mean: OVector<f64, DimMinimum<S::Size, S::Size>>, pub sqrt_s_v: OMatrix<f64, S::Size, DimMinimum<S::Size, S::Size>>, pub std_norm_distr: Normal<f64>, }
Expand description

A state generator for Monte Carlo analyses.

Fields

template: S

The template state

params: Vec<StateParameter>

The ordered vector of parameters to which the mean and covariance correspond to.

mean: OVector<f64, DimMinimum<S::Size, S::Size>>

The mean of the multivariate normal distribution

sqrt_s_v: OMatrix<f64, S::Size, DimMinimum<S::Size, S::Size>>

The dot product \sqrt{\vec s} \cdot \vec v, where S is the singular values and V the V matrix from the SVD decomp of the covariance of multivariate normal distribution

std_norm_distr: Normal<f64>

The standard normal distribution used to seed the multivariate normal distribution

Implementations

Creates a new Monte Carlos state generator from a mean and covariance which must be of the same size as the state vector The covariance must be positive semi definite. The algorithm is the one from numpy https://github.com/numpy/numpy/blob/6c16f23c30fe490422959d30c2e22345211a2fe3/numpy/random/mtrand.pyx#L3979

Same as new but with a zero mean

Trait Implementations

Generate a random value of T, using rng as the source of randomness.

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.