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;
void sort(std::vector< double > &v)
sort an array of values; v is sorted on exit.
std::pair< int, double > pair_t
absolute descending order
proxy object to pass to stl sort algorithm
std::vector< int > sort_index(std::vector< double > &v)
sort an array and return list of index; v is sorted on exit.
virtual ~Sorter()
destructor
Sorter(const std::string &type)
constructor with sort ordering as a string arg
Sorter & operator=(const Sorter &)
base class for sort ordering
bool comp(const double lhs, const double rhs)
call sort condition.