]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | .. Sequences/Concepts//Front Extensible Sequence |50 |
2 | ||
3 | Front Extensible Sequence | |
4 | ========================= | |
5 | ||
6 | Description | |
7 | ----------- | |
8 | ||
9 | A |Front Extensible Sequence| is an |Extensible Sequence| that supports amortized constant | |
10 | time insertion and removal operations at the beginning. | |
11 | ||
12 | Refinement of | |
13 | ------------- | |
14 | ||
15 | |Extensible Sequence| | |
16 | ||
17 | ||
18 | Expression requirements | |
19 | ----------------------- | |
20 | ||
21 | In addition to the requirements defined in |Extensible Sequence|, | |
22 | for any |Back Extensible Sequence| ``s`` the following must be met: | |
23 | ||
24 | +-------------------------------+-------------------------------+---------------------------+ | |
25 | | Expression | Type | Complexity | | |
26 | +===============================+===============================+===========================+ | |
27 | | ``push_front<s,x>::type`` | |Front Extensible Sequence| | Amortized constant time | | |
28 | +-------------------------------+-------------------------------+---------------------------+ | |
29 | | ``pop_front<s>::type`` | |Front Extensible Sequence| | Amortized constant time | | |
30 | +-------------------------------+-------------------------------+---------------------------+ | |
31 | | ``front<s>::type`` | Any type | Amortized constant time | | |
32 | +-------------------------------+-------------------------------+---------------------------+ | |
33 | ||
34 | ||
35 | Expression semantics | |
36 | -------------------- | |
37 | ||
38 | |Semantics disclaimer...| |Extensible Sequence|. | |
39 | ||
40 | +-------------------------------+-----------------------------------------------------------+ | |
41 | | Expression | Semantics | | |
42 | +===============================+===========================================================+ | |
43 | | ``push_front<s,x>::type`` | Equivalent to ``insert<s,begin<s>::type,x>::type``; | | |
44 | | | see |push_front|. | | |
45 | +-------------------------------+-----------------------------------------------------------+ | |
46 | | ``pop_front<v>::type`` | Equivalent to ``erase<s,begin<s>::type>::type``; | | |
47 | | | see |pop_front|. | | |
48 | +-------------------------------+-----------------------------------------------------------+ | |
49 | | ``front<s>::type`` | The first element in the sequence; see |front|. | | |
50 | +-------------------------------+-----------------------------------------------------------+ | |
51 | ||
52 | ||
53 | Models | |
54 | ------ | |
55 | ||
56 | * |vector| | |
57 | * |list| | |
58 | ||
59 | ||
60 | See also | |
61 | -------- | |
62 | ||
63 | |Sequences|, |Extensible Sequence|, |Back Extensible Sequence|, |push_front|, |pop_front|, |front| | |
64 | ||
65 | ||
66 |