![]() |
Home | Libraries | People | FAQ | More |
A Random Access Sequence is a Bidirectional Sequence whose iterators model Random Access Iterator. It guarantees constant time access to arbitrary sequence elements.
Notation
sA Random Access Sequence
SA Random Access Sequence type
NoAn arbitrary object
eA Sequence element
In addition to the requirements defined in Bidirectional Sequence, for any Random Access Sequence the following must be met:
|
Expression |
Return type |
Type Requirements |
Runtime Complexity |
|---|---|---|---|
|
|
Constant |
||
|
|
Constant |
||
|
|
Any type |
Constant |
|
|
|
Any type |
|
Constant |
|
Expression |
Compile Time Complexity |
|---|---|
|
|
Amortized constant time |
|
|
Amortized constant time |
|
|
Amortized constant time |
|
|
Amortized constant time |
The semantics of an expression are defined only where they differ from, or are not defined in Bidirectional Sequence.
std::pair
boost::array
vector
reverse_view
iterator_range
(where adapted sequence is a Random Access Sequence)
transform_view
(where adapted sequence is a Random Access Sequence)
zip_view
(where adapted sequences are models of Random Access Sequence)