39 #ifndef Foam_labelRanges_H 40 #define Foam_labelRanges_H 52 Istream&
operator>>(Istream& is, labelRanges& ranges);
53 Ostream&
operator<<(Ostream& is,
const labelRanges& ranges);
107 inline explicit labelRanges(
const label initialCapacity);
116 template<
int AnySizeMin>
151 template<class... Args>
164 label operator[](const label i) const;
190 const label subIdx = 0
255 bool found(const label value)
const {
return contains(value); }
labelRanges()=default
Default construct.
const_iterator begin() const noexcept
A const_iterator set to the beginning of the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
A range or interval of labels defined by a start and a size.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
bool empty() const noexcept
True if List is empty (ie, size() is zero)
bool contains(const label value) const noexcept
True if the value is contained within any of the sub-ranges.
Istream & readList(Istream &is)
Read List of labelRange from Istream, discarding contents.
labelRanges & operator=(const labelRanges &)=default
Default copy assignment.
const const_iterator cend() const noexcept
A const_iterator set to beyond the end of the list.
bool found(const label value) const
Same as contains()
bool add(const labelRange &range)
Add the range to the list.
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
void sort()
Inplace sort of the range elements.
Istream & operator>>(Istream &, directionInfo &)
List< label > labels() const
Return flattened list of all range labels.
const const_iterator end() const noexcept
A const_iterator set to beyond the end of the list.
bool remove(const labelRange &range)
Remove the range from the list.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void reserve(const label len)
Reserve allocation space for at least this size, allocating new space if required and retaining old c...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void clear() noexcept
Clear the addressable list of ranges.
OBJstream os(runTime.globalPath()/outputName)
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
bool empty() const noexcept
True if list of ranges is empty.
labelRange & emplace_back(Args &&... args)
Construct a range element at the end of the list, return reference to the new element.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
label totalSize() const noexcept
The linear size (sum of all the element sizes)
bool operator!=(const eddy &a, const eddy &b)
A list of labelRange with constrained list capabilities.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Foam::argList args(argc, argv)
labelRange value_type
The value type the list contains.
const_iterator cbegin() const noexcept
A const_iterator set to the beginning of the list.
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List of labelRange, with line-breaks in ASCII when length exceeds shortLen. ...
Forward input iterator with const access.
void reserve(const label len)
Reserve space for at least this size.
const UList< labelRange > & ranges() const noexcept
The list of ranges.