Represents a Multivariate Normal Distribution. It provides functionalities like getting its PDF or generating random vectors from this distribution.
More...
#include <mvn.h>
|
| Mvn (const Eigen::VectorXd &mu, const Eigen::MatrixXd &s) |
| Default constructor. More...
|
|
| ~Mvn () |
|
double | pdf (const Eigen::VectorXd &x) const |
| The Probability Density Function of the Mualtivariate Normal Distribution. More...
|
|
Eigen::VectorXd | sample (unsigned int nr_iterations=20) const |
| Generates a random vector based ont Mutlivariate distribution. More...
|
|
|
Eigen::VectorXd | mean |
| The vector for the mean for this class. Is public and you can change it, with your responsibility. More...
|
|
Eigen::MatrixXd | sigma |
| The convariance matrix for this class. Is public and you can change it, with your responsibility. More...
|
|
Represents a Multivariate Normal Distribution. It provides functionalities like getting its PDF or generating random vectors from this distribution.
arl::math::Mvn::Mvn |
( |
const Eigen::VectorXd & |
mu, |
|
|
const Eigen::MatrixXd & |
s |
|
) |
| |
Default constructor.
- Parameters
-
mu | The vector for the mean value |
s | The convariance matrix. This should be a symmetric semi-positive matrix. |
double arl::math::Mvn::pdf |
( |
const Eigen::VectorXd & |
x | ) |
const |
The Probability Density Function of the Mualtivariate Normal Distribution.
Which is
- Parameters
-
x | The value the random variable |
Eigen::VectorXd arl::math::Mvn::sample |
( |
unsigned int |
nr_iterations = 20 | ) |
const |
Generates a random vector based ont Mutlivariate distribution.
- Parameters
-
nr_iterations | The number of iterations for producing random numbers from the univariate distribution. The larger the number the more accurate the approximation of the distribution, but this reduces computational performance, of course. Defaults to 20. |
Eigen::VectorXd arl::math::Mvn::mean |
The vector for the mean for this class. Is public and you can change it, with your responsibility.
Eigen::MatrixXd arl::math::Mvn::sigma |
The convariance matrix for this class. Is public and you can change it, with your responsibility.