Generated on Mon Jun 23 17:17:53 2008 for ell-2.3.0 by doxygen 1.5.1

src/ell/State.hh

Go to the documentation of this file.
00001 #ifndef STATE_H_
00002 #define STATE_H_
00003 
00004 
00005 #include <string>
00006 #include <biu/VirtualList.hh>
00007 #include <biu/Alphabet.hh>
00008 
00020 namespace ell
00021 {
00022     
00025     typedef biu::Alphabet::CSequence CSequence; 
00036     class State
00037     {
00038     public:
00039         // TYPEDEFs
00040     
00043         typedef biu::VirtualList<State> NeighborList;
00044         
00046         typedef std::auto_ptr<NeighborList> NeighborListPtr;
00047 
00048         State()
00049         {}
00050         
00051         virtual ~State()
00052         {}
00053         
00054         virtual bool            operator== (const State& state2) const = 0;
00055         virtual bool            operator!= (const State& state2) const = 0;
00056 
00058         virtual int         getFitness() const = 0;
00059         
00061         virtual double      getEnergy() const = 0;
00062         
00067         virtual unsigned int    getMinimalDistance(const State& state2) const = 0;
00068         
00070         virtual State*          clone() const = 0;
00071         
00074         virtual State* fromString(const std::string& stringRep) const = 0;
00075         
00079         virtual std::string toString() const = 0;
00080 
00081         // neighborhood
00085         virtual NeighborListPtr getNeighborList() const = 0;
00086 
00091         virtual NeighborListPtr getRandomNeighborList() const = 0;
00092 
00096         virtual State* getRandomNeighbor(State* inPlaceNeigh = NULL) const = 0;
00097         
00099         
00103         virtual CSequence compress(void) const = 0;
00104         
00110         virtual CSequence& compress(CSequence& toFill) const = 0;
00111         
00120         virtual State* uncompress(const CSequence& cseq, State* toFill ) const = 0;
00121         
00127         virtual State* uncompress(const CSequence& cseq) = 0;
00128         
00129     };
00130 
00131 }
00132 
00133 #endif /*STATE_H_*/