Go to the documentation of this file.
40 const label packLen1 = this->packedLength();
45 bool needTrim =
false;
46 maxPackLen = packLen1;
48 if (packLen1 == packLen2)
53 this->size() != lst.
size()
55 && rhs[maxPackLen-1] > lhs[maxPackLen-1]
64 else if (packLen2 < packLen1)
67 maxPackLen = packLen2;
72 for (
label storeI = packLen1; storeI < packLen2; ++storeI)
76 maxPackLen = storeI+1;
81 if (maxPackLen > packLen1)
83 resize(maxPackLen * packing());
92 template<
class LabelListType>
101 if (
set(indices[elemI]))
111 template<
class LabelListType>
117 if (unset(indices[elemI]))
127 template<
class LabelListType>
131 if (empty() || indices.empty())
144 const label& index = indices[elemI];
145 if (
operator[](index))
173 const bool needTrim = bitorPrepare(lst, len);
179 for (
label i=0; i < len; ++i)
193 return setIndices(indices);
199 return setIndices(indices);
212 for (
label i=0; i < len; ++i)
221 return unsetIndices(indices);
227 return unsetIndices(indices);
234 if (this->size() > lst.
size())
243 const label len = this->packedLength();
245 for (
label i=0; i < len; ++i)
254 return subsetIndices(indices);
260 return subsetIndices(indices);
276 lst[nElem++] = elemI;
297 set(elemI, lst[elemI]);
309 const bool needTrim = bitorPrepare(lst, len);
315 for (
label i=0; i < len; ++i)
points setSize(newPointi)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
label setIndices(const LabelListType &indices)
Set the listed indices. Return number of elements changed.
void unset(const PackedList< 1 > &)
Unset specified bits.
#define forAll(list, i)
Loop across all elements in list.
Xfer< List< T > > xfer()
Transfer contents to the Xfer container.
List< unsigned int > & storage()
Return the underlying packed storage.
label subsetIndices(const LabelListType &indices)
Subset with the listed indices. Return number of elements subsetted.
triSurfaceToAgglom resize(surfacesMesh.size())
void set(const PackedList< 1 > &)
Set specified bits.
bool bitorPrepare(const PackedList< 1 > &lst, label &maxPackLen)
Preparation, resizing before a bitor operation.
PackedBoolList()
Construct null.
PackedBoolList & operator=(const bool val)
Assignment of all entries to the given value.
A simple container for copying or transferring objects of type <T>.
void reserve(const label)
Reserve allocation space for at least this size.
static label packedLength(const label)
Calculate the list length when packed.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
PackedBoolList & operator^=(const PackedList< 1 > &)
Xor operator (lists may be dissimilar sizes)
bool trim()
Trim any trailing zero elements.
void setSize(const label)
Reset size of List.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A List with indirect addressing.
label size() const
Number of entries.
void size(const label)
Override size to be inconsistent with allocated storage.
label size() const
Return the number of elements in the UList.
label unsetIndices(const LabelListType &indices)
Unset the listed indices. Return number of elements changed.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
void subset(const PackedList< 1 > &)
Subset with the specified list.
Xfer< labelList > used() const
Return indices of the used (true) elements as a list of labels.
string trim(const string &)
Return string trimmed of leading and trailing whitespace.