1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Intersection</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="erasure.html" title="Erasure"> 10<link rel="next" href="symmetric_difference.html" title="Symmetric Difference"> 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="erasure.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="symmetric_difference.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.intersection"></a><a class="link" href="intersection.html" title="Intersection">Intersection</a> 28</h3></div></div></div> 29<div class="toc"><dl class="toc"> 30<dt><span class="section"><a href="intersection.html#boost_icl.function_reference.intersection.synopsis">Synopsis</a></span></dt> 31<dt><span class="section"><a href="intersection.html#boost_icl.function_reference.intersection.functions">Functions</a></span></dt> 32<dt><span class="section"><a href="intersection.html#boost_icl.function_reference.intersection.inplace_operators">Inplace 33 operators</a></span></dt> 34<dt><span class="section"><a href="intersection.html#boost_icl.function_reference.intersection.infix_operators">Infix 35 operators</a></span></dt> 36<dt><span class="section"><a href="intersection.html#boost_icl.function_reference.intersection.intersection_tester">Intersection 37 tester</a></span></dt> 38</dl></div> 39<div class="section"> 40<div class="titlepage"><div><div><h4 class="title"> 41<a name="boost_icl.function_reference.intersection.synopsis"></a><a class="link" href="intersection.html#boost_icl.function_reference.intersection.synopsis" title="Synopsis">Synopsis</a> 42</h4></div></div></div> 43<div class="informaltable"><table class="table"> 44<colgroup> 45<col> 46<col> 47<col> 48<col> 49<col> 50<col> 51</colgroup> 52<thead><tr> 53<th> 54 <p> 55 Intersection 56 </p> 57 </th> 58<th> 59 <p> 60 interval<br> type 61 </p> 62 </th> 63<th> 64 <p> 65 interval<br> sets 66 </p> 67 </th> 68<th> 69 <p> 70 interval<br> maps 71 </p> 72 </th> 73<th> 74 <p> 75 element<br> sets 76 </p> 77 </th> 78<th> 79 <p> 80 element<br> maps 81 </p> 82 </th> 83</tr></thead> 84<tbody> 85<tr> 86<td> 87 <p> 88 <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">add_intersection</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</span> 89 <span class="identifier">T</span><span class="special">&,</span> 90 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 91 </p> 92 </td> 93<td> 94 </td> 95<td> 96 <p> 97 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 98 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 99 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 100 </p> 101 </td> 102<td> 103 <p> 104 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 105 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 106 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 107 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 108 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 109 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 110 </p> 111 </td> 112<td> 113 </td> 114<td> 115 </td> 116</tr> 117<tr> 118<td> 119 <p> 120 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 121 <span class="keyword">operator</span> <span class="special">&=(</span><span class="identifier">T</span><span class="special">&,</span> 122 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code> 123 </p> 124 </td> 125<td> 126 </td> 127<td> 128 <p> 129 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 130 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 131 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 132 </p> 133 </td> 134<td> 135 <p> 136 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 137 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 138 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 139 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 140 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 141 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 142 </p> 143 </td> 144<td> 145 <p> 146 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 147 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 148 </p> 149 </td> 150<td> 151 <p> 152 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 153 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 154 </p> 155 </td> 156</tr> 157<tr> 158<td> 159 <p> 160 <code class="computeroutput"><span class="identifier">T</span> <span class="keyword">operator</span> 161 <span class="special">&</span> <span class="special">(</span><span class="identifier">T</span><span class="special">,</span> 162 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code><br> <code class="computeroutput"><span class="identifier">T</span> 163 <span class="keyword">operator</span> <span class="special">&</span> 164 <span class="special">(</span><span class="keyword">const</span> 165 <span class="identifier">P</span><span class="special">&,</span> 166 <span class="identifier">T</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#element_type"><span class="bold"><strong>e</strong></span></a> 177 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 178 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 179 </p> 180 </td> 181<td> 182 <p> 183 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 184 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 185 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 186 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 187 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 188 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 189 </p> 190 </td> 191<td> 192 <p> 193 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 194 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 195 </p> 196 </td> 197<td> 198 <p> 199 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 200 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 201 </p> 202 </td> 203</tr> 204<tr> 205<td> 206 <p> 207 <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">intersects</span><span class="special">(</span><span class="keyword">const</span> 208 <span class="identifier">T</span><span class="special">&,</span> 209 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span></code><br> <code class="computeroutput"><span class="keyword">bool</span> 210 <span class="identifier">disjoint</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</span> 211 <span class="identifier">P</span><span class="special">&)</span></code> 212 </p> 213 </td> 214<td> 215 <p> 216 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 217 </p> 218 </td> 219<td> 220 <p> 221 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 222 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 223 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 224 </p> 225 </td> 226<td> 227 <p> 228 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 229 <a class="link" href="../interface/function_synopsis.html#interval_type"><span class="bold"><strong>i</strong></span></a> 230 <a class="link" href="../interface/function_synopsis.html#interval_set_types"><span class="bold"><strong>S</strong></span></a> 231 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 232 <a class="link" href="../interface/function_synopsis.html#interval_mapping_type"><span class="bold"><strong>p</strong></span></a> 233 <a class="link" href="../interface/function_synopsis.html#interval_map_types"><span class="bold"><strong>M</strong></span></a> 234 </p> 235 </td> 236<td> 237 <p> 238 <a class="link" href="../interface/function_synopsis.html#element_type"><span class="bold"><strong>e</strong></span></a> 239 <a class="link" href="../interface/function_synopsis.html#itl_set_type"><span class="bold"><strong>s</strong></span></a> 240 </p> 241 </td> 242<td> 243 <p> 244 <a class="link" href="../interface/function_synopsis.html#element_mapping_type"><span class="bold"><strong>b</strong></span></a> 245 <a class="link" href="../interface/function_synopsis.html#itl_map_type"><span class="bold"><strong>m</strong></span></a> 246 </p> 247 </td> 248</tr> 249</tbody> 250</table></div> 251<p> 252 Functions and operators that are related to <span class="emphasis"><em><span class="bold"><strong>intersection</strong></span></em></span> 253 on <span class="bold"><strong>icl</strong></span> objects are given in the table 254 above. 255 </p> 256<div class="informaltable"><table class="table"> 257<colgroup> 258<col> 259<col> 260</colgroup> 261<thead><tr> 262<th> 263 </th> 264<th> 265 <p> 266 Description of Intersection 267 </p> 268 </th> 269</tr></thead> 270<tbody> 271<tr> 272<td> 273 <p> 274 <code class="computeroutput"><span class="identifier">Sets</span></code> 275 </p> 276 </td> 277<td> 278 <p> 279 Intersection on Sets implements <span class="emphasis"><em><span class="bold"><strong>set 280 intersection</strong></span></em></span> 281 </p> 282 </td> 283</tr> 284<tr> 285<td> 286 <p> 287 <code class="computeroutput"><span class="identifier">Maps</span></code> 288 </p> 289 </td> 290<td> 291 <p> 292 Intersection on Maps implements a <span class="emphasis"><em><span class="bold"><strong>map 293 intersection</strong></span></em></span> function similar to <span class="emphasis"><em>set 294 intersection</em></span>. If, on intersection, an element value 295 pair <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> 296 is in the map already, the intersection function is propagated 297 to the associated value, if it exists for the Map's codomain_type. 298 </p> 299 <p> 300 If the codomain_type has no intersection operation, associated 301 values are combined using addition. For partial map types this 302 results in an addition on the intersection of the domains of 303 the intersected sets. For total maps intersection and addition 304 are identical in this case. 305 </p> 306 <p> 307 See also <a class="link" href="../semantics/quantifiers__maps_of_numbers.html#boost_icl.semantics.quantifiers__maps_of_numbers.intersection_on_quantifiers"><span class="emphasis"><em>intersection 308 on Maps of numbers</em></span></a>. 309 </p> 310 <p> 311 A Map can be intersected with key types: an element (an interval 312 for interval_maps) and and a Set. This results in the selection 313 of a submap, and can be defined as a generalized selection function 314 on Maps. 315 </p> 316 </td> 317</tr> 318</tbody> 319</table></div> 320</div> 321<div class="section"> 322<div class="titlepage"><div><div><h4 class="title"> 323<a name="boost_icl.function_reference.intersection.functions"></a><a class="link" href="intersection.html#boost_icl.function_reference.intersection.functions" title="Functions">Functions</a> 324</h4></div></div></div> 325<p> 326 The overloaded function 327 </p> 328<p> 329 <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">add_intersection</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> 330 <span class="identifier">result</span><span class="special">,</span> 331 <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">y</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&</span> <span class="identifier">x</span><span class="special">)</span></code> 332 </p> 333<p> 334 allows to accumulate the intersection of <code class="computeroutput"><span class="identifier">y</span></code> 335 and <code class="computeroutput"><span class="identifier">x</span></code> in the first argument 336 <code class="computeroutput"><span class="identifier">result</span></code>. <code class="computeroutput"><span class="identifier">Result</span></code> 337 might already contain data. In this case the intersection of <code class="computeroutput"><span class="identifier">y</span></code> and <code class="computeroutput"><span class="identifier">x</span></code> 338 is <code class="computeroutput"><span class="identifier">added</span></code> the the contents 339 of <code class="computeroutput"><span class="identifier">result</span></code>. 340</p> 341<pre class="programlisting"><span class="identifier">T</span> <span class="identifier">s1</span> <span class="special">=</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">s2</span> <span class="special">=</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">g</span><span class="special">;</span> <span class="identifier">P</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">h</span><span class="special">;</span> <span class="comment">// The effect of </span> 342<span class="identifier">add_intersection</span><span class="special">(</span><span class="identifier">s1</span><span class="special">,</span> <span class="identifier">y</span><span class="special">,</span> <span class="identifier">x</span><span class="special">);</span> <span class="comment">// add_intersection </span> 343<span class="identifier">s2</span> <span class="special">+=</span> <span class="special">(</span><span class="identifier">y</span> <span class="special">&</span> <span class="identifier">x</span><span class="special">);</span> <span class="comment">// and & followed by +=</span> 344<span class="identifier">assert</span><span class="special">(</span><span class="identifier">s1</span><span class="special">==</span><span class="identifier">s2</span><span class="special">);</span> <span class="comment">// is identical</span> 345</pre> 346<p> 347 </p> 348<p> 349 This might be convenient, if intersection is used like a generalized selection 350 function. Using element or segment types for <code class="computeroutput"><span class="identifier">P</span></code>, 351 we can select small parts of a container <code class="computeroutput"><span class="identifier">y</span></code> 352 and accumulate them in <code class="computeroutput"><span class="identifier">section</span></code>. 353 </p> 354<p> 355 The admissible combinations of types for function <code class="computeroutput"><span class="keyword">void</span> 356 <span class="identifier">add_intersection</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</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> 357 can be summarized in the <span class="emphasis"><em><span class="bold"><strong>overload table</strong></span></em></span> 358 below. Compared to other overload tables, placements of function arguments 359 are different: Row headers denote type <code class="computeroutput"><span class="identifier">T</span></code> 360 of <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code> 361 object. Columns headers denote type <code class="computeroutput"><span class="identifier">P</span></code> 362 of the second function argument. The table cells contain the arguments 363 <code class="computeroutput"><span class="identifier">T</span></code> of the intersections 364 <code class="computeroutput"><span class="identifier">result</span></code>, which is the functions 365 first argument. 366 </p> 367<p> 368</p> 369<pre class="programlisting"><span class="comment">/* overload table for */</span> <span class="identifier">T</span><span class="special">\</span><span class="identifier">P</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> 370<span class="keyword">void</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">add_intersection</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">result</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span><span class="keyword">const</span> <span class="special">---+--------</span> 371 <span class="identifier">s</span> <span class="special">|</span> <span class="identifier">s</span> 372 <span class="identifier">m</span> <span class="special">|</span> <span class="identifier">m</span> <span class="identifier">m</span> 373 <span class="identifier">S</span> <span class="special">|</span> <span class="identifier">S</span> <span class="identifier">S</span> 374 <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="identifier">M</span> 375</pre> 376<p> 377 </p> 378<p> 379 The next table contains complexity characteristics for function <code class="computeroutput"><span class="identifier">add_intersection</span></code>. 380 </p> 381<div class="table"> 382<a name="boost_icl.function_reference.intersection.functions.t0"></a><p class="title"><b>Table 1.34. Time Complexity for function add_intersection on icl containers</b></p> 383<div class="table-contents"><table class="table" summary="Time Complexity for function add_intersection on icl containers"> 384<colgroup> 385<col> 386<col> 387<col> 388<col> 389<col> 390</colgroup> 391<thead><tr> 392<th> 393 <p> 394 <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">add_intersection</span><span class="special">(</span><span class="identifier">T</span><span class="special">&,</span> <span class="keyword">const</span> 395 <span class="identifier">T</span><span class="special">&,</span> 396 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&)</span><span class="keyword">const</span></code> 397 </p> 398 </th> 399<th> 400 <p> 401 domain<br> type 402 </p> 403 </th> 404<th> 405 <p> 406 interval<br> type 407 </p> 408 </th> 409<th> 410 <p> 411 domain<br> mapping<br> type 412 </p> 413 </th> 414<th> 415 <p> 416 interval<br> mapping<br> type 417 </p> 418 </th> 419</tr></thead> 420<tbody> 421<tr> 422<td> 423 <p> 424 <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> 425 </p> 426 </td> 427<td> 428 <p> 429 <span class="emphasis"><em>O(log n)</em></span> 430 </p> 431 </td> 432<td> 433 </td> 434<td> 435 </td> 436<td> 437 </td> 438</tr> 439<tr> 440<td> 441 <p> 442 <code class="computeroutput"><a class="link" href="../../boost/icl/map.html" title="Class template map">icl::map</a></code> 443 </p> 444 </td> 445<td> 446 <p> 447 <span class="emphasis"><em>O(log n)</em></span> 448 </p> 449 </td> 450<td> 451 </td> 452<td> 453 <p> 454 <span class="emphasis"><em>O(log n)</em></span> 455 </p> 456 </td> 457<td> 458 </td> 459</tr> 460<tr> 461<td> 462 <p> 463 <code class="computeroutput"><a class="link" href="../../boost/icl/interval_set.html" title="Class template interval_set">interval_sets</a></code> 464 </p> 465 </td> 466<td> 467 <p> 468 <span class="emphasis"><em>O(log n)</em></span> 469 </p> 470 </td> 471<td> 472 <p> 473 <span class="emphasis"><em>O(n)</em></span> 474 </p> 475 </td> 476<td> 477 </td> 478<td> 479 </td> 480</tr> 481<tr> 482<td> 483 <p> 484 <code class="computeroutput"><a class="link" href="../../boost/icl/interval_map.html" title="Class template interval_map">interval_maps</a></code> 485 </p> 486 </td> 487<td> 488 <p> 489 <span class="emphasis"><em>O(log n)</em></span> 490 </p> 491 </td> 492<td> 493 <p> 494 <span class="emphasis"><em>O(n)</em></span> 495 </p> 496 </td> 497<td> 498 <p> 499 <span class="emphasis"><em>O(n)</em></span> 500 </p> 501 </td> 502<td> 503 <p> 504 <span class="emphasis"><em>O(n)</em></span> 505 </p> 506 </td> 507</tr> 508</tbody> 509</table></div> 510</div> 511<br class="table-break"> 512</div> 513<div class="section"> 514<div class="titlepage"><div><div><h4 class="title"> 515<a name="boost_icl.function_reference.intersection.inplace_operators"></a><a class="link" href="intersection.html#boost_icl.function_reference.intersection.inplace_operators" title="Inplace operators">Inplace 516 operators</a> 517</h4></div></div></div> 518<p> 519 The overload tables below are giving admissible type combinations for the 520 intersection <code class="computeroutput"><span class="keyword">operator</span> <span class="special">&=</span></code>. 521 As for the overload patterns of <span class="emphasis"><em>subtraction</em></span> intersections 522 are possible within Sets and Maps but also for Maps combined with <span class="emphasis"><em>key 523 objects</em></span> which are <span class="emphasis"><em>key elements, intervals</em></span> 524 and <span class="emphasis"><em>Sets of keys</em></span>. 525 </p> 526<p> 527</p> 528<pre class="programlisting"><span class="comment">// overload tables for element containers: interval containers:</span> 529<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> 530 <span class="special">---+--------</span> <span class="special">---+------------</span> 531 <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> 532 <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="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> <span class="identifier">M</span> <span class="identifier">M</span> <span class="identifier">M</span> 533</pre> 534<p> 535 </p> 536<p> 537 While intersection on maps can be viewed as a <span class="emphasis"><em><span class="bold"><strong>generalisation 538 of set intersection</strong></span></em></span>. The combination on Maps and 539 Sets can be interpreted as a <span class="emphasis"><em><span class="bold"><strong>generalized 540 selection function</strong></span></em></span>, because it allows to select parts 541 of a maps using <span class="emphasis"><em>key</em></span> or <span class="emphasis"><em>selection objects</em></span>. 542 So we have a <span class="emphasis"><em><span class="bold"><strong>generalized intersection</strong></span></em></span> 543 for these overloads, 544 </p> 545<p> 546</p> 547<pre class="programlisting"><span class="comment">/* (Generalized) intersection */</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> 548 <span class="special">---+--------</span> <span class="special">---+------------</span> 549 <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> 550 <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> 551</pre> 552<p> 553 </p> 554<p> 555 <span class="bold"><strong>and</strong></span> a <span class="emphasis"><em><span class="bold"><strong>selection 556 by key objects</strong></span></em></span> here: 557 </p> 558<p> 559</p> 560<pre class="programlisting"><span class="comment">/* Selection by key objects */</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> 561 <span class="special">---+--------</span> <span class="special">---+------------</span> 562 <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> 563 <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> 564</pre> 565<p> 566 </p> 567<p> 568 The differences for the different functionalities of <code class="computeroutput"><span class="keyword">operator</span> 569 <span class="special">&=</span></code> are on the Map-row of the 570 tables. Both functionalities fall together for Sets in the function <span class="emphasis"><em><span class="bold"><strong>set intersection</strong></span></em></span>. 571 </p> 572<p> 573 Complexity characteristics for inplace intersection operations are given 574 by the next tables where 575</p> 576<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> 577<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> 578</pre> 579<p> 580 </p> 581<div class="table"> 582<a name="boost_icl.function_reference.intersection.inplace_operators.t0"></a><p class="title"><b>Table 1.35. Time Complexity for inplace intersection on element containers</b></p> 583<div class="table-contents"><table class="table" summary="Time Complexity for inplace intersection on element containers"> 584<colgroup> 585<col> 586<col> 587<col> 588<col> 589<col> 590</colgroup> 591<thead><tr> 592<th> 593 <p> 594 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 595 <span class="keyword">operator</span> <span class="special">&=</span> 596 <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> 597 <span class="identifier">P</span><span class="special">&</span> 598 <span class="identifier">x</span><span class="special">)</span></code> 599 </p> 600 </th> 601<th> 602 <p> 603 domain<br> type 604 </p> 605 </th> 606<th> 607 <p> 608 domain<br> mapping<br> type 609 </p> 610 </th> 611<th> 612 <p> 613 std::set 614 </p> 615 </th> 616<th> 617 <p> 618 icl::map 619 </p> 620 </th> 621</tr></thead> 622<tbody> 623<tr> 624<td> 625 <p> 626 <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> 627 </p> 628 </td> 629<td> 630 <p> 631 <span class="emphasis"><em>O(log n)</em></span> 632 </p> 633 </td> 634<td> 635 </td> 636<td> 637 <p> 638 <span class="emphasis"><em>O(m log n)</em></span> 639 </p> 640 </td> 641<td> 642 </td> 643</tr> 644<tr> 645<td> 646 <p> 647 <code class="computeroutput"><a class="link" href="../../boost/icl/map.html" title="Class template map">icl::map</a></code> 648 </p> 649 </td> 650<td> 651 <p> 652 <span class="emphasis"><em>O(log n)</em></span> 653 </p> 654 </td> 655<td> 656 <p> 657 <span class="emphasis"><em>O(log n)</em></span> 658 </p> 659 </td> 660<td> 661 <p> 662 <span class="emphasis"><em>O(m log n)</em></span> 663 </p> 664 </td> 665<td> 666 <p> 667 <span class="emphasis"><em>O(m log n)</em></span> 668 </p> 669 </td> 670</tr> 671</tbody> 672</table></div> 673</div> 674<br class="table-break"><div class="table"> 675<a name="boost_icl.function_reference.intersection.inplace_operators.t1"></a><p class="title"><b>Table 1.36. Time Complexity for inplace intersection on interval containers</b></p> 676<div class="table-contents"><table class="table" summary="Time Complexity for inplace intersection on interval containers"> 677<colgroup> 678<col> 679<col> 680<col> 681<col> 682<col> 683<col> 684<col> 685</colgroup> 686<thead><tr> 687<th> 688 <p> 689 <code class="computeroutput"><span class="identifier">T</span><span class="special">&</span> 690 <span class="keyword">operator</span> <span class="special">&=</span> 691 <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> 692 <span class="identifier">P</span><span class="special">&</span> 693 <span class="identifier">x</span><span class="special">)</span></code> 694 </p> 695 </th> 696<th> 697 <p> 698 domain<br> type 699 </p> 700 </th> 701<th> 702 <p> 703 interval<br> type 704 </p> 705 </th> 706<th> 707 <p> 708 domain<br> mapping<br> type 709 </p> 710 </th> 711<th> 712 <p> 713 interval<br> mapping<br> type 714 </p> 715 </th> 716<th> 717 <p> 718 interval<br> sets 719 </p> 720 </th> 721<th> 722 <p> 723 interval<br> maps 724 </p> 725 </th> 726</tr></thead> 727<tbody> 728<tr> 729<td> 730 <p> 731 interval_sets 732 </p> 733 </td> 734<td> 735 <p> 736 <span class="emphasis"><em>O(log n)</em></span> 737 </p> 738 </td> 739<td> 740 <p> 741 <span class="emphasis"><em>O(n)</em></span> 742 </p> 743 </td> 744<td> 745 </td> 746<td> 747 </td> 748<td> 749 <p> 750 <span class="emphasis"><em>O(m log(n+m))</em></span> 751 </p> 752 </td> 753<td> 754 </td> 755</tr> 756<tr> 757<td> 758 <p> 759 interval_maps 760 </p> 761 </td> 762<td> 763 <p> 764 <span class="emphasis"><em>O(log n)</em></span> 765 </p> 766 </td> 767<td> 768 <p> 769 <span class="emphasis"><em>O(n)</em></span> 770 </p> 771 </td> 772<td> 773 <p> 774 <span class="emphasis"><em>O(log n)</em></span> 775 </p> 776 </td> 777<td> 778 <p> 779 <span class="emphasis"><em>O(n)</em></span> 780 </p> 781 </td> 782<td> 783 <p> 784 <span class="emphasis"><em>O(m log(n+m))</em></span> 785 </p> 786 </td> 787<td> 788 <p> 789 <span class="emphasis"><em>O(m log(n+m))</em></span> 790 </p> 791 </td> 792</tr> 793</tbody> 794</table></div> 795</div> 796<br class="table-break"> 797</div> 798<div class="section"> 799<div class="titlepage"><div><div><h4 class="title"> 800<a name="boost_icl.function_reference.intersection.infix_operators"></a><a class="link" href="intersection.html#boost_icl.function_reference.intersection.infix_operators" title="Infix operators">Infix 801 operators</a> 802</h4></div></div></div> 803<p> 804 For the <span class="bold"><strong>icl's</strong></span> infix intersection the following 805 overloads are available: 806 </p> 807<p> 808</p> 809<pre class="programlisting"><span class="comment">// overload tables for element containers: interval containers:</span> 810<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> 811<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> 812 <span class="identifier">e</span> <span class="special">|</span> <span class="identifier">s</span> <span class="identifier">m</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> <span class="identifier">M1</span> <span class="identifier">M3</span> 813 <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">i</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> 814 <span class="identifier">s</span> <span class="special">|</span> <span class="identifier">s</span> <span class="identifier">s</span> <span class="identifier">m</span> <span class="identifier">b</span> <span class="special">|</span> <span class="identifier">M1</span> <span class="identifier">M3</span> 815 <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="identifier">m</span> <span class="identifier">p</span> <span class="special">|</span> <span class="identifier">M1</span> <span class="identifier">M3</span> 816 <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> <span class="identifier">M1</span> <span class="identifier">M3</span> 817 <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> <span class="identifier">M1</span> <span class="identifier">M3</span> 818 <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> <span class="identifier">M1</span> <span class="identifier">M3</span> 819 <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">M1</span> <span class="identifier">M1</span> <span class="identifier">M1</span> <span class="identifier">M1</span> <span class="identifier">M1</span> <span class="identifier">M3</span> 820 <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> <span class="identifier">M3</span> <span class="identifier">M3</span> <span class="identifier">M3</span> <span class="identifier">M3</span> <span class="identifier">M3</span> 821</pre> 822<p> 823 </p> 824<p> 825 To resolve ambiguities among interval containers the <span class="emphasis"><em><span class="bold"><strong>finer</strong></span></em></span> container type is chosen as result 826 type. 827 </p> 828<p> 829 Again, we can split up the overload tables of <code class="computeroutput"><span class="keyword">operator</span> 830 <span class="special">&</span></code> in a part describing the 831 <span class="emphasis"><em>*generalized intersection</em></span> on interval containers and 832 a second part defining the <span class="emphasis"><em>*selection by key object</em></span> 833 functionality. 834 </p> 835<p> 836</p> 837<pre class="programlisting"><span class="comment">/* (Generalized) intersection */</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> 838 <span class="special">---+--------</span> <span class="special">---+---------------------------</span> 839 <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> 840 <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">i</span> <span class="identifier">S1</span> <span class="identifier">S2</span> <span class="identifier">S3</span> 841 <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> 842 <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> 843 <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> 844 <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> 845 <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> 846 <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> 847 <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> 848</pre> 849<p> 850 </p> 851<p> 852</p> 853<pre class="programlisting"><span class="comment">/* Selection by key objects */</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> 854 <span class="special">---+--------</span> <span class="special">---+---------------------------</span> 855 <span class="identifier">e</span> <span class="special">|</span> <span class="identifier">s</span> <span class="identifier">m</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> <span class="identifier">M1</span> <span class="identifier">M3</span> 856 <span class="identifier">b</span> <span class="special">|</span> <span class="identifier">i</span> <span class="special">|</span> <span class="identifier">i</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> 857 <span class="identifier">s</span> <span class="special">|</span> <span class="identifier">s</span> <span class="identifier">s</span> <span class="identifier">m</span> <span class="identifier">b</span> <span class="special">|</span> 858 <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> 859 <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> <span class="identifier">M1</span> <span class="identifier">M3</span> 860 <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> <span class="identifier">M1</span> <span class="identifier">M3</span> 861 <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> <span class="identifier">M1</span> <span class="identifier">M3</span> 862 <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">M1</span> <span class="identifier">M1</span> 863 <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> <span class="identifier">M3</span> 864</pre> 865<p> 866 </p> 867</div> 868<div class="section"> 869<div class="titlepage"><div><div><h4 class="title"> 870<a name="boost_icl.function_reference.intersection.intersection_tester"></a><a class="link" href="intersection.html#boost_icl.function_reference.intersection.intersection_tester" title="Intersection tester">Intersection 871 tester</a> 872</h4></div></div></div> 873<div class="informaltable"><table class="table"> 874<colgroup> 875<col> 876<col> 877</colgroup> 878<thead><tr> 879<th> 880 <p> 881 Tester 882 </p> 883 </th> 884<th> 885 <p> 886 Desctription 887 </p> 888 </th> 889</tr></thead> 890<tbody> 891<tr> 892<td> 893 <p> 894 <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">intersects</span><span class="special">(</span><span class="keyword">const</span> 895 <span class="identifier">T</span><span class="special">&</span> 896 <span class="identifier">left</span><span class="special">,</span> 897 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&</span> <span class="identifier">right</span><span class="special">)</span></code> 898 </p> 899 </td> 900<td> 901 <p> 902 Tests, if <code class="computeroutput"><span class="identifier">left</span></code> 903 and <code class="computeroutput"><span class="identifier">right</span></code> intersect. 904 </p> 905 </td> 906</tr> 907<tr> 908<td> 909 <p> 910 <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">disjoint</span><span class="special">(</span><span class="keyword">const</span> 911 <span class="identifier">T</span><span class="special">&</span> 912 <span class="identifier">left</span><span class="special">,</span> 913 <span class="keyword">const</span> <span class="identifier">P</span><span class="special">&</span> <span class="identifier">right</span><span class="special">)</span></code> 914 </p> 915 </td> 916<td> 917 <p> 918 Tests, if <code class="computeroutput"><span class="identifier">left</span></code> 919 and <code class="computeroutput"><span class="identifier">right</span></code> are 920 disjoint. 921 </p> 922 </td> 923</tr> 924<tr> 925<td> 926 </td> 927<td> 928 <p> 929 <code class="computeroutput"><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span> 930 <span class="special">==</span> <span class="special">!</span><span class="identifier">disjoint</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span></code> 931 </p> 932 </td> 933</tr> 934</tbody> 935</table></div> 936<p> 937</p> 938<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">intersects</span><span class="special">(</span><span class="keyword">const</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">T</span><span class="special">\</span><span class="identifier">P</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="identifier">T</span><span class="special">\</span><span class="identifier">P</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> 939<span class="keyword">bool</span> <span class="identifier">disjoint</span><span class="special">(</span><span class="keyword">const</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> 940 <span class="identifier">s</span> <span class="special">|</span> <span class="number">1</span> <span class="number">1</span> <span class="identifier">S</span> <span class="special">|</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> 941 <span class="identifier">m</span> <span class="special">|</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> <span class="identifier">M</span> <span class="special">|</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> 942</pre> 943<p> 944 </p> 945</div> 946<p> 947 <span class="emphasis"><em><span class="bold"><strong>See also . . .</strong></span></em></span> 948 </p> 949<div class="informaltable"><table class="table"> 950<colgroup><col></colgroup> 951<thead><tr></tr></thead> 952<tbody> 953<tr><td> 954 <p> 955 <a class="link" href="symmetric_difference.html" title="Symmetric Difference"><span class="emphasis"><em><span class="bold"><strong>Symmetric difference</strong></span></em></span></a> 956 </p> 957 </td></tr> 958<tr><td> 959 <p> 960 <a class="link" href="subtraction.html" title="Subtraction"><span class="emphasis"><em><span class="bold"><strong>Subtraction</strong></span></em></span></a> 961 </p> 962 </td></tr> 963<tr><td> 964 <p> 965 <a class="link" href="addition.html" title="Addition"><span class="emphasis"><em><span class="bold"><strong>Addition</strong></span></em></span></a> 966 </p> 967 </td></tr> 968</tbody> 969</table></div> 970<p> 971 <span class="emphasis"><em><span class="bold"><strong>Back to section . . .</strong></span></em></span> 972 </p> 973<div class="informaltable"><table class="table"> 974<colgroup><col></colgroup> 975<thead><tr></tr></thead> 976<tbody> 977<tr><td> 978 <p> 979 <a class="link" href="../interface/function_synopsis.html#function_synopsis_table"><span class="emphasis"><em><span class="bold"><strong>Function 980 Synopsis</strong></span></em></span></a> 981 </p> 982 </td></tr> 983<tr><td> 984 <p> 985 <a class="link" href="../interface.html" title="Interface"><span class="emphasis"><em><span class="bold"><strong>Interface</strong></span></em></span></a> 986 </p> 987 </td></tr> 988</tbody> 989</table></div> 990</div> 991<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 992<td align="left"></td> 993<td align="right"><div class="copyright-footer">Copyright © 2007-2010 Joachim 994 Faulhaber<br>Copyright © 1999-2006 Cortex Software 995 GmbH<p> 996 Distributed under the Boost Software License, Version 1.0. (See accompanying 997 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>) 998 </p> 999</div></td> 1000</tr></table> 1001<hr> 1002<div class="spirit-nav"> 1003<a accesskey="p" href="erasure.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="symmetric_difference.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 1004</div> 1005</body> 1006</html> 1007