swift-collections icon indicating copy to clipboard operation
swift-collections copied to clipboard

Commonly used data structures for Swift

Results 70 swift-collections issues
Sort by recently updated
recently updated
newest added

This work-in-progress draft PR kicks the tires for incubating [persistent data structures](https://en.wikipedia.org/wiki/Persistent_data_structure) into the `swift-collections` project. A long-term goal of this effort is to mature persistent replacements for the general-purpose...

I missed the [GSoC 2021 topic][] on the forums, so I'd like to post my feedback here instead. I'm working on similar types (`SetOfUInt8` and `SetOfUInt16`), so I have a...

enhancement

There’s seems to be no way to modify the `_elements` memory in place when we want to alter a property that does not partake in the `Equatable` and `Hashable` conformance....

enhancement

I had a need for a data structure recently and couldn't find any good package implementations. I think it might be a nice addition to this package. Essentially, the problem...

enhancement

It would be quite useful to have a type that can efficiently store values with corrilative range regions. This type ideally would conform to RangeReplaceableCollection (or near miss). It should...

enhancement

### Information - **Package version:** 1.0.0 - **Platform version:** macOS 12.1 (21C52) - **Swift version:** Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) ### Checklist - [ ] If possible, I've reproduced...

bug

I encountered the issue when trying to get an absolute position of the element and got incorrect results. I started a conversation on [forum](https://forums.swift.org/t/what-distance-between-indexes-mean-in-sortedset/54986/4) because I wasn't sure if it's...

bug

`SortedSet` incorrectly reports that the element is not contained in it. ### Information - **Package version:** Branch `feature/SortedCollections` - **Platform version:** macOS 12.2 Beta (21D5025f) - **Swift version:** > swift-driver...

bug

### Description This introduces a double-ended `PriorityQueue` as discussed in #3. ### Detailed Design `Heap` (a min-max heap) is used as the storage. One of the big advantages of using...

### Description A new implicit data structure has been added: an unsigned multiset. This has been discussed extensively on the Swift Forums, most notably [here](https://forums.swift.org/t/rfd-countedset/11792) and [here](https://forums.swift.org/t/unordered-array-counted-set/52170/12). ### Detailed Design...