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 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Various utility functions to operate on Pointer Lists.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
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.
void shuffle(UList< T > &list)
Randomise the list order.
List< label > labelList
A List of labels.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.