Go to the documentation of this file.
63 template<
class IntListType>
68 template<
class IntListType>
77 template<
class ListType>
81 const ListType&
input,
82 const bool prune =
false
90 template<
class ListType>
95 const bool prune =
false
102 template<
unsigned W
idth>
106 const PackedList<Width>&
input,
107 const bool prune =
false
113 template<
unsigned W
idth>
117 PackedList<Width>&
input,
118 const bool prune =
false
128 const bool prune =
false
137 const bool prune =
false
143 template<
class Container>
148 template<
class Container>
177 template<
class Container>
190 template<
class T,
class ListComparePredicate>
193 const UList<T>&
input,
195 const ListComparePredicate& comp
209 template<
class T,
class ListComparePredicate>
212 const UList<T>&
input,
214 const ListComparePredicate& comp
228 template<
class T,
class ListComparePredicate>
231 const UList<T>&
input,
233 const ListComparePredicate& comp
239 template<
class ListType>
244 template<
class ListType,
class ListComparePredicate>
248 const ListComparePredicate& comp
266 template<
class BoolListType,
class T>
269 const BoolListType& select,
270 const UList<T>&
input,
284 const bitSet& select,
285 const UList<T>&
input,
297 template<
class BoolListType,
class ListType>
300 const BoolListType& select,
313 template<
class ListType>
316 const bitSet& select,
326 template<
class T,
class UnaryPredicate>
329 const UList<T>&
input,
330 const UnaryPredicate& pred,
341 template<
class ListType,
class UnaryPredicate>
345 const UnaryPredicate& pred,
379 template<
class InputIntListType,
class OutputIntListType>
383 const UList<InputIntListType>&
input,
384 List<OutputIntListType>&
output
387 template<
class InputIntListType,
class OutputIntListType>
395 invertManyToMany<InputIntListType,OutputIntListType>(len,
input,
output);
403 template<
class ListType>
407 const ListType&
input,
408 typename ListType::const_reference val,
412 return input.find(val, start);
417 template<
class ListType>
420 const ListType&
input,
421 typename ListType::const_reference val,
435 template<
class ListType>
447 template<
class ListType>
461 template<
class ListType>
479 template<
class ListType>
482 const ListType&
input,
483 typename ListType::const_reference val,
506 template<
class ListType,
class T,
class ComparePredicate>
509 const ListType&
input,
512 const ComparePredicate& comp
530 template<
class ListType,
class T>
533 const ListType&
input,
540 template<
class ListType>
545 template<
class ListType>
552 template<
class ListType>
553 ListType
rotateList(
const ListType& list,
const label
n);
557 template<
template<
typename>
class ListType,
class DataType>
592 template<
class ListType>
610 template<
class ListType>
636 template<
class ListType,
class UnaryPredicate>
639 const ListType&
input,
640 const UnaryPredicate& pred,
649 template<
class ListType,
class UnaryPredicate>
652 const ListType&
input,
653 const UnaryPredicate& pred,
659 template<
class ListType,
class UnaryPredicate>
662 const ListType&
input,
663 const UnaryPredicate& pred,
755 template<
class T,
class T2,
class UnaryOperation>
759 const UnaryOperation& op
770 template<
class T,
class InputIterator,
class UnaryOperation>
775 const UnaryOperation& op
List< label > labelList
A List of labels.
static Ostream & output(Ostream &os, const IntRange< T > &range)
List helper to add y unique elements to x.
void operator()(labelList &x, const labelList &y) const
void inplaceSubsetList(ListType &input, const UnaryPredicate &pred, const bool invert=false)
Inplace subset of the list when predicate is true.
void inplaceReverseList(ListType &input)
Inplace reversal of a list using Swap.
bool operator()(const label a, const label b) const
labelList uniqueOrder(const UList< T > &input)
Return (sorted) indices corresponding to unique list values.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
greater(const ListType &list)
void operator()(List< T > &x, const List< T > &y) const
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 > subset(const BoolListType &select, const UList< T > &input, const bool invert=false)
Extract elements of the input list when select is true.
void inplaceRotateList(ListType< DataType > &list, label n)
Inplace reversal of a list using the Reversal Block Swapping algorithm.
void inplaceUniqueSort(ListType &input)
Inplace sorting and removal of duplicates.
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
List< T > createWithValue(const label len, const labelUList &locations, const T &val, const T &deflt=T())
less(const ListType &list)
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values (not the indices) of a list.
A list compare binary predicate for reverse sort.
A list compare binary predicate for normal sort.
void invertManyToMany(const label len, const UList< InputIntListType > &input, List< OutputIntListType > &output)
Invert many-to-many.
Pair< label > labelPair
A pair of labels.
labelPair findMinMax(const ListType &input, label start=0)
labelList findIndices(const ListType &input, const UnaryPredicate &pred, label start=0)
Linear search to find all occurences of given element.
void inplaceMapKey(const labelUList &oldToNew, Container &input)
Rewrite with mapped keys. Ignore elements with negative key.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
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 T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
ListType reorder(const labelUList &oldToNew, const ListType &input, const bool prune=false)
Reorder the elements of a list.
label findSortedIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
label inplaceMapValue(const labelUList &oldToNew, Container &input)
Map values. Ignore negative values.
void operator()(List< T > &x, const List< T > &y) const
labelList duplicateOrder(const UList< T > &input)
Return (sorted) indices corresponding to duplicate list values.
bool operator()(const label a, const label b) const
label find(const ListType &input, const UnaryPredicate &pred, const label start=0)
Find index of the first occurrence that satisfies the predicate.
ListType rotateList(const ListType &list, const label n)
Rotate a list by n places.
List helper to append y unique elements onto the end of x.
void inplaceSubset(const BoolListType &select, ListType &input, const bool invert=false)
Inplace extract elements of the input list when select is true.
List helper to append y elements onto the end of x.
ListType reverseList(const ListType &input)
Reverse a list. First element becomes last element etc.
List< labelList > labelListList
A List of labelList.
IntListType renumber(const labelUList &oldToNew, const IntListType &input)
Renumber the values (not the indices) of a list.
void setValue(UList< T > &list, const labelUList &locations, const T &val)
Set various locations of the list with a specified value.
label findMax(const ListType &input, label start=0)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void identity(labelUList &map, label start=0)
Set identity map with (map[i] == i)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static Istream & input(Istream &is, IntRange< T > &range)
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
bool found(const ListType &input, const UnaryPredicate &pred, const label start=0)
True if there is a value in the list that satisfies the predicate.
labelList findIndices(const ListType &input, typename ListType::const_reference val, label start=0)
Linear search to find all occurrences of given element.
void inplaceReorder(const labelUList &oldToNew, ListType &input, const bool prune=false)
Inplace reorder the elements of a list.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
UList< label > labelUList
A UList of labels.
labelListList invertOneToMany(const label len, const labelUList &map)
Invert one-to-many map. Unmapped elements will be size 0.
label findMin(const ListType &input, label start=0)
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.