20 #ifndef OST_MM_INDEX_HH
21 #define OST_MM_INDEX_HH
31 namespace ost {
namespace mol{
namespace mm{
39 memcpy(data_, rhs.data_,
sizeof(
uint[D]));
42 memset(data_, 0,
sizeof(
uint[D]));
46 memcpy(data_, rhs.data_,
sizeof(
uint[D]));
59 return std::lexicographical_compare(data_, data_+D, rhs.data_, rhs.data_+D);
63 return std::equal(data_,data_+D,rhs.data_);
67 return !(*
this == rhs);
82 Index() : impl::IndexBase<1>() {}
86 template <
typename DS>
94 Index() : impl::IndexBase<2>() {}
99 template <
typename DS>
114 template <
typename DS>
131 template <
typename DS>
150 template <
typename DS>
171 template <
typename DS>
194 template <
typename DS>
210 : start_(s), end_(e), current_(s) {
216 while (++current_[current_it] > end_[current_it]) {
218 if (current_it < D) {
219 current_[current_it-1] = start_[current_it-1];
230 return current_[D-1] > end_[D-1];
Index(uint a, uint b, uint c)
Index(uint a, uint b, uint c, uint d)
Index(uint a, uint b, uint c, uint d, uint e)
Index(uint a, uint b, uint c, uint d, uint e, uint f)
Index(uint a, uint b, uint c, uint d, uint e, uint f, uint g)
IndexIterator< D > & operator++()
const IndexType & operator*() const
IndexIterator(const IndexType &s, const IndexType &e)
uint & operator[](uint idx)
IndexBase & operator=(const IndexBase &rhs)
bool operator!=(const IndexBase< D > &rhs) const
bool operator==(const IndexBase< D > &rhs) const
bool operator<(const IndexBase< D > &rhs) const
uint operator[](uint idx) const
IndexBase(const IndexBase &rhs)