71 indices_(lst.indices())
79 indices_(move(lst.indices()))
107 return static_cast<List<T>&
>(*this);
119 lst[i] = this->operator[](indices_[i]);
134 lst[i] = this->operator[](indices_[i]);
170 indices_ = move(lst.indices());
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void clear()
Clear the list, i.e. set size to zero.
void operator=(const UList< T > &)
Assignment to UList operator. Takes linear time.
A list that is sorted upon construction or when explicitly requested with the sort() method.
const labelList & indices() const
Return the list of sorted indices. Updated every sort.
void sort()
(stable) sort the list (if changed after construction time)
void operator=(const T &)
Assignment of all entries to the given value.
SortableList()
Null constructor, sort later (eg, after assignment or transfer)
void reverseSort()
Reverse (stable) sort the list.
List< T > & shrink()
Clear the indices and return a reference to the underlying List.
void clear()
Clear the list and the indices.
Greater function class that can be used for sorting.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
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 T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)