19 #ifndef itkLexicographicCompare_h
20 #define itkLexicographicCompare_h
47 template<
class TAggregateType1,
class TAggregateType2 >
48 bool operator()(
const TAggregateType1 &lhs,
const TAggregateType2 &rhs)
const
50 return std::lexicographical_compare(
51 std::begin(lhs), std::end(lhs),
52 std::begin(rhs), std::end(rhs));
74 template<
typename TB
idirectionalRange1,
typename TB
idirectionalRange2 >
75 bool operator()(
const TBidirectionalRange1 &lhs,
const TBidirectionalRange2 &rhs)
const
77 using ReverseIterator1 = std::reverse_iterator<decltype(std::begin(lhs))>;
78 using ReverseIterator2 = std::reverse_iterator<decltype(std::begin(rhs))>;
84 return std::lexicographical_compare(
85 ReverseIterator1{ std::end(lhs) },
86 ReverseIterator1{ std::begin(lhs) },
87 ReverseIterator2{ std::end(rhs) },
88 ReverseIterator2{ std::begin(rhs) });
bool operator()(const TBidirectionalRange1 &lhs, const TBidirectionalRange2 &rhs) const
bool operator()(const TAggregateType1 &lhs, const TAggregateType2 &rhs) const
Order Index instances lexicographically.
Checks if one range of elements colexicographically comes before another one.