40 template<
typename dtype,
typename Po
interType,
typename DifferenceType>
169 return tmp += offset;
181 return *
this += -offset;
194 return tmp -= offset;
206 return ptr_ - rhs.ptr_;
218 return *(*
this + offset);
230 return ptr_ == rhs.ptr_;
242 return !(*
this == rhs);
254 return ptr_ < rhs.ptr_;
278 return !(rhs < *
this);
290 return !(*
this < rhs);
305 template<
class dtype,
typename Po
interType,
typename DifferenceType>
306 NdArrayConstIterator<dtype, PointerType, DifferenceType>
310 return next += offset;
316 template<
typename dtype,
typename Po
interType,
typename DifferenceType>
330 using MyBase::MyBase;
427 return tmp += offset;
443 using MyBase::operator-;
455 return tmp -= offset;
479 template<
class dtype,
typename Po
interType,
typename DifferenceType>
480 NdArrayIterator<dtype, PointerType, DifferenceType>
484 return next += offset;
490 template<
typename dtype,
typename SizeType,
typename Po
interType,
typename DifferenceType>
523 size_(numRows_ * numCols_)
606 currPtr_ = colIdx2Ptr(ptr2ColIdx(currPtr_) + offset);
620 return tmp += offset;
632 return *
this += -offset;
645 return tmp -= offset;
657 return ptr2ColIdx(currPtr_) - ptr2ColIdx(rhs.currPtr_);
669 return *(*
this + offset);
681 return currPtr_ == rhs.currPtr_;
693 return !(*
this == rhs);
705 return *
this - rhs < 0;
717 return *
this - rhs > 0;
729 return !(rhs < *
this);
741 return !(*
this < rhs);
765 const auto rowIdx = ptr - ptr_;
771 const auto row = rowIdx / numCols_;
772 const auto col = rowIdx % numCols_;
773 return row + col * numRows_;
790 const auto row = colIdx % numRows_;
791 const auto col = colIdx / numRows_;
792 const auto rowIdx = col + row * numCols_;
793 return ptr_ + rowIdx;
805 template<
class dtype,
typename SizeType,
typename Po
interType,
typename DifferenceType>
810 return next += offset;
816 template<
typename dtype,
typename SizeType,
typename Po
interType,
typename DifferenceType>
831 using MyBase::MyBase;
928 return tmp += offset;
944 using MyBase::operator-;
956 return tmp -= offset;
980 template<
class dtype,
typename SizeType,
typename Po
interType,
typename DifferenceType>
981 NdArrayColumnIterator<dtype, SizeType, PointerType, DifferenceType>
985 return next += offset;
#define THROW_RUNTIME_ERROR(msg)
Definition: Error.hpp:40
Custom column iterator for NdArray.
Definition: NdArrayIterators.hpp:818
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:886
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:873
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:966
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:953
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:925
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:938
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:898
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:861
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:912
DifferenceType difference_type
Definition: NdArrayIterators.hpp:829
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:850
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:839
Custom column const_iterator for NdArray.
Definition: NdArrayIterators.hpp:492
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:617
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:544
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:667
dtype value_type
Definition: NdArrayIterators.hpp:498
NdArrayConstColumnIterator()=default
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:497
PointerType pointer
Definition: NdArrayIterators.hpp:500
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:590
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:655
const value_type & reference
Definition: NdArrayIterators.hpp:501
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:642
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:715
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:566
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:727
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:579
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:739
SizeType size_type
Definition: NdArrayIterators.hpp:499
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:604
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:703
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:533
DifferenceType difference_type
Definition: NdArrayIterators.hpp:502
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:555
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:691
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:679
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:630
NdArrayConstColumnIterator(pointer ptr, SizeType numRows, SizeType numCols) noexcept
Definition: NdArrayIterators.hpp:518
Custom const_iterator for NdArray.
Definition: NdArrayIterators.hpp:42
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:288
DifferenceType difference_type
Definition: NdArrayIterators.hpp:51
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:276
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:47
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:91
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:114
PointerType pointer
Definition: NdArrayIterators.hpp:49
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:191
NdArrayConstIterator()=default
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:139
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:166
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:127
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:252
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:216
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:264
NdArrayConstIterator(pointer ptr)
Definition: NdArrayIterators.hpp:65
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:240
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:179
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:204
const value_type & reference
Definition: NdArrayIterators.hpp:50
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:228
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:80
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:102
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:153
dtype value_type
Definition: NdArrayIterators.hpp:48
Custom iterator for NdArray.
Definition: NdArrayIterators.hpp:318
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:372
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:437
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:385
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:465
DifferenceType difference_type
Definition: NdArrayIterators.hpp:328
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:452
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:349
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:424
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:360
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:397
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:338
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:411
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:307