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

src/ell/protein/S_LP.hh

Go to the documentation of this file.
00001 #ifndef LATTICEPROTEINMOVESTATE_HH_
00002 #define LATTICEPROTEINMOVESTATE_HH_
00003 
00004 #include "ell/State.hh"
00005 #include <ell/IterableNeighbors.hh>
00006 #include <biu/LatticeProtein_I.hh>
00007 #include <biu/LatticeMoveSet.hh>
00008 
00009 namespace ell
00010 {
00011 
00012 class S_LP : public State, public IterableNeighbors 
00013 {
00014 protected:
00015 
00016     biu::LatticeProtein_I* latProt;
00017     biu::LatticeMoveSet* moveSet;
00018     
00019 public:
00020     
00022     typedef size_t Move;
00023     
00027     S_LP(biu::LatticeProtein_I* latProt, biu::LatticeMoveSet* moveSet);
00028     S_LP(const S_LP& state);
00029     virtual ~S_LP();
00030     
00031     virtual State* clone() const = 0;
00032     
00035     virtual State* fromString(const std::string& stringRep) const = 0;      
00036     
00037     /*
00038      * Functions using only latProt:
00039      */
00040     virtual double getEnergy() const;
00041     virtual int getFitness() const;
00042     virtual std::string toString() const;
00043     
00044     // standard implementation: relay to LatticeProtein operators
00045     virtual bool operator== (const State& state2) const;
00046     virtual bool operator!= (const State& state2) const;
00047     
00048     virtual NeighborListPtr getNeighborList() const;
00049     virtual NeighborListPtr getRandomNeighborList() const;
00050     
00051     virtual State* getRandomNeighbor(State* inPlaceNeigh = NULL) const;
00052     
00054     
00057     virtual size_t getNeighborNumber(void) const;
00058     
00065     virtual State* getNeighbor(const size_t index, State* neigh) const;
00066     
00075     virtual State* undoNeighborChange(const size_t index, State* const neigh) const;
00076     
00086     virtual State* applyNeighborChange(const size_t index, State* const neigh) const;
00087     
00089     
00093     virtual CSequence compress(void) const = 0;
00094     
00100     virtual CSequence& compress(CSequence& toFill) const = 0;
00101     
00110     virtual State* uncompress(const CSequence& cseq, State* toFill = NULL) const = 0;
00111     
00117     virtual State* uncompress(const CSequence& cseq) = 0;
00118 };
00119 
00120 } // namespace ell
00121 
00122 #endif /*LATTICEPROTEINMOVESTATE_HH_*/