#include <comparators.hpp>
template<typename T, typename Less = std::less <T>>
struct tu::vector_less< T, Less >
A wrapper for an element-comparator which can be used to sort an indirection vector according to the data it points to.
◆ vector_less()
template<typename T , typename Less = std::less <T>>
Constructs the comparator.
- Parameters
-
data | The vector |
less | An optional element-comparator |
◆ operator()()
template<typename T , typename Less = std::less <T>>
Compares two indices by comparing their elements.
- Parameters
-
i | First index |
j | Second index |
- Returns
- true if and only if the element at the first index is smaller than the element at the second index
The documentation for this struct was generated from the following file: