SolidUtils
Static Public Member Functions | List of all members
sl::Sort Class Reference

Static Public Member Functions

template<typename K , typename I >
static std::unique_ptr< I[]> fixedKeys (K const *const keys, size_t const num)
 Generate a permutation for a given set of keys. The range of the keys must be limited to [0,n), where n is the number of keys. More...
 
template<typename K , typename I , typename URBG >
static std::unique_ptr< I[]> fixedKeysRandom (K const *const keys, size_t const num, URBG &&rng)
 Generate a permutation for a given set of keys. The range of the keys must be limited to [0,n), where n is the number of keys. More...
 

Member Function Documentation

◆ fixedKeys()

template<typename K , typename I >
static std::unique_ptr<I[]> sl::Sort::fixedKeys ( K const *const  keys,
size_t const  num 
)
inlinestatic

Generate a permutation for a given set of keys. The range of the keys must be limited to [0,n), where n is the number of keys.

Template Parameters
KThe key type (must be integral).
IThe index type (must be integral).
Parameters
keysThe set of keys to use to generate the sorted permutation.
numThe number of keys.
Returns
The sorted permutation array.

◆ fixedKeysRandom()

template<typename K , typename I , typename URBG >
static std::unique_ptr<I[]> sl::Sort::fixedKeysRandom ( K const *const  keys,
size_t const  num,
URBG &&  rng 
)
inlinestatic

Generate a permutation for a given set of keys. The range of the keys must be limited to [0,n), where n is the number of keys.

Template Parameters
KThe key type (must be integral).
IThe index type (must be integral).
Parameters
keysThe set of keys to use to generate the sorted permutation.
numThe number of keys.
Returns
The sorted permutation array.

The documentation for this class was generated from the following file: