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

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

00001 #define __cplusplus__
00002 #ifndef __POSSGENPOTTSMRF__
00003 #define __POSSGENPOTTSMRF__
00004 
00005 #include<iostream>
00006 #include<istream>
00007 #include<fstream>
00008 #include<string>
00009 #include<vector>
00010 #include<sstream>
00011 #include <cmath>
00012 #include <Possibility_MRF.hpp>
00013 
00014 using namespace std;
00015 
00016 
00017 
00028 class Possibility_Generic_Potts : public Possibility_MRF {
00030   vector<double> Beta ; 
00032   vector<double> Alpha;
00033 
00034   vector<double> S_mf;
00035   bool precomputed_smf;
00036 
00037   void Precompute_Smf();
00038 
00039 
00040 public :
00042   Possibility_Generic_Potts();
00044   Possibility_Generic_Potts(vector<uint> const & subk);
00046   Possibility_Generic_Potts(Neighborhood_System *nhs);
00048   Possibility_Generic_Potts(Neighborhood_System *nhs,vector<uint> const & subk);
00050   Possibility_Generic_Potts(Neighborhood_System *nhs,vector<uint> const & subk , 
00051                        vector<double> const &  alph ,vector<double>  const &  bet, vector<uint> const &y);
00053   ~Possibility_Generic_Potts();
00055   void DeleteAll();
00056 
00058   void Get_Alpha(vector<double> & a);
00060   void Get_Beta(vector<double> & b );
00062   void Set_Alpha(vector<double> const & a);
00064   void Set_Beta(vector<double> const & b );
00065 
00066   //  void Set_Zmf( vector<double> z );
00067 
00069   double H(uint i, uint k, vector<uint>  const &  Z);
00071   double Hmf(uint i, uint k);
00072   
00074   void ReadFromFile(string filename);
00076   void WriteToFile(string filename);
00077   
00078   void Read_Params(istream & is);
00079   void Write_Params(ostream & os);
00080 
00082   uint Degrees_Of_Freedom();
00083 
00084   void Info();
00085 
00086 };
00087 
00088 #endif

Generated on Thu Oct 27 17:58:45 2005 for NEM by doxygen1.2.18