63 List<
T>(std::move(lst)),
64 indices_(std::move(lst.indices_))
80 List<
T>(std::move(values))
109 return static_cast<List<T>&
>(*this);
118 List<T> list(*
this, indices_);
128 List<T> list(*
this, indices_);
136 indices_.resize_nocopy(this->size());
142 indices_.begin() + start,
143 indices_.begin() + start +
n,
148 List<T> list(*
this, indices_);
156 indices_.resize_nocopy(this->size());
162 indices_.begin() + start,
163 indices_.begin() + start +
n,
168 List<T> list(*
this, indices_);
182 indices_.swap(other.indices_);
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 > &list)
Transfer the contents of the argument List into this list and annul the argument list.
void operator=(const UList< T > &list)
Assignment to UList operator. Takes linear time.
void clear()
Clear the list, i.e. set size to zero.
A list that is sorted upon construction or when explicitly requested with the sort() method.
void partialSort(label n, label start=0)
Forward partial sort the list until the middle point.
const labelList & indices() const noexcept
Return the list of sorted indices. Updated every sort.
SortableList() noexcept=default
Default construct.
void operator=(const T &val)
Assignment of all entries to the given value, removing indices.
void sort()
Forward (stable) sort the list (if changed after construction).
void reverseSort()
Reverse (stable) sort the list.
void swap(SortableList< T > &other)
Swap content with another SortableList in constant time.
List< T > & shrink()
Clear the indices and return a reference to the underlying List.
void clear()
Clear the list and the indices.
void partialReverseSort(label n, label start=0)
Reverse partial sort the list until the middle point.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void swap(UList< T > &list) noexcept
Swap content with another UList of the same type in constant time.
void size(const label n)
Older name for setAddressableSize.
UList< T > & operator=(const UList< T > &)=delete
No copy assignment (default: shallow copy).
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
void sort(UList< T > &list)
Sort the list.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
A list compare binary predicate for reverse sort.
A list compare binary predicate for normal sort.