Public Member Functions | Protected Attributes | List of all members
o2scl::prob_dens_mdim_gaussian< vec_t, mat_t > Class Template Reference

A multi-dimensional Gaussian probability density function. More...

#include <prob_dens_func.h>

Inheritance diagram for o2scl::prob_dens_mdim_gaussian< vec_t, mat_t >:
o2scl::prob_dens_mdim< vec_t >

Public Member Functions

virtual size_t dim () const
 The dimensionality.
 
 prob_dens_mdim_gaussian (size_t p_ndim, vec_t &p_peak, mat_t &covar)
 Create a distribution from the covariance matrix.
 
void set (size_t p_ndim, vec_t &p_peak, mat_t &covar)
 Set the peak and covariance matrix for the distribution.
 
virtual double pdf (const vec_t &x) const
 The normalized density.
 
virtual double log_pdf (const vec_t &x) const
 The log of the normalized density.
 
virtual void operator() (vec_t &x) const
 Sample the distribution.
 

Protected Attributes

mat_t chol
 Cholesky decomposition.
 
mat_t covar_inv
 Inverse of the covariance matrix.
 
vec_t peak
 Location of the peak.
 
double norm
 Normalization factor.
 
size_t ndim
 Number of dimensions.
 
vec_t q
 Temporary storage 1.
 
vec_t vtmp
 Temporary storage 2.
 
o2scl::prob_dens_gaussian pdg
 Standard normal.
 

Detailed Description

template<class vec_t = boost::numeric::ublas::vector<double>, class mat_t = boost::numeric::ublas::matrix<double>>
class o2scl::prob_dens_mdim_gaussian< vec_t, mat_t >

This class is experimental.

Definition at line 741 of file prob_dens_func.h.


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

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).