src/biu/LatticeModel.hh
Go to the documentation of this file.00001 #ifndef LATTICEMODEL_H_ 00002 #define LATTICEMODEL_H_ 00003 00004 00005 #include "Point.hh" 00006 #include "BioMolecule.hh" 00007 #include "LatticeDescriptor.hh" 00008 #include <set> 00009 00010 namespace biu 00011 { 00012 00013 00021 class LatticeModel 00022 { 00023 protected: 00025 LatticeDescriptor const* const latDescriptor; 00026 00028 const LatticeNeighborhood & latNeighborhood; 00029 00030 public: 00034 LatticeModel(const LatticeDescriptor* const _latDescriptor); 00035 00036 LatticeModel(const LatticeModel& toCopy); 00037 virtual ~LatticeModel(); 00038 00040 LatticeDescriptor const* const getDescriptor() const { 00041 return latDescriptor; 00042 } 00043 00045 const LatticeNeighborhood & getNeighborhood() const { 00046 return latNeighborhood; 00047 } 00048 00049 00050 bool operator == (const LatticeModel& lm2) const; 00051 bool operator != (const LatticeModel& lm2) const; 00052 00053 00055 // conversion of move sequences 00057 00060 MoveSequence relMovesToAbsMoves( const MoveSequence &relMoves ) const; 00061 00064 MoveSequence absMovesToRelMoves( const MoveSequence &absMoves ) const; 00065 00067 // conversion moves <=> coordinates 00069 00073 virtual Move getAbsMove( const IntPoint& lastPoint, 00074 const IntPoint& actPoint ) const; 00075 00079 virtual MoveSequence pointsToAbsMoves( const IPointVec& points ) const; 00080 00083 virtual MoveSequence parseMoveString( const std::string& moveStr) const; 00084 00088 virtual MoveSequence pointsToRelMoves( const IPointVec& points) const; 00089 00091 virtual IntPoint applyAbsMove( const IntPoint& actPoint, 00092 const Move& absMove ) const; 00093 00095 virtual IPointVec absMovesToPoints( const MoveSequence& absMoves) const; 00096 00098 virtual IPointVec relMovesToPoints( const MoveSequence& relMoves) const; 00099 00102 virtual IPointVec& relMovesToPoints( const MoveSequence& relMoves, 00103 IPointVec& toFill) const; 00104 00106 virtual std::string getString( const MoveSequence& moveSeq ) const; 00107 00109 // nachbarschaft im gitter 00111 00114 virtual IPointSet getAllNeighPoints( const IntPoint& center ) const; 00115 00122 virtual bool areNeighbored( const IntPoint &first, 00123 const IntPoint &second ) const; 00124 00125 00126 }; 00127 00128 } // namespace biu 00129 00130 00131 #include "LatticeModel.icc" 00132 00133 #endif /*LATTICEMODEL_H_*/