Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Normal.hpp

00001 #define __cplusplus__
00002 #ifndef __NORMAL__
00003 #define __NORMAL__
00004 
00005 #include<iostream>
00006 #include<istream>
00007 #include<fstream>
00008 #include<string>
00009 #include<vector>
00010 #include<sstream>
00011 #include <cmath>
00012 
00013 
00014 #include <Spatial_Data.hpp>
00015 #include <Distribution.hpp>
00016 
00017 using namespace std;
00018 
00019 
00027 class Normal:public Distribution{
00028   
00030   vector<double> Mu; 
00032   vector<double> Sigma;
00033 
00034 
00036   vector<double> Sigma_inv_sqrt;
00038   double Sigma_sqrt_det;
00039 
00040 
00041 
00042 public :
00044   Normal();
00046   Normal(uint dim);
00048   Normal(uint dim, vector<double> const &  mu, vector<double> const &  sigma);
00049 
00051   ~Normal();
00052 
00054   void DeleteAll();
00055   
00057         void Get_Mu(vector<double> &mu);        
00059         void Get_Sigma(vector<double> &sigma);
00060         
00062   void precompute_cholesky();
00063 
00065   void Simulate(vector<double> & X);
00066 
00068   double LogDensity(vector<double> const &  X);
00069 
00071   void Set_Mu(vector<double> const &  m);
00073   void Set_Sigma(vector<double>  const & sig);
00074 
00076   void Estimate_Mu(Spatial_Data *spatd, vector<double>  const &  freqs);
00078   void Estimate_Sigma(Spatial_Data *spatd, vector<double>  const &  freqs);
00079 
00081   void Estimate(Spatial_Data *spatd, vector<double>  const &  freqs);
00082 
00084   void Estimate(Spatial_Data *spatd);
00085   
00087   void Read_Params(istream & is);
00089   void Write_Params(ostream & os);
00090 
00092   uint Degrees_Of_Freedom();
00093 
00095         void Info();
00096 };
00097 
00098 
00099 #endif

Generated on Thu Jan 12 11:54:58 2006 for NEM by  doxygen 1.4.4