functions_interval_orderings.qbk 3.7 KB

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