C++ main module for mmsd Package  1.0
MMSD_GaussianLaw.h
Go to the documentation of this file.
1 #ifndef MMSD_GaussianLaw_H
2 #define MMSD_GaussianLaw_H
3 
4 
5 #include "MMSD_Law.h"
6 #include "MMSD_IntegerVector.h"
7 #include "MMSD_DoubleVector.h"
10 #include "MMSD_IntegerFullMatrix.h"
11 #include "MMSD_DataSet.h"
12 
13 
21 class MMSD_GaussianLaw : public virtual MMSD_Law {
22  SP_OBJECT(MMSD_GaussianLaw);
23  // ATTRIBUTES
24 public:
25 
26 private:
27 
28 
29 
30  // work vector
31  MMSD_DoubleVector mWork;
32 
33 
34 
35 
36 
37 
38 protected:
39  // METHODS
40 
41  // CONSTRUCTORS
42 
44  MMSD_GaussianLaw(void);
45 
46 
47 
48  // DESTRUCTORS
49 
50 
53  virtual ~MMSD_GaussianLaw(void);
54 
55 
56 
57 public:
58  //----------------
59  // NEW constructors
60  // ---------------
61 
62 
63 
64  // -----------------
65  // SET & GET Methods
66  // -----------------
67 
68 
69 
73  return mWork;
74  }
75 
76 protected:
77 
78 
79 public:
80 
81 
82  // -----------------------------
83  // Parameters estimation methods
84  // ------------------------------
85 
86 
87 protected:
88 
103  virtual void updateMean(const MMSD_DoubleFullMatrix& P,
104  const MMSD_DoubleFullMatrix& YP,
105  const MMSD_DoubleFullMatrix& W,
106  const MMSD_DoubleVector& probs,
107  MMSD_DoubleVector& mean) ;
108 
109 
110 
129  const MMSD_DoubleFullMatrix& YP, //NxP
130  const MMSD_DoubleVector& mean, // P
131  const MMSD_DoubleFullMatrix& W, // NxP
132  const MMSD_DoubleVector& probs, // N
133  MMSD_DoubleVector& D){
134  updateCovarianceDecompositionDiagonal(P,YP,mean,W,probs,getMinEigenValue(),mWork,D);
135  }
136 
137 private:
138 
158  const MMSD_DoubleFullMatrix& YP, //NxP
159  const MMSD_DoubleVector& mean, // P
160  const MMSD_DoubleFullMatrix& W, // NxP
161  const MMSD_DoubleVector& probs, // N
162  const double& minValue,
163  MMSD_DoubleVector& work,
164  MMSD_DoubleVector& D);
165 
166  // ----------------------
167  // String representation
168  // ----------------------
169 public:
172  virtual tString toString() const {
174  return ret;
175  }
176 
177 };
178 
179 #endif
MMSD_DoubleVector & getWork()
get work vector
Definition: MMSD_GaussianLaw.h:72
virtual void updateMean(const MMSD_DoubleFullMatrix &P, const MMSD_DoubleFullMatrix &YP, const MMSD_DoubleFullMatrix &W, const MMSD_DoubleVector &probs, MMSD_DoubleVector &mean)
update the mean parameters
Definition: MMSD_GaussianLaw.cpp:18
This class describes the FullMatrix class.
Definition: MMSD_DoubleFullMatrix.h:17
virtual tString toString() const
turn the class into string
Definition: MMSD_GaussianLaw.h:172
This class is a Gaussian Law inherits from MMSD_Law.
Definition: MMSD_GaussianLaw.h:21
Definition: MMSD_DoubleVector.h:16
double getMinEigenValue() const
get the min eigen value available
Definition: MMSD_Law.h:114
DEFINE_SPTR(MMSD_GaussianLaw)
virtual ~MMSD_GaussianLaw(void)
destroy an object.
Definition: MMSD_GaussianLaw.cpp:14
#define tString
Definition: types.h:49
virtual void updateCovarianceDecompositionDiagonal(const MMSD_DoubleFullMatrix &P, const MMSD_DoubleFullMatrix &YP, const MMSD_DoubleVector &mean, const MMSD_DoubleFullMatrix &W, const MMSD_DoubleVector &probs, MMSD_DoubleVector &D)
pdate the decomposition diagonal of the covariance parameters
Definition: MMSD_GaussianLaw.h:128
This class is a geneal MMSD Law.
Definition: MMSD_Law.h:33
MMSD_GaussianLaw(void)
create an object
Definition: MMSD_GaussianLaw.cpp:8
virtual tString toString() const
turn the class into string
Definition: MMSD_Law.h:250