39#ifndef Foam_labelRange_H
40#define Foam_labelRange_H
51template<
class T>
class MinMax;
52template<
class T>
class Pair;
137 class = std::enable_if_t
138 <std::is_integral_v<IntT> && (sizeof(IntT) <= sizeof(
value_type))>
164 inline
void reset(label beg, label len,
bool adjustStart)
noexcept;
200 class = std::enable_if_t
201 <std::is_integral_v<IntT> && (sizeof(IntT) <= sizeof(
value_type))>
void reset() noexcept
Reset to (0,0).
IndexIterator< label > const_iterator
label start() const noexcept
bool good() const noexcept
label size() const noexcept
ReverseIndexIterator< label > const_reverse_iterator
constexpr IntRange() noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A min/max value pair with additional methods. In addition to conveniently storing values,...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An ordered pair of two objects of type <T> with first() and second() elements.
A range or interval of labels defined by a start and a size.
label size_type
The type that can represent the size of the range.
constexpr labelRange() noexcept
Default construct an empty range (0,0).
void adjust() noexcept
Adjust the start to avoid negative indices.
labelRange(Istream &is)
Construct from Istream. Read a bracketed (start size) tuple.
labelRange(const labelRange &) noexcept=default
Copy construct.
bool overlaps(const labelRange &range, bool touches=false) const
Return true if the ranges overlap.
labelRange subset0(label len) const
Calculate the intersection with the given 0/size range.
bool valid() const noexcept
Deprecated(2020-09) True if range has size greater than zero.
labelRange(labelRange &&) noexcept=default
Move construct.
label value_type
Type of values the range contains.
void reset(label beg, label len, bool adjustStart) noexcept
Reset start and length, enforces non-negative size.
labelRange join(const labelRange &range) const
Return a joined range, squashing any gaps in between.
static int debug
Debugging.
labelRange subset(const labelRange &range) const
Calculate the intersection of the range with another.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
Conversion/extraction to labelRange operation (functor).