123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- /**
- * @file PDFGaussian.h
- * @brief Normal Distribution / Gaussian PDF
- * @author Erik Rodner
- * @date 01/29/2008
- */
- #ifndef PDFGAUSSIANINCLUDE
- #define PDFGAUSSIANINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include <map>
- #include "PDF.h"
- namespace OBJREC {
- /** Normal Distribution / Gaussian PDF */
- class PDFGaussian : public PDF
- {
- protected:
- double constant;
- double ldet;
- NICE::Matrix covariance;
- NICE::Matrix covCholesky;
- NICE::Vector mean;
- /** empty constructor */
- PDFGaussian ( int dimension );
- static const double logdetEPS = 0.0;
- static const double regEPS = 1e-7;
- static NICE::Matrix RobustInverse ( const NICE::Matrix & M, double & logdet );
- public:
-
- /** simple constructor */
- PDFGaussian ( const NICE::Matrix & covariance, const NICE::Vector & mean );
- /** simple destructor */
- virtual ~PDFGaussian();
-
- double getNLogDensity ( const NICE::Vector & x ) const;
- int getDimension () const;
- /**
- * get Mean of PDF
- * @return mean vector
- */
- NICE::Vector getMean();
-
- /**
- * get Covariance of PDF
- * @return covariance matrix
- */
- NICE::Matrix getCovariance();
-
- /**
- * get multivariate samples
- * @param samples vector of NICE::Vector
- * @param count number of samples
- */
- void sample ( NICE::VVector & samples, int count ) const;
- };
- } // namespace
- #endif
|