Clipper
|
Generic map sorting class. More...
#include <map_utils.h>
Static Public Member Functions | |
template<class M > | |
static void | sort_increasing (const M &map, std::vector< int > &index) |
Sort a list into increasing order. More... | |
template<class M > | |
static void | sort_decreasing (const M &map, std::vector< int > &index) |
Sort a list into decreasing order. More... | |
Generic map sorting class.
This class is used to sort a vector of integer indices into a map. This includes sorting the whole map to get highest or lowest density first, or sorting some subset, e.g. a list of peak indices. Integer indices are used because they are the most compact way of referencing a unique map location. e.g.
|
static |
Sort a list into increasing order.
The index is sorted in place map The map to be sorted. index The list of indices to sort.
|
static |
Sort a list into decreasing order.
The index is sorted in place map The map to be sorted. index The list of indices to sort.