|
DMP_BBO library
|
A class for representing a Gaussian distribution. More...
#include <DistributionGaussian.hpp>
Public Member Functions | |
| DistributionGaussian (const Eigen::VectorXd &mean, const Eigen::MatrixXd &covar) | |
| Construct the Gaussian distribution with a mean and covariance matrix. More... | |
| void | generateSamples (int n_samples, Eigen::MatrixXd &samples) const |
| Generate samples from the distribution. More... | |
| double | maxEigenValue (void) const |
| Get the largest eigenvalue of the covariance matrix of this distribution. More... | |
| DistributionGaussian * | clone (void) const |
| Make a deep copy of the object. More... | |
| const Eigen::VectorXd & | mean (void) const |
| Accessor get function for the mean. More... | |
| const Eigen::MatrixXd & | covar (void) const |
| Accessor get function for the covariance matrix. More... | |
| void | set_mean (const Eigen::VectorXd &mean) |
| Accessor set function for the mean. More... | |
| void | set_covar (const Eigen::MatrixXd &covar) |
| Accessor set function for the covar. More... | |
Friends | |
| class | boost::serialization::access |
| Give boost serialization access to private members. More... | |
| std::ostream & | operator<< (std::ostream &output, const DistributionGaussian &distribution) |
| Print to output stream. More... | |
A class for representing a Gaussian distribution.
This is mainly a wrapper around boost functionality The reason to make the wrapper is to provide functionality for serialization/deserialization.
Definition at line 44 of file DistributionGaussian.hpp.
| DistributionGaussian | ( | const Eigen::VectorXd & | mean, |
| const Eigen::MatrixXd & | covar | ||
| ) |
Construct the Gaussian distribution with a mean and covariance matrix.
| [in] | mean | Mean of the distribution |
| [in] | covar | Covariance matrix of the distribution |
Definition at line 55 of file DistributionGaussian.cpp.
| void generateSamples | ( | int | n_samples, |
| Eigen::MatrixXd & | samples | ||
| ) | const |
Generate samples from the distribution.
| [in] | n_samples | Number of samples to sample |
| [in] | samples | the samples themselves (size n_samples X dim(mean) |
Definition at line 97 of file DistributionGaussian.cpp.
| double maxEigenValue | ( | void | ) | const |
Get the largest eigenvalue of the covariance matrix of this distribution.
Definition at line 72 of file DistributionGaussian.cpp.
| DistributionGaussian * clone | ( | void | ) | const |
Make a deep copy of the object.
Definition at line 61 of file DistributionGaussian.cpp.
|
inline |
Accessor get function for the mean.
Definition at line 73 of file DistributionGaussian.hpp.
|
inline |
Accessor get function for the covariance matrix.
Definition at line 79 of file DistributionGaussian.hpp.

| void set_mean | ( | const Eigen::VectorXd & | mean | ) |
Accessor set function for the mean.
| [in] | mean | The new mean of the distribution |
Definition at line 66 of file DistributionGaussian.cpp.
| void set_covar | ( | const Eigen::MatrixXd & | covar | ) |
Accessor set function for the covar.
| [in] | covar | The new covariance matrix of the distribution |
Definition at line 89 of file DistributionGaussian.cpp.
|
friend |
Give boost serialization access to private members.
Definition at line 119 of file DistributionGaussian.hpp.
|
friend |
Print to output stream.
| [in] | output | Output stream to which to write to |
| [in] | distribution | Distribution to write |
Definition at line 126 of file DistributionGaussian.cpp.
1.8.11