EigenRand  0.5.0
 
Loading...
Searching...
No Matches
Eigen::Rand::MvNormalGen< _Scalar, Dim > Class Template Reference

Generator of real vectors on a multivariate normal distribution. More...

#include <MvNormal.h>

Inheritance diagram for Eigen::Rand::MvNormalGen< _Scalar, Dim >:
Collaboration diagram for Eigen::Rand::MvNormalGen< _Scalar, Dim >:

Public Member Functions

template<typename MeanTy , typename LTTy >
 MvNormalGen (const MatrixBase< MeanTy > &_mean, const MatrixBase< LTTy > &_lt, detail::LowerTriangular)
 Construct a new multivariate normal generator from lower triangular matrix of decomposed covariance. More...
 
template<typename MeanTy , typename CovTy >
 MvNormalGen (const MatrixBase< MeanTy > &_mean, const MatrixBase< CovTy > &_cov, detail::FullMatrix={})
 Construct a new multivariate normal generator from covariance matrix. More...
 
 MvNormalGen (const MvNormalGen &)=default
 
 MvNormalGen (MvNormalGen &&)=default
 
MvNormalGenoperator= (const MvNormalGen &)=default
 
MvNormalGenoperator= (MvNormalGen &&)=default
 
Index dims () const
 
template<typename Urng >
auto generate (Urng &&urng, Index samples) -> decltype((lt *stdnorm.template generate< Matrix< _Scalar, Dim, -1 > >(mean.rows(), samples, std::forward< Urng >(urng))).colwise()+mean)
 
template<typename Urng >
auto generate (Urng &&urng) -> decltype((lt *stdnorm.template generate< Matrix< _Scalar, Dim, 1 > >(mean.rows(), 1, std::forward< Urng >(urng))).colwise()+mean)
 
- Public Member Functions inherited from Eigen::Rand::MvVecGenBase< DerivedGen, _Scalar, Dim >
Index dims () const
 returns the dimensions of vectors to be generated
 
template<typename Urng >
Matrix< _Scalar, Dim, -1 > generate (Urng &&urng, Index samples)
 generates multiple samples at once More...
 
template<typename Urng >
Matrix< _Scalar, Dim, 1 > generate (Urng &&urng)
 generates one sample More...
 

Detailed Description

template<typename _Scalar, Index Dim = -1>
class Eigen::Rand::MvNormalGen< _Scalar, Dim >

Generator of real vectors on a multivariate normal distribution.

Template Parameters
_ScalarNumeric type
Dimnumber of dimensions, or Eigen::Dynamic

Constructor & Destructor Documentation

◆ MvNormalGen() [1/2]

template<typename _Scalar , Index Dim = -1>
template<typename MeanTy , typename LTTy >
Eigen::Rand::MvNormalGen< _Scalar, Dim >::MvNormalGen ( const MatrixBase< MeanTy > &  _mean,
const MatrixBase< LTTy > &  _lt,
detail::LowerTriangular   
)
inline

Construct a new multivariate normal generator from lower triangular matrix of decomposed covariance.

Template Parameters
MeanTy
LTTy
Parameters
_meanmean vector of the distribution
_ltlower triangular matrix of decomposed covariance

◆ MvNormalGen() [2/2]

template<typename _Scalar , Index Dim = -1>
template<typename MeanTy , typename CovTy >
Eigen::Rand::MvNormalGen< _Scalar, Dim >::MvNormalGen ( const MatrixBase< MeanTy > &  _mean,
const MatrixBase< CovTy > &  _cov,
detail::FullMatrix  = {} 
)
inline

Construct a new multivariate normal generator from covariance matrix.

Template Parameters
MeanTy
CovTy
Parameters
_meanmean vector of the distribution
_covcovariance matrix (should be positive semi-definite)

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