Generated on Tue Dec 16 13:34:01 2008 for ell-3.0.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     
00038     virtual S_LP* clone(State* toFill = NULL) const = 0;
00039     
00042     virtual State* fromString(const std::string& stringRep) const = 0;      
00043     
00044     /*
00045      * Functions using only latProt:
00046      */
00047     virtual double getEnergy() const;
00048     virtual std::string toString() const;
00049     
00055     virtual std::string& toString( std::string & toFill ) const;
00056     
00057     
00058     // standard implementation: relay to LatticeProtein operators
00059     virtual bool operator== (const State& state2) const;
00060     virtual bool operator!= (const State& state2) const;
00061     
00072     virtual bool operator< (const State& lp2) const;
00073 
00074     virtual NeighborListPtr getNeighborList() const;
00075     virtual NeighborListPtr getRandomNeighborList() const;
00076     
00077     virtual State* getRandomNeighbor(State* inPlaceNeigh = NULL) const;
00078     
00080     
00083     virtual size_t getNeighborNumber(void) const;
00084     
00091     virtual State* getNeighbor(const size_t index, State* neigh) const;
00092     
00101     virtual State* undoNeighborChange(const size_t index, State* const neigh) const;
00102     
00112     virtual State* applyNeighborChange(const size_t index, State* const neigh) const;
00113     
00115     
00119     virtual CSequence compress(void) const = 0;
00120     
00126     virtual CSequence& compress(CSequence& toFill) const = 0;
00127     
00136     virtual State* uncompress(const CSequence& cseq, State* toFill = NULL) const = 0;
00137     
00143     virtual State* uncompress(const CSequence& cseq) = 0;
00144 };
00145 
00146 } // namespace ell
00147 
00148 #endif /*LATTICEPROTEINMOVESTATE_HH_*/