#include <EigenMultiVariateNormal.hpp>
Public Member Functions | |
EigenMultivariateNormal (const Eigen::Matrix< _Scalar, _size, 1 > &meanVec, const Eigen::Matrix< _Scalar, _size, _size > &covarMat) | |
void | nextSample (Eigen::Matrix< _Scalar, _size, 1 > &sampleVec) |
void | setCovar (const Eigen::Matrix< _Scalar, _size, _size > &covarMat) |
void | setMean (const Eigen::Matrix< _Scalar, _size, 1 > &meanVec) |
Private Attributes | |
Eigen::Matrix< _Scalar, _size, 1 > | mean |
boost::normal_distribution < _Scalar > | norm |
boost::variate_generator < boost::mt19937 &, boost::normal_distribution < _Scalar > > | randN |
boost::mt19937 | rng |
Eigen::Matrix< _Scalar, _size, _size > | rot |
Eigen::Matrix< _Scalar, _size, 1 > | scl |
We find the eigen-decomposition of the covariance matrix. We create a vector of normal samples scaled by the eigenvalues. We rotate the vector by the eigenvectors. We add the mean.
Definition at line 21 of file EigenMultiVariateNormal.hpp.
EigenMultivariateNormal< _Scalar, _size >::EigenMultivariateNormal | ( | const Eigen::Matrix< _Scalar, _size, 1 > & | meanVec, |
const Eigen::Matrix< _Scalar, _size, _size > & | covarMat | ||
) | [inline] |
Definition at line 34 of file EigenMultiVariateNormal.hpp.
void EigenMultivariateNormal< _Scalar, _size >::nextSample | ( | Eigen::Matrix< _Scalar, _size, 1 > & | sampleVec | ) | [inline] |
Definition at line 58 of file EigenMultiVariateNormal.hpp.
void EigenMultivariateNormal< _Scalar, _size >::setCovar | ( | const Eigen::Matrix< _Scalar, _size, _size > & | covarMat | ) | [inline] |
Definition at line 42 of file EigenMultiVariateNormal.hpp.
void EigenMultivariateNormal< _Scalar, _size >::setMean | ( | const Eigen::Matrix< _Scalar, _size, 1 > & | meanVec | ) | [inline] |
Definition at line 53 of file EigenMultiVariateNormal.hpp.
Eigen::Matrix<_Scalar,_size,1> EigenMultivariateNormal< _Scalar, _size >::mean [private] |
Definition at line 31 of file EigenMultiVariateNormal.hpp.
boost::normal_distribution<_Scalar> EigenMultivariateNormal< _Scalar, _size >::norm [private] |
Definition at line 24 of file EigenMultiVariateNormal.hpp.
boost::variate_generator<boost::mt19937&,boost::normal_distribution<_Scalar> > EigenMultivariateNormal< _Scalar, _size >::randN [private] |
Definition at line 26 of file EigenMultiVariateNormal.hpp.
boost::mt19937 EigenMultivariateNormal< _Scalar, _size >::rng [private] |
Definition at line 23 of file EigenMultiVariateNormal.hpp.
Eigen::Matrix<_Scalar,_size,_size> EigenMultivariateNormal< _Scalar, _size >::rot [private] |
Definition at line 28 of file EigenMultiVariateNormal.hpp.
Eigen::Matrix<_Scalar,_size,1> EigenMultivariateNormal< _Scalar, _size >::scl [private] |
Definition at line 29 of file EigenMultiVariateNormal.hpp.