IndexSet
A collection of unique integer values that represent the indexes of elements in another collection.
Declaration
struct IndexSetOverview
The range of valid integer values is 0...Int.max-1. Anything outside this range is an error.
Topics
Creating an Index Set
Counting Items in a Set
Accessing Elements
Combining Index Sets
formIntersection(_:)formSymmetricDifference(_:)formUnion(_:)intersection(_:)symmetricDifference(_:)union(_:)
Inserting Elements
Removing Elements
Testing Set Membership
Manipulating Indexes
Finding Elements
integerLessThanOrEqualTo(_:)integerGreaterThan(_:)integerGreaterThanOrEqualTo(_:)integerLessThan(_:)
Selecting Elements
filteredIndexSet(in:includeInteger:)filteredIndexSet(in:includeInteger:)filteredIndexSet(includeInteger:)
Iterating Over Elements
Shifting Index Groups
Getting a Range-Based View
Using Reference Types
Structures
Initializers
Instance Properties
Instance Methods
contains(integersIn:)count(in:)indexRange(in:)insert(integersIn:)intersects(integersIn:)rangeView(of:)