SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2013 Heiko Strathmann 00008 */ 00009 #ifdef HAVE_EIGEN3 00010 00011 #ifndef GAUSSIANDISTRIBUTION_H 00012 #define GAUSSIANDISTRIBUTION_H 00013 00014 #include <shogun/distributions/classical/ProbabilityDistribution.h> 00015 #include <shogun/lib/SGVector.h> 00016 00017 namespace shogun 00018 { 00019 00020 00034 class CGaussianDistribution: public CProbabilityDistribution 00035 { 00036 public: 00038 CGaussianDistribution(); 00039 00049 CGaussianDistribution(SGVector<float64_t> mean, SGMatrix<float64_t> cov, 00050 bool cov_is_factor=false); 00051 00053 virtual ~CGaussianDistribution(); 00054 00063 virtual SGMatrix<float64_t> sample(int32_t num_samples, 00064 SGMatrix<float64_t> pre_samples=SGMatrix<float64_t>()) const; 00065 00082 virtual SGVector<float64_t> log_pdf_multiple(SGMatrix<float64_t> samples) const; 00083 00085 virtual const char* get_name() const 00086 { 00087 return "GaussianDistribution"; 00088 } 00089 00090 private: 00091 00093 void init(); 00094 00095 protected: 00097 SGVector<float64_t> m_mean; 00098 00101 SGMatrix<float64_t> m_L; 00102 }; 00103 00104 } 00105 00106 #endif // GAUSSIANDISTRIBUTION_H 00107 #endif // HAVE_EIGEN3