3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
5 <link rel=
"stylesheet" href=
"../../../../../../doc/src/boostbook.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.74.0">
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=
"insertion.html" title=
"Insertion">
10 <link rel=
"next" href=
"intersection.html" title=
"Intersection">
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>
22 <div class=
"spirit-nav">
23 <a accesskey=
"p" href=
"insertion.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=
"intersection.html"><img src=
"../../../../../../doc/src/images/next.png" alt=
"Next"></a>
25 <div class=
"section boost_icl_function_reference_erasure" lang=
"en">
26 <div class=
"titlepage"><div><div><h3 class=
"title">
27 <a name=
"boost_icl.function_reference.erasure"></a><a class=
"link" href=
"erasure.html" title=
"Erasure">Erasure
</a>
28 </h3></div></div></div>
30 <dt><span class=
"section"><a href=
"erasure.html#boost_icl.function_reference.erasure.synopsis">Synopsis
</a></span></dt>
31 <dt><span class=
"section"><a href=
"erasure.html#boost_icl.function_reference.erasure.erasure_of_objects">Erasure
32 of Objects
</a></span></dt>
33 <dt><span class=
"section"><a href=
"erasure.html#boost_icl.function_reference.erasure.erasure_by_iterators">Erasure
34 by Iterators
</a></span></dt>
36 <div class=
"section boost_icl_function_reference_erasure_synopsis" lang=
"en">
37 <div class=
"titlepage"><div><div><h4 class=
"title">
38 <a name=
"boost_icl.function_reference.erasure.synopsis"></a><a class=
"link" href=
"erasure.html#boost_icl.function_reference.erasure.synopsis" title=
"Synopsis">Synopsis
</a>
39 </h4></div></div></div>
40 <div class=
"informaltable"><table class=
"table">
51 <span class=
"emphasis"><em><span class=
"bold"><strong>Erasure
</strong></span></em></span>
79 <code class=
"computeroutput"><span class=
"identifier">T
</span><span class=
"special">&</span>
80 <span class=
"identifier">T
</span><span class=
"special">::
</span><span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"keyword">const
</span> <span class=
"identifier">P
</span><span class=
"special">&)
</span></code>
85 <a class=
"link" href=
"../interface/function_synopsis.html#element_type"><span class=
"bold"><strong>e
</strong></span></a>
86 <a class=
"link" href=
"../interface/function_synopsis.html#interval_type"><span class=
"bold"><strong>i
</strong></span></a>
91 <a class=
"link" href=
"../interface/function_synopsis.html#element_type"><span class=
"bold"><strong>e
</strong></span></a>
92 <a class=
"link" href=
"../interface/function_synopsis.html#interval_type"><span class=
"bold"><strong>i
</strong></span></a>
93 <a class=
"link" href=
"../interface/function_synopsis.html#element_mapping_type"><span class=
"bold"><strong>b
</strong></span></a>
94 <a class=
"link" href=
"../interface/function_synopsis.html#interval_mapping_type"><span class=
"bold"><strong>p
</strong></span></a>
99 <a class=
"link" href=
"../interface/function_synopsis.html#element_type"><span class=
"bold"><strong>e
</strong></span></a>
104 <a class=
"link" href=
"../interface/function_synopsis.html#element_mapping_type"><span class=
"bold"><strong>b
</strong></span></a>
105 <a class=
"link" href=
"../interface/function_synopsis.html#interval_mapping_type"><span class=
"bold"><strong>p
</strong></span></a>
112 <code class=
"computeroutput"><span class=
"identifier">T
</span><span class=
"special">&</span>
113 <span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"identifier">T
</span><span class=
"special">&,
</span>
114 <span class=
"keyword">const
</span> <span class=
"identifier">P
</span><span class=
"special">&)
</span></code>
119 <a class=
"link" href=
"../interface/function_synopsis.html#element_type"><span class=
"bold"><strong>e
</strong></span></a>
120 <a class=
"link" href=
"../interface/function_synopsis.html#interval_type"><span class=
"bold"><strong>i
</strong></span></a>
121 <a class=
"link" href=
"../interface/function_synopsis.html#interval_set_types"><span class=
"bold"><strong>S
</strong></span></a>
126 <a class=
"link" href=
"../interface/function_synopsis.html#element_type"><span class=
"bold"><strong>e
</strong></span></a>
127 <a class=
"link" href=
"../interface/function_synopsis.html#interval_type"><span class=
"bold"><strong>i
</strong></span></a>
128 <a class=
"link" href=
"../interface/function_synopsis.html#interval_set_types"><span class=
"bold"><strong>S
</strong></span></a>
129 <a class=
"link" href=
"../interface/function_synopsis.html#element_mapping_type"><span class=
"bold"><strong>b
</strong></span></a>
130 <a class=
"link" href=
"../interface/function_synopsis.html#interval_mapping_type"><span class=
"bold"><strong>p
</strong></span></a>
131 <a class=
"link" href=
"../interface/function_synopsis.html#interval_map_types"><span class=
"bold"><strong>M
</strong></span></a>
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#itl_set_type"><span class=
"bold"><strong>s
</strong></span></a>
142 <a class=
"link" href=
"../interface/function_synopsis.html#element_mapping_type"><span class=
"bold"><strong>b
</strong></span></a>
143 <a class=
"link" href=
"../interface/function_synopsis.html#itl_map_type"><span class=
"bold"><strong>m
</strong></span></a>
150 <code class=
"computeroutput"><span class=
"keyword">void
</span> <span class=
"identifier">T
</span><span class=
"special">::
</span><span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"identifier">iterator
</span><span class=
"special">)
</span></code>
177 <code class=
"computeroutput"><span class=
"keyword">void
</span> <span class=
"identifier">T
</span><span class=
"special">::
</span><span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"identifier">iterator
</span><span class=
"special">,
</span><span class=
"identifier">iterator
</span><span class=
"special">)
</span></code>
203 <a name=
"boost_icl.function_reference.erasure.synopsis.erasure"></a><h6>
204 <a name=
"id1167178"></a>
205 <a class=
"link" href=
"erasure.html#boost_icl.function_reference.erasure.synopsis.erasure">Erasure
</a>
208 The effects of
<span class=
"emphasis"><em><span class=
"bold"><strong>erasure
</strong></span></em></span>
209 implemented by
<code class=
"computeroutput"><span class=
"identifier">erase
</span></code> and
210 <span class=
"emphasis"><em><span class=
"bold"><strong>subtraction
</strong></span></em></span> implemented
211 by
<code class=
"computeroutput"><span class=
"identifier">subtract
</span></code> and
<code class=
"computeroutput"><span class=
"keyword">operator
</span> <span class=
"special">-=
</span></code>
212 are identical for all Set-types of the
<span class=
"bold"><strong>icl
</strong></span>.
215 For Map-types,
<code class=
"computeroutput"><span class=
"identifier">erase
</span></code> provides
216 the
<span class=
"bold"><strong>stl
</strong></span> semantics of erasure in contrast
217 to
<code class=
"computeroutput"><span class=
"identifier">subtract
</span></code> and
<code class=
"computeroutput"><span class=
"keyword">operator
</span> <span class=
"special">-=
</span></code>,
218 that implement a generalized subtraction, that performs inverse aggregations
219 if key values collide or key intervals overlap.
222 Using iterators it is possible to erase objects or ranges of objects the
223 iterator is pointing at from icl Sets and Maps.
226 <div class=
"section boost_icl_function_reference_erasure_erasure_of_objects" lang=
"en">
227 <div class=
"titlepage"><div><div><h4 class=
"title">
228 <a name=
"boost_icl.function_reference.erasure.erasure_of_objects"></a><a class=
"link" href=
"erasure.html#boost_icl.function_reference.erasure.erasure_of_objects" title=
"Erasure of Objects">Erasure
230 </h4></div></div></div>
234 <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>
235 <span class=
"identifier">T
</span><span class=
"special">&</span> <span class=
"identifier">T
</span><span class=
"special">::
</span><span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"keyword">const
</span> <span class=
"identifier">P
</span><span class=
"special">&)
</span> <span class=
"special">---+--------
</span>
236 <span class=
"identifier">T
</span><span class=
"special">&</span> <span class=
"identifier">erase
</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>
237 <span class=
"identifier">m
</span> <span class=
"special">|
</span> <span class=
"identifier">m
</span>
238 <span class=
"identifier">S
</span> <span class=
"special">|
</span> <span class=
"identifier">S
</span> <span class=
"identifier">S
</span>
239 <span class=
"identifier">M
</span> <span class=
"special">|
</span> <span class=
"identifier">M
</span> <span class=
"identifier">M
</span>
244 The next table contains complexity characteristics for the
<code class=
"computeroutput"><span class=
"identifier">erase
</span></code> function on elements and segments.
247 <a name=
"id1168579"></a><p class=
"title"><b>Table
 1.31.
 Time Complexity for erasure of elements and segments
248 on icl containers
</b></p>
249 <div class=
"table-contents"><table class=
"table" summary=
"Time Complexity for erasure of elements and segments
261 <code class=
"computeroutput"><span class=
"identifier">T
</span><span class=
"special">&</span>
262 <span class=
"identifier">T
</span><span class=
"special">::
</span><span class=
"identifier">erase
</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">erase
</span><span class=
"special">(
</span><span class=
"identifier">T
</span><span class=
"special">&,
</span> <span class=
"keyword">const
</span>
263 <span class=
"identifier">P
</span><span class=
"special">&)
</span></code>
278 domain
<br> mapping
<br> type
283 interval
<br> mapping
<br> type
291 <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>
296 <span class=
"emphasis"><em>O(log n)
</em></span>
315 <code class=
"computeroutput"><a class=
"link" href=
"../../boost/icl/map.html" title=
"Class template map">icl::map
</a></code>
320 <span class=
"emphasis"><em>O(log n)
</em></span>
329 <span class=
"emphasis"><em>O(log n)
</em></span>
340 <code class=
"computeroutput"><a class=
"link" href=
"../../boost/icl/interval_set.html" title=
"Class template interval_set">interval_sets
</a></code>
345 <span class=
"emphasis"><em>O(log n)
</em></span>
350 <span class=
"emphasis"><em>amortized
<br> O(log n)
</em></span>
365 <code class=
"computeroutput"><a class=
"link" href=
"../../boost/icl/interval_map.html" title=
"Class template interval_map">interval_maps
</a></code>
370 <span class=
"emphasis"><em>O(log n)
</em></span>
375 <span class=
"emphasis"><em>O(n)
</em></span>
380 <span class=
"emphasis"><em>O(log n)
</em></span>
385 <span class=
"emphasis"><em>O(n)
</em></span>
392 <br class=
"table-break"><p>
393 As presented in the overload tables for inplace function
<code class=
"computeroutput"><span class=
"identifier">erase
</span></code> below, more type combinations are
394 available for
<span class=
"emphasis"><em>erasure
</em></span> than for
<span class=
"emphasis"><em>insertion
</em></span>.
399 <pre class=
"programlisting"><span class=
"comment">// overload tables for function element containers: interval containers:
400 </span><span class=
"identifier">T
</span><span class=
"special">&</span> <span class=
"identifier">erase
</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">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>
401 <span class=
"special">---+--------
</span> <span class=
"special">---+------------
</span>
402 <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>
403 <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>
406 We can split up these overloads in two groups. The first group can be called
407 <span class=
"emphasis"><em>reverse insertion
</em></span>.
409 <pre class=
"programlisting"><span class=
"comment">/* (
1) Reverse insertion */
</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>
410 <span class=
"special">---+--------
</span> <span class=
"special">---+------------
</span>
411 <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>
412 <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>
415 The second group can be viewed as an
<span class=
"emphasis"><em>erasure by key objects
</em></span>
418 <pre class=
"programlisting"><span class=
"comment">/* (
2) Erasure by key objects */
</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>
419 <span class=
"special">---+--------
</span> <span class=
"special">---+------------
</span>
420 <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>
421 <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>
426 On Maps
<span class=
"emphasis"><em><span class=
"bold"><strong>reverse insertion (
1)
</strong></span></em></span>
427 is different from
<span class=
"bold"><strong>stl's
</strong></span> erase semantics,
428 because value pairs are deleted only, if key
<span class=
"emphasis"><em><span class=
"bold"><strong>and
</strong></span></em></span>
429 data values are found. Only
<span class=
"emphasis"><em><span class=
"bold"><strong>erasure by
430 key objects (
2)
</strong></span></em></span> works like the erase function on
431 <span class=
"bold"><strong>stl's
</strong></span> std::maps, that passes a
<span class=
"emphasis"><em><span class=
"bold"><strong>key value
</strong></span></em></span> as argument.
434 On Sets both function groups fall together as
<span class=
"emphasis"><em><span class=
"bold"><strong>set
435 difference
</strong></span></em></span>.
438 Complexity characteristics for inplace erasure operations are given by
439 the next tables where
441 <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>
442 <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
447 <a name=
"id1169691"></a><p class=
"title"><b>Table
 1.32.
 Time Complexity for inplace erasure on element
449 <div class=
"table-contents"><table class=
"table" summary=
"Time Complexity for inplace erasure on element
461 <code class=
"computeroutput"><span class=
"identifier">T
</span><span class=
"special">&</span>
462 <span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"identifier">T
</span><span class=
"special">&</span>
463 <span class=
"identifier">y
</span><span class=
"special">,
</span>
464 <span class=
"keyword">const
</span> <span class=
"identifier">P
</span><span class=
"special">&</span> <span class=
"identifier">x
</span><span class=
"special">)
</span></code>
474 domain
<br> mapping
<br> type
492 <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>
497 <span class=
"emphasis"><em>O(log n)
</em></span>
506 <span class=
"emphasis"><em>O(m log n)
</em></span>
517 <code class=
"computeroutput"><a class=
"link" href=
"../../boost/icl/map.html" title=
"Class template map">icl::map
</a></code>
522 <span class=
"emphasis"><em>O(log n)
</em></span>
527 <span class=
"emphasis"><em>O(log n)
</em></span>
532 <span class=
"emphasis"><em>O(m log n)
</em></span>
537 <span class=
"emphasis"><em>O(m log n)
</em></span>
544 <br class=
"table-break"><div class=
"table">
545 <a name=
"id1169926"></a><p class=
"title"><b>Table
 1.33.
 Time Complexity for inplace erasure on
546 interval containers
</b></p>
547 <div class=
"table-contents"><table class=
"table" summary=
"Time Complexity for inplace erasure on
548 interval containers">
561 <code class=
"computeroutput"><span class=
"identifier">T
</span><span class=
"special">&</span>
562 <span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"identifier">T
</span><span class=
"special">&</span>
563 <span class=
"identifier">y
</span><span class=
"special">,
</span>
564 <span class=
"keyword">const
</span> <span class=
"identifier">P
</span><span class=
"special">&</span> <span class=
"identifier">x
</span><span class=
"special">)
</span></code>
579 domain
<br> mapping
<br> type
584 interval
<br> mapping
<br> type
607 <span class=
"emphasis"><em>O(log n)
</em></span>
612 <span class=
"emphasis"><em>amortized
<br> O(log n)
</em></span>
625 <span class=
"emphasis"><em>O(m log(n+m))
</em></span>
641 <span class=
"emphasis"><em>O(log n)
</em></span>
646 <span class=
"emphasis"><em>amortized
<br> O(log n)
</em></span>
651 <span class=
"emphasis"><em>O(log n)
</em></span>
656 <span class=
"emphasis"><em>O(n)
</em></span>
661 <span class=
"emphasis"><em>O(m log(n+m))
</em></span>
666 <span class=
"emphasis"><em>O(m log(n+m))
</em></span>
673 <br class=
"table-break">
675 <div class=
"section boost_icl_function_reference_erasure_erasure_by_iterators" lang=
"en">
676 <div class=
"titlepage"><div><div><h4 class=
"title">
677 <a name=
"boost_icl.function_reference.erasure.erasure_by_iterators"></a><a class=
"link" href=
"erasure.html#boost_icl.function_reference.erasure.erasure_by_iterators" title=
"Erasure by Iterators">Erasure
679 </h4></div></div></div>
681 The next table shows the
<span class=
"bold"><strong>icl
</strong></span> containers
682 that erasure with iterators is available for. Erase on iterators erases
683 always one
<code class=
"computeroutput"><span class=
"identifier">value
</span></code> of
<code class=
"computeroutput"><span class=
"identifier">value_type
</span></code> for an iterator pointing to
686 <div class=
"itemizedlist"><ul type=
"disc">
688 elements from
<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">sets
</span></code></a>
691 element-value pairs from
<code class=
"computeroutput"><a class=
"link" href=
"../../boost/icl/map.html" title=
"Class template map">icl::maps
</a></code>
694 intervals from
<code class=
"computeroutput"><a class=
"link" href=
"../../boost/icl/interval_set.html" title=
"Class template interval_set">interval_sets
</a></code>
698 interval-value-pairs from
<code class=
"computeroutput"><a class=
"link" href=
"../../boost/icl/interval_map.html" title=
"Class template interval_map">interval_maps
</a></code>
701 <div class=
"informaltable"><table class=
"table">
712 <span class=
"emphasis"><em><span class=
"bold"><strong>Erasure by iterators
</strong></span></em></span>
740 <code class=
"computeroutput"><span class=
"keyword">void
</span> <span class=
"identifier">T
</span><span class=
"special">::
</span><span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"identifier">iterator
</span>
741 <span class=
"identifier">pos
</span><span class=
"special">)
</span></code>
746 <span class=
"emphasis"><em>amortized O(
1)
</em></span>
751 <span class=
"emphasis"><em>amortized O(
1)
</em></span>
756 <span class=
"emphasis"><em>amortized O(
1)
</em></span>
761 <span class=
"emphasis"><em>amortized O(
1)
</em></span>
768 <code class=
"computeroutput"><span class=
"keyword">void
</span> <span class=
"identifier">T
</span><span class=
"special">::
</span><span class=
"identifier">erase
</span><span class=
"special">(
</span><span class=
"identifier">iterator
</span>
769 <span class=
"identifier">first
</span><span class=
"special">,
</span>
770 <span class=
"identifier">iterator
</span> <span class=
"identifier">past
</span><span class=
"special">)
</span></code>
775 <span class=
"emphasis"><em>O(k)
</em></span>
780 <span class=
"emphasis"><em>O(k)
</em></span>
785 <span class=
"emphasis"><em>O(k)
</em></span>
790 <span class=
"emphasis"><em>O(k)
</em></span>
797 Erasing by a single iterator need only
<span class=
"emphasis"><em><span class=
"bold"><strong>amortized
798 constant time
</strong></span></em></span>. Erasing via a range of iterators
799 <code class=
"computeroutput"><span class=
"special">[
</span><span class=
"identifier">first
</span><span class=
"special">,
</span> <span class=
"identifier">past
</span><span class=
"special">)
</span></code> is of
<span class=
"emphasis"><em><span class=
"bold"><strong>linear
800 time
</strong></span></em></span> in the number
<code class=
"computeroutput"><span class=
"identifier">k
</span></code>
801 of iterators in range
<code class=
"computeroutput"><span class=
"special">[
</span><span class=
"identifier">first
</span><span class=
"special">,
</span> <span class=
"identifier">past
</span><span class=
"special">)
</span></code>.
805 <span class=
"emphasis"><em><span class=
"bold"><strong>See also . . .
</strong></span></em></span>
807 <div class=
"informaltable"><table class=
"table">
808 <colgroup><col></colgroup>
809 <thead><tr></tr></thead>
813 <a class=
"link" href=
"insertion.html" title=
"Insertion"><span class=
"emphasis"><em><span class=
"bold"><strong>Insertion
</strong></span></em></span></a>
818 <a class=
"link" href=
"subtraction.html" title=
"Subtraction"><span class=
"emphasis"><em><span class=
"bold"><strong>Subtraction
</strong></span></em></span></a>
824 <span class=
"emphasis"><em><span class=
"bold"><strong>Back to section . . .
</strong></span></em></span>
826 <div class=
"informaltable"><table class=
"table">
827 <colgroup><col></colgroup>
828 <thead><tr></tr></thead>
832 <a class=
"link" href=
"../interface/function_synopsis.html#function_synopsis_table"><span class=
"emphasis"><em><span class=
"bold"><strong>Function
833 Synopsis
</strong></span></em></span></a>
838 <a class=
"link" href=
"../interface.html" title=
"Interface"><span class=
"emphasis"><em><span class=
"bold"><strong>Interface
</strong></span></em></span></a>
844 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
845 <td align=
"left"></td>
846 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2007 -
2010 Joachim Faulhaber
<br>Copyright
© 1999 -
2006 Cortex Software GmbH
<p>
847 Distributed under the Boost Software License, Version
1.0. (See accompanying
848 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>)
853 <div class=
"spirit-nav">
854 <a accesskey=
"p" href=
"insertion.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=
"intersection.html"><img src=
"../../../../../../doc/src/images/next.png" alt=
"Next"></a>