59 template<
class ListType>
63 template<
class ListType>
71 template<
class ListType>
80 template<
class ListType>
85 template<
class ListType>
93 template<
class Container>
97 template<
class Container>
105 template<
class T,
class Cmp>
112 template<
class T,
class Cmp>
119 template<
class T,
class Cmp>
125 template<
class T,
class ListType>
126 ListType
subset(
const UList<T>& select,
const T& value,
const ListType&);
131 template<
class T,
class ListType>
138 template<
class BoolListType,
class ListType>
139 ListType
subset(
const BoolListType& select,
const ListType&);
145 template<
class BoolListType,
class ListType>
157 template<
class InList,
class OutList>
160 template<
class InList,
class OutList>
164 invertManyToMany<InList,OutList>(len, in, out);
172 template<
class ListType>
173 label count(
const ListType& l,
typename ListType::const_reference
x);
177 template<
class ListType>
181 typename ListType::const_reference,
186 template<
class ListType>
190 typename ListType::const_reference,
195 template<
class ListType>
200 typename ListType::const_reference
204 template<
class ListType>
208 typename ListType::const_reference initValue,
210 typename ListType::const_reference setValue
215 template<
class ListType>
221 template<
class ListType>
227 template<
class ListType>
231 typename ListType::const_reference,
238 template<
class ListType,
class BinaryOp>
242 typename ListType::const_reference,
250 template<
class ListType>
254 typename ListType::const_reference,
261 template<
class Container,
class T,
int mRows>
267 template<
class Container,
class T,
int mRows,
int nColumns>
281 template<
class ListType>
286 template<
class ListType>
292 template<
class ListType>
297 template<
template<
typename>
class ListType,
class DataType>
void inplaceSubset(const UList< T > &select, const T &value, ListType &)
Inplace extract elements of List when select is a certain value.
void inplaceMapKey(const labelUList &oldToNew, Container &)
Recreate with mapped keys. Do not map elements with negative key.
ListType renumber(const labelUList &oldToNew, const ListType &)
Renumber the values (not the indices) of a list.
void duplicateOrder(const UList< T > &, labelList &order)
Generate (sorted) indices corresponding to duplicate list values.
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.
label findSortedIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element in sorted list and return index,.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
void inplaceRenumber(const labelUList &oldToNew, ListType &)
Inplace renumber the values of a list.
ListType rotateList(const ListType &list, const label n)
Rotate a list by n places. If n is positive rotate clockwise/right/down.
labelListList invertOneToMany(const label len, const labelUList &)
Invert one-to-many map. Unmapped elements will be size 0.
void uniqueOrder(const UList< T > &, labelList &order)
Generate (sorted) indices corresponding to unique list values.
Combination-Reduction operation for a parallel run.
List< Container > initList(const T[mRows])
To construct a List from a C array. Has extra Container type.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
void setValues(ListType &, const labelUList &indices, typename ListType::const_reference)
Opposite of findIndices: set values at indices to given value.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
label findMin(const ListType &, const label start=0)
Find index of min element (and less than given element).
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
ListType createWithValues(const label sz, typename ListType::const_reference initValue, const labelUList &indices, typename ListType::const_reference setValue)
Opposite of findIndices: set values at indices to given value.
void inplaceReverseList(ListType &list)
Inplace reversal of a list using Swap.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
void operator()(List< T > &x, const List< T > &y) const
static const List< Type > & emptyList()
Return reference to zero-sized list. Compare to List::null() which returns.
List< label > labelList
A List of labels.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
ListType reverseList(const ListType &list)
Reverse a list. First element becomes last element etc.
label findMax(const ListType &, const label start=0)
Find index of max element (and larger than given element).
ListType reorder(const labelUList &oldToNew, const ListType &)
Reorder the elements (indices, not values) of a list.
List< Container > initListList(const T[mRows][nColumns])
To construct a (square) ListList from a C array. Has extra Container type.
void inplaceMapValue(const labelUList &oldToNew, Container &)
Map values. Do not map negative values.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const labelList emptyLabelList
void inplaceRotateList(ListType< DataType > &list, label n)
Inplace reversal of a list using the Reversal Block Swapping algorithm.
void invertManyToMany(const label len, const UList< InList > &, List< OutList > &)
Invert many-to-many.
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.
label findLower(const ListType &, typename ListType::const_reference, const label stary, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
Helper class for list to append y onto the end of x.