Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Size

Size

interval

interval
sets

interval
maps

itl::set

itl::map

size_type T::size()const

O(1)

O(n)

O(n)

O(1)

O(1)

size_type T::cardinality()const

O(1)

O(n)

O(n)

O(1)

O(1)

difference_type T::length()const

O(1)

O(n)

O(n)

size_t T::iterative_size()const

O(1)

O(1)

O(1)

O(1)

size_t T::interval_count()const

O(1)

O(1)

For itl containers the single size function known from std containers branches into tree to five different members functions. The table above shows the types, size functions are implemented for, together with their complexities. Linear complexities O(n) refer to the container's iterative_size:

n = y.iterative_size()

The next table gives a short definition for the different size functions.

Size

Types

Description

size_t T::interval_count()const

S M

The number of intervals of an interval container.

size_t T::iterative_size()const

S M s m

The number of objects in an itl container that can be iterated over.

difference_type T::length()const

i S M

The length of an interval or the sum of lengths of an interval container's intervals, that's domain_type has a difference_type.

size_type T::cardinality()const

i S M s m

The number of elements of an interval or a container. For continuous data types cardinality can be infinite.

size_type T::size()const

i S M s m

The number of elements of an interval or a container, which is also it's cardinality.

Back to section . . .

Function Synopsis

Interface


PrevUpHomeNext