Template Function sequant::sort_via_ordinals¶
Defined in File utils.hpp
Function Documentation¶
-
template<OrderType OT, typename Sequence, typename LessThan>
container::svector<std::size_t> sequant::sort_via_ordinals(Sequence &seq, const LessThan &less_than)¶ sorts a directly-addressable sequence via ordinals
less-than relationship for elements
iandi+1is given byless_than(i,i+1)- Template Parameters:
OT – the type of order provided by
LessThen- Parameters:
seq – [inout] on input: a directly-addressable sequence; on output: the sorted sequence
less_than – [in] less-than comparison of two ordinals defines the weak order between the corresponding elements; does not have to be strict (i.e. does not have to meet the standard Compare concept used by standard algorithms)
- Returns:
ordinals of sorted elements in the input sequence