43 #ifndef Foam_PtrListOps_H 44 #define Foam_PtrListOps_H 65 template<
class T,
class ListComparePredicate>
68 const UPtrList<T>& list,
70 const ListComparePredicate& comp
76 void shuffle(UPtrList<T>& list);
93 template<
class ReturnType,
class T,
class AccessOp>
96 const UPtrList<T>& list,
111 template<
class T,
class UnaryMatchPredicate>
114 const UPtrList<T>& list,
115 const UnaryMatchPredicate& matcher
122 List<word>
names(
const UPtrList<T>& list);
126 template<
class T,
class UnaryMatchPredicate>
129 const UPtrList<T>& list,
130 const UnaryMatchPredicate& matcher
135 template<
class T,
class UnaryMatchPredicate>
138 const UPtrList<T>& list,
139 const UnaryMatchPredicate& matcher
labelList findMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Extract list indices for all items with 'name()' that matches.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
Various functions to operate on Lists.
List< label > labelList
A List of labels.
void shuffle(UList< T > &list)
Randomise the list order.
label firstMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Find first list item with 'name()' that matches, -1 on failure.