38 #ifndef Foam_sliceRange_H 39 #define Foam_sliceRange_H 50 template<
class T>
class List;
51 template<
class T,
unsigned N>
class FixedList;
126 constexpr label
min() const
noexcept {
return start_; }
130 label
max() const
noexcept {
return start_ + (size_-1) * stride_; }
141 return start_ + i * stride_;
145 explicit operator bool() const
noexcept {
return bool(size_); }
202 typedef label difference_type;
203 typedef const label* pointer;
204 typedef label reference;
223 constexpr label value()
const noexcept {
return value_; }
229 constexpr label value(
const label
n)
const noexcept 231 return value_ + (
n * stride_);
235 void prev()
noexcept { value_ -= stride_; }
238 void prev(
const label
n)
noexcept { value_ -= (
n * stride_); }
241 void next()
noexcept { value_ += stride_; }
244 void next(
const label
n)
noexcept { value_ += (
n * stride_); }
267 typedef std::random_access_iterator_tag iterator_category;
312 inline constexpr label operator-
334 return !(*
this == iter);
340 return !(iter < *
this);
343 constexpr
bool operator>(
const const_iterator& iter)
346 return (iter < *
this);
352 return !(*
this < iter);
410 inline constexpr label
operator-
432 return !(*
this == iter);
435 constexpr
bool operator<=(
const const_reverse_iterator& iter)
438 return !(iter < *
this);
441 constexpr
bool operator>(
const const_reverse_iterator& iter)
444 return (iter < *
this);
450 return !(*
this < iter);
468 inline constexpr
bool operator==
477 && a.
size() ==
b.size()
486 inline constexpr
bool operator<
494 a.start() <
b.start()
497 !(
b.start() < a.start())
503 !(
b.size() < a.size())
504 && a.stride() <
b.stride()
514 inline constexpr
bool operator!=
524 inline constexpr
bool operator<=
533 inline constexpr
bool operator>
542 inline constexpr
bool operator>=
const_iterator end() 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.
constexpr indexer() noexcept
Default construct with zero value and stride = 1.
A 1D vector of objects of type <T> with a fixed length <N>.
std::random_access_iterator_tag iterator_category
const_iterator cbegin() const noexcept
A const_iterator set to the beginning of the range.
constexpr bool operator==(const const_reverse_iterator &iter) const noexcept
Test for equality of values (ignore stride)
constexpr bool operator>=(const const_reverse_iterator &iter) const noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A value indexer, for iteration or generation.
bool empty() const noexcept
True if range is empty (zero-sized)
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.
const_reverse_iterator crend() const noexcept
A const_reverse_iterator set to 1 before the begin of range.
List< label > labels() const
Return list of labels corresponding to the slice.
label max() const noexcept
The (inclusive) upper value of the range. Ill-defined for an empty range.
label size_type
The type that can represent the size of the range.
Bidirectional input iterator with const access.
constexpr label operator[](const label n) const noexcept
Offset dereference operator.
bool operator>=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or newer than B.
label value_type
Type of values the range contains.
bool operator<=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or older than B.
Bidirectional reverse input iterator with const access.
constexpr label size() const noexcept
The size of the range.
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
constexpr label min() const noexcept
The (inclusive) lower value of the range.
Istream & operator>>(Istream &, directionInfo &)
constexpr bool operator<(const const_reverse_iterator &iter) const noexcept
Reverse compare less-than values (ignore stride)
const_iterator begin() const noexcept
A const_iterator set to the beginning of the range.
constexpr bool operator!=(const const_reverse_iterator &iter) const noexcept
label operator[](const label i) const noexcept
Return element in the range, without bounds checking.
constexpr sliceRange() noexcept
Default construct an empty slice (0,0,0)
A set of labels defined by a start, a length and a stride.
const_reverse_iterator & operator++() noexcept
Prefix increment.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
const_reverse_iterator & operator+=(const label n) noexcept
Arbitrary increment.
const_reverse_iterator & operator-=(const label n) noexcept
Arbitrary decrement.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
const_reverse_iterator rbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
const_reverse_iterator & operator--() noexcept
Prefix decrement.
constexpr label start() const noexcept
The start value in the range.
const_reverse_iterator rend() const noexcept
A const_reverse_iterator set to 1 before the begin of range.
constexpr bool operator>(const const_reverse_iterator &iter) const noexcept
const_reverse_iterator crbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
constexpr bool operator<=(const const_reverse_iterator &iter) const noexcept
const_iterator cend() const noexcept
A const_iterator set to 1 beyond the end of the range.
indexer generator() const
Return a forward values generator.
constexpr label stride() const noexcept
The stride for the range.