LevelS C++ support library
3.83
|
#include <algorithm>
#include <functional>
#include <vector>
Go to the source code of this file.
Functions | |
template<typename It , typename T2 , typename Comp > | |
void | buildIndex (It begin, It end, std::vector< T2 > &idx, Comp comp) |
template<typename It , typename T2 > | |
void | buildIndex (It begin, It end, std::vector< T2 > &idx) |
template<typename It , typename T2 > | |
void | sortByIndex (It begin, It end, const std::vector< T2 > &idx) |
template<typename It , typename T2 > | |
void | sortByIndex_inplace (It begin, It end, const std::vector< T2 > &idx) |
Various helper functions for sorting sequences.
Copyright (C) 2002-2015 Max-Planck-Society
Definition in file sort_utils.h.
|
inline |
Performs an indirect sort on the supplied iterator range and returns in idx a vector containing the indices of the smallest, second smallest, third smallest, etc. element, according to comp.
Definition at line 54 of file sort_utils.h.
|
inline |
Performs an indirect sort on the supplied iterator range and returns in idx a vector containing the indices of the smallest, second smallest, third smallest, etc. element.
Definition at line 66 of file sort_utils.h.
|
inline |
Sorts the supplied iterator range according to the order given by idx. The operation is done out of place and requires temporary extra storage.
Definition at line 76 of file sort_utils.h.
|
inline |
Sorts the supplied iterator range according to the order given by idx. The operation is done in place.
Definition at line 91 of file sort_utils.h.