functions_size.qbk 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. [/ //= Size ===================================================================]
  8. [section Size]
  9. [table
  10. [[['*Size*]] [__ch_itvs__][__ch_itv_sets__][__ch_itv_maps__][__ch_ele_sets__][__ch_ele_maps__]]
  11. [[`size_type T::size()const`\n
  12. `size_type size(const T&)`] [__O1__] [__On__] [__On__] [__O1__] [__O1__] ]
  13. [[`size_type cardinality(const T&)`] [__O1__] [__On__] [__On__] [__O1__] [__O1__] ]
  14. [[`difference_type length(const T&)`] [__O1__] [__On__] [__On__] [ ] [ ] ]
  15. [[`size_type iterative_size(const T&)`] [ ] [__O1__] [__O1__] [__O1__] [__O1__] ]
  16. [[`size_type interval_count(const T&)`] [ ] [__O1__] [__O1__] [ ] [ ] ]
  17. ]
  18. For *icl* containers the single `size` function known from std containers
  19. branches into tree to five different members functions.
  20. The table above shows the types, `size` functions are implemented for,
  21. together with their *complexities*. Linear complexities __On__ refer to the container's
  22. `iterative_size`:
  23. ``
  24. n = y.iterative_size()
  25. ``
  26. The next table gives a short definition for the different size functions.
  27. [table
  28. [[['*Size*]] [Types] [Description] ]
  29. [[`size_type interval_count(const T&)`] [__S __M] [The number of intervals of an interval container.] ]
  30. [[`size_type iterative_size(const T&)`] [__S __M __s __m] [The number of objects in an icl container that can be iterated over.] ]
  31. [[`difference_type length(const T&)`] [__i __S __M] [The length of an interval or the sum of lengths of
  32. an interval container's intervals, that's `domain_type` has a `difference_type`.] ]
  33. [[`size_type cardinality(const T&)`][__i __S __M __s __m] [The number of elements of an interval or a container.
  34. For continuous data types cardinality can be /infinite/.] ]
  35. [[`size_type T::size()const`\n
  36. `size_type size(const T&)`] [__i __S __M __s __m] [The number of elements of an interval or a container,
  37. which is also it's `cardinality`.] ]
  38. ]
  39. ['*Back to section . . .*]
  40. [table
  41. []
  42. [[[link function_synopsis_table ['*Function Synopsis*]] ] ]
  43. [[[link boost_icl.interface ['*Interface*]] ] ]
  44. ]
  45. [endsect][/ Size]