43#ifndef Foam_PtrListOps_H
44#define Foam_PtrListOps_H
65template<
class T,
class ListComparePredicate>
70 const ListComparePredicate& comp
93template<
class ReturnType,
class T,
class AccessOp>
111template<
class T,
class UnaryMatchPredicate>
115 const UnaryMatchPredicate& matcher
126template<
class T,
class UnaryMatchPredicate>
130 const UnaryMatchPredicate& matcher
135template<
class T,
class UnaryMatchPredicate>
139 const UnaryMatchPredicate& matcher
Various functions to operate on Lists.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
labelList findMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Extract list indices for all items with 'name()' that matches.
label firstMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Find first list item with 'name()' that matches, -1 on failure.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
void shuffle(UList< T > &list)
Randomise the list order.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.