50 start() =
range.min();
75 std::iota(result.begin(), result.end(), this->
start());
83 if (this->start() < 0)
88 this->size() += this->start();
98 const label extra = touches ? 1 : 0;
102 this->size() &&
range.size()
107 && range.min() <= this->
max() + extra
111 this->
min() >= range.min()
112 && this->
min() <= range.max() + extra
126 else if (!
range.size())
138 newRange.clampSize();
192 return labelRange(
lower, total);
constexpr labelRange() noexcept
Default construct an empty range (0,0)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void adjust() noexcept
Adjust the start to avoid negative indices.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A range or interval of labels defined by a start and a size.
A min/max value pair with additional methods. In addition to conveniently storing values...
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
static int debug
Debugging.
List< label > labels() const
Return list of labels corresponding to the range.
labelRange subset0(const label size) const
Calculate the intersection with the given 0/size range.
IntType max() const noexcept
The (inclusive) upper value of the range, same as rbegin_value(). Ill-defined for an empty range...
labelRange subset(const labelRange &range) const
Calculate the intersection of the range with another.
label start() const noexcept
The (inclusive) lower value of the range.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
labelRange join(const labelRange &range) const
Return a joined range, squashing any gaps in between.
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
IntType min() const noexcept
The (inclusive) lower value of the range, same as start(), begin_value()
label size() const noexcept
The size of the range.
bool overlaps(const labelRange &range, bool touches=false) const
Return true if the ranges overlap.