Home | Libraries | People | FAQ | More |
Construct, copy, destruct |
interval |
interval |
interval |
itl::set |
itl::map |
---|---|---|---|---|---|
|
1 |
1 |
1 |
1 |
1 |
|
A |
1 |
1 |
||
|
A |
1 |
1 |
||
|
|
1 |
1 |
1 |
1 |
All itl types are regular
types. They are default
constructible, copy
constructible and assignable.
On itl Sets and Maps a swap
function is available, that allows for constant time
swapping of container contents. The regular and swappable part
of the basic functions and their complexities are described in the tables
below.
Regular and swap |
interval |
interval |
interval |
itl::set |
itl::map |
---|---|---|---|---|---|
|
O(1) |
O(1) |
O(1) |
O(1) |
O(1) |
|
O(1) |
O(n) |
O(n) |
O(n) |
O(n) |
|
O(1) |
O(n) |
O(n) |
O(n) |
O(n) |
|
|
O(1) |
O(1) |
O(1) |
O(1) |
where n = iterative_size()
.
Construct, copy, destruct |
Description |
---|---|
|
Object of type T is default constructed. |
|
Object of type T is copy constructed from object |
|
Assigns the contents of src to |
|
Swaps the content containers |
In addition we have overloads of constructors and assignment operators for itl container types.
// overload tables for constructors T::T(const P& src) element containers: interval containers: T \ P | e b s m T \ P | e i b p S M ------+-------- ------+------------ s | s s S | S S S m | m m M | M M M
For an object of type T
and
an argument src
of type
P
let
n = this->iterative_size(); m = src.iterative_size();
in the following tables.
Time complexity characteristics of inplace insertion for interval containers is given by this table.
Table 1.15. Time Complexity for overloaded constructors on interval containers
|
domain |
interval |
domain |
interval |
interval |
interval |
---|---|---|---|---|---|---|
interval_sets |
O(1) |
O(1) |
|
|
O(m) |
|
interval_maps |
|
|
O(1) |
O(1) |
|
O(m) |
// overload tables for assignment T& operator = (const P& src) interval containers: T \ P | S M ------+---- S | S M | M
The assignment T&
operator =
(const P& src)
is
overloaded within interval containers. For all type combinations we have
linear time complexity
in the maximum of the iterative_size
of *this
and src
.
Back to section . . .