• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/
2    Copyright (c) 2008-2010 Joachim Faulhaber
3
4    Distributed under the Boost Software License, Version 1.0.
5    (See accompanying file LICENSE_1_0.txt or copy at
6    http://www.boost.org/LICENSE_1_0.txt)
7]
8
9
10[/ //= Additional Interval Orderings ===================================================================]
11[section Additional Interval Orderings]
12
13In addition to the standard orderings `operator <` and rleated `> <= >=` that you will find in the
14[link function_synopsis_table ['*librarie's function synopsis*]], intervals
15implement some additional orderings that can be useful.
16
17[table
18[[T]                                       [__ch_dsc_itv__] [__ch_cnt_itv__] [__ch_ro_itv__] [__ch_lo_itv__]  [__ch_cl_itv__] [__ch_op_itv__]      ]
19[[Interval bounds]                                     [dynamic]  [dynamic]    [static]     [static]     [static]    [static]    ]
20[[Form]                                                [ ]        [ ]          [asymmetric] [asymmetric] [symmetric] [symmetric] ]
21[[['*Orderings*]]                                      [ ]        [ ]          [ ]          [ ]          [ ]         [ ]         ]
22[[`bool exclusive_less(const T&, const T&)`]           [1]        [1]          [1]          [1]          [1]         [1]         ]
23[[``
24bool lower_less(const T&, const T&)
25bool lower_equal(const T&, const T&)
26bool lower_less_equal(const T&, const T&)
27``]                                                    [1]        [1]          [1]          [1]          [1]         [1]         ]
28[[``
29bool upper_less(const T&, const T&)
30bool upper_equal(const T&, const T&)
31bool upper_less_equal(const T&, const T&)
32``]
33                                                       [1]        [1]          [1]          [1]          [1]         [1]         ]
34]
35
36A central role for the *icl* plays the
37`exclusive_less` ordering, which is used
38in all interval containers.
39The other orderings can be useful to simplify
40comparison of intervals specifically for
41dynamically bounded ones.
42
43[table
44[[['*Orderings*]]                                      [Description]         ]
45[[`bool exclusive_less(const T&, const T&)`]           [`exclusive_less(x1, x2)` is true if every element of interval `x1` is less than
46                                                         every element of interval `x2` w.r.t. the the intervals `Compare` ordering ]     ]
47[[``
48bool lower_less(const T&, const T&)
49bool lower_equal(const T&, const T&)
50bool lower_less_equal(const T&, const T&)
51``]                                                    [Compares the beginnings of intervals.
52``
53lower_less(x,y)  == true; // x begins before y
54lower_equal(x,y) == true; // x and y begin at the same element
55lower_less_equal(x,y) == lower_less(x,y) || lower_equal(x,y);
56``
57                                                       ]         ]
58[[``
59bool upper_less(const T&, const T&)
60bool upper_equal(const T&, const T&)
61bool upper_less_equal(const T&, const T&)
62``]
63                                                       [Compares the endings of intervals.
64``
65upper_less(x,y)  == true; // x ends before y
66upper_equal(x,y) == true; // x and y end at the same element
67upper_less_equal(x,y) == upper_less(x,y) || upper_equal(x,y);
68``
69                                                       ]         ]
70]
71
72
73['*See also . . .*]
74[table
75[]
76[[ __biLEquivsOrderings__ ]]
77]
78
79
80['*Back to section . . .*]
81[table
82[]
83[[[link additional_interval_functions ['*Additional interval functions*]] ]]
84[[[link function_synopsis_table ['*Function Synopsis*]]          ]]
85[[[link boost_icl.interface ['*Interface*]]                      ]]
86]
87
88[endsect][/ Additional Interval Orderings]
89
90
91