Go to the documentation of this file.
14 #ifndef SORTER_INCLUDED
15 #define SORTER_INCLUDED
47 void sort(std::vector<double>& v);
50 void sort(std::vector<double>& v,
const size_t nelem);
53 std::vector<int>
sort_index(std::vector<double>& v);
56 std::vector<int>
sort_index(std::vector<double>& v,
const size_t nelem);
59 bool comp(
const double lhs,
const double rhs);
72 typedef std::pair<int, double>
pair_t;
absolute descending order
base class for sort ordering
Sorter(const std::string &type)
constructor with sort ordering as a string arg
std::pair< int, double > pair_t
std::vector< int > sort_index(std::vector< double > &v)
sort an array and return list of index; v is sorted on exit.
bool comp(const double lhs, const double rhs)
call sort condition.
void sort(std::vector< double > &v)
sort an array of values; v is sorted on exit.
Sorter & operator=(const Sorter &)
virtual ~Sorter()
destructor