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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Range

Range

intervals

interval
sets

interval
maps

condition

interval_type hull(const T&)

O(1)

O(1)

T hull(const T&, const T&)

O(1)

domain_type lower(const T&)

O(1)

O(1)

O(1)

domain_type upper(const T&)

O(1)

O(1)

O(1)

domain_type first(const T&)

O(1)

O(1)

O(1)

is_discrete<domain_type>::value

domain_type last(const T&)

O(1)

O(1)

O(1)

is_discrete<domain_type>::value

The table above shows the availability of functions hull, lower, upper, first and last on intervals and interval containers that are all of constant time complexity. Find the functions description and some simple properties below.

Range

Types

Description

interval_type hull(const T&)

S M

hull(x) returns the smallest interval that contains all intervals of an interval container x.

T hull(const T&, const T&)

S M

hull(i,j) returns the smallest interval that contains intervals i abd 'j'.

domain_type lower(const T&)

i S M

lower(x) returns the lower bound of an interval or interval container x.

domain_type upper(const T&)

i S M

upper(x) returns the upper bound of an interval or interval container x.

domain_type first(const T&)

i S M

first(x) returns the first element of an interval or interval container x. first(const T&) is defined for a discrete domain_type only.

domain_type last(const T&)

i S M

last(x) returns the last element of an interval or interval container x. last(const T&) is defined for a discrete domain_type only.

// for interval_containers x:
lower(hull(x)) == lower(x)
upper(hull(x)) == upper(x)
first(hull(x)) == first(x)
last(hull(x))  == last(x)

Back to section . . .

Function Synopsis

Interface


PrevUpHomeNext