38 #ifndef Foam_sliceRange_H 39 #define Foam_sliceRange_H 52 template<
class T>
class List;
53 template<
class T,
unsigned N>
class FixedList;
145 label
max() const
noexcept {
return start_ + (size_-1) * stride_; }
156 return start_ + i * stride_;
160 explicit operator bool() const
noexcept {
return (size_ > 0); }
217 typedef label difference_type;
218 typedef const label* pointer;
219 typedef label reference;
238 constexpr label value()
const noexcept {
return value_; }
244 constexpr label value(
const label
n)
const noexcept 246 return value_ + (
n * stride_);
250 void prev()
noexcept { value_ -= stride_; }
253 void prev(
const label
n)
noexcept { value_ -= (
n * stride_); }
256 void next()
noexcept { value_ += stride_; }
259 void next(
const label
n)
noexcept { value_ += (
n * stride_); }
327 inline constexpr label operator-
349 return !(*
this == iter);
355 return !(iter < *
this);
361 return (iter < *
this);
364 constexpr
bool operator>=(
const const_iterator& iter)
367 return !(*
this < iter);
425 inline constexpr label operator-
447 return !(*
this == iter);
453 return !(iter < *
this);
456 constexpr
bool operator>(
const const_reverse_iterator& iter)
459 return (iter < *
this);
462 constexpr
bool operator>=(
const const_reverse_iterator& iter)
465 return !(*
this < iter);
483 inline bool operator==
492 && a.
size() ==
b.size()
501 inline bool operator<
518 !(
b.size() < a.
size())
529 inline bool operator!=
539 inline bool operator<=
548 inline bool operator>
557 inline bool operator>=
const_iterator end() const noexcept
A const_iterator set to 1 beyond the end of the range.
constexpr label operator[](const label n) const noexcept
Offset dereference operator.
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.
label stride() const noexcept
The stride for the range.
label min() const noexcept
The (inclusive) lower value of the range, same as start()
label size() const noexcept
The size of the range.
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
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A value indexer, for iteration or generation.
bool good() const noexcept
True if range has size greater than zero.
bool empty() const noexcept
True if range is empty (zero-sized)
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.
constexpr bool operator>=(const const_iterator &iter) const noexcept
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.
label value_type
Type of values the range contains.
Typedefs for label/uLabel without requiring label.H.
Bidirectional reverse input iterator with const access.
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Istream & operator>>(Istream &, directionInfo &)
constexpr bool operator>(const const_iterator &iter) const noexcept
const_iterator begin() const noexcept
A const_iterator set to the beginning of the range.
label operator[](const label i) const noexcept
Return element in the range, without bounds checking.
const_iterator & operator++() noexcept
Prefix increment.
constexpr sliceRange() noexcept
Default construct an empty slice (0,0,0)
std::random_access_iterator_tag iterator_category
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)
constexpr bool operator<=(const const_iterator &iter) const noexcept
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.
label start() const noexcept
The (inclusive) lower value of 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.