functions_ctor_dtor.qbk 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [/
  2. Copyright (c) 2008-2009 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<domain_type> hull(const T&)`] [ ] [__O1__] [__O1__][] ]
  12. [[`domain_type T::lower()const`] [__O1__] [__O1__] [__O1__][] ]
  13. [[`domain_type T::upper()const`] [__O1__] [__O1__] [__O1__][] ]
  14. [[`domain_type T::first()const`] [__O1__] [__O1__] [__O1__][`!is_continuous<domain_type>::value`]]
  15. [[`domain_type T::last()const`] [__O1__] [__O1__] [__O1__][`!is_continuous<domain_type>::value`]]
  16. ]
  17. The table above shows the availability of functions
  18. `hull`, `lower`, `upper`, `first` and `last` on intervals
  19. and interval containers that are all of ['*constant time complexity*].
  20. Find the functions description and some simple properties below.
  21. [table
  22. [[['*Range*]] [Types] [Description] ]
  23. [[`interval<domain_type> hull(const T&)`] [__S __M] [`hull(x)` returns the smallest interval that contains all intervals of an interval container `x`.] ]
  24. [[`domain_type T::lower()const`] [__i __S __M][`x.lower()` returns the lower bound of an interval or interval container `x`.] ]
  25. [[`domain_type T::upper()const`] [__i __S __M][`x.upper()` returns the upper bound of an interval or interval container `x`.] ]
  26. [[`domain_type T::first()const`] [__i __S __M][`x.first()` returns the first element of an interval or interval container `x`.
  27. `T::first()` is defined for a non continuous `domain_type` only.] ]
  28. [[`domain_type T::last()const`] [__i __S __M][`x.last()` returns the last element of an interval or interval container `x`.
  29. `T::last()` is defined for a non continuous `domain_type` only.] ]
  30. ]
  31. ``
  32. // for interval_containers x:
  33. hull(x).lower() == x.lower()
  34. hull(x).upper() == x.upper()
  35. hull(x).first() == x.first()
  36. hull(x).last() == x.last()
  37. ``
  38. [endsect][/ Range]