 |
NumCpp
2.1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
40 template<
typename dtype,
42 typename DifferenceType>
166 return tmp += offset;
178 return *
this += -offset;
191 return tmp -= offset;
203 return ptr_ - rhs.ptr_;
215 return *(*
this + offset);
227 return ptr_ == rhs.ptr_;
239 return !(*
this == rhs);
251 return ptr_ < rhs.ptr_;
275 return !(rhs < *
this);
287 return !(*
this < rhs);
302 template <
class dtype,
303 typename PointerType,
304 typename DifferenceType>
309 return next += offset;
315 template<
typename dtype,
316 typename PointerType,
317 typename DifferenceType>
331 using MyBase::MyBase;
428 return tmp += offset;
444 using MyBase::operator-;
456 return tmp -= offset;
480 template <
class dtype,
481 typename PointerType,
482 typename DifferenceType>
487 return next += offset;
493 template<
typename dtype,
495 typename PointerType,
496 typename DifferenceType>
529 size_(numRows_ * numCols_)
611 currPtr_ = colIdx2Ptr(ptr2ColIdx(currPtr_) + offset);
625 return tmp += offset;
637 return *
this += -offset;
650 return tmp -= offset;
662 return ptr2ColIdx(currPtr_) - ptr2ColIdx(rhs.currPtr_);
674 return *(*
this + offset);
686 return currPtr_ == rhs.currPtr_;
698 return !(*
this == rhs);
710 return *
this - rhs < 0;
722 return *
this - rhs > 0;
734 return !(rhs < *
this);
746 return !(*
this < rhs);
770 const auto rowIdx = ptr - ptr_;
776 const auto row = rowIdx / numCols_;
777 const auto col = rowIdx % numCols_;
778 return row + col * numRows_;
795 const auto row = colIdx % numRows_;
796 const auto col = colIdx / numRows_;
797 const auto rowIdx = col + row * numCols_;
798 return ptr_ + rowIdx;
810 template <
class dtype,
812 typename PointerType,
813 typename DifferenceType>
818 return next += offset;
824 template<
typename dtype,
826 typename PointerType,
827 typename DifferenceType>
842 using MyBase::MyBase;
939 return tmp += offset;
955 using MyBase::operator-;
967 return tmp -= offset;
991 template <
class dtype,
993 typename PointerType,
994 typename DifferenceType>
999 return next += offset;
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:425
DifferenceType difference_type
Definition: NdArrayIterators.hpp:840
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:897
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:124
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:635
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:732
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:438
DifferenceType difference_type
Definition: NdArrayIterators.hpp:329
Custom column iterator for NdArray.
Definition: NdArrayIterators.hpp:828
NdArrayConstIterator< dtype, PointerType, DifferenceType > operator+(typename NdArrayConstIterator< dtype, PointerType, DifferenceType >::difference_type offset, NdArrayConstIterator< dtype, PointerType, DifferenceType > next) noexcept
Definition: NdArrayIterators.hpp:305
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:466
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:977
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:850
NdArrayConstColumnIterator()=default
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:936
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:398
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:923
SizeType size_type
Definition: NdArrayIterators.hpp:505
DifferenceType difference_type
Definition: NdArrayIterators.hpp:508
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:136
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:249
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:872
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:188
NdArrayConstIterator()=default
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:163
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:77
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:49
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:744
PointerType pointer
Definition: NdArrayIterators.hpp:506
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:361
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:584
Custom column const_iterator for NdArray.
Definition: NdArrayIterators.hpp:497
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:261
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:503
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:538
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:571
const value_type & reference
Definition: NdArrayIterators.hpp:52
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:99
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:647
dtype value_type
Definition: NdArrayIterators.hpp:50
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:560
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:609
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:88
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:373
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:111
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:696
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:708
Definition: Coordinate.hpp:45
dtype value_type
Definition: NdArrayIterators.hpp:504
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:549
Custom const_iterator for NdArray.
Definition: NdArrayIterators.hpp:43
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:964
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:273
Custom iterator for NdArray.
Definition: NdArrayIterators.hpp:318
NdArrayConstColumnIterator(pointer ptr, SizeType numRows, SizeType numCols) noexcept
Definition: NdArrayIterators.hpp:524
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:237
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:684
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:412
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:201
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:660
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:861
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:150
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:386
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:339
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:595
NdArrayConstIterator(pointer ptr) noexcept
Definition: NdArrayIterators.hpp:67
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:672
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:453
const value_type & reference
Definition: NdArrayIterators.hpp:507
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:176
PointerType pointer
Definition: NdArrayIterators.hpp:51
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:720
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:350
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:884
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:225
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:909
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:622
DifferenceType difference_type
Definition: NdArrayIterators.hpp:53
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:285
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:213
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:949