123template<
class UnaryCondition>
127 const UnaryCondition& select,
131 const label len = values.size();
139 for (label i=0; i < len; ++i)
155template<
class UnaryPredicate>
159 const UnaryPredicate& pred,
163 const label len = values.size();
171 for (label i=0; i < len; ++i)
193 const label len = values.size();
204 for (label i = 1; i < len; ++i)
207 if (values[order[count]] != values[order[i]])
210 order[count] = order[i];
A class for storing list addressing (labels, slices etc), which are normally to used by IndirectList....
IndirectListAddressing(const labelList &addr)
const UList< T > & values() const noexcept
A List with indirect addressing.
IndirectList(const UList< T > &values, const labelUList &addr)
Copy construct addressing, shallow copy values reference.
const Addr & addressing() const noexcept
The list addressing.
static IndirectList< T > uniq(const UList< T > &values, const bool sorted=false)
Return an IndirectList with duplicate entries filtered out.
static IndirectList< T > subset_if(const UList< T > &values, const UnaryPredicate &pred, const bool invert=false)
Return an IndirectList comprising entries with values that satisfy the predicate.
static IndirectList< T > subset(const UList< T > &values, const UnaryCondition &select, const bool invert=false)
Return an IndirectList comprising entries with positions that satisfy the condition predicate.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
A List with indirect addressing. Like IndirectList but does not store addressing.
UIndirectList(const UList< T > &values, const labelUList &addr)
Shallow copy values and addressing.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
List< label > labelList
A List of labels.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
void sort(UList< T > &list)
Sort the list.
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
UList< label > labelUList
A UList of labels.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)