42template<
class Compare>
56 return this->addressing();
63 return this->addressing();
77 auto& addr = this->indices();
79 addr.resize_nocopy(this->values().size());
85template<
class Compare>
88 auto& vals = this->values();
89 auto& addr = this->indices();
91 addr.resize_nocopy(vals.size());
98 [&](label a, label
b) ->
bool { return comp(vals[a], vals[b]); }
Various functions to operate on Lists.
A List with indirect addressing.
An indirect list with addressing based on sorting. The list is sorted upon construction or when expli...
void reverse()
Reverse the indices.
const labelUList & indices() const noexcept
Return the list of sorted indices (updated every sort).
void uniqueSort()
Sort the list, only retaining unique entries.
void reset()
Reset list indices to identity.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void identity(labelUList &map, label start=0)
Set identity map with (map[i] == i)
void reverse(UList< T > &list, const label n)
Reverse the first n elements of the list.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
labelList uniqueOrder(const UList< T > &input)
Return (sorted) indices corresponding to unique list values.
A list compare binary predicate for reverse sort.