00001 #define __cplusplus__
00002 #ifndef __DIAGGAUSSPOTTS__
00003 #define __DIAGGAUSSPOTTS__
00004
00005 #include<iostream>
00006 #include<istream>
00007 #include<fstream>
00008 #include<string>
00009 #include<vector>
00010 #include<sstream>
00011 #include <cmath>
00012
00013 #include <HMRF.hpp>
00014 #include <Spatial_Data.hpp>
00015 #include <Diag_Normal.hpp>
00016
00017 using namespace std;
00018
00019
00028 class Diag_Normal_MRF : public HMRF{
00029
00030 vector<Diag_Normal *> Gaussians;
00031
00033 void cholesky_all();
00034
00035
00036
00037 public :
00038
00039
00041 Diag_Normal_MRF();
00043 Diag_Normal_MRF(Neighborhood_System *nhs );
00045 Diag_Normal_MRF(uint k, uint dim, Neighborhood_System *nhs );
00047 Diag_Normal_MRF(MRF *rf , vector<Diag_Normal *> const & gaussians);
00049 ~Diag_Normal_MRF();
00050
00052 void DeleteAll();
00053
00054
00056 uint Get_D();
00057
00059 void Simulate(Data *dat, uint gibbs_sampler_nbiter);
00060
00062 void Simulate(Data *dat, double grad_tol);
00063
00064 uint Degrees_Of_Freedom();
00066 double Density(vector<double> const & X, uint k);
00067
00068
00070 void Update_Gaussians(Spatial_Data *spatd, vector<double> const & tik);
00071
00072
00074
00076
00077
00079 void NREM_E(Spatial_Data *spatd, vector<double> & tik);
00081 void NREM_M(Spatial_Data *spatd, vector<double> const & tik);
00082
00083 void Info();
00084
00085 };
00086
00087
00088 #endif