Function compute_sort_order(const std::vector<double>&)

Function Documentation

std::vector<std::size_t> compute_sort_order(const std::vector<double> &v)

Calculates sorted index array of a given vector.

Equivalent to numpy.argsort

Parameters

v – vector to be sorted

Returns

array of indices that would sort the vector v