23#ifndef VCL_MISC_COMPARATORS_H
24#define VCL_MISC_COMPARATORS_H
38template<
typename Pair>
41 bool operator()(
const Pair& p1,
const Pair&
p2)
const
43 if (p1.first ==
p2.first) {
44 return p1.second <
p2.second;
46 return p1.first <
p2.first;
59 bool operator()(
const std::pair<T, T>& p1,
const std::pair<T, T>&
p2)
const
61 if (std::min(p1.first, p1.second) < std::min(
p2.first,
p2.second)) {
65 std::min(p1.first, p1.second) == std::min(
p2.first,
p2.second)) {
66 return std::max(p1.first, p1.second) <
67 std::max(
p2.first,
p2.second);
83template<
typename Pair>
86 bool operator()(
const Pair& p1,
const Pair&
p2)
const
88 return p1.first <
p2.first;
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The FirstElementPairComparator struct is an utility comparator that allow to sort std::pair (or any t...
Definition comparators.h:85
The PairComparator struct is an utility comparator to allow to sort pairs in lexical order.
Definition comparators.h:40
The UnorderedPairComparator struct is an utility comparator to allow to sort unordered std::pair<T,...
Definition comparators.h:58