MNormal Class Reference

A class that generates multivariate normal (Gaussian) deviates with given covariance matrix and vector of means. More...

#include <MNormal.h>

Inheritance diagram for MNormal::

CRandVec List of all members.

Public Methods

 MNormal ()
 Empty constructor.

 MNormal (RNG *gen, DoubleVector &mean_vec, DoubleMatrix &covariance)
 Constructor with matrix of covariances.

 MNormal (RNG *gen, DoubleVector &mean_vec, DoubleVector &covariance)
 Constructor with vector of diagonal covariance matrix.

 MNormal (RNG *gen, DoubleVector &mean_vec, double covariance)
 Constructor with constant diagonal covariance matrix.

int set (DoubleVector &mean_vec, DoubleMatrix &covariance)
 Set the means and the matrix of covariances.

int set (DoubleVector &mean_vec, DoubleVector &covariance)
 Set the means and the diagonal covariance matrix.

int set (DoubleVector &mean_vec, double covariance)
 Set the means and the constant diagonal covariance matrix.

virtual RNGgenerator ()
 Returns the rng used by this instance.

virtual void generator (RNG *p)
 Set the rng used by this instance.

DoubleVectoroperator() ()
 Operator that generates a vector of random values.

void operator() (DoubleVector &new_vec)
 Method that returns a vector of random variables in the vec argument.


Protected Attributes

Normal norm_rng
 The Normal r.v. used by this class.

DoubleMatrix CF_matrix
 The covariance matrix.

DoubleVector mean_vec
 The vector of means.

DoubleVector diag_covariance
 The diagonal covariance matrix.

double const_covariance
 The constant diagonal covariance matrix.

int pd_flag
 TODO.


Detailed Description

A class that generates multivariate normal (Gaussian) deviates with given covariance matrix and vector of means.


The documentation for this class was generated from the following file: