[/ Copyright (c) 2008-2010 Joachim Faulhaber Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ] [/ //= Equivalences and Orderings ===================================================] [section Equivalences and Orderings] [section Synopsis][/ Equivalences and Orderings] [table [[['*Equivalences and Orderings*]][__ch_itvs__][__ch_itv_sets__][__ch_itv_maps__][__ch_ele_sets__][__ch_ele_maps__]] [[['Segment Ordering]] [ ] [ ] [ ] [ ] [ ] ] [[`bool operator == (const T&, const T&)`] [1] [1] [1] [1] [1] ] [[`bool operator != (const T&, const T&)`] [1] [1] [1] [1] [1] ] [[`bool operator < (const T&, const T&)`] [1] [1] [1] [1] [1] ] [[`bool operator > (const T&, const T&)`] [1] [1] [1] [1] [1] ] [[`bool operator <= (const T&, const T&)`] [1] [1] [1] [1] [1] ] [[`bool operator >= (const T&, const T&)`] [1] [1] [1] [1] [1] ] [[['Element Ordering]] [ ] [ ] [ ] [ ] [ ] ] [[`bool is_element_equal(const T&, const P&)`] [ ] [__S] [__M] [1] [1] ] [[`bool is_element_less(const T&, const P&)`] [ ] [__S] [__M] [1] [1] ] [[`bool is_element_greater(const T&, const P&)`][ ] [__S] [__M] [1] [1] ] [[['Distinct Equality]] [ ] [ ] [ ] [ ] [ ] ] [[`bool is_distinct_equal(const T&, const P&)`][ ] [ ] [__M] [ ] [1] ] ] [endsect][/ Synopsis Equivalences and Orderings] [section Less on Intervals] [table [[ ] [Types][]] [[`x < y`] [__i] [`x` begins before `y` or, for equal beginnings `x` ends before `y`]] ] [endsect][/ Less on Intervals] [section Lexicographical Ordering][/ Equivalences and Orderings] All common equality and compare operators are defined for all objects of the *icl*. For all *icl* containers equality and compare operators implement lexicographical equality and lexicographical comparison, that depends on the equality of template parameter `Compare`. This includes the less ordering on intervals, that can be perceived as the sequence of elements between their lower and upper bound. This generalized lexicogrphical comparison in intervals can also be specified this way: [table [] [[`x < y`] [`:=`] [`x` begins before `y` or, for equal beginnings `x` ends before `y`.]] [[] [] [The other operators can be deduced in the usual way]] [[`x > y`] [`:=`] [`y < x`] ] [[`x <= y`] [`:=`] [`!(y < x)`] ] [[`x >= y`] [`:=`] [`!(x < y)`] ] [[`x == y`] [`:=`] [`!(x < y) && !(y < x)` induced equivalence] ] [[`x != y`] [`:=`] [`!(x == y)`] ] ] Equality and compare operators are defined for all *icl* objects but there are no overloads between different types. Containers of different segmentation are different, even if their elements are the same: `` split_interval_set