1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Addition</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="selection.html" title="Selection"> 10<link rel="next" href="subtraction.html" title="Subtraction"> 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="selection.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="subtraction.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.addition"></a><a class="link" href="addition.html" title="Addition">Addition</a> 28</h3></div></div></div> 29<div class="toc"><dl class="toc"> 30<dt><span class="section"><a href="addition.html#boost_icl.function_reference.addition.synopsis">Synopsis</a></span></dt> 31<dt><span class="section"><a href="addition.html#boost_icl.function_reference.addition.functions">Functions</a></span></dt> 32<dt><span class="section"><a href="addition.html#boost_icl.function_reference.addition.inplace_operators">Inplace 33 operators</a></span></dt> 34<dt><span class="section"><a href="addition.html#boost_icl.function_reference.addition.infix_operators">Infix 35 operators</a></span></dt> 36</dl></div> 37<div class="section"> 38<div class="titlepage"><div><div><h4 class="title"> 39<a name="boost_icl.function_reference.addition.synopsis"></a><a class="link" href="addition.html#boost_icl.function_reference.addition.synopsis" title="Synopsis">Synopsis</a> 40</h4></div></div></div> 41<div class="informaltable"><table class="table"> 42<colgroup> 43<col> 44<col> 45<col> 46<col> 47<col> 48</colgroup> 49<thead><tr> 50<th> 51 <p> 52 Addition 53 </p> 54 </th> 55<th> 56 <p> 57 interval<br> sets 58 </p> 59 </th> 60<th> 61 <p> 62 interval<br> maps 63 </p> 64 </th> 65<th> 66 <p> 67 element<br> sets 68 </p> 69 </th> 70<th> 71 <p> 72 element<br> maps 73 </p> 74 </th> 75</tr></thead> 76<tbody> 77<tr> 78<td> 79 <p> 80 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 81 <span class="identifier">T</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 82 </p> 83 </td> 84<td> 85 <p> 86 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 87 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 88 </p> 89 </td> 90<td> 91 <p> 92 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 93 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 94 </p> 95 </td> 96<td> 97 </td> 98<td> 99 <p> 100 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 101 </p> 102 </td> 103</tr> 104<tr> 105<td> 106 <p> 107 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 108 <span class="identifier">add</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> 109 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 110 </p> 111 </td> 112<td> 113 <p> 114 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 115 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 116 </p> 117 </td> 118<td> 119 <p> 120 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 121 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 122 </p> 123 </td> 124<td> 125 <p> 126 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 127 </p> 128 </td> 129<td> 130 <p> 131 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 132 </p> 133 </td> 134</tr> 135<tr> 136<td> 137 <p> 138 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="identifier">J</span> 139 <span class="identifier">pos</span><span class="special">,</span> 140 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 141 </p> 142 </td> 143<td> 144 <p> 145 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 146 </p> 147 </td> 148<td> 149 <p> 150 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 151 </p> 152 </td> 153<td> 154 </td> 155<td> 156 <p> 157 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 158 </p> 159 </td> 160</tr> 161<tr> 162<td> 163 <p> 164 <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">add</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="identifier">J</span> 165 <span class="identifier">pos</span><span class="special">,</span> 166 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 167 </p> 168 </td> 169<td> 170 <p> 171 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 172 </p> 173 </td> 174<td> 175 <p> 176 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 177 </p> 178 </td> 179<td> 180 <p> 181 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 182 </p> 183 </td> 184<td> 185 <p> 186 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 187 </p> 188 </td> 189</tr> 190<tr> 191<td> 192 <p> 193 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 194 <span class="keyword">operator</span> <span class="special">+=(</span><span class="identifier">T</span><span class="special">&,</span> 195 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 196 </p> 197 </td> 198<td> 199 <p> 200 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 201 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 202 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 203 </p> 204 </td> 205<td> 206 <p> 207 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 208 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 209 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 210 </p> 211 </td> 212<td> 213 <p> 214 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 215 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 216 </p> 217 </td> 218<td> 219 <p> 220 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 221 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 222 </p> 223 </td> 224</tr> 225<tr> 226<td> 227 <p> 228 <code class="computeroutput"><span class="identifier">T</span> <span class="keyword">operator</span> 229 <span class="special">+</span> <span class="special">(</span><span class="identifier">T</span><span class="special">,</span> 230 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code><br> <code class="computeroutput"><span class="identifier">T</span> 231 <span class="keyword">operator</span> <span class="special">+</span> 232 <span class="special">(</span><span class="keyword">const</span> 233 <span class="identifier">P</span><span class="special">&,</span> 234 <span class="identifier">T</span><span class="special">)</span></code> 235 </p> 236 </td> 237<td> 238 <p> 239 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 240 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 241 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 242 </p> 243 </td> 244<td> 245 <p> 246 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 247 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 248 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 249 </p> 250 </td> 251<td> 252 <p> 253 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 254 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 255 </p> 256 </td> 257<td> 258 <p> 259 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 260 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 261 </p> 262 </td> 263</tr> 264<tr> 265<td> 266 <p> 267 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 268 <span class="keyword">operator</span> <span class="special">|=(</span> 269 <span class="identifier">T</span><span class="special">&,</span> 270 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 271 </p> 272 </td> 273<td> 274 <p> 275 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 276 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 277 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 278 </p> 279 </td> 280<td> 281 <p> 282 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 283 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 284 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 285 </p> 286 </td> 287<td> 288 <p> 289 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 290 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 291 </p> 292 </td> 293<td> 294 <p> 295 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 296 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 297 </p> 298 </td> 299</tr> 300<tr> 301<td> 302 <p> 303 <code class="computeroutput"><span class="identifier">T</span> <span class="keyword">operator</span> 304 <span class="special">|</span> <span class="special">(</span><span class="identifier">T</span><span class="special">,</span> 305 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code><br> <code class="computeroutput"><span class="identifier">T</span> 306 <span class="keyword">operator</span> <span class="special">|</span> 307 <span class="special">(</span><span class="keyword">const</span> 308 <span class="identifier">P</span><span class="special">&,</span> 309 <span class="identifier">T</span><span class="special">)</span></code> 310 </p> 311 </td> 312<td> 313 <p> 314 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 315 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 316 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 317 </p> 318 </td> 319<td> 320 <p> 321 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 322 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 323 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 324 </p> 325 </td> 326<td> 327 <p> 328 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 329 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 330 </p> 331 </td> 332<td> 333 <p> 334 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 335 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 336 </p> 337 </td> 338</tr> 339</tbody> 340</table></div> 341<p> 342 Functions and operators that implement <span class="emphasis"><em><span class="bold"><strong>Addition</strong></span></em></span> 343 on <span class="bold"><strong>icl</strong></span> objects are given in the table 344 above. <code class="computeroutput"><span class="keyword">operator</span> <span class="special">|=</span></code> 345 and <code class="computeroutput"><span class="keyword">operator</span> <span class="special">|</span></code> 346 are behavioral identical to <code class="computeroutput"><span class="keyword">operator</span> 347 <span class="special">+=</span></code> and <code class="computeroutput"><span class="keyword">operator</span> 348 <span class="special">+</span></code>. This is a redundancy that has 349 been introduced deliberately, because a <span class="emphasis"><em>set union</em></span> 350 semantics is often attached <code class="computeroutput"><span class="identifier">operators</span> 351 <span class="special">|=</span></code> and <code class="computeroutput"><span class="special">|</span></code>. 352 </p> 353<div class="informaltable"><table class="table"> 354<colgroup> 355<col> 356<col> 357</colgroup> 358<thead><tr> 359<th> 360 </th> 361<th> 362 <p> 363 Description of Addition 364 </p> 365 </th> 366</tr></thead> 367<tbody> 368<tr> 369<td> 370 <p> 371 <code class="computeroutput"><span class="identifier">Sets</span></code> 372 </p> 373 </td> 374<td> 375 <p> 376 Addition on Sets implements <span class="emphasis"><em><span class="bold"><strong>set 377 union</strong></span></em></span> 378 </p> 379 </td> 380</tr> 381<tr> 382<td> 383 <p> 384 <code class="computeroutput"><span class="identifier">Maps</span></code> 385 </p> 386 </td> 387<td> 388 <p> 389 Addition on Maps implements a <span class="emphasis"><em><span class="bold"><strong>map 390 union</strong></span></em></span> function similar to <span class="emphasis"><em>set 391 union</em></span>. If, on insertion of an element value pair 392 <code class="computeroutput"><span class="special">(</span><span class="identifier">k</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code> it's key <code class="computeroutput"><span class="identifier">k</span></code> 393 is in the map already, the addition function is propagated to 394 the associated value. This functionality has been introduced 395 as <span class="emphasis"><em>aggregate on collision</em></span> for element maps 396 and <span class="emphasis"><em>aggregate on overlap</em></span> for interval maps. 397 </p> 398 <p> 399 Find more on <a class="link" href="../concepts/aggrovering.html" title="Addability, Subtractability and Aggregate on Overlap"><span class="emphasis"><em>addability 400 of maps</em></span></a> and related <a class="link" href="../semantics/maps.html" title="Maps"><span class="emphasis"><em>semantic 401 issues</em></span></a> following the links. 402 </p> 403 <p> 404 Examples, demonstrating Addition on interval containers are 405 <a class="link" href="../examples/overlap_counter.html" title="Overlap counter"><span class="emphasis"><em>overlap 406 counter</em></span></a>, <a class="link" href="../examples/party.html" title="Party"><span class="emphasis"><em>party</em></span></a> 407 and <a class="link" href="../examples/partys_height_average.html" title="Party's height average"><span class="emphasis"><em>party's 408 height average.</em></span></a> 409 </p> 410 </td> 411</tr> 412</tbody> 413</table></div> 414<p> 415 For <code class="computeroutput"><span class="identifier">Sets</span></code> <span class="emphasis"><em><span class="bold"><strong>addition</strong></span></em></span> and <span class="emphasis"><em><span class="bold"><strong>insertion</strong></span></em></span> 416 are implemented identically. Functions <code class="computeroutput"><span class="identifier">add</span></code> 417 and <code class="computeroutput"><span class="identifier">insert</span></code> collapse to 418 the same function. For <code class="computeroutput"><span class="identifier">Maps</span></code> 419 <span class="emphasis"><em><span class="bold"><strong>addition</strong></span></em></span> and <span class="emphasis"><em><span class="bold"><strong>insertion</strong></span></em></span> work differently. Function 420 <code class="computeroutput"><span class="identifier">add</span></code> performs aggregations 421 on collision or overlap, while function <code class="computeroutput"><span class="identifier">insert</span></code> 422 only inserts values that do not yet have key values. 423 </p> 424</div> 425<div class="section"> 426<div class="titlepage"><div><div><h4 class="title"> 427<a name="boost_icl.function_reference.addition.functions"></a><a class="link" href="addition.html#boost_icl.function_reference.addition.functions" title="Functions">Functions</a> 428</h4></div></div></div> 429<p> 430 The admissible combinations of types for member function <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 431 can be summarized in the <span class="emphasis"><em><span class="bold"><strong>overload table</strong></span></em></span> 432 below: 433 </p> 434<p> 435</p> 436<pre class="programlisting"><span class="comment">// overload table for T\P| e i b p </span> 437<span class="identifier">T</span><span class="special">&</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span> <span class="special">---+--------</span> 438<span class="identifier">T</span><span class="special">&</span> <span class="identifier">add</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span> <span class="identifier">s</span> <span class="special">|</span> <span class="identifier">s</span> 439 <span class="identifier">m</span> <span class="special">|</span> <span class="identifier">m</span> 440 <span class="identifier">S</span> <span class="special">|</span> <span class="identifier">S</span> <span class="identifier">S</span> 441 <span class="identifier">M</span> <span class="special">|</span> <span class="identifier">M</span> <span class="identifier">M</span> 442</pre> 443<p> 444 </p> 445<p> 446 The next table contains complexity characteristics for <code class="computeroutput"><span class="identifier">add</span></code>. 447 </p> 448<div class="table"> 449<a name="boost_icl.function_reference.addition.functions.t0"></a><p class="title"><b>Table 1.21. Time Complexity for member function add on icl containers</b></p> 450<div class="table-contents"><table class="table" summary="Time Complexity for member function add on icl containers"> 451<colgroup> 452<col> 453<col> 454<col> 455<col> 456<col> 457</colgroup> 458<thead><tr> 459<th> 460 <p> 461 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 462 <span class="identifier">T</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code><br> <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> <span class="identifier">add</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</span> 463 <span class="identifier">P</span><span class="special">&)</span></code> 464 </p> 465 </th> 466<th> 467 <p> 468 domain<br> type 469 </p> 470 </th> 471<th> 472 <p> 473 interval<br> type 474 </p> 475 </th> 476<th> 477 <p> 478 domain<br> mapping<br> type 479 </p> 480 </th> 481<th> 482 <p> 483 interval<br> mapping<br> type 484 </p> 485 </th> 486</tr></thead> 487<tbody> 488<tr> 489<td> 490 <p> 491 <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> 492 </p> 493 </td> 494<td> 495 <p> 496 <span class="emphasis"><em>O(log n)</em></span> 497 </p> 498 </td> 499<td> 500 </td> 501<td> 502 </td> 503<td> 504 </td> 505</tr> 506<tr> 507<td> 508 <p> 509 <code class="computeroutput"><a class="link" href="../../boost/icl/map.html" title="Class template map">icl::map</a></code> 510 </p> 511 </td> 512<td> 513 </td> 514<td> 515 </td> 516<td> 517 <p> 518 <span class="emphasis"><em>O(log n)</em></span> 519 </p> 520 </td> 521<td> 522 </td> 523</tr> 524<tr> 525<td> 526 <p> 527 <code class="computeroutput"><a class="link" href="../../boost/icl/interval_set.html" title="Class template interval_set">interval_set</a></code><br> 528 <code class="computeroutput"><a class="link" href="../../boost/icl/separate_interval_set.html" title="Class template separate_interval_set">separate_interval_set</a></code> 529 </p> 530 </td> 531<td> 532 <p> 533 <span class="emphasis"><em>O(log n)</em></span> 534 </p> 535 </td> 536<td> 537 <p> 538 <span class="emphasis"><em>amortized<br> O(log n)</em></span> 539 </p> 540 </td> 541<td> 542 </td> 543<td> 544 </td> 545</tr> 546<tr> 547<td> 548 <p> 549 <code class="computeroutput"><a class="link" href="../../boost/icl/split_interval_set.html" title="Class template split_interval_set">split_interval_set</a></code> 550 </p> 551 </td> 552<td> 553 <p> 554 <span class="emphasis"><em>O(log n)</em></span> 555 </p> 556 </td> 557<td> 558 <p> 559 <span class="emphasis"><em>O(n)</em></span> 560 </p> 561 </td> 562<td> 563 </td> 564<td> 565 </td> 566</tr> 567<tr> 568<td> 569 <p> 570 <code class="computeroutput"><a class="link" href="../../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code><br> 571 <code class="computeroutput"><a class="link" href="../../boost/icl/split_interval_map.html" title="Class template split_interval_map">split_interval_map</a></code> 572 </p> 573 </td> 574<td> 575 </td> 576<td> 577 </td> 578<td> 579 <p> 580 <span class="emphasis"><em>O(log n)</em></span> 581 </p> 582 </td> 583<td> 584 <p> 585 <span class="emphasis"><em>O(n)</em></span> 586 </p> 587 </td> 588</tr> 589</tbody> 590</table></div> 591</div> 592<br class="table-break"><h6> 593<a name="boost_icl.function_reference.addition.functions.h0"></a> 594 <span class="phrase"><a name="boost_icl.function_reference.addition.functions.hinted_addition"></a></span><a class="link" href="addition.html#boost_icl.function_reference.addition.functions.hinted_addition">Hinted 595 addition</a> 596 </h6> 597<p> 598 Function <code class="computeroutput"><span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="identifier">J</span> <span class="identifier">prior</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&</span> <span class="identifier">addend</span><span class="special">)</span></code> 599 allows for an addition in <span class="emphasis"><em><span class="bold"><strong>constant time</strong></span></em></span>, 600 if <code class="computeroutput"><span class="identifier">addend</span></code> can be inserted 601 right after iterator <code class="computeroutput"><span class="identifier">prior</span></code> 602 without collision. If this is not possible the complexity characteristics 603 are as stated for the non hinted addition above. Hinted addition is available 604 for these combinations of types: 605</p> 606<pre class="programlisting"><span class="comment">// overload table for addition with hint T\P| e i b p </span> 607<span class="identifier">J</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">add</span><span class="special">(</span><span class="identifier">J</span> <span class="identifier">prior</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span> <span class="special">---+--------</span> 608<span class="identifier">J</span> <span class="identifier">add</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="identifier">J</span> <span class="identifier">prior</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span> <span class="identifier">s</span> <span class="special">|</span> <span class="identifier">s</span> 609 <span class="identifier">m</span> <span class="special">|</span> <span class="identifier">m</span> 610 <span class="identifier">S</span> <span class="special">|</span> <span class="identifier">S</span> 611 <span class="identifier">M</span> <span class="special">|</span> <span class="identifier">M</span> 612</pre> 613<p> 614 </p> 615</div> 616<div class="section"> 617<div class="titlepage"><div><div><h4 class="title"> 618<a name="boost_icl.function_reference.addition.inplace_operators"></a><a class="link" href="addition.html#boost_icl.function_reference.addition.inplace_operators" title="Inplace operators">Inplace 619 operators</a> 620</h4></div></div></div> 621<p> 622 The possible overloads of inplace <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span> 623 <span class="special">+=</span> <span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> are given by two tables, that show 624 admissible combinations of types. Row types show instantiations of argument 625 type <code class="computeroutput"><span class="identifier">T</span></code>. Columns types show 626 show instantiations of argument type <code class="computeroutput"><span class="identifier">P</span></code>. 627 If a combination of argument types is possible, the related table cell 628 contains the result type of the operation. <a class="link" href="../interface/function_synopsis.html#element_type">Placeholders</a> 629 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 630 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 631 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 632 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 633 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 634 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 635 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 636 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 637 will be used to denote <span class="emphasis"><em>elements, intervals, element value pairs, 638 interval value pairs, element sets, interval sets, element maps</em></span> 639 and <span class="emphasis"><em>interval maps</em></span>. The first table shows the overloads 640 of <code class="computeroutput"><span class="special">+=</span></code> for <span class="emphasis"><em>element 641 containers</em></span> the second table refers to <span class="emphasis"><em>interval containers</em></span>. 642 </p> 643<p> 644</p> 645<pre class="programlisting"><span class="comment">// overload tables for element containers: interval containers: </span> 646<span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span> <span class="special">+=</span> <span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span> <span class="special">+=</span> <span class="special">|</span> <span class="identifier">e</span> <span class="identifier">b</span> <span class="identifier">s</span> <span class="identifier">m</span> <span class="special">+=</span> <span class="special">|</span> <span class="identifier">e</span> <span class="identifier">i</span> <span class="identifier">b</span> <span class="identifier">p</span> <span class="identifier">S</span> <span class="identifier">M</span> 647 <span class="special">---+--------</span> <span class="special">---+------------</span> 648 <span class="identifier">s</span> <span class="special">|</span> <span class="identifier">s</span> <span class="identifier">s</span> <span class="identifier">S</span> <span class="special">|</span> <span class="identifier">S</span> <span class="identifier">S</span> <span class="identifier">S</span> 649 <span class="identifier">m</span> <span class="special">|</span> <span class="identifier">m</span> <span class="identifier">m</span> <span class="identifier">M</span> <span class="special">|</span> <span class="identifier">M</span> <span class="identifier">M</span> <span class="identifier">M</span> 650</pre> 651<p> 652 </p> 653<p> 654 For the definition of admissible overloads we separate <span class="emphasis"><em>element 655 containers</em></span> from <span class="emphasis"><em>interval containers</em></span>. Within 656 each group all combinations of types are supported for an operation, that 657 are in line with the <span class="bold"><strong>icl's</strong></span> design and 658 the sets of laws, that establish the <span class="bold"><strong>icl's</strong></span> 659 <a class="link" href="../semantics.html" title="Semantics">semantics</a>. 660 </p> 661<p> 662 Overloads between <span class="emphasis"><em>element containers</em></span> and <span class="emphasis"><em>interval 663 containers</em></span> could also be defined. But this has not been done 664 for pragmatical reasons: Each additional combination of types for an operation 665 enlarges the space of possible overloads. This makes the overload resolution 666 by compilers more complex, error prone and slows down compilation speed. 667 Error messages for unresolvable or ambiguous overloads are difficult to 668 read and understand. Therefore overloading of namespace global functions 669 in the <span class="bold"><strong>icl</strong></span> are limited to a reasonable 670 field of combinations, that are described here. 671 </p> 672</div> 673<h5> 674<a name="boost_icl.function_reference.addition.h0"></a> 675 <span class="phrase"><a name="boost_icl.function_reference.addition.complexity"></a></span><a class="link" href="addition.html#boost_icl.function_reference.addition.complexity">Complexity</a> 676 </h5> 677<p> 678 For different combinations of argument types <code class="computeroutput"><span class="identifier">T</span></code> 679 and <code class="computeroutput"><span class="identifier">P</span></code> different implementations 680 of the <code class="computeroutput"><span class="keyword">operator</span> <span class="special">+=</span></code> 681 are selected. These implementations show different complexity characteristics. 682 If <code class="computeroutput"><span class="identifier">T</span></code> is a container type, 683 the combination of domain elements (<a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a>) or element value pairs (<a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a>) is faster than a combination of intervals 684 (<a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a>) 685 or interval value pairs (<a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a>) which in turn is faster than the combination 686 of element or interval containers. The next table shows <span class="emphasis"><em>time complexities</em></span> 687 of addition for <span class="bold"><strong>icl's</strong></span> element containers. 688 </p> 689<p> 690 Sizes <code class="computeroutput"><span class="identifier">n</span></code> and <code class="computeroutput"><span class="identifier">m</span></code> are in the complexity statements are 691 sizes of objects <code class="computeroutput"><span class="identifier">T</span> <span class="identifier">y</span></code> 692 and <code class="computeroutput"><span class="identifier">P</span> <span class="identifier">x</span></code>: 693</p> 694<pre class="programlisting"><span class="identifier">n</span> <span class="special">=</span> <span class="identifier">iterative_size</span><span class="special">(</span><span class="identifier">y</span><span class="special">);</span> 695<span class="identifier">m</span> <span class="special">=</span> <span class="identifier">iterative_size</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span> <span class="comment">//if P is a container type</span> 696</pre> 697<p> 698 Note, that for an interval container the number of elements <code class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">size</span></code> 699 is different from the number of intervals that you can iterate over. Therefore 700 a function <code class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">iterative_size</span><span class="special">()</span></code> 701 is used that provides the desired kind of size. 702 </p> 703<div class="table"> 704<a name="boost_icl.function_reference.addition.t0"></a><p class="title"><b>Table 1.22. Time Complexity for inplace Addition on element containers</b></p> 705<div class="table-contents"><table class="table" summary="Time Complexity for inplace Addition on element containers"> 706<colgroup> 707<col> 708<col> 709<col> 710<col> 711<col> 712</colgroup> 713<thead><tr> 714<th> 715 <p> 716 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 717 <span class="keyword">operator</span> <span class="special">+=</span> 718 <span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> 719 <span class="identifier">P</span><span class="special">&</span> 720 <span class="identifier">x</span><span class="special">)</span></code> 721 </p> 722 </th> 723<th> 724 <p> 725 domain<br> type 726 </p> 727 </th> 728<th> 729 <p> 730 domain<br> mapping<br> type 731 </p> 732 </th> 733<th> 734 <p> 735 __ch_icl_sets__ 736 </p> 737 </th> 738<th> 739 <p> 740 __ch_icl_maps__ 741 </p> 742 </th> 743</tr></thead> 744<tbody> 745<tr> 746<td> 747 <p> 748 <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> 749 </p> 750 </td> 751<td> 752 <p> 753 <span class="emphasis"><em>O(log n)</em></span> 754 </p> 755 </td> 756<td> 757 </td> 758<td> 759 <p> 760 <span class="emphasis"><em>O(m)</em></span> 761 </p> 762 </td> 763<td> 764 </td> 765</tr> 766<tr> 767<td> 768 <p> 769 <code class="computeroutput"><a class="link" href="../../boost/icl/map.html" title="Class template map">icl::map</a></code> 770 </p> 771 </td> 772<td> 773 </td> 774<td> 775 <p> 776 <span class="emphasis"><em>O(log n)</em></span> 777 </p> 778 </td> 779<td> 780 </td> 781<td> 782 <p> 783 <span class="emphasis"><em>O(m)</em></span> 784 </p> 785 </td> 786</tr> 787</tbody> 788</table></div> 789</div> 790<br class="table-break"><p> 791 Time complexity characteristics of inplace addition for interval containers 792 is given by this table. 793 </p> 794<div class="table"> 795<a name="boost_icl.function_reference.addition.t1"></a><p class="title"><b>Table 1.23. Time Complexity for inplace Addition on interval containers</b></p> 796<div class="table-contents"><table class="table" summary="Time Complexity for inplace Addition on interval containers"> 797<colgroup> 798<col> 799<col> 800<col> 801<col> 802<col> 803<col> 804<col> 805<col> 806</colgroup> 807<thead><tr> 808<th> 809 <p> 810 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 811 <span class="keyword">operator</span> <span class="special">+=</span> 812 <span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> 813 <span class="identifier">P</span><span class="special">&</span> 814 <span class="identifier">x</span><span class="special">)</span></code> 815 </p> 816 </th> 817<th> 818 </th> 819<th> 820 <p> 821 domain<br> type 822 </p> 823 </th> 824<th> 825 <p> 826 interval<br> type 827 </p> 828 </th> 829<th> 830 <p> 831 domain<br> mapping<br> type 832 </p> 833 </th> 834<th> 835 <p> 836 interval<br> mapping<br> type 837 </p> 838 </th> 839<th> 840 <p> 841 interval<br> sets 842 </p> 843 </th> 844<th> 845 <p> 846 interval<br> maps 847 </p> 848 </th> 849</tr></thead> 850<tbody> 851<tr> 852<td> 853 <p> 854 interval_sets 855 </p> 856 </td> 857<td> 858 <p> 859 <code class="computeroutput"><a class="link" href="../../boost/icl/interval_set.html" title="Class template interval_set">interval_set</a></code><br> 860 <code class="computeroutput"><a class="link" href="../../boost/icl/separate_interval_set.html" title="Class template separate_interval_set">separate_interval_set</a></code> 861 </p> 862 </td> 863<td> 864 <p> 865 <span class="emphasis"><em>O(log n)</em></span> 866 </p> 867 </td> 868<td> 869 <p> 870 <span class="emphasis"><em>amortized<br> O(log n)</em></span> 871 </p> 872 </td> 873<td> 874 </td> 875<td> 876 </td> 877<td> 878 <p> 879 <span class="emphasis"><em>O(m log(n+m))</em></span> 880 </p> 881 </td> 882<td> 883 </td> 884</tr> 885<tr> 886<td> 887 </td> 888<td> 889 <p> 890 <code class="computeroutput"><a class="link" href="../../boost/icl/split_interval_set.html" title="Class template split_interval_set">split_interval_set</a></code> 891 </p> 892 </td> 893<td> 894 <p> 895 <span class="emphasis"><em>O(log n)</em></span> 896 </p> 897 </td> 898<td> 899 <p> 900 <span class="emphasis"><em>O(n)</em></span> 901 </p> 902 </td> 903<td> 904 </td> 905<td> 906 </td> 907<td> 908 <p> 909 <span class="emphasis"><em>O(m log(n+m))</em></span> 910 </p> 911 </td> 912<td> 913 </td> 914</tr> 915<tr> 916<td> 917 <p> 918 interval_maps 919 </p> 920 </td> 921<td> 922 </td> 923<td> 924 </td> 925<td> 926 </td> 927<td> 928 <p> 929 <span class="emphasis"><em>O(log n)</em></span> 930 </p> 931 </td> 932<td> 933 <p> 934 <span class="emphasis"><em>O(n)</em></span> 935 </p> 936 </td> 937<td> 938 </td> 939<td> 940 <p> 941 <span class="emphasis"><em>O(m log(n+m))</em></span> 942 </p> 943 </td> 944</tr> 945</tbody> 946</table></div> 947</div> 948<br class="table-break"><p> 949 Since the implementation of element and interval containers is based on the 950 <a class="link" href="../implementation.html" title="Implementation">link red-black tree implementation</a> 951 of std::AssociativeContainers, we have a logarithmic complexity for addition 952 of elements. Addition of intervals or interval value pairs is amortized logarithmic 953 for <code class="computeroutput"><a class="link" href="../../boost/icl/interval_set.html" title="Class template interval_set">interval_sets</a></code> and 954 <code class="computeroutput"><a class="link" href="../../boost/icl/separate_interval_set.html" title="Class template separate_interval_set">separate_interval_sets</a></code> 955 and linear for <code class="computeroutput"><a class="link" href="../../boost/icl/split_interval_set.html" title="Class template split_interval_set">split_interval_sets</a></code> 956 and <code class="computeroutput"><a class="link" href="../../boost/icl/interval_map.html" title="Class template interval_map">interval_maps</a></code>. 957 Addition is linear for element containers and loglinear for interval containers. 958 </p> 959<div class="section"> 960<div class="titlepage"><div><div><h4 class="title"> 961<a name="boost_icl.function_reference.addition.infix_operators"></a><a class="link" href="addition.html#boost_icl.function_reference.addition.infix_operators" title="Infix operators">Infix 962 operators</a> 963</h4></div></div></div> 964<p> 965 The admissible type combinations for infix <code class="computeroutput"><span class="keyword">operator</span> 966 <span class="special">+</span></code> are defined by the overload tables 967 below. 968 </p> 969<p> 970</p> 971<pre class="programlisting"><span class="comment">// overload tables for element containers: interval containers:</span> 972<span class="identifier">T</span> <span class="keyword">operator</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">T</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span> <span class="special">+</span> <span class="special">|</span> <span class="identifier">e</span> <span class="identifier">b</span> <span class="identifier">s</span> <span class="identifier">m</span> <span class="special">+</span> <span class="special">|</span> <span class="identifier">e</span> <span class="identifier">i</span> <span class="identifier">b</span> <span class="identifier">p</span> <span class="identifier">S1</span> <span class="identifier">S2</span> <span class="identifier">S3</span> <span class="identifier">M1</span> <span class="identifier">M3</span> 973<span class="identifier">T</span> <span class="keyword">operator</span> <span class="special">+</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">P</span><span class="special">&,</span> <span class="identifier">T</span><span class="special">)</span> <span class="special">---+--------</span> <span class="special">---+---------------------------</span> 974 <span class="identifier">e</span> <span class="special">|</span> <span class="identifier">s</span> <span class="identifier">e</span> <span class="special">|</span> <span class="identifier">S1</span> <span class="identifier">S2</span> <span class="identifier">S3</span> 975 <span class="identifier">b</span> <span class="special">|</span> <span class="identifier">m</span> <span class="identifier">i</span> <span class="special">|</span> <span class="identifier">S1</span> <span class="identifier">S2</span> <span class="identifier">S3</span> 976 <span class="identifier">s</span> <span class="special">|</span> <span class="identifier">s</span> <span class="identifier">s</span> <span class="identifier">b</span> <span class="special">|</span> <span class="identifier">M1</span> <span class="identifier">M3</span> 977 <span class="identifier">m</span> <span class="special">|</span> <span class="identifier">m</span> <span class="identifier">m</span> <span class="identifier">p</span> <span class="special">|</span> <span class="identifier">M1</span> <span class="identifier">M3</span> 978 <span class="identifier">S1</span> <span class="special">|</span> <span class="identifier">S1</span> <span class="identifier">S1</span> <span class="identifier">S1</span> <span class="identifier">S2</span> <span class="identifier">S3</span> 979 <span class="identifier">S2</span> <span class="special">|</span> <span class="identifier">S2</span> <span class="identifier">S2</span> <span class="identifier">S2</span> <span class="identifier">S2</span> <span class="identifier">S3</span> 980 <span class="identifier">S3</span> <span class="special">|</span> <span class="identifier">S3</span> <span class="identifier">S3</span> <span class="identifier">S3</span> <span class="identifier">S3</span> <span class="identifier">S3</span> 981 <span class="identifier">M1</span> <span class="special">|</span> <span class="identifier">M1</span> <span class="identifier">M1</span> <span class="identifier">M1</span> <span class="identifier">M3</span> 982 <span class="identifier">M3</span> <span class="special">|</span> <span class="identifier">M3</span> <span class="identifier">M3</span> <span class="identifier">M3</span> <span class="identifier">M3</span> 983</pre> 984<p> 985 </p> 986</div> 987<p> 988 <span class="emphasis"><em><span class="bold"><strong>See also . . .</strong></span></em></span> 989 </p> 990<div class="informaltable"><table class="table"> 991<colgroup><col></colgroup> 992<thead><tr></tr></thead> 993<tbody> 994<tr><td> 995 <p> 996 <a class="link" href="subtraction.html" title="Subtraction"><span class="emphasis"><em><span class="bold"><strong>Subtraction</strong></span></em></span></a> 997 </p> 998 </td></tr> 999<tr><td> 1000 <p> 1001 <a class="link" href="insertion.html" title="Insertion"><span class="emphasis"><em><span class="bold"><strong>Insertion</strong></span></em></span></a> 1002 </p> 1003 </td></tr> 1004</tbody> 1005</table></div> 1006<p> 1007 <span class="emphasis"><em><span class="bold"><strong>Back to section . . .</strong></span></em></span> 1008 </p> 1009<div class="informaltable"><table class="table"> 1010<colgroup><col></colgroup> 1011<thead><tr></tr></thead> 1012<tbody> 1013<tr><td> 1014 <p> 1015 <a class="link" href="../interface/function_synopsis.html#function_synopsis_table"><span class="emphasis"><em><span class="bold"><strong>Function 1016 Synopsis</strong></span></em></span></a> 1017 </p> 1018 </td></tr> 1019<tr><td> 1020 <p> 1021 <a class="link" href="../interface.html" title="Interface"><span class="emphasis"><em><span class="bold"><strong>Interface</strong></span></em></span></a> 1022 </p> 1023 </td></tr> 1024</tbody> 1025</table></div> 1026</div> 1027<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 1028<td align="left"></td> 1029<td align="right"><div class="copyright-footer">Copyright © 2007-2010 Joachim 1030 Faulhaber<br>Copyright © 1999-2006 Cortex Software 1031 GmbH<p> 1032 Distributed under the Boost Software License, Version 1.0. (See accompanying 1033 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>) 1034 </p> 1035</div></td> 1036</tr></table> 1037<hr> 1038<div class="spirit-nav"> 1039<a accesskey="p" href="selection.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="subtraction.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 1040</div> 1041</body> 1042</html> 1043