Visual Computing Library
|
The UnorderedPairComparator struct is an utility comparator to allow to sort unordered std::pair<T, T>, that means that it is not important the order of the first and the second element of the pair. This menas that pairs (1, 2) and (2, 1) are considered equal, and (3, 1) < (2, 3). More...
#include <vclib/misc/comparators.h>
Public Member Functions | |
bool | operator() (const std::pair< T, T > &p1, const std::pair< T, T > &p2) const |
The UnorderedPairComparator struct is an utility comparator to allow to sort unordered std::pair<T, T>, that means that it is not important the order of the first and the second element of the pair. This menas that pairs (1, 2) and (2, 1) are considered equal, and (3, 1) < (2, 3).