QuickRank  v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
Enumerations | Functions
radix.h File Reference
#include <memory>

Go to the source code of this file.

Enumerations

enum  sortorder { ascending, descending }
 

Functions

std::unique_ptr< size_t[]> idx_radixsort (float const *fvalues, const size_t nvalues)
 
unsigned int * idxfloat_radixsort (float const *fvalues, const unsigned int nvalues)
 
template<sortorder const order>
void float_radixsort (float *fvalues, const unsigned int nvalues)
 
template<sortorder const order>
float * copyextfloat_radixsort (float const *extvalues, float const *fvalues, const unsigned int nvalues)
 

Enumeration Type Documentation

enum sortorder
Enumerator
ascending 
descending 

Function Documentation

template<sortorder const order>
float* copyextfloat_radixsort ( float const *  extvalues,
float const *  fvalues,
const unsigned int  nvalues 
)

sort an array of float values with respect to another one without modifing the input array and returning permuted indexes of the sorted items

Parameters
extvaluesinput float array
fvaluesinput float array
nvalueslength of fvalues
Returns
a sorted copy of extvalues wrt fvalues
template<sortorder const order>
void float_radixsort ( float *  fvalues,
const unsigned int  nvalues 
)

sort an array of float values

Parameters
fvaluesinput float array
nvalueslength of fvalues
std::unique_ptr<size_t[]> idx_radixsort ( float const *  fvalues,
const size_t  nvalues 
)
unsigned int* idxfloat_radixsort ( float const *  fvalues,
const unsigned int  nvalues 
)

sort an array of float values without modifing the input array and returning permuted indexes of the sorted items

Parameters
fvaluesinput float array
nvalueslength of fvalues
Returns
indexes of ascending sorted fvalues