GClasses
GClasses::GMultivariateNormalDistribution Class Reference

Detailed Description

A multivariate Normal distribution. It can compute the likelihood of a specified vector, and can also generate random vectors from the distribution.

#include <GDistribution.h>

Inheritance diagram for GClasses::GMultivariateNormalDistribution:
GClasses::GDistribution

Public Member Functions

 GMultivariateNormalDistribution (const GVec &mean, GMatrix *pCovariance)
 
 GMultivariateNormalDistribution (GMatrix *pData, size_t nDims)
 
 ~GMultivariateNormalDistribution ()
 
double likelihood (const GVec &x)
 Compute the likelihood of the specified vector (which is assumed to be the same size as the number of columns or rows in the covariance matrix). More...
 
void randomVector (GRand *pRand, GVec &out)
 Generates a random vector from this multivariate Normal distribution. More...
 

Protected Member Functions

void precompute (GMatrix *pCovariance)
 

Protected Attributes

double m_dScale
 
GVec m_mean
 
size_t m_nDims
 
GMatrixm_pCholesky
 
GMatrixm_pInverseCovariance
 
GVec m_vector1
 
GVec m_vector2
 

Constructor & Destructor Documentation

GClasses::GMultivariateNormalDistribution::GMultivariateNormalDistribution ( const GVec mean,
GMatrix pCovariance 
)
GClasses::GMultivariateNormalDistribution::GMultivariateNormalDistribution ( GMatrix pData,
size_t  nDims 
)
GClasses::GMultivariateNormalDistribution::~GMultivariateNormalDistribution ( )

Member Function Documentation

double GClasses::GMultivariateNormalDistribution::likelihood ( const GVec x)

Compute the likelihood of the specified vector (which is assumed to be the same size as the number of columns or rows in the covariance matrix).

void GClasses::GMultivariateNormalDistribution::precompute ( GMatrix pCovariance)
protected
void GClasses::GMultivariateNormalDistribution::randomVector ( GRand pRand,
GVec out 
)

Generates a random vector from this multivariate Normal distribution.

Member Data Documentation

double GClasses::GMultivariateNormalDistribution::m_dScale
protected
GVec GClasses::GMultivariateNormalDistribution::m_mean
protected
size_t GClasses::GMultivariateNormalDistribution::m_nDims
protected
GMatrix* GClasses::GMultivariateNormalDistribution::m_pCholesky
protected
GMatrix* GClasses::GMultivariateNormalDistribution::m_pInverseCovariance
protected
GVec GClasses::GMultivariateNormalDistribution::m_vector1
protected
GVec GClasses::GMultivariateNormalDistribution::m_vector2
protected