00001 #ifndef _MATRIXIDX_H 00002 #define _MATRIXIDX_H 00003 00004 #include "dsu.h" 00005 #include <iostream> 00006 00007 class MatrixIdx { 00008 public: 00009 MatrixIdx() : _frame(-1), _strnd(dsu::eEither), _side(dsu::eSide), _bnd(dsu::eGbnd) { } 00010 MatrixIdx(const MatrixIdx& mi) : _frame(mi._frame), _strnd(mi._strnd), _side(mi._side), _bnd(mi._bnd) 00011 { } 00012 MatrixIdx(int frame, dsu::Strand_t strnd, dsu::side_t side, dsu::gbnd_t bnd) : 00013 _frame(frame), _strnd(strnd), _side(side), _bnd(bnd) 00014 { } 00015 00016 bool operator==(const MatrixIdx& mi) const { 00017 return _frame==mi._frame&&_strnd==mi._strnd&&_side==mi._side&&_bnd==mi._bnd; 00018 } 00019 void init(const MatrixIdx&); 00020 00021 int getFrame() const { return _frame; } 00022 dsu::Strand_t getStrnd() const { return _strnd; } 00023 dsu::side_t getSide() const { return _side; } 00024 dsu::gbnd_t getBnd() const { return _bnd; } 00025 00026 const MatrixIdx& getIdx() const; 00027 00028 int getIntIdx() const; 00029 00030 friend std::ostream& 00031 operator<<(std::ostream&,const MatrixIdx&); 00032 00033 00034 private: 00035 int _frame; 00036 dsu::Strand_t _strnd; 00037 dsu::side_t _side; 00038 dsu::gbnd_t _bnd; 00039 }; 00040 00041 #endif // _MATRIXIDX_H