functions_iterator_related.qbk 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. [/ //= Iterator related ===================================================================]
  8. [section Iterator related]
  9. [table
  10. [[['*Synopsis Complexities*]] [__ch_itv_sets__][__ch_itv_maps__][__ch_ele_sets__][__ch_ele_maps__] ]
  11. [[`J T::begin()`] [__O1__] [__O1__] [__O1__] [__O1__] ]
  12. [[`J T::end()`] [__O1__] [__O1__] [__O1__] [__O1__] ]
  13. [[`J T::rbegin()`] [__O1__] [__O1__] [__O1__] [__O1__] ]
  14. [[`J T::rend()`] [__O1__] [__O1__] [__O1__] [__O1__] ]
  15. [[`J T::lower_bound(const key_type&)`] [__Olgn__] [__Olgn__] [__Olgn__] [__Olgn__] ]
  16. [[`J T::upper_bound(const key_type&)`] [__Olgn__] [__Olgn__] [__Olgn__] [__Olgn__] ]
  17. [[`pair<J,J> T::equal_range(const key_type&)`] [__Olgn__] [__Olgn__] [__Olgn__] [__Olgn__] ]
  18. ]
  19. [table
  20. [[['*Iterator related*]] [] ]
  21. [[`` iterator T::begin()
  22. const_iterator T::begin()const``] [Returns an iterator to the first value of the container.] ]
  23. [[`` iterator T::end()
  24. const_iterator T::end()const``] [Returns an iterator to a position `end()` after the last value of the container.]]
  25. [[`` reverse_iterator T::rbegin()
  26. const_reverse_iterator T::rbegin()const``] [Returns a reverse iterator to the last value of the container.] ]
  27. [[`` reverse_iterator T::rend()
  28. const_reverse_iterator T::rend()const``] [Returns a reverse iterator to a position `rend()` before the first value of the container.]]
  29. [[`` iterator T::lower_bound(const key_type& k)
  30. const_iterator T::lower_bound(const key_type& key)const``][Returns an iterator that points to the first element `first`, that does not compare less than `key_type key`.
  31. `first` can be equal or greater than `key`, or it may overlap `key` for interval containers.]]
  32. [[`` iterator T::upper_bound(const key_type&)
  33. const_iterator T::upper_bound(const key_type&)const``] [Returns an iterator that points to the first element `past`, that compares greater than `key_type key`.]]
  34. [[``
  35. pair<iterator,iterator> T::equal_range(const key_type& key)
  36. pair<const_iterator,const_iterator> T::equal_range(const key_type& key)const
  37. ``
  38. ]
  39. [Returns a range `[first, past)` of iterators to all elements of the container
  40. that compare neither less than nor greater than `key_type key`.
  41. For element containers __icl_set__ and __icl_map__, `equal_range`
  42. contains at most one iterator pointing the element equal to `key`,
  43. if it exists.
  44. For interval containers `equal_range` contains iterators to all
  45. intervals that overlap interval `key`.
  46. ]]
  47. ]
  48. [/
  49. Functions `begin`, `end`, `rbegin`, `rend` need ['*constant time*].
  50. Complexity of `lower_bound`, `upper_bound` and `equal_range` are
  51. ['*logarithmic*] in the `iterative_size` of the container.
  52. ]
  53. ['*See also . . .*]
  54. [table
  55. []
  56. [[[link boost_icl.function_reference.element_iteration ['*Element iteration*]] ]]
  57. ]
  58. ['*Back to section . . .*]
  59. [table
  60. []
  61. [[[link function_synopsis_table ['*Function Synopsis*]] ]]
  62. [[[link boost_icl.interface ['*Interface*]] ]]
  63. ]
  64. [endsect][/ Iterator related]