functions_range.qbk 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. [/ //= Range ===================================================================]
  8. [section Range]
  9. [table
  10. [[['*Range*]] [__ch_itvs__][__ch_itv_sets__][__ch_itv_maps__][condition] ]
  11. [[`interval_type hull(const T&)`] [ ] [__O1__] [__O1__][] ]
  12. [[`T hull(const T&, const T&)`] [__O1__] [ ] [ ][] ]
  13. [[`domain_type lower(const T&)`] [__O1__] [__O1__] [__O1__][] ]
  14. [[`domain_type upper(const T&)`] [__O1__] [__O1__] [__O1__][] ]
  15. [[`domain_type first(const T&)`] [__O1__] [__O1__] [__O1__][`is_discrete<domain_type>::value`]]
  16. [[`domain_type last(const T&)`] [__O1__] [__O1__] [__O1__][`is_discrete<domain_type>::value`]]
  17. ]
  18. The table above shows the availability of functions
  19. `hull`, `lower`, `upper`, `first` and `last` on intervals
  20. and interval containers that are all of ['*constant time complexity*].
  21. Find the functions description and some simple properties below.
  22. [table
  23. [[['*Range*]] [Types] [Description] ]
  24. [[`interval_type hull(const T&)`] [__S __M] [`hull(x)` returns the smallest interval that contains all intervals of an interval container `x`.] ]
  25. [[`T hull(const T&, const T&)`] [__S __M] [`hull(i,j)` returns the smallest interval that contains intervals `i` abd 'j'.] ]
  26. [[`domain_type lower(const T&)`] [__i __S __M][`lower(x)` returns the lower bound of an interval or interval container `x`.] ]
  27. [[`domain_type upper(const T&)`] [__i __S __M][`upper(x)` returns the upper bound of an interval or interval container `x`.] ]
  28. [[`domain_type first(const T&)`] [__i __S __M][`first(x)` returns the first element of an interval or interval container `x`.
  29. `first(const T&)` is defined for a discrete `domain_type` only.] ]
  30. [[`domain_type last(const T&)`] [__i __S __M][`last(x)` returns the last element of an interval or interval container `x`.
  31. `last(const T&)` is defined for a discrete `domain_type` only.] ]
  32. ]
  33. ``
  34. // for interval_containers x:
  35. lower(hull(x)) == lower(x)
  36. upper(hull(x)) == upper(x)
  37. first(hull(x)) == first(x)
  38. last(hull(x)) == last(x)
  39. ``
  40. ['*Back to section . . .*]
  41. [table
  42. []
  43. [[[link function_synopsis_table ['*Function Synopsis*]] ]]
  44. [[[link boost_icl.interface ['*Interface*]] ]]
  45. ]
  46. [endsect][/ Range]