1.. Sequences/Concepts//Random Access Sequence |30 2 3Random Access Sequence 4====================== 5 6Description 7----------- 8 9A |Random Access Sequence| is a |Bidirectional Sequence| whose iterators model 10|Random Access Iterator|. A random access sequence guarantees amortized constant 11time access to an arbitrary sequence element. 12 13Refinement of 14------------- 15 16|Bidirectional Sequence| 17 18 19Expression requirements 20----------------------- 21 22In addition to the requirements defined in |Bidirectional Sequence|, 23for any |Random Access Sequence| ``s`` the following must be met: 24 25+---------------------------+-----------------------------------+---------------------------+ 26| Expression | Type | Complexity | 27+===========================+===================================+===========================+ 28| ``begin<s>::type`` | |Random Access Iterator| | Amortized constant time | 29+---------------------------+-----------------------------------+---------------------------+ 30| ``end<s>::type`` | |Random Access Iterator| | Amortized constant time | 31+---------------------------+-----------------------------------+---------------------------+ 32| ``at<s,n>::type`` | Any type | Amortized constant time | 33+---------------------------+-----------------------------------+---------------------------+ 34 35 36Expression semantics 37-------------------- 38 39Semantics of an expression is defined only where it differs from, or is not 40defined in |Bidirectional Sequence|. 41 42+---------------------------+-----------------------------------------------------------------------+ 43| Expression | Semantics | 44+===========================+=======================================================================+ 45| ``at<s,n>::type`` | The ``n``\ th element from the beginning of the sequence; see |at|. | 46+---------------------------+-----------------------------------------------------------------------+ 47 48 49Models 50------ 51 52* |vector| 53* |range_c| 54 55 56See also 57-------- 58 59|Sequences|, |Bidirectional Sequence|, |Extensible Sequence|, |Random Access Iterator|, 60|begin| / |end|, |at| 61 62 63.. copyright:: Copyright � 2001-2009 Aleksey Gurtovoy and David Abrahams 64 Distributed under the Boost Software License, Version 1.0. (See accompanying 65 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 66