38#ifndef Foam_sliceRange_H
39#define Foam_sliceRange_H
151 label
max() const
noexcept {
return start_ + (size_-1) * stride_; }
167 label
operator[](
const label i)
const noexcept
169 return start_ + i * stride_;
173 explicit operator bool() const
noexcept {
return (size_ > 0); }
230 typedef label difference_type;
231 typedef const label* pointer;
232 typedef label reference;
251 constexpr label value() const
noexcept {
return value_; }
257 constexpr label value(
const label
n)
const noexcept
259 return value_ + (
n * stride_);
263 void prev()
noexcept { value_ -= stride_; }
266 void prev(
const label
n)
noexcept { value_ -= (
n * stride_); }
269 void next()
noexcept { value_ += stride_; }
272 void next(
const label
n)
noexcept { value_ += (
n * stride_); }
295 typedef std::random_access_iterator_tag iterator_category;
340 inline constexpr label operator-
362 return !(*
this == iter);
368 return !(iter < *
this);
374 return (iter < *
this);
380 return !(*
this < iter);
386 class const_reverse_iterator
405 inline constexpr label
operator[](
const label
n)
const noexcept;
438 inline constexpr label operator-
460 return !(*
this == iter);
466 return !(iter < *
this);
469 constexpr bool operator>(
const const_reverse_iterator& iter)
472 return (iter < *
this);
475 constexpr bool operator>=(
const const_reverse_iterator& iter)
478 return !(*
this < iter);
487inline bool operator==
510inline bool operator!=
520inline bool operator<=
538inline bool operator>=
A 1D vector of objects of type <T> with a fixed length <N>.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Bidirectional input iterator with const access.
std::random_access_iterator_tag iterator_category
constexpr bool operator<=(const const_iterator &iter) const noexcept
const_iterator & operator++() noexcept
Prefix increment.
constexpr bool operator>=(const const_iterator &iter) const noexcept
constexpr indexer() noexcept
Inherit constructors from indexer.
constexpr bool operator>(const const_iterator &iter) const noexcept
Bidirectional reverse input iterator with const access.
const_reverse_iterator & operator++() noexcept
Prefix increment.
constexpr label operator[](const label n) const noexcept
Offset dereference operator.
constexpr bool operator>(const const_reverse_iterator &iter) const noexcept
constexpr bool operator>=(const const_reverse_iterator &iter) const noexcept
constexpr bool operator<=(const const_reverse_iterator &iter) const noexcept
std::random_access_iterator_tag iterator_category
constexpr indexer() noexcept
Inherit constructors from indexer.
A value indexer, for iteration or generation.
constexpr label value() const noexcept
The current value.
constexpr label value(const label n) const noexcept
Value with offset.
constexpr label stride() const noexcept
The stride.
void prev() noexcept
Decrement value.
void next(const label n) noexcept
Increase value.
void prev(const label n) noexcept
Decrease value.
constexpr label operator*() const noexcept
Return the value.
void next() noexcept
Increment 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.
label size_type
The type that can represent the size of the range.
const_iterator cbegin() const noexcept
A const_iterator set to the beginning of the range.
label max() const noexcept
The (inclusive) upper value of the range. Ill-defined for an empty 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.
bool empty() const noexcept
True if range is empty (zero-sized).
const_reverse_iterator crbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
bool good() const noexcept
True if range has size greater than zero.
const_iterator end() const noexcept
A const_iterator set to 1 beyond the end of the range.
label & stride() noexcept
Non-const access to the stride.
const_reverse_iterator rbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
label & size() noexcept
Non-const access to size of the range.
const_iterator begin() const noexcept
A const_iterator set to the beginning of the range.
label & start() noexcept
Non-const access to start of the range.
label min() const noexcept
The (inclusive) lower value of the range, same as start().
const_iterator cend() const noexcept
A const_iterator set to 1 beyond the end of the range.
label value_type
Type of values the range contains.
const_iterator at(const label i) const
Return const_iterator to a position within the range, with bounds checking.
label operator[](const label i) const noexcept
Return element in the range, without bounds checking.
label size() const noexcept
The size of the 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.
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.
OBJstream os(runTime.globalPath()/outputName)
Typedefs for label/uLabel without requiring label.H.
bool operator<=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or older than B.
bool operator>=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or newer than B.
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.