64template<
class IntListType>
69template<
class IntListType>
78template<
class ListType>
82 const ListType&
input,
83 const bool prune =
false
91template<
class ListType>
96 const bool prune =
false
103template<
unsigned W
idth>
108 const bool prune =
false
114template<
unsigned W
idth>
119 const bool prune =
false
129 const bool prune =
false
138 const bool prune =
false
144template<
class Container>
149template<
class Container>
178template<
class Container>
192template<
class T,
class ListComparePredicate>
197 const ListComparePredicate& comp
211template<
class T,
class ListComparePredicate>
216 const ListComparePredicate& comp
226template<
class ListType>
231template<
class ListType,
class ListComparePredicate>
235 const ListComparePredicate& comp
254template<
class BoolListType,
class T>
257 const BoolListType& select,
286template<
class BoolListType,
class ListType>
289 const BoolListType& select,
302template<
class ListType>
318template<
class T,
class UnaryPredicate>
322 const UnaryPredicate& pred,
333template<
class ListType,
class UnaryPredicate>
337 const UnaryPredicate& pred,
371template<
class InputIntListType,
class OutputIntListType>
379template<
class InputIntListType,
class OutputIntListType>
387 invertManyToMany<InputIntListType,OutputIntListType>(len,
input,
output);
395template<
class ListType>
399 const ListType&
input,
400 typename ListType::const_reference val,
404 return input.find(val, start);
409template<
class ListType>
412 const ListType&
input,
413 typename ListType::const_reference val,
427template<
class ListType>
439template<
class ListType>
453template<
class ListType>
471template<
class ListType>
474 const ListType&
input,
475 typename ListType::const_reference val,
498template<
class ListType,
class T,
class ComparePredicate>
501 const ListType&
input,
504 const ComparePredicate& comp
522template<
class ListType,
class T>
525 const ListType&
input,
532template<
class ListType>
537template<
class ListType>
544template<
class ListType>
545ListType
rotateList(
const ListType& list,
const label
n);
549template<
template<
typename>
class ListType,
class DataType>
584template<
class ListType>
602template<
class ListType>
627template<
class ListType,
class UnaryPredicate>
630 const ListType&
input,
631 const UnaryPredicate& pred,
641template<
class ListType,
class UnaryPredicate>
644 const ListType&
input,
645 const UnaryPredicate& pred,
651template<
class ListType,
class UnaryPredicate>
654 const ListType&
input,
655 const UnaryPredicate& pred,
667template<
class ListType,
class UnaryPredicate>
670 const ListType&
input,
671 const UnaryPredicate& pred,
677template<
class ListType,
class UnaryPredicate>
680 const ListType&
input,
681 const UnaryPredicate& pred,
690template<
class ListType,
class UnaryPredicate>
693 const ListType&
input,
694 const UnaryPredicate& pred,
786template<
class T,
class T2,
class UnaryOperation>
790 const UnaryOperation& op
801template<
class T,
class InputIterator,
class UnaryOperation>
806 const UnaryOperation& op
A HashTable to objects of type <T> with a label key.
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
labelList findIndices(const ListType &input, const UnaryPredicate &pred, label start=0)
Linear search to find all occurences of given element.
label count_if(const ListType &input, const UnaryPredicate &pred, const label start=0)
Count the number of matching entries.
void identity(labelUList &map, label start=0)
Set identity map with (map[i] == i)
label find_if(const ListType &input, const UnaryPredicate &pred, const label start=0)
Find index of the first occurrence that satisfies the predicate.
label find(const ListType &input, const UnaryPredicate &pred, const label start=0)
Same as ListOps::find_if.
void setValue(UList< T > &list, const labelUList &locations, const T &val)
Set various locations of the list with a specified value.
List< T > create(const UList< T2 > &input, const UnaryOperation &op)
Create a List from a List of a dissimilar type, using the entire list.
List< T > createWithValue(const label len, const labelUList &locations, const T &val, const T &deflt=T())
bool found_if(const ListType &input, const UnaryPredicate &pred, const label start=0)
True if there is a value in the list that satisfies the predicate.
void invertManyToMany(const label len, const UList< InputIntListType > &input, List< OutputIntListType > &output)
Invert many-to-many.
List< T > uniqueSort(const UList< T > &input)
Return sorted list with removal of duplicates.
void inplaceSubset(const BoolListType &select, ListType &input, const bool invert=false)
Inplace extract elements of the input list when select is true.
label findIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
Deprecated(2017-10) search for first occurrence of the given element.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values (not the indices) of a list.
static Istream & input(Istream &is, IntRange< T > &range)
label findMin(const ListType &input, label start=0)
ListType rotateList(const ListType &list, const label n)
Rotate a list by n places.
IntListType renumber(const labelUList &oldToNew, const IntListType &input)
Renumber the values (not the indices) of a list.
void inplaceRotateList(ListType< DataType > &list, label n)
Inplace reversal of a list using the Reversal Block Swapping algorithm.
List< T > subset(const BoolListType &select, const UList< T > &input, const bool invert=false)
Extract elements of the input list when select is true.
labelList duplicateOrder(const UList< T > &input)
Return (sorted) indices corresponding to duplicate list values.
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
void inplaceReverseList(ListType &input)
Inplace reversal of a list using Swap.
List< T > subsetList(const UList< T > &input, const UnaryPredicate &pred, const bool invert=false)
Copy a subset of the input list when predicate is true.
labelPair findMinMax(const ListType &input, label start=0)
void inplaceSubsetList(ListType &input, const UnaryPredicate &pred, const bool invert=false)
Inplace subset of the list when predicate is true.
void inplaceReorder(const labelUList &oldToNew, ListType &input, const bool prune=false)
Inplace reorder the elements of a list.
label inplaceMapValue(const labelUList &oldToNew, Container &input)
Map values. Ignore negative values.
void inplaceMapKey(const labelUList &oldToNew, Container &input)
Rewrite with mapped keys. Ignore elements with negative key.
void inplaceUniqueSort(ListType &input)
Inplace sorting and removal of duplicates.
ListType reverseList(const ListType &input)
Reverse a list. First element becomes last element etc.
static Ostream & output(Ostream &os, const IntRange< T > &range)
labelList uniqueOrder(const UList< T > &input)
Return (sorted) indices corresponding to unique list values.
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
label findSortedIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
labelListList invertOneToMany(const label len, const labelUList &map)
Invert one-to-many map. Unmapped elements will be size 0.
label findMax(const ListType &input, label start=0)
labelList findIndices(const ListType &input, typename ListType::const_reference val, label start=0)
Linear search to find all occurrences of given element.
UList< label > labelUList
A UList of labels.
ListType reorder(const labelUList &oldToNew, const ListType &input, const bool prune=false)
Reorder the elements of a list.
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
#define FOAM_DEPRECATED_FOR(since, replacement)
List helper to append y elements onto the end of x.
void operator()(List< T > &x, const List< T > &y) const
A list compare binary predicate for reverse sort.
bool operator()(const label a, const label b) const
greater(const ListType &list)
A list compare binary predicate for normal sort.
less(const ListType &list)
bool operator()(const label a, const label b) const
List helper to add y unique elements to x.
void operator()(labelList &x, const labelList &y) const
List helper to append y unique elements onto the end of x.
void operator()(List< T > &x, const List< T > &y) const