• 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[/ //= Size ===================================================================]
11[section Size]
12
13[table
14[[['*Size*]]                    [__ch_itvs__][__ch_itv_sets__][__ch_itv_maps__][__ch_ele_sets__][__ch_ele_maps__]]
15[[`size_type T::size()const`\n
16  `size_type size(const T&)`]               [__O1__]  [__On__] [__On__] [__O1__] [__O1__]   ]
17[[`size_type cardinality(const T&)`]        [__O1__]  [__On__] [__On__] [__O1__] [__O1__]   ]
18[[`difference_type length(const T&)`]       [__O1__]  [__On__] [__On__]   [ ]      [ ]      ]
19[[`size_type iterative_size(const T&)`]        [ ]    [__O1__] [__O1__] [__O1__] [__O1__]   ]
20[[`size_type interval_count(const T&)`]        [ ]    [__O1__] [__O1__]   [ ]      [ ]      ]
21]
22
23For *icl* containers the single `size` function known from std containers
24branches into tree to five different members functions.
25The table above shows the types, `size` functions are implemented for,
26together with their *complexities*. Linear complexities __On__ refer to the container's
27`iterative_size`:
28``
29n = y.iterative_size()
30``
31
32The next table gives a short definition for the different size functions.
33
34[table
35[[['*Size*]]                                      [Types] [Description]                                        ]
36[[`size_type interval_count(const T&)`]            [__S __M] [The number of intervals of an interval container.]                         ]
37[[`size_type iterative_size(const T&)`]    [__S __M __s __m] [The number of objects in an icl container that can be iterated over.]      ]
38[[`difference_type length(const T&)`]       [__i __S __M] [The length of an interval or the sum of lengths of
39                                                          an interval container's intervals, that's `domain_type` has a `difference_type`.]     ]
40[[`size_type cardinality(const T&)`][__i __S __M __s __m] [The number of elements of an interval or a container.
41                                                           For continuous data types cardinality can be /infinite/.]                ]
42[[`size_type T::size()const`\n
43  `size_type size(const T&)`]       [__i __S __M __s __m] [The number of elements of an interval or a container,
44                                                           which is also it's `cardinality`.]                                        ]
45]
46
47['*Back to section . . .*]
48[table
49[]
50[[[link function_synopsis_table ['*Function Synopsis*]] ] ]
51[[[link boost_icl.interface ['*Interface*]]             ] ]
52]
53
54[endsect][/ Size]
55
56
57