66 indices_(lst.indices())
74 indices_(
std::move(lst.indices_))
119 return static_cast<List<T>&
>(*this);
146 indices_.resize_nocopy(this->size());
152 indices_.begin() + start,
153 indices_.begin() + start +
n,
166 indices_.resize_nocopy(this->size());
172 indices_.begin() + start,
173 indices_.begin() + start +
n,
192 indices_.swap(other.indices_);
void sort()
Forward (stable) sort the list (if changed after construction).
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
List< T > & shrink()
Clear the indices and return a reference to the underlying List.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list that is sorted upon construction or when explicitly requested with the sort() method...
A list compare binary predicate for reverse sort.
void operator=(const UList< T > &a)
Assignment to UList operator. Takes linear time.
constexpr SortableList() noexcept
Default construct.
static bool less(const vector &x, const vector &y)
To compare normals.
void swap(UList< T > &list)
Swap content with another UList of the same type in constant time.
Various functions to operate on Lists.
UList< T > & operator=(const UList< T > &)=delete
No copy assignment (default: shallow copy)
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
void clear()
Clear the list, i.e. set size to zero.
void sort(UList< T > &list)
Sort the list.
void operator=(const T &val)
Assignment of all entries to the given value, removing 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 T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void reverseSort()
Reverse (stable) sort the list.
const labelList & indices() const noexcept
Return the list of sorted indices. Updated every sort.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
void swap(SortableList< T > &other)
Swap content with another SortableList in constant time.
void identity(labelUList &map, label start=0)
Set identity map with (map[i] == i)
void clear()
Clear the list and the indices.
A list compare binary predicate for normal sort.
void partialSort(label n, label start=0)
Forward partial sort the list until the middle point.
static constexpr const zero Zero
Global zero (0)