examples.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. <html>
  2. <head>
  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.79.1">
  7. <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Icl">
  8. <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Icl">
  9. <link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Boost.Icl">
  10. <link rel="next" href="examples/party.html" title="Party">
  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="../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>
  24. </div>
  25. <div class="section">
  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>
  29. <div class="toc"><dl class="toc">
  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>
  48. </dl></div>
  49. <div class="section">
  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>
  53. <div class="table">
  54. <a name="boost_icl.examples.overview.t0"></a><p class="title"><b>Table&#160;1.5.&#160;Overview over Icl Examples</b></p>
  55. <div class="table-contents"><table class="table" summary="Overview over Icl Examples">
  56. <colgroup>
  57. <col>
  58. <col>
  59. <col>
  60. <col>
  61. </colgroup>
  62. <thead><tr>
  63. <th>
  64. <p>
  65. level
  66. </p>
  67. </th>
  68. <th>
  69. <p>
  70. example
  71. </p>
  72. </th>
  73. <th>
  74. <p>
  75. classes
  76. </p>
  77. </th>
  78. <th>
  79. <p>
  80. features
  81. </p>
  82. </th>
  83. </tr></thead>
  84. <tbody>
  85. <tr>
  86. <td>
  87. <p>
  88. intro
  89. </p>
  90. </td>
  91. <td>
  92. <p>
  93. <a class="link" href="examples/party.html" title="Party">Party</a>
  94. </p>
  95. </td>
  96. <td>
  97. <p>
  98. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>
  99. </p>
  100. </td>
  101. <td>
  102. <p>
  103. Generates an attendance history of a party by inserting into an
  104. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>.
  105. Demonstrating <span class="emphasis"><em><span class="bold"><strong>aggregate on overlap</strong></span></em></span>.
  106. </p>
  107. </td>
  108. </tr>
  109. <tr>
  110. <td>
  111. <p>
  112. basic
  113. </p>
  114. </td>
  115. <td>
  116. <p>
  117. <a class="link" href="examples/interval.html" title="Interval">Interval</a>
  118. </p>
  119. </td>
  120. <td>
  121. <p>
  122. <code class="computeroutput"><a class="link" href="../boost/icl/discrete_interval.html" title="Class template discrete_interval">discrete_interval</a></code>,
  123. <code class="computeroutput"><a class="link" href="../boost/icl/continuous_interval.html" title="Class template continuous_interval">continuous_interval</a></code>
  124. </p>
  125. </td>
  126. <td>
  127. <p>
  128. Intervals for discrete and continuous instance types. Closed and
  129. open interval borders.
  130. </p>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td>
  135. <p>
  136. basic
  137. </p>
  138. </td>
  139. <td>
  140. <p>
  141. <a class="link" href="examples/dynamic_interval.html" title="Dynamic interval">Dynamic intervals</a>
  142. </p>
  143. </td>
  144. <td>
  145. <p>
  146. <code class="computeroutput"><a class="link" href="../boost/icl/discrete_interval.html" title="Class template discrete_interval">discrete_interval</a></code>,
  147. <code class="computeroutput"><a class="link" href="../boost/icl/continuous_interval.html" title="Class template continuous_interval">continuous_interval</a></code>,
  148. <code class="computeroutput"><a class="link" href="../boost/icl/interval.html" title="Struct template interval">interval</a></code>
  149. </p>
  150. </td>
  151. <td>
  152. <p>
  153. Intervals with dynamic interval bounds as library default.
  154. </p>
  155. </td>
  156. </tr>
  157. <tr>
  158. <td>
  159. <p>
  160. basic
  161. </p>
  162. </td>
  163. <td>
  164. <p>
  165. <a class="link" href="examples/static_interval.html" title="Static interval">Static intervals</a>
  166. </p>
  167. </td>
  168. <td>
  169. <p>
  170. <code class="computeroutput"><a class="link" href="../boost/icl/right_open_interval.html" title="Class template right_open_interval">right_open_interval</a></code>,
  171. <code class="computeroutput"><a class="link" href="../boost/icl/interval.html" title="Struct template interval">interval</a></code>
  172. </p>
  173. </td>
  174. <td>
  175. <p>
  176. Intervals with static interval bounds and changing the library
  177. default.
  178. </p>
  179. </td>
  180. </tr>
  181. <tr>
  182. <td>
  183. <p>
  184. basic
  185. </p>
  186. </td>
  187. <td>
  188. <p>
  189. <a class="link" href="examples/interval_container.html" title="Interval container">Interval
  190. container</a>
  191. </p>
  192. </td>
  193. <td>
  194. <p>
  195. <code class="computeroutput"><a class="link" href="../boost/icl/interval_set.html" title="Class template interval_set">interval_set</a></code>,<br>
  196. <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>
  197. <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>
  198. <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>
  199. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>
  200. </p>
  201. </td>
  202. <td>
  203. <p>
  204. Basic characteristics of interval containers.
  205. </p>
  206. </td>
  207. </tr>
  208. <tr>
  209. <td>
  210. <p>
  211. basic
  212. </p>
  213. </td>
  214. <td>
  215. <p>
  216. <a class="link" href="examples/overlap_counter.html" title="Overlap counter">Overlap counter</a>
  217. </p>
  218. </td>
  219. <td>
  220. <p>
  221. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>
  222. </p>
  223. </td>
  224. <td>
  225. <p>
  226. The most simple application of an interval map: Counting the overlaps
  227. of added intervals.
  228. </p>
  229. </td>
  230. </tr>
  231. <tr>
  232. <td>
  233. <p>
  234. advanced
  235. </p>
  236. </td>
  237. <td>
  238. <p>
  239. <a class="link" href="examples/partys_height_average.html" title="Party's height average">Party's
  240. height average</a>
  241. </p>
  242. </td>
  243. <td>
  244. <p>
  245. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>
  246. </p>
  247. </td>
  248. <td>
  249. <p>
  250. Using <span class="emphasis"><em>aggregate on overlap</em></span> a history of height
  251. averages of party guests is computed. Associated values are user
  252. defined class objects, that implement an appropriate <code class="computeroutput"><span class="keyword">operator</span> <span class="special">+=</span></code>
  253. for the aggregation.
  254. </p>
  255. </td>
  256. </tr>
  257. <tr>
  258. <td>
  259. <p>
  260. advanced
  261. </p>
  262. </td>
  263. <td>
  264. <p>
  265. <a class="link" href="examples/partys_tallest_guests.html" title="Party's tallest guests">Party's
  266. tallest guests</a>
  267. </p>
  268. </td>
  269. <td>
  270. <p>
  271. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>,<br>
  272. <code class="computeroutput"><a class="link" href="../boost/icl/split_interval_map.html" title="Class template split_interval_map">split_interval_map</a></code>
  273. </p>
  274. </td>
  275. <td>
  276. <p>
  277. Using <span class="emphasis"><em>aggregate on overlap</em></span> the heights of
  278. the party's tallest guests are computed. Associated values are
  279. aggregated via a maximum functor, that can be chosen as template
  280. parameter of an interval_map class template.
  281. </p>
  282. </td>
  283. </tr>
  284. <tr>
  285. <td>
  286. <p>
  287. advanced
  288. </p>
  289. </td>
  290. <td>
  291. <p>
  292. <a class="link" href="examples/time_grids.html" title="Time grids for months and weeks">Time grids for months
  293. and weeks</a>
  294. </p>
  295. </td>
  296. <td>
  297. <p>
  298. <code class="computeroutput"><a class="link" href="../boost/icl/split_interval_set.html" title="Class template split_interval_set">split_interval_set</a></code>
  299. </p>
  300. </td>
  301. <td>
  302. <p>
  303. Shows how the <span class="emphasis"><em><span class="bold"><strong>border preserving</strong></span></em></span>
  304. <code class="computeroutput"><a class="link" href="../boost/icl/split_interval_set.html" title="Class template split_interval_set">split_interval_set</a></code>
  305. can be used to create time partitions where different periodic
  306. time intervals overlay each other.
  307. </p>
  308. </td>
  309. </tr>
  310. <tr>
  311. <td>
  312. <p>
  313. advanced
  314. </p>
  315. </td>
  316. <td>
  317. <p>
  318. <a class="link" href="examples/man_power.html" title="Man power">Man power</a>
  319. </p>
  320. </td>
  321. <td>
  322. <p>
  323. <code class="computeroutput"><a class="link" href="../boost/icl/interval_set.html" title="Class template interval_set">interval_set</a></code>,<br>
  324. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>
  325. </p>
  326. </td>
  327. <td>
  328. <p>
  329. 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>
  330. and <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_maps</a></code>
  331. like union, difference and intersection can be used to obtain calculations
  332. in a flexible way. Example <span class="bold"><strong>man_power</strong></span>
  333. demonstrates such operations in the process of calculating the
  334. available man-power of a company in a given time interval.
  335. </p>
  336. </td>
  337. </tr>
  338. <tr>
  339. <td>
  340. <p>
  341. advanced
  342. </p>
  343. </td>
  344. <td>
  345. <p>
  346. <a class="link" href="examples/user_groups.html" title="User groups">User groups</a>
  347. </p>
  348. </td>
  349. <td>
  350. <p>
  351. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>
  352. </p>
  353. </td>
  354. <td>
  355. <p>
  356. Example <span class="bold"><strong>user_groups</strong></span> shows how
  357. interval_maps can be unified or intersected to calculate desired
  358. information.
  359. </p>
  360. </td>
  361. </tr>
  362. <tr>
  363. <td>
  364. <p>
  365. and std
  366. </p>
  367. </td>
  368. <td>
  369. <p>
  370. <a class="link" href="examples/std_copy.html" title="Std copy">Std copy</a>
  371. </p>
  372. </td>
  373. <td>
  374. <p>
  375. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>
  376. </p>
  377. </td>
  378. <td>
  379. <p>
  380. Fill interval containers using <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span></code>.
  381. </p>
  382. </td>
  383. </tr>
  384. <tr>
  385. <td>
  386. <p>
  387. and std
  388. </p>
  389. </td>
  390. <td>
  391. <p>
  392. <a class="link" href="examples/std_transform.html" title="Std transform">Std transform</a>
  393. </p>
  394. </td>
  395. <td>
  396. <p>
  397. <code class="computeroutput"><a class="link" href="../boost/icl/interval_map.html" title="Class template interval_map">interval_map</a></code>,<br>
  398. <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. </p>
  400. </td>
  401. <td>
  402. <p>
  403. 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>.
  404. </p>
  405. </td>
  406. </tr>
  407. <tr>
  408. <td>
  409. <p>
  410. customize
  411. </p>
  412. </td>
  413. <td>
  414. <p>
  415. <a class="link" href="examples/custom_interval.html" title="Custom interval">Custom interval</a>
  416. </p>
  417. </td>
  418. <td>
  419. <p>
  420. <code class="computeroutput"><a class="link" href="../boost/icl/interval_traits.html" title="Struct template interval_traits">interval_traits</a></code>
  421. </p>
  422. </td>
  423. <td>
  424. <p>
  425. Use interval containers with your own interval class types.
  426. </p>
  427. </td>
  428. </tr>
  429. </tbody>
  430. </table></div>
  431. </div>
  432. <br class="table-break">
  433. </div>
  434. </div>
  435. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  436. <td align="left"></td>
  437. <td align="right"><div class="copyright-footer">Copyright &#169; 2007-2010 Joachim
  438. Faulhaber<br>Copyright &#169; 1999-2006 Cortex Software
  439. GmbH<p>
  440. Distributed under the Boost Software License, Version 1.0. (See accompanying
  441. 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>)
  442. </p>
  443. </div></td>
  444. </tr></table>
  445. <hr>
  446. <div class="spirit-nav">
  447. <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>
  448. </div>
  449. </body>
  450. </html>