Home Libraries People FAQ More

### 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&)`

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

```T hull(const T&, const T&)```

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

`domain_type lower(const T&)`

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

`domain_type upper(const T&)`

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

`domain_type first(const T&)`

`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&)`

`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 . . .