Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/home/mistis/jblanche/DEV/NEM/include/Normal_Mix.hpp

00001 #define __cplusplus__
00002 #ifndef __GAUSSMIX__
00003 #define __GAUSSMIX__
00004 
00005 #include<iostream>
00006 #include<istream>
00007 #include<fstream>
00008 #include<string>
00009 #include<vector>
00010 #include<sstream>
00011 #include <cmath>
00012 
00013 using namespace std;
00014 
00015 #include <Normal.hpp>
00016 #include <IID_Mixture.hpp>
00017 
00028 class Normal_Mix : public IID_Mixture{
00029 
00030   vector<Normal *> Gaussians;
00031 
00033   void cholesky_all();
00034   
00035 public :
00036   
00038   Normal_Mix();
00039 
00041   Normal_Mix(uint k, uint dim);
00042 
00044   Normal_Mix(uint k, vector<Normal *> const &  gauss);
00045 
00047   ~Normal_Mix();
00048 
00050   void DeleteAll();
00051 
00052     
00054   uint Get_D();
00055 
00056   uint Degrees_Of_Freedom();
00057 
00058   void Init(Spatial_Data *spatd);
00059   void Init_Mclachlan(Spatial_Data *spatd);
00060 
00062   void Simulate(uint N, Data *dat);
00063 
00065   double Density(vector<double> const &  X, uint k);
00066 
00067   
00069   void Update_Gaussians(Spatial_Data *spatd, vector<double>  const &  tik);
00070 
00071   // I/O Functions
00073   void ReadFromFile(string filename); 
00075   void WriteToFile(string filename); 
00076 
00078   void Info();
00079 
00081   void EM_E(Spatial_Data *spatd, vector<double> & tik);
00083   void EM_M(Spatial_Data *spatd, vector<double>  const &  tik);
00084   
00085   
00087   void NEM_E(Spatial_Data *spatd, vector<double> const &  beta, vector<double> & tik);
00089   void NEM_M(Spatial_Data *spatd, vector<double>  const &  tik);
00090 
00091 };
00092 
00093 
00094 #endif

Generated on Tue Nov 8 14:55:45 2005 for NEM by doxygen1.2.18