51 std::sort(order.begin(), order.end(), [&](std::size_t i, std::size_t j) {
return compare(input[i], input[j]); });
static void SortByIndices(const std::vector< std::size_t > &order, std::vector< T > &vector)
Sort a vector in place based on a supplied index ordering.
static std::vector< std::size_t > GetSortIndices(const std::vector< T > &input, Comparison &compare)
Determine the permutation that would apply to the elements of a vector if sorted in ascending order...