[−][src]Struct nalgebra_mvn::MultivariateNormal
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]
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>,
pub fn from_mean_and_precision(
mu: &VectorN<Real, N>,
precision: &MatrixN<Real, N>
) -> Self
[src]
mu: &VectorN<Real, N>,
precision: &MatrixN<Real, N>
) -> Self
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]
mu: &VectorN<Real, N>,
covariance: &MatrixN<Real, N>
) -> Result<Self, Error>
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]
Count: Dim,
DefaultAllocator: Allocator<Real, Count>,
DefaultAllocator: Allocator<Real, N, Count>,
DefaultAllocator: Allocator<Real, Count, N>,
DefaultAllocator: Allocator<Real, Count, Count>,
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]
&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>,
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]
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>,
fn clone(&self) -> MultivariateNormal<Real, N>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
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>,
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> !RefUnwindSafe for MultivariateNormal<Real, N>
impl<Real, N> !UnwindSafe for MultivariateNormal<Real, N>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,