MyraMath
Classes | Functions
sortperm.h File Reference

Given a range, returns the permutation that will place it in sorted order. More...

#include <vector>
#include <iterator>
#include <algorithm>
#include <myramath/utility/detail/ssize.h>
Include dependency graph for sortperm.h:

Go to the source code of this file.

Classes

class  myra::detail::sortperm_Pair< Iterator >
 
class  myra::detail::sortperm_Comparator< Iterator, Comparator >
 

Functions

template<class Iterator , class Comparator >
std::vector< int > myra::sortperm (Iterator begin, Iterator end, const Comparator &cmp)
 Given a range, returns the permutation that will place it in sorted order according to cmp().
 
template<class Iterator >
std::vector< int > myra::sortperm (Iterator begin, Iterator end)
 Given a range, returns the permutation that will place it in sorted order according to std::less<*Iterator>()
 

Detailed Description

Given a range, returns the permutation that will place it in sorted order.