58 const auto& a = *
this;
62 a.start() ==
b.start()
63 && a.size() ==
b.size()
64 && a.stride() ==
b.stride()
74 const auto& a = *
this;
76 if (a.start() <
b.start())
return -1;
77 if (
b.start() < a.start())
return +1;
79 if (a.size() <
b.size())
return -1;
80 if (
b.size() < a.size())
return +1;
82 if (a.stride() <
b.stride())
return -1;
83 if (
b.stride() < a.stride())
return +1;
113 const label old(value_);
121inline constexpr Foam::label
201inline constexpr Foam::label
213 return (
value() == iter.value());
227inline constexpr Foam::label
307inline constexpr Foam::label
319 return (
value() == iter.value());
327 return (iter.value() < value());
336 return indexer(start_, stride_);
346 start_ + ((i < 0 || i > size_) ? size_ : i) * stride_,
404 return const_reverse_iterator(start_ - stride_, stride_);
Bidirectional input iterator with const access.
constexpr label operator[](const label n) const noexcept
Offset dereference operator.
constexpr bool operator==(const const_iterator &iter) const noexcept
Test for equality of values (ignore stride).
constexpr bool operator<(const const_iterator &iter) const noexcept
Compare less-than values (ignore stride).
const_iterator & operator+=(const label n) noexcept
Arbitrary increment.
const_iterator & operator-=(const label n) noexcept
Arbitrary decrement.
constexpr const_iterator operator+(const label n) const noexcept
Return iterator with offset.
const_iterator & operator--() noexcept
Prefix decrement.
const_iterator & operator++() noexcept
Prefix increment.
constexpr const_iterator operator-(const label n) const noexcept
Return iterator with offset.
Bidirectional reverse input iterator with const access.
constexpr bool operator==(const const_reverse_iterator &iter) const noexcept
Test for equality of values (ignore stride).
const_reverse_iterator & operator++() noexcept
Prefix increment.
constexpr label operator[](const label n) const noexcept
Offset dereference operator.
constexpr const_reverse_iterator operator+(const label n) const noexcept
Return iterator with offset.
constexpr const_reverse_iterator operator-(const label n) const noexcept
Return iterator with offset.
const_reverse_iterator & operator+=(const label n) noexcept
Arbitrary increment.
const_reverse_iterator & operator--() noexcept
Prefix decrement.
const_reverse_iterator & operator-=(const label n) noexcept
Arbitrary decrement.
constexpr bool operator<(const const_reverse_iterator &iter) const noexcept
Reverse compare less-than values (ignore stride).
A value indexer, for iteration or generation.
constexpr label value() const noexcept
The current value.
constexpr label stride() const noexcept
The stride.
void prev() noexcept
Decrement value.
void next() noexcept
Increment value.
label operator()() noexcept
Apply a postfix increment and return the current value.
constexpr indexer() noexcept
Default construct with zero value and stride = 1.
A set of labels defined by a start, a length and a stride.
const_iterator cbegin() const noexcept
A const_iterator set to the beginning of the range.
constexpr sliceRange() noexcept
Default construct an empty slice (0,0,0).
int compare(const sliceRange &b) const noexcept
Compare start/size/stride in that order.
bool equals(const sliceRange &b) const noexcept
Test equality of start/size/stride.
const_reverse_iterator crbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
const_iterator end() const noexcept
A const_iterator set to 1 beyond the end of the range.
const_reverse_iterator rbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
const_iterator begin() const noexcept
A const_iterator set to the beginning of the range.
const_iterator cend() const noexcept
A const_iterator set to 1 beyond the end of the range.
const_iterator at(const label i) const
Return const_iterator to a position within the range, with bounds checking.
const_reverse_iterator rend() const noexcept
A const_reverse_iterator set to 1 before the begin of range.
label stride() const noexcept
The stride for the range.
indexer generator() const
Return a forward values generator.
const_reverse_iterator crend() const noexcept
A const_reverse_iterator set to 1 before the begin of range.