21 #include "../wrappers/rng/rng.h" 31 : Pdf<ColumnVector> ( m.rows() )
32 , _diff(DimensionGet())
33 , _tempColumn(DimensionGet())
34 , _samples(DimensionGet())
35 , _sampleValue(DimensionGet())
36 , _Low_triangle(DimensionGet(),DimensionGet())
39 assert (m.rows() == s.columns());
43 _Sigma_changed =
true;
47 :
Pdf<ColumnVector>(dimension)
51 , _sampleValue(dimension)
54 _Mu.resize(dimension);
100 list_samples.resize(num_samples);
101 vector<Sample<ColumnVector> >::iterator rit = list_samples.begin();
108 while (rit != list_samples.end())
void ExpectedValueSet(const MatrixWrapper::ColumnVector &mu)
Set the Expected Value.
Class PDF: Virtual Base class representing Probability Density Functions.
virtual Probability ProbabilityGet(const MatrixWrapper::ColumnVector &input) const
Get the probability of a certain argument.
friend std::ostream & operator<<(std::ostream &os, const Gaussian &g)
output stream for Gaussian
MatrixWrapper::ColumnVector _Mu
double rnorm(const double &mu, const double &sigma)
Class representing Gaussian (or normal density)
MatrixWrapper::SymmetricMatrix _Sigma
void ValueSet(const T &value)
Set the value of the Sample.
MatrixWrapper::SymmetricMatrix _Sigma_inverse
virtual MatrixWrapper::SymmetricMatrix CovarianceGet() const
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.
bool SampleFrom(vector< Sample< MatrixWrapper::ColumnVector > > &list_samples, const int num_samples, int method=DEFAULT, void *args=NULL) const
virtual ~Gaussian()
Default Copy Constructor will do.
Gaussian(const MatrixWrapper::ColumnVector &Mu, const MatrixWrapper::SymmetricMatrix &Sigma)
Constructor.
unsigned int DimensionGet() const
Get the dimension of the argument.
virtual Gaussian * Clone() const
Clone function.
void CovarianceSet(const MatrixWrapper::SymmetricMatrix &cov)
Set the Covariance Matrix.
ColumnVector _sampleValue
Class representing a probability (a double between 0 and 1)
virtual void DimensionSet(unsigned int dim)
Set the dimension of the argument.
virtual MatrixWrapper::ColumnVector ExpectedValueGet() const
Get the expected value E[x] of the pdf.