RandomAccessCollection

E427893

RandomAccessCollection is a Swift protocol for collections that support efficient, index-based random access to their elements in constant time.

All labels observed (1)

Label Occurrences
RandomAccessCollection canonical 1

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf Swift protocol
availableSince Swift 3.0 NERFINISHED
category Swift collection protocol
conformingTypesInclude Array
ArraySlice NERFINISHED
ContiguousArray NERFINISHED
UnsafeBufferPointer
UnsafeMutableBufferPointer
conformsTo BidirectionalCollection NERFINISHED
definedIn Swift Standard Library NERFINISHED
documentationURL https://developer.apple.com/documentation/swift/randomaccesscollection
guarantees indices traversal in O(1) per step
hasAssociatedType Element
Index
Indices
SubSequence
hasComplexityGuarantee O(1) index distance
O(1) index offsetting
O(1) index subscripting
indexMovement supports random access backward
supports random access forward
indexOperation distance(from:to:) must be O(1)
index(_:offsetBy:) must be O(1)
subscript(position:) must be O(1)
indexTypeRequirement Strideable index with signed distance type
inheritsDefaultImplementationsFrom BidirectionalCollection NERFINISHED
Collection
isGenericOver Element
Index
isSubtypeOf BidirectionalCollection NERFINISHED
Collection
language Swift NERFINISHED
module Swift NERFINISHED
primaryUse model collections with constant-time index traversal
refines BidirectionalCollection NERFINISHED
requires Element
Index
Indices
SubSequence
requiresIndicesType RandomAccessCollection.Indices is a RandomAccessCollection
requiresSubSequenceConstraint SubSequence.Element == Element
SubSequence.Index == Index
supports bidirectional iteration
collection slicing
efficient random access by index
usedFor algorithms requiring fast random indexing

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Swift Standard Library includesProtocol RandomAccessCollection