52 #ifndef Foam_IndirectList_H 53 #define Foam_IndirectList_H 119 private IndirectListAddressing<labelList>,
120 public UIndirectList<T>
158 template<
class UnaryCondition>
159 static IndirectList<T>
subset 162 const UnaryCondition&
select,
172 template<
class UnaryPredicate>
176 const UnaryPredicate& pred,
185 static IndirectList<T>
uniq 188 const bool sorted =
false 201 using UIndirectList<T>::operator=;
204 void operator=(
const IndirectList<T>& rhs)
const UList< T > & values() const noexcept
The list of values (without addressing)
void operator=(const IndirectList< T > &rhs)
Deep copy values, Fatal if list sizes are not identical.
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
IndirectList(const UList< T > &values, const labelUList &addr)
Copy construct addressing, shallow copy values reference.
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...
Base for lists with indirect addressing, templated on the list contents type and the addressing type...
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. ...
UList< label > labelUList
A UList of labels.
void operator=(const UIndirectList< T > &rhs)
Deep copy values, Fatal if list sizes are not identical.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const labelUList & addressing() const noexcept
The addressing used for the list.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
UIndirectList(const UList< T > &values, const labelUList &addr)
Shallow copy values and addressing.
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
const Addr & addressing() const noexcept
Const access to the addressing.
UIndirectList< label > labelUIndList
UIndirectList of labels.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
static IndirectList< T > uniq(const UList< T > &values, const bool sorted=false)
Return an IndirectList with duplicate entries filtered out.
void copyList(const ListType &rhs)
Deep copy values from the list.
List< label > labelList
A List of labels.
A List with indirect addressing.
UIndirectList< bool > boolUIndList
UIndirectList of bools.
List< T > list() const
Return the addressed elements as a List.