Go to the documentation of this file.
35 const UPtrList<T>&
input
47 const UPtrList<T>&
input,
55 template<
class T,
class ListComparePredicate>
58 const UPtrList<T>&
input,
60 const ListComparePredicate& comp
77 list.sortOrder(order,
false);
81 template<
class T,
class Compare>
82 void Foam::sort(UPtrList<T>& list,
const Compare& comp)
86 list.sortOrder(order,
false);
95 list.sortOrder(order,
false);
101 template<
class ReturnType,
class T,
class AccessOp>
104 const UPtrList<T>& list,
108 const label len = list.size();
110 List<ReturnType>
output(len);
113 for (label i = 0; i < len; ++i)
115 const T* ptr = list.get(i);
129 template<
class T,
class UnaryMatchPredicate>
132 const UPtrList<T>& list,
133 const UnaryMatchPredicate& matcher
138 const label len = list.size();
143 for (label i = 0; i < len; ++i)
145 const T* ptr = list.get(i);
149 if (matcher(ptr->name()))
165 const UPtrList<T>& list
172 template<
class T,
class UnaryMatchPredicate>
175 const UPtrList<T>& list,
176 const UnaryMatchPredicate& matcher
179 const label len = list.size();
181 for (label i = 0; i < len; ++i)
183 const T* ptr = list.get(i);
185 if (
bool(ptr) && matcher(ptr->name()))
195 template<
class T,
class UnaryMatchPredicate>
198 const UPtrList<T>& list,
199 const UnaryMatchPredicate& matcher
202 const label len = list.size();
207 for (label i = 0; i < len; ++i)
209 const T* ptr = list.get(i);
211 if (
bool(ptr) && matcher(ptr->name()))
List< label > labelList
A List of labels.
label size() const noexcept
static Ostream & output(Ostream &os, const IntRange< T > &range)
labelList findMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Functions to operate on Pointer Lists.
void resize_nocopy(const label len)
void stableSort(UList< T > &a)
void sortOrder(const labelUList &order, const bool testNull=true)
unsigned int count(const UList< bool > &bools, const bool val=true)
void shuffle(UList< T > &a)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
labelList identity(const label len, label start=0)
label firstMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
static Istream & input(Istream &is, IntRange< T > &range)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
labelList sortedOrder(const UList< T > &input)
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)