Commit Graph
16 Commits
Author SHA1 Message Date
Karoy Lorentey 1c69635852 Add SPDX-License-Identifier tags 2026-03-05 19:39:24 -08:00
Karoy Lorentey d9b09ecde8 Update copyright dates 2026-03-05 19:39:20 -08:00
Karoy Lorentey 35d5746117 Rename _CollectionsUtilities to InternalCollectionsUtilities
We are forced to do this due to an Xcode issue (#364) with underscored module names.

This module remains unstable, despite the removal of the underscore. Directly importing it from outside the package remains unsupported. This module and/or its entire contents may go away or change in incompatible ways in any future swift-collections release.
2024-05-29 14:00:13 -07:00
Karoy Lorentey 3bc1c3be46 [BitCollections] Update copyright dates 2024-01-30 18:09:37 -08:00
Karoy Lorentey a8dad62bc9 Remove obsolete swift(>=5.5)/swift(>=5.6) checks 2023-04-10 18:33:52 -07:00
Karoy Lorentey 8ca5c0367f Merge pull request #263 from lorentey/bitcollections-finalization
BitArray API refinements & additions
2023-04-10 17:32:10 -07:00
Karoy Lorentey cbab9e3737 Introduce COLLECTIONS_SINGLE_MODULE condition 2023-03-21 18:42:33 -07:00
Karoy Lorentey 6cb03fee98 [BitCollections] Update file headers 2023-01-31 17:30:39 -08:00
Karoy Lorentey a2f4b18ae0 [BitSet, OrderedCollections] Unify UnsafeBitSet implementations 2022-11-28 16:30:55 -08:00
Karoy Lorentey 14432582dc [BitArray] Explicitly conform to Sendable 2022-10-05 11:33:31 -07:00
Karoy Lorentey d8d9c5ea25 [BitSet] Add documentation 2022-08-16 19:01:11 -07:00
Karoy Lorentey 94e2e477db [BitArray] Add truncateOrExtend method
This comes handy to e.g. restore the original count of a bit array
after a BitArray→BitSet→BitArray conversion roundtrip.
2022-08-16 15:43:34 -07:00
Karoy Lorentey cbf933665b [BitSet] Revert to non-generic BitSet
Also, remove members that were generic over FixedWidthInteger.
2022-08-12 19:22:24 -07:00
Karoy Lorentey 565c09e8d5 Review & update BitArray 2022-02-06 22:38:35 -08:00
Károly Lőrentey 8f2e0c79c3 Review & update BitSet
This is a work in progress; in particular, it adds a cached `count` to BitSet, which may turn out to be a bad idea. (It generates extra work for bulk operations even if the count is never needed.) I think replacing this with a cached `startIndex` might be more useful in practice.

The `_UnsafeBitset` type from the OrderedCollections module is brought over as `BitSet._UnsafeHandle`. This implements an (internal-only) fixed-size bitset.

`BitSet` now conforms to `SetAlgebra`. We decided against this in the initial implementation, but on reflection, it seems like the right move. (The somewhat nonsensical `insert` and `update` methods are unfortunate, but consistency is valuable.)
2022-01-10 23:35:33 -08:00
Károly Lőrentey 537382f2a6 BitArrayModule ⟹ BitCollections 2021-12-28 15:45:38 -08:00