Generated on Mon Jun 23 16:24:56 2008 for BIU-1.7.0 by doxygen 1.5.1

src/biu/LatticeFrame.hh

Go to the documentation of this file.
00001 #ifndef LATTICEFRAME_HH_
00002 #define LATTICEFRAME_HH_
00003 
00004 
00005 #include "LatticeModel.hh"
00006 
00007 namespace biu
00008 {
00009     
00010 
00020     class LatticeFrame : public LatticeModel
00021     {
00022     private:
00023         unsigned int    frameSize;      
00024         unsigned int    frameSizeP2;    
00025     public:
00026     
00027         typedef int index_type;         
00028         
00033         LatticeFrame(   const LatticeDescriptor* const _latDescriptor, 
00034                         const unsigned int frameSize);
00035                         
00036         LatticeFrame(const LatticeFrame& toCopy);
00037         virtual ~LatticeFrame();
00038 
00040         unsigned int getFrameSize() const { return frameSize; }
00041         
00046         void setFrameSize(const unsigned int frameSize_);
00047         
00049         IntPoint getCenter() const  { 
00050             unsigned int cen = frameSize/2 ; 
00051             return IntPoint(cen, cen, cen); 
00052         }
00053         
00055         index_type getMaxIndex() const { 
00056             return getIndex(IntPoint(frameSize-1,frameSize-1,frameSize-1));
00057         }
00058 
00060         bool isInFrame(const IntPoint& point) const;
00061         
00065         index_type getIndex(const IntPoint& point) const;
00066         
00071         IntPoint getPoint(const index_type& index) const;
00072         
00075         MoveSequence 
00076         indicesToAbsMoves(const std::vector<index_type> indVec) const;
00077         
00080         std::vector<index_type> getIndexedNeighborhood() const;
00081         
00082         bool    operator== (const LatticeFrame &lf2) const;
00083         bool    operator!= (const LatticeFrame &lf2) const;
00084         
00085     }; // class LatticeFrame
00086 
00087         typedef std::set<biu::LatticeFrame::index_type> IndexSet;
00088         typedef std::vector<biu::LatticeFrame::index_type> IndexVec;
00089 
00090     std::ostream & operator <<(std::ostream &os, IndexSet& x);
00091     std::ostream & operator <<(std::ostream &os, IndexVec& x);
00092 
00093 }   // namespace biu
00094 
00095 #endif /*LATTICEFRAME_HH_*/