• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/
2    Copyright (c) 2008-2009 Joachim Faulhaber
3
4    Distributed under the Boost Software License, Version 1.0.
5    (See accompanying file LICENSE_1_0.txt or copy at
6    http://www.boost.org/LICENSE_1_0.txt)
7]
8
9
10[/ //= Construct, copy, destruct ===================================================================]
11[section Construct, copy, destruct]
12
13[table
14[[['*Construct, copy, destruct*]]      [__ch_itvs__][__ch_itv_sets__][__ch_itv_maps__][__ch_ele_sets__][__ch_ele_maps__] ]
15[[`T::T()`]                                    [1]       [1]      [1]     [1]      [1]   ]
16[[`T::T(const P&)`]                            [A]   [__eiS]  [__bpM]     [1]      [1]   ]
17[[`T& T::operator=(const P&)`]                 [A]     [__S]    [__M]     [1]      [1]   ]
18[[`void T::swap(T&)`]                          [ ]       [1]      [1]     [1]      [1]   ]
19]
20
21All *icl* types are ['*regular types*]. They are ['*default constructible*],
22['*copy constructible*] and ['*assignable*]. On icl Sets and Maps a `swap`
23function is available, that allows for *constant time* swapping of
24container contents.
25The /regular and swappable part/ of the basic functions and their complexities
26are described in the tables below.
27
28[table
29[[['*Regular and swap*]]      [__ch_itvs__][__ch_itv_sets__][__ch_itv_maps__][__ch_ele_sets__][__ch_ele_maps__] ]
30[[`T::T()`]                                 [__O1__]  [__O1__] [__O1__][__O1__] [__O1__] ]
31[[`T::T(const T&)`]                         [__O1__]  [__On__] [__On__][__On__] [__On__] ]
32[[`T& T::operator=(const T&)`]              [__O1__]  [__On__] [__On__][__On__] [__On__] ]
33[[`void T::swap(T&)`]                          [ ]    [__O1__] [__O1__][__O1__] [__O1__] ]
34]
35
36where /n/ `= iterative_size(x)`.
37
38[table
39[[['*Construct, copy, destruct*]] [Description] ]
40[[`T::T()`]                       [Object of type T is default constructed.] ]
41[[`T::T(const T& src)`]           [Object of type T is copy constructed from object `src`. ] ]
42[[`T& T::operator=(const T& src)`][Assigns the contents of src to `*this` object. Returns a reference to the assigned object.] ]
43[[`void T::swap(T& src)`]         [Swaps the content containers `*this` and `src` in constant time. ] ]
44]
45
46In addition we have overloads of constructors and assignment operators
47for icl container types.
48``
49// overload tables for constructors
50T::T(const P& src)
51
52element containers:     interval containers:
53T \ P | e b s m         T \ P | e i b p S M
54------+--------         ------+------------
55s     | s   s           S     | S S     S
56m     |   m   m         M     |     M M   M
57``
58
59For an object `dst` of type `T` and an argument `src` of type `P` let
60``
61n = iterative_size(dst);
62m = iterative_size(src);
63``
64in the following tables.
65
66[table Time Complexity for overloaded constructors on element containers
67[[`T(const P& src)`][__ch_dom_t__][__ch_dom_mp_t__][__ch_itv_sets__][__ch_itv_maps__]]
68[[__icl_set__]      [__Olgn__]    []               [__Om__]         []               ]
69[[__icl_map__]      []            [__Olgn__]       []               [__Om__]         ]
70]
71
72Time complexity characteristics of inplace insertion for interval containers
73is given by this table.
74
75[table Time Complexity for overloaded constructors on interval containers
76[[`T(const P& src)`] [__ch_dom_t__][__ch_itv_t__][__ch_dom_mp_t__][__ch_itv_mp_t__][__ch_itv_sets__][__ch_itv_maps__]]
77[[interval_sets]     [__O1__] [__O1__][]      []      [__Om__]    []          ]
78[[interval_maps]     []       []      [__O1__][__O1__][]          [__Om__]    ]
79]
80
81``
82// overload tables for assignment
83T& operator = (const P& src)
84
85interval containers:
86T \ P | S M
87------+----
88S     | S
89M     |   M
90``
91
92The assignment `T& operator = (const P& src)` is overloaded within interval containers.
93For all type combinations we have ['*linear time complexity*]
94in the maximum of the `iterative_size` of `dst` and `src`.
95
96
97['*Back to section . . .*]
98[table
99[]
100[[[link function_synopsis_table ['*Function Synopsis*]]]]
101[[[link boost_icl.interface ['*Interface*]]                          ]]
102]
103
104
105[endsect][/ Construct, copy, destruct]
106
107
108