 |
NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Go to the documentation of this file.
39 template<
typename dtype,
41 typename DifferenceType>
165 return tmp += offset;
177 return *
this += -offset;
190 return tmp -= offset;
202 return ptr_ - rhs.ptr_;
214 return *(*
this + offset);
226 return ptr_ == rhs.ptr_;
238 return !(*
this == rhs);
250 return ptr_ < rhs.ptr_;
274 return !(rhs < *
this);
286 return !(*
this < rhs);
301 template <
class dtype,
302 typename PointerType,
303 typename DifferenceType>
308 return next += offset;
314 template<
typename dtype,
315 typename PointerType,
316 typename DifferenceType>
330 using MyBase::MyBase;
427 return tmp += offset;
443 using MyBase::operator-;
455 return tmp -= offset;
479 template <
class dtype,
480 typename PointerType,
481 typename DifferenceType>
486 return next += offset;
492 template<
typename dtype,
494 typename PointerType,
495 typename DifferenceType>
528 size_(numRows_ * numCols_)
610 currPtr_ = colIdx2Ptr(ptr2ColIdx(currPtr_) + offset);
624 return tmp += offset;
636 return *
this += -offset;
649 return tmp -= offset;
661 return ptr2ColIdx(currPtr_) - ptr2ColIdx(rhs.currPtr_);
673 return *(*
this + offset);
685 return currPtr_ == rhs.currPtr_;
697 return !(*
this == rhs);
709 return *
this - rhs < 0;
721 return *
this - rhs > 0;
733 return !(rhs < *
this);
745 return !(*
this < rhs);
769 const auto rowIdx = ptr - ptr_;
775 const auto row = rowIdx / numCols_;
776 const auto col = rowIdx % numCols_;
777 return row + col * numRows_;
794 const auto row = colIdx % numRows_;
795 const auto col = colIdx / numRows_;
796 const auto rowIdx = col + row * numCols_;
797 return ptr_ + rowIdx;
809 template <
class dtype,
811 typename PointerType,
812 typename DifferenceType>
817 return next += offset;
823 template<
typename dtype,
825 typename PointerType,
826 typename DifferenceType>
841 using MyBase::MyBase;
938 return tmp += offset;
954 using MyBase::operator-;
966 return tmp -= offset;
990 template <
class dtype,
992 typename PointerType,
993 typename DifferenceType>
998 return next += offset;
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:424
DifferenceType difference_type
Definition: NdArrayIterators.hpp:839
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:896
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:123
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:634
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:731
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:437
DifferenceType difference_type
Definition: NdArrayIterators.hpp:328
Custom column iterator for NdArray.
Definition: NdArrayIterators.hpp:827
NdArrayConstIterator< dtype, PointerType, DifferenceType > operator+(typename NdArrayConstIterator< dtype, PointerType, DifferenceType >::difference_type offset, NdArrayConstIterator< dtype, PointerType, DifferenceType > next) noexcept
Definition: NdArrayIterators.hpp:304
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:465
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:976
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:849
NdArrayConstColumnIterator()=default
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:935
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:397
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:922
SizeType size_type
Definition: NdArrayIterators.hpp:504
DifferenceType difference_type
Definition: NdArrayIterators.hpp:507
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:135
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:248
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:871
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:187
NdArrayConstIterator()=default
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:162
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:76
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:48
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:743
PointerType pointer
Definition: NdArrayIterators.hpp:505
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:360
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:583
Custom column const_iterator for NdArray.
Definition: NdArrayIterators.hpp:496
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:260
std::random_access_iterator_tag iterator_category
Definition: NdArrayIterators.hpp:502
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:537
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:570
const value_type & reference
Definition: NdArrayIterators.hpp:51
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:98
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:646
dtype value_type
Definition: NdArrayIterators.hpp:49
self_type & operator++() noexcept
Definition: NdArrayIterators.hpp:559
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:608
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:87
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:372
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:110
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:695
bool operator<(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:707
Definition: Coordinate.hpp:44
dtype value_type
Definition: NdArrayIterators.hpp:503
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:548
Custom const_iterator for NdArray.
Definition: NdArrayIterators.hpp:42
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:963
bool operator<=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:272
Custom iterator for NdArray.
Definition: NdArrayIterators.hpp:317
NdArrayConstColumnIterator(pointer ptr, SizeType numRows, SizeType numCols) noexcept
Definition: NdArrayIterators.hpp:523
bool operator!=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:236
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:683
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:411
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:200
difference_type operator-(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:659
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:860
self_type & operator+=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:149
self_type & operator--() noexcept
Definition: NdArrayIterators.hpp:385
reference operator*() const noexcept
Definition: NdArrayIterators.hpp:338
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:594
NdArrayConstIterator(pointer ptr) noexcept
Definition: NdArrayIterators.hpp:66
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:671
self_type operator-(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:452
const value_type & reference
Definition: NdArrayIterators.hpp:506
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:175
PointerType pointer
Definition: NdArrayIterators.hpp:50
bool operator>(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:719
pointer operator->() const noexcept
Definition: NdArrayIterators.hpp:349
self_type operator++(int) noexcept
Definition: NdArrayIterators.hpp:883
bool operator==(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:224
self_type operator--(int) noexcept
Definition: NdArrayIterators.hpp:908
self_type operator+(const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:621
DifferenceType difference_type
Definition: NdArrayIterators.hpp:52
bool operator>=(const self_type &rhs) const noexcept
Definition: NdArrayIterators.hpp:284
reference operator[](const difference_type offset) const noexcept
Definition: NdArrayIterators.hpp:212
self_type & operator-=(const difference_type offset) noexcept
Definition: NdArrayIterators.hpp:948