[][src]Struct nalgebra_mvn::MultivariateNormal

pub struct MultivariateNormal<Real, N> where
    Real: RealField,
    N: Dim + DimMin<N, Output = N>,
    DefaultAllocator: Allocator<Real, N>,
    DefaultAllocator: Allocator<Real, N, N>,
    DefaultAllocator: Allocator<Real, U1, N>,
    DefaultAllocator: Allocator<(usize, usize), <N as DimMin<N>>::Output>, 
{ /* fields omitted */ }

An N-dimensional multivariate normal distribution

See the crate-level docs for example usage.

Methods

impl<Real, N> MultivariateNormal<Real, N> where
    Real: RealField,
    N: Dim + DimMin<N, Output = N> + DimSub<Dynamic>,
    DefaultAllocator: Allocator<Real, N>,
    DefaultAllocator: Allocator<Real, N, N>,
    DefaultAllocator: Allocator<Real, U1, N>,
    DefaultAllocator: Allocator<(usize, usize), <N as DimMin<N>>::Output>, 
[src]

pub fn from_mean_and_precision(
    mu: &VectorN<Real, N>,
    precision: &MatrixN<Real, N>
) -> Self
[src]

Create a multivariate normal distribution from a mean and precision

The mean vector mu is N dimensional and the precision matrix is N x N.

pub fn from_mean_and_covariance(
    mu: &VectorN<Real, N>,
    covariance: &MatrixN<Real, N>
) -> Result<Self, Error>
[src]

Create a multivariate normal distribution from a mean and covariance

The mean vector mu is N dimensional and the covariance matrix is N x N.

The precision matrix is calculated by inverting the covariance matrix using a Cholesky decomposition. This can fail if the covariance matrix is not definite positive.

pub fn mean(&self) -> VectorN<Real, N>[src]

Get the mean of the distribution

pub fn precision(&self) -> &MatrixN<Real, N>[src]

Get the precision of the distribution

pub fn pdf<Count>(&self, xs: &MatrixMN<Real, Count, N>) -> VectorN<Real, Count> where
    Count: Dim,
    DefaultAllocator: Allocator<Real, Count>,
    DefaultAllocator: Allocator<Real, N, Count>,
    DefaultAllocator: Allocator<Real, Count, N>,
    DefaultAllocator: Allocator<Real, Count, Count>, 
[src]

Probability density function

Evaluate the probability density at locations xs.

pub fn logpdf<Count>(
    &self,
    xs: &MatrixMN<Real, Count, N>
) -> VectorN<Real, Count> where
    Count: Dim,
    DefaultAllocator: Allocator<Real, Count>,
    DefaultAllocator: Allocator<Real, N, Count>,
    DefaultAllocator: Allocator<Real, Count, N>,
    DefaultAllocator: Allocator<Real, Count, Count>, 
[src]

Log of the probability density function

Evaluate the log probability density at locations xs.

Trait Implementations

impl<Real: Clone, N: Clone> Clone for MultivariateNormal<Real, N> where
    Real: RealField,
    N: Dim + DimMin<N, Output = N>,
    DefaultAllocator: Allocator<Real, N>,
    DefaultAllocator: Allocator<Real, N, N>,
    DefaultAllocator: Allocator<Real, U1, N>,
    DefaultAllocator: Allocator<(usize, usize), <N as DimMin<N>>::Output>, 
[src]

impl<Real: Debug, N: Debug> Debug for MultivariateNormal<Real, N> where
    Real: RealField,
    N: Dim + DimMin<N, Output = N>,
    DefaultAllocator: Allocator<Real, N>,
    DefaultAllocator: Allocator<Real, N, N>,
    DefaultAllocator: Allocator<Real, U1, N>,
    DefaultAllocator: Allocator<(usize, usize), <N as DimMin<N>>::Output>, 
[src]

Auto Trait Implementations

impl<Real, N> !Send for MultivariateNormal<Real, N>

impl<Real, N> !Unpin for MultivariateNormal<Real, N>

impl<Real, N> !Sync for MultivariateNormal<Real, N>

impl<Real, N> !UnwindSafe for MultivariateNormal<Real, N>

impl<Real, N> !RefUnwindSafe for MultivariateNormal<Real, N>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,