1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Iterator related</title> 5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Icl"> 8<link rel="up" href="../function_reference.html" title="Function Reference"> 9<link rel="prev" href="symmetric_difference.html" title="Symmetric Difference"> 10<link rel="next" href="element_iteration.html" title="Element iteration"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="symmetric_difference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../function_reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="element_iteration.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_icl.function_reference.iterator_related"></a><a class="link" href="iterator_related.html" title="Iterator related">Iterator 28 related</a> 29</h3></div></div></div> 30<div class="informaltable"><table class="table"> 31<colgroup> 32<col> 33<col> 34<col> 35<col> 36<col> 37</colgroup> 38<thead><tr> 39<th> 40 <p> 41 <span class="emphasis"><em><span class="bold"><strong>Synopsis Complexities</strong></span></em></span> 42 </p> 43 </th> 44<th> 45 <p> 46 interval<br> sets 47 </p> 48 </th> 49<th> 50 <p> 51 interval<br> maps 52 </p> 53 </th> 54<th> 55 <p> 56 element<br> sets 57 </p> 58 </th> 59<th> 60 <p> 61 element<br> maps 62 </p> 63 </th> 64</tr></thead> 65<tbody> 66<tr> 67<td> 68 <p> 69 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">begin</span><span class="special">()</span></code> 70 </p> 71 </td> 72<td> 73 <p> 74 <span class="emphasis"><em>O(1)</em></span> 75 </p> 76 </td> 77<td> 78 <p> 79 <span class="emphasis"><em>O(1)</em></span> 80 </p> 81 </td> 82<td> 83 <p> 84 <span class="emphasis"><em>O(1)</em></span> 85 </p> 86 </td> 87<td> 88 <p> 89 <span class="emphasis"><em>O(1)</em></span> 90 </p> 91 </td> 92</tr> 93<tr> 94<td> 95 <p> 96 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">end</span><span class="special">()</span></code> 97 </p> 98 </td> 99<td> 100 <p> 101 <span class="emphasis"><em>O(1)</em></span> 102 </p> 103 </td> 104<td> 105 <p> 106 <span class="emphasis"><em>O(1)</em></span> 107 </p> 108 </td> 109<td> 110 <p> 111 <span class="emphasis"><em>O(1)</em></span> 112 </p> 113 </td> 114<td> 115 <p> 116 <span class="emphasis"><em>O(1)</em></span> 117 </p> 118 </td> 119</tr> 120<tr> 121<td> 122 <p> 123 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">()</span></code> 124 </p> 125 </td> 126<td> 127 <p> 128 <span class="emphasis"><em>O(1)</em></span> 129 </p> 130 </td> 131<td> 132 <p> 133 <span class="emphasis"><em>O(1)</em></span> 134 </p> 135 </td> 136<td> 137 <p> 138 <span class="emphasis"><em>O(1)</em></span> 139 </p> 140 </td> 141<td> 142 <p> 143 <span class="emphasis"><em>O(1)</em></span> 144 </p> 145 </td> 146</tr> 147<tr> 148<td> 149 <p> 150 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">rend</span><span class="special">()</span></code> 151 </p> 152 </td> 153<td> 154 <p> 155 <span class="emphasis"><em>O(1)</em></span> 156 </p> 157 </td> 158<td> 159 <p> 160 <span class="emphasis"><em>O(1)</em></span> 161 </p> 162 </td> 163<td> 164 <p> 165 <span class="emphasis"><em>O(1)</em></span> 166 </p> 167 </td> 168<td> 169 <p> 170 <span class="emphasis"><em>O(1)</em></span> 171 </p> 172 </td> 173</tr> 174<tr> 175<td> 176 <p> 177 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">lower_bound</span><span class="special">(</span><span class="keyword">const</span> 178 <span class="identifier">key_type</span><span class="special">&)</span></code> 179 </p> 180 </td> 181<td> 182 <p> 183 <span class="emphasis"><em>O(log n)</em></span> 184 </p> 185 </td> 186<td> 187 <p> 188 <span class="emphasis"><em>O(log n)</em></span> 189 </p> 190 </td> 191<td> 192 <p> 193 <span class="emphasis"><em>O(log n)</em></span> 194 </p> 195 </td> 196<td> 197 <p> 198 <span class="emphasis"><em>O(log n)</em></span> 199 </p> 200 </td> 201</tr> 202<tr> 203<td> 204 <p> 205 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">upper_bound</span><span class="special">(</span><span class="keyword">const</span> 206 <span class="identifier">key_type</span><span class="special">&)</span></code> 207 </p> 208 </td> 209<td> 210 <p> 211 <span class="emphasis"><em>O(log n)</em></span> 212 </p> 213 </td> 214<td> 215 <p> 216 <span class="emphasis"><em>O(log n)</em></span> 217 </p> 218 </td> 219<td> 220 <p> 221 <span class="emphasis"><em>O(log n)</em></span> 222 </p> 223 </td> 224<td> 225 <p> 226 <span class="emphasis"><em>O(log n)</em></span> 227 </p> 228 </td> 229</tr> 230<tr> 231<td> 232 <p> 233 <code class="computeroutput"><span class="identifier">pair</span><span class="special"><</span><span class="identifier">J</span><span class="special">,</span><span class="identifier">J</span><span class="special">></span> 234 <span class="identifier">T</span><span class="special">::</span><span class="identifier">equal_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">key_type</span><span class="special">&)</span></code> 235 </p> 236 </td> 237<td> 238 <p> 239 <span class="emphasis"><em>O(log n)</em></span> 240 </p> 241 </td> 242<td> 243 <p> 244 <span class="emphasis"><em>O(log n)</em></span> 245 </p> 246 </td> 247<td> 248 <p> 249 <span class="emphasis"><em>O(log n)</em></span> 250 </p> 251 </td> 252<td> 253 <p> 254 <span class="emphasis"><em>O(log n)</em></span> 255 </p> 256 </td> 257</tr> 258</tbody> 259</table></div> 260<div class="informaltable"><table class="table"> 261<colgroup> 262<col> 263<col> 264</colgroup> 265<thead><tr> 266<th> 267 <p> 268 <span class="emphasis"><em><span class="bold"><strong>Iterator related</strong></span></em></span> 269 </p> 270 </th> 271<th> 272 </th> 273</tr></thead> 274<tbody> 275<tr> 276<td> 277 <p> 278</p> 279<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">begin</span><span class="special">()</span> 280<span class="identifier">const_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">begin</span><span class="special">()</span><span class="keyword">const</span></pre> 281<p> 282 </p> 283 </td> 284<td> 285 <p> 286 Returns an iterator to the first value of the container. 287 </p> 288 </td> 289</tr> 290<tr> 291<td> 292 <p> 293</p> 294<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">end</span><span class="special">()</span> 295<span class="identifier">const_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">end</span><span class="special">()</span><span class="keyword">const</span></pre> 296<p> 297 </p> 298 </td> 299<td> 300 <p> 301 Returns an iterator to a position <code class="computeroutput"><span class="identifier">end</span><span class="special">()</span></code> after the last value of the container. 302 </p> 303 </td> 304</tr> 305<tr> 306<td> 307 <p> 308</p> 309<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">reverse_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">()</span> 310<span class="identifier">const_reverse_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">()</span><span class="keyword">const</span></pre> 311<p> 312 </p> 313 </td> 314<td> 315 <p> 316 Returns a reverse iterator to the last value of the container. 317 </p> 318 </td> 319</tr> 320<tr> 321<td> 322 <p> 323</p> 324<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">reverse_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">rend</span><span class="special">()</span> 325<span class="identifier">const_reverse_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">rend</span><span class="special">()</span><span class="keyword">const</span></pre> 326<p> 327 </p> 328 </td> 329<td> 330 <p> 331 Returns a reverse iterator to a position <code class="computeroutput"><span class="identifier">rend</span><span class="special">()</span></code> before the first value of the 332 container. 333 </p> 334 </td> 335</tr> 336<tr> 337<td> 338 <p> 339</p> 340<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">lower_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">key_type</span><span class="special">&</span> <span class="identifier">k</span><span class="special">)</span> 341<span class="identifier">const_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">lower_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">key_type</span><span class="special">&</span> <span class="identifier">key</span><span class="special">)</span><span class="keyword">const</span></pre> 342<p> 343 </p> 344 </td> 345<td> 346 <p> 347 Returns an iterator that points to the first element <code class="computeroutput"><span class="identifier">first</span></code>, that does not compare 348 less than <code class="computeroutput"><span class="identifier">key_type</span> <span class="identifier">key</span></code>. <code class="computeroutput"><span class="identifier">first</span></code> 349 can be equal or greater than <code class="computeroutput"><span class="identifier">key</span></code>, 350 or it may overlap <code class="computeroutput"><span class="identifier">key</span></code> 351 for interval containers. 352 </p> 353 </td> 354</tr> 355<tr> 356<td> 357 <p> 358</p> 359<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">upper_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">key_type</span><span class="special">&)</span> 360<span class="identifier">const_iterator</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">upper_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">key_type</span><span class="special">&)</span><span class="keyword">const</span></pre> 361<p> 362 </p> 363 </td> 364<td> 365 <p> 366 Returns an iterator that points to the first element <code class="computeroutput"><span class="identifier">past</span></code>, that compares greater than 367 <code class="computeroutput"><span class="identifier">key_type</span> <span class="identifier">key</span></code>. 368 </p> 369 </td> 370</tr> 371<tr> 372<td> 373 <p> 374</p> 375<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="identifier">pair</span><span class="special"><</span><span class="identifier">iterator</span><span class="special">,</span><span class="identifier">iterator</span><span class="special">></span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">equal_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">key_type</span><span class="special">&</span> <span class="identifier">key</span><span class="special">)</span> 376<span class="identifier">pair</span><span class="special"><</span><span class="identifier">const_iterator</span><span class="special">,</span><span class="identifier">const_iterator</span><span class="special">></span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">equal_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">key_type</span><span class="special">&</span> <span class="identifier">key</span><span class="special">)</span><span class="keyword">const</span> 377</pre> 378<p> 379 </p> 380 </td> 381<td> 382 <p> 383 Returns a range <code class="computeroutput"><span class="special">[</span><span class="identifier">first</span><span class="special">,</span> 384 <span class="identifier">past</span><span class="special">)</span></code> 385 of iterators to all elements of the container that compare neither 386 less than nor greater than <code class="computeroutput"><span class="identifier">key_type</span> 387 <span class="identifier">key</span></code>. For element containers 388 <a href="http://www.cplusplus.com/reference/stl/set/" target="_top"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code> </a> and <code class="computeroutput"><a class="link" href="../../boost/icl/map.html" title="Class template map">icl::map</a></code>, 389 <code class="computeroutput"><span class="identifier">equal_range</span></code> contains 390 at most one iterator pointing the element equal to <code class="computeroutput"><span class="identifier">key</span></code>, if it exists. 391 </p> 392 <p> 393 For interval containers <code class="computeroutput"><span class="identifier">equal_range</span></code> 394 contains iterators to all intervals that overlap interval <code class="computeroutput"><span class="identifier">key</span></code>. 395 </p> 396 </td> 397</tr> 398</tbody> 399</table></div> 400<p> 401 <span class="emphasis"><em><span class="bold"><strong>See also . . .</strong></span></em></span> 402 </p> 403<div class="informaltable"><table class="table"> 404<colgroup><col></colgroup> 405<thead><tr></tr></thead> 406<tbody><tr><td> 407 <p> 408 <a class="link" href="element_iteration.html" title="Element iteration"><span class="emphasis"><em><span class="bold"><strong>Element iteration</strong></span></em></span></a> 409 </p> 410 </td></tr></tbody> 411</table></div> 412<p> 413 <span class="emphasis"><em><span class="bold"><strong>Back to section . . .</strong></span></em></span> 414 </p> 415<div class="informaltable"><table class="table"> 416<colgroup><col></colgroup> 417<thead><tr></tr></thead> 418<tbody> 419<tr><td> 420 <p> 421 <a class="link" href="../interface/function_synopsis.html#function_synopsis_table"><span class="emphasis"><em><span class="bold"><strong>Function 422 Synopsis</strong></span></em></span></a> 423 </p> 424 </td></tr> 425<tr><td> 426 <p> 427 <a class="link" href="../interface.html" title="Interface"><span class="emphasis"><em><span class="bold"><strong>Interface</strong></span></em></span></a> 428 </p> 429 </td></tr> 430</tbody> 431</table></div> 432</div> 433<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 434<td align="left"></td> 435<td align="right"><div class="copyright-footer">Copyright © 2007-2010 Joachim 436 Faulhaber<br>Copyright © 1999-2006 Cortex Software 437 GmbH<p> 438 Distributed under the Boost Software License, Version 1.0. (See accompanying 439 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 440 </p> 441</div></td> 442</tr></table> 443<hr> 444<div class="spirit-nav"> 445<a accesskey="p" href="symmetric_difference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../function_reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="element_iteration.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 446</div> 447</body> 448</html> 449