Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Examples

Overview
Party
Interval
Dynamic interval
Static interval
Interval container
Overlap counter
Party's height average
Party's tallest guests
Time grids for months and weeks
Man power
User groups
Std copy
Std transform
Custom interval

Table 1.5. Overview over Icl Examples

level

example

classes

features

intro

Party

interval_map

Generates an attendance history of a party by inserting into an interval_map. Demonstrating aggregate on overlap.

basic

Interval

discrete_interval, continuous_interval

Intervals for discrete and continuous instance types. Closed and open interval borders.

basic

Dynamic intervals

discrete_interval, continuous_interval, interval

Intervals with dynamic interval bounds as library default.

basic

Static intervals

right_open_interval, interval

Intervals with static interval bounds and changing the library default.

basic

Interval container

interval_set,
separate_interval_set,
split_interval_set,
split_interval_map,
interval_map

Basic characteristics of interval containers.

basic

Overlap counter

interval_map

The most simple application of an interval map: Counting the overlaps of added intervals.

advanced

Party's height average

interval_map

Using aggregate on overlap a history of height averages of party guests is computed. Associated values are user defined class objects, that implement an appropriate operator += for the aggregation.

advanced

Party's tallest guests

interval_map,
split_interval_map

Using aggregate on overlap the heights of the party's tallest guests are computed. Associated values are aggregated via a maximum functor, that can be chosen as template parameter of an interval_map class template.

advanced

Time grids for months and weeks

split_interval_set

Shows how the border preserving split_interval_set can be used to create time partitions where different periodic time intervals overlay each other.

advanced

Man power

interval_set,
interval_map

Set style operations on interval_sets and interval_maps like union, difference and intersection can be used to obtain calculations in a flexible way. Example man_power demonstrates such operations in the process of calculating the available man-power of a company in a given time interval.

advanced

User groups

interval_map

Example user_groups shows how interval_maps can be unified or intersected to calculate desired information.

and std

Std copy

interval_map

Fill interval containers using std::copy.

and std

Std transform

interval_map,
separate_interval_set

Fill interval containers from user defined objects using std::transform.

customize

Custom interval

interval_traits

Use interval containers with your own interval class types.



PrevUpHomeNext