40 template<
typename dtype,
42 typename DifferenceType>
171 return tmp += offset;
183 return *
this += -offset;
196 return tmp -= offset;
208 return ptr_ - rhs.ptr_;
220 return *(*
this + offset);
232 return ptr_ == rhs.ptr_;
244 return !(*
this == rhs);
256 return ptr_ < rhs.ptr_;
280 return !(rhs < *
this);
292 return !(*
this < rhs);
307 template <
class dtype,
308 typename PointerType,
309 typename DifferenceType>
314 return next += offset;
320 template<
typename dtype,
321 typename PointerType,
322 typename DifferenceType>
336 using MyBase::MyBase;
433 return tmp += offset;
449 using MyBase::operator-;
461 return tmp -= offset;
485 template <
class dtype,
486 typename PointerType,
487 typename DifferenceType>
492 return next += offset;
498 template<
typename dtype,
500 typename PointerType,
501 typename DifferenceType>
534 size_(numRows_ * numCols_)
616 currPtr_ = colIdx2Ptr(ptr2ColIdx(currPtr_) + offset);
630 return tmp += offset;
642 return *
this += -offset;
655 return tmp -= offset;
667 return ptr2ColIdx(currPtr_) - ptr2ColIdx(rhs.currPtr_);
679 return *(*
this + offset);
691 return currPtr_ == rhs.currPtr_;
703 return !(*
this == rhs);
715 return *
this - rhs < 0;
727 return *
this - rhs > 0;
739 return !(rhs < *
this);
751 return !(*
this < rhs);
775 const auto rowIdx = ptr - ptr_;
781 const auto row = rowIdx / numCols_;
782 const auto col = rowIdx % numCols_;
783 return row + col * numRows_;
800 const auto row = colIdx % numRows_;
801 const auto col = colIdx / numRows_;
802 const auto rowIdx = col + row * numCols_;
803 return ptr_ + rowIdx;
815 template <
class dtype,
817 typename PointerType,
818 typename DifferenceType>
823 return next += offset;
829 template<
typename dtype,
831 typename PointerType,
832 typename DifferenceType>
847 using MyBase::MyBase;
944 return tmp += offset;
960 using MyBase::operator-;
972 return tmp -= offset;
996 template <
class dtype,
998 typename PointerType,
999 typename DifferenceType>
1004 return next += offset;
#define THROW_RUNTIME_ERROR(msg)
Definition: Error.hpp:37
Custom column iterator for NdArray.
Definition: NdArrayIterators.hpp:834
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:902
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:889
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:982
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:969
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:941
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:954
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:914
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:877
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:928
DifferenceType difference_type
Definition: NdArrayIterators.hpp:845
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:866
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:855
Custom column const_iterator for NdArray.
Definition: NdArrayIterators.hpp:503
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:627
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:554
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:677
dtype value_type
Definition: NdArrayIterators.hpp:509
NdArrayConstColumnIterator()=default
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:508
PointerType pointer
Definition: NdArrayIterators.hpp:511
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:600
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:665
const value_type & reference
Definition: NdArrayIterators.hpp:512
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:652
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:725
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:576
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:737
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:589
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:749
SizeType size_type
Definition: NdArrayIterators.hpp:510
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:614
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:713
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:543
DifferenceType difference_type
Definition: NdArrayIterators.hpp:513
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:565
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:701
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:689
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:640
NdArrayConstColumnIterator(pointer ptr, SizeType numRows, SizeType numCols) noexcept
Definition: NdArrayIterators.hpp:529
Custom const_iterator for NdArray.
Definition: NdArrayIterators.hpp:44
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:290
DifferenceType difference_type
Definition: NdArrayIterators.hpp:53
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:278
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:49
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:93
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:116
PointerType pointer
Definition: NdArrayIterators.hpp:51
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:193
NdArrayConstIterator()=default
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:141
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:168
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:129
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:254
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:218
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:266
NdArrayConstIterator(pointer ptr)
Definition: NdArrayIterators.hpp:67
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:242
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:181
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:206
const value_type & reference
Definition: NdArrayIterators.hpp:52
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:230
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:82
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:104
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:155
dtype value_type
Definition: NdArrayIterators.hpp:50
Custom iterator for NdArray.
Definition: NdArrayIterators.hpp:324
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:378
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:443
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:391
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:471
DifferenceType difference_type
Definition: NdArrayIterators.hpp:334
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:458
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:355
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:430
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:366
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:403
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:344
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:417
Definition: Coordinate.hpp:45
NdArrayConstIterator< dtype, PointerType, DifferenceType > operator+(typename NdArrayConstIterator< dtype, PointerType, DifferenceType >::difference_type offset, NdArrayConstIterator< dtype, PointerType, DifferenceType > next) noexcept
Definition: NdArrayIterators.hpp:310