3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Examples
</title>
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=
"../index.html" title=
"Chapter 1. Boost.Icl">
9 <link rel=
"prev" href=
"../index.html" title=
"Chapter 1. Boost.Icl">
10 <link rel=
"next" href=
"examples/party.html" title=
"Party">
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=
"../index.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../index.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=
"examples/party.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>
25 <div class=
"section boost_icl_examples" lang=
"en">
26 <div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both">
27 <a name=
"boost_icl.examples"></a><a class=
"link" href=
"examples.html" title=
"Examples">Examples
</a>
28 </h2></div></div></div>
30 <dt><span class=
"section"><a href=
"examples.html#boost_icl.examples.overview">Overview
</a></span></dt>
31 <dt><span class=
"section"><a href=
"examples/party.html">Party
</a></span></dt>
32 <dt><span class=
"section"><a href=
"examples/interval.html">Interval
</a></span></dt>
33 <dt><span class=
"section"><a href=
"examples/dynamic_interval.html">Dynamic interval
</a></span></dt>
34 <dt><span class=
"section"><a href=
"examples/static_interval.html">Static interval
</a></span></dt>
35 <dt><span class=
"section"><a href=
"examples/interval_container.html">Interval container
</a></span></dt>
36 <dt><span class=
"section"><a href=
"examples/overlap_counter.html">Overlap counter
</a></span></dt>
37 <dt><span class=
"section"><a href=
"examples/partys_height_average.html"> Party's height
38 average
</a></span></dt>
39 <dt><span class=
"section"><a href=
"examples/partys_tallest_guests.html"> Party's tallest
40 guests
</a></span></dt>
41 <dt><span class=
"section"><a href=
"examples/time_grids.html"> Time grids for months
42 and weeks
</a></span></dt>
43 <dt><span class=
"section"><a href=
"examples/man_power.html">Man power
</a></span></dt>
44 <dt><span class=
"section"><a href=
"examples/user_groups.html">User groups
</a></span></dt>
45 <dt><span class=
"section"><a href=
"examples/std_copy.html">Std copy
</a></span></dt>
46 <dt><span class=
"section"><a href=
"examples/std_transform.html">Std transform
</a></span></dt>
47 <dt><span class=
"section"><a href=
"examples/custom_interval.html">Custom interval
</a></span></dt>
49 <div class=
"section boost_icl_examples_overview" lang=
"en">
50 <div class=
"titlepage"><div><div><h3 class=
"title">
51 <a name=
"boost_icl.examples.overview"></a><a class=
"link" href=
"examples.html#boost_icl.examples.overview" title=
"Overview">Overview
</a>
52 </h3></div></div></div>
54 <a name=
"id1021865"></a><p class=
"title"><b>Table
 1.5.
 Overview over Icl Examples
</b></p>
55 <div class=
"table-contents"><table class=
"table" summary=
"Overview over Icl Examples">
93 <a class=
"link" href=
"examples/party.html" title=
"Party">Party
</a>
98 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>
103 Generates an attendance history of a party by inserting into an
<code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>. Demonstrating
104 <span class=
"emphasis"><em><span class=
"bold"><strong>aggregate on overlap
</strong></span></em></span>.
116 <a class=
"link" href=
"examples/interval.html" title=
"Interval">Interval
</a>
121 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/discrete_interval.html" title=
"Class template discrete_interval">discrete_interval
</a></code>,
122 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/continuous_interval.html" title=
"Class template continuous_interval">continuous_interval
</a></code>
127 Intervals for discrete and continuous instance types. Closed and open
140 <a class=
"link" href=
"examples/dynamic_interval.html" title=
"Dynamic interval">Dynamic intervals
</a>
145 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/discrete_interval.html" title=
"Class template discrete_interval">discrete_interval
</a></code>,
146 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/continuous_interval.html" title=
"Class template continuous_interval">continuous_interval
</a></code>,
147 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval.html" title=
"Struct template interval">interval
</a></code>
152 Intervals with dynamic interval bounds as library default.
164 <a class=
"link" href=
"examples/static_interval.html" title=
"Static interval">Static intervals
</a>
169 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/right_open_interval.html" title=
"Class template right_open_interval">right_open_interval
</a></code>,
170 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval.html" title=
"Struct template interval">interval
</a></code>
175 Intervals with static interval bounds and changing the library default.
187 <a class=
"link" href=
"examples/interval_container.html" title=
"Interval container">Interval container
</a>
192 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_set.html" title=
"Class template interval_set">interval_set
</a></code>,
<br>
193 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/separate_interval_set.html" title=
"Class template separate_interval_set">separate_interval_set
</a></code>,
<br>
194 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/split_interval_set.html" title=
"Class template split_interval_set">split_interval_set
</a></code>,
<br>
195 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/split_interval_map.html" title=
"Class template split_interval_map">split_interval_map
</a></code>,
<br>
196 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>
201 Basic characteristics of interval containers.
213 <a class=
"link" href=
"examples/overlap_counter.html" title=
"Overlap counter">Overlap counter
</a>
218 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>
223 The most simple application of an interval map: Counting the overlaps
236 <a class=
"link" href=
"examples/partys_height_average.html" title=
"Party's height average">Party's height
242 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>
247 Using
<span class=
"emphasis"><em>aggregate on overlap
</em></span> a history of height
248 averages of party guests is computed. Associated values are user defined
249 class objects, that implement an appropriate
<code class=
"computeroutput"><span class=
"keyword">operator
</span>
250 <span class=
"special">+=
</span></code> for the aggregation.
262 <a class=
"link" href=
"examples/partys_tallest_guests.html" title=
"Party's tallest guests">Party's tallest
268 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>,
<br>
269 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/split_interval_map.html" title=
"Class template split_interval_map">split_interval_map
</a></code>
274 Using
<span class=
"emphasis"><em>aggregate on overlap
</em></span> the heights of the
275 party's tallest guests are computed. Associated values are aggregated
276 via a maximum functor, that can be chosen as template parameter of
277 an interval_map class template.
289 <a class=
"link" href=
"examples/time_grids.html" title=
"Time grids for months and weeks">Time grids for months
295 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/split_interval_set.html" title=
"Class template split_interval_set">split_interval_set
</a></code>
300 Shows how the
<span class=
"emphasis"><em><span class=
"bold"><strong>border preserving
</strong></span></em></span>
301 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/split_interval_set.html" title=
"Class template split_interval_set">split_interval_set
</a></code>
302 can be used to create time partitions where different periodic time
303 intervals overlay each other.
315 <a class=
"link" href=
"examples/man_power.html" title=
"Man power">Man power
</a>
320 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_set.html" title=
"Class template interval_set">interval_set
</a></code>,
<br>
321 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>
326 Set style operations on
<code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_set.html" title=
"Class template interval_set">interval_sets
</a></code>
327 and
<code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_maps
</a></code>
328 like union, difference and intersection can be used to obtain calculations
329 in a flexible way. Example
<span class=
"bold"><strong>man_power
</strong></span>
330 demonstrates such operations in the process of calculating the available
331 man-power of a company in a given time interval.
343 <a class=
"link" href=
"examples/user_groups.html" title=
"User groups">User groups
</a>
348 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>
353 Example
<span class=
"bold"><strong>user_groups
</strong></span> shows how interval_maps
354 can be unified or intersected to calculate desired information.
366 <a class=
"link" href=
"examples/std_copy.html" title=
"Std copy">Std copy
</a>
371 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>
376 Fill interval containers using
<code class=
"computeroutput"><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">copy
</span></code>.
388 <a class=
"link" href=
"examples/std_transform.html" title=
"Std transform">Std transform
</a>
393 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_map.html" title=
"Class template interval_map">interval_map
</a></code>,
<br>
394 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/separate_interval_set.html" title=
"Class template separate_interval_set">separate_interval_set
</a></code>
399 Fill interval containers from user defined objects using
<code class=
"computeroutput"><span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">transform
</span></code>.
411 <a class=
"link" href=
"examples/custom_interval.html" title=
"Custom interval">Custom interval
</a>
416 <code class=
"computeroutput"><a class=
"link" href=
"../boost/icl/interval_traits.html" title=
"Struct template interval_traits">interval_traits
</a></code>
421 Use interval containers with your own interval class types.
428 <br class=
"table-break">
431 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
432 <td align=
"left"></td>
433 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2007 -
2010 Joachim Faulhaber
<br>Copyright
© 1999 -
2006 Cortex Software GmbH
<p>
434 Distributed under the Boost Software License, Version
1.0. (See accompanying
435 file LICENSE_1_0.txt or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt" target=
"_top">http://www.boost.org/LICENSE_1_0.txt
</a>)
440 <div class=
"spirit-nav">
441 <a accesskey=
"p" href=
"../index.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../index.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=
"examples/party.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>