pf
|
A class that performs sampling from a multivariate normal distribution. More...
#include <rv_samp.h>
Public Types | |
using | Vec = Eigen::Matrix< float_t, dim, 1 > |
using | Mat = Eigen::Matrix< float_t, dim, dim > |
Public Member Functions | |
MVNSampler () | |
Default-constructor sets up for multivariate standard Normal random variate generation. More... | |
MVNSampler (const Vec &meanVec, const Mat &covMat) | |
The user must supply both mean and covariance matrix. More... | |
void | setCovar (const Mat &covMat) |
sets the covariance matrix of the sampler. More... | |
void | setMean (const Vec &meanVec) |
sets the mean vector of the sampler. More... | |
auto | sample () -> Vec |
Draws a random vector. More... | |
![]() | |
rvsamp_base () | |
The default constructor. This is the only option available. Sets the seed with the clock. | |
Private Attributes | |
std::normal_distribution< float_t > | m_z_gen |
makes normal random variates | |
Mat | m_scale_mat |
covariance matrix | |
Vec | m_mean |
mean vector | |
Additional Inherited Members | |
![]() | |
std::mt19937 | m_rng |
prng | |
A class that performs sampling from a multivariate normal distribution.
using pf::rvsamp::MVNSampler< dim, float_t >::Mat = Eigen::Matrix<float_t,dim,dim> |
type alias for linear algebra stuff
using pf::rvsamp::MVNSampler< dim, float_t >::Vec = Eigen::Matrix<float_t,dim,1> |
type alias for linear algebra stuff
pf::rvsamp::MVNSampler< dim, float_t >::MVNSampler |
Default-constructor sets up for multivariate standard Normal random variate generation.
pf::rvsamp::MVNSampler< dim, float_t >::MVNSampler | ( | const Vec & | meanVec, |
const Mat & | covMat | ||
) |
The user must supply both mean and covariance matrix.
meanVec | a Vec for the mean vector of the sampling distribution. |
covMat | a Mat representing the covariance matrix of the samples. |
auto pf::rvsamp::MVNSampler< dim, float_t >::sample |
Draws a random vector.
void pf::rvsamp::MVNSampler< dim, float_t >::setCovar | ( | const Mat & | covMat | ) |
sets the covariance matrix of the sampler.
covMat | the desired covariance matrix. |
void pf::rvsamp::MVNSampler< dim, float_t >::setMean | ( | const Vec & | meanVec | ) |
sets the mean vector of the sampler.
meanVec | the desired mean vector. |