Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #if !defined(ALIZE_DistribGF_h)
00056 #define ALIZE_DistribGF_h
00057
00058 #if defined(_WIN32)
00059 #if defined(ALIZE_EXPORTS)
00060 #define ALIZE_API __declspec(dllexport)
00061 #else
00062 #define ALIZE_API __declspec(dllimport)
00063 #endif
00064 #else
00065 #define ALIZE_API
00066 #endif
00067
00068 #include "Distrib.h"
00069 #include "RealVector.h"
00070 #include "DoubleSquareMatrix.h"
00071
00072 namespace alize
00073 {
00074 class Config;
00075
00089
00090
00091 class ALIZE_API DistribGF : public Distrib
00092 {
00093 friend class TestDistribGF;
00094 friend class TestMixtureGF;
00095 friend class TestMixtureGFStat;
00096
00097 public :
00098
00104 DistribGF(const DistribGF& d);
00105
00110 explicit DistribGF(const unsigned long vectSize);
00111
00116 explicit DistribGF(const Config& config);
00117
00125 virtual const Distrib& operator=(const Distrib& d);
00126
00133 const DistribGF& operator=(const DistribGF& d);
00134
00146 virtual bool operator==(const Distrib& d) const;
00147
00148 virtual ~DistribGF();
00149
00152 virtual void reset();
00153
00160 virtual lk_t computeLK(const Feature&) const;
00161 virtual lk_t computeLK(const Feature&, unsigned long idx) const;
00162
00174 void setCov(const real_t value, const unsigned long col, const unsigned long row);
00175
00179 virtual void computeAll();
00180
00190 real_t getCov(const unsigned long col, const unsigned long row) const;
00191
00201 real_t getCovInv(const unsigned long col, const unsigned long row) const;
00202
00206 DoubleSquareMatrix& getCovMatrix();
00207 const DoubleSquareMatrix& getCovMatrix() const;
00208
00212 DoubleSquareMatrix& getCovInvMatrix();
00213 const DoubleSquareMatrix& getCovInvMatrix() const;
00214
00215 virtual String getClassName() const;
00216 virtual String toString() const;
00217
00225 void setCovInv(const K&, real_t value, const unsigned long col,
00226 const unsigned long row);
00227
00234 static DistribGF& create(const K&, const unsigned long vectSize);
00235
00242 static DistribGF& create(const K&, const Config& config);
00243
00248 DistribGF& duplicate(const K&) const;
00249
00250 private :
00251
00252 virtual Distrib& clone() const;
00253
00254 mutable DoubleSquareMatrix _covMatr;
00257 DoubleSquareMatrix _covInvMatr;
00258 real_t _cst;
00259 DoubleVector _tmpVect;
00260
00261 };
00262
00263 }
00264
00265 #endif // !defined(ALIZE_DistribGF_h)
00266