Karoy Lorentey
540348f147
[Heap] Update copyright notices
2024-02-02 16:20:21 -08:00
Karoy Lorentey
37e66d0e49
[Heap] Modernize generic declaration syntax
2024-02-02 16:20:21 -08:00
Karoy Lorentey
50f6307501
[Heap] Also add an init(minimumCapacity:) initializer
2024-01-29 17:57:14 -08:00
Karoy Lorentey
9022cbd153
[Heap] Add reserveCapacity
2024-01-29 17:51:00 -08:00
Karoy Lorentey
a52457d6fc
[Heap] Mark removeMin/removeMax @discardableResult
2024-01-29 17:50:44 -08:00
Karoy Lorentey
53831b3a22
[Heap] Update docs
2023-11-14 19:10:35 -08:00
Karoy Lorentey
e10396bb20
[Heap] Convert min() and max() to properties
2023-11-14 18:52:27 -08:00
Karoy Lorentey
c44d56f4c8
Merge pull request #327 from lorentey/heap-better-bulk-insert
...
[Heap] insert(contentsOf:) Switch to Floyd’s if we’re inserting too many items
2023-11-14 17:56:22 -08:00
Karoy Lorentey and Stephen Canon
19ec155f60
Update Sources/HeapModule/Heap.swift
...
Co-authored-by: Stephen Canon <stephentyrone@gmail.com >
2023-11-14 11:06:05 -08:00
Karoy Lorentey
069dd4e5df
[Heap] insert(contentsOf:) Switch to Floyd’s if we’re inserting too many items
2023-11-13 21:28:24 -08:00
Karoy Lorentey
7686af1555
[Heap] Improve type-level doc comment
2023-11-13 18:33:43 -08:00
Karoy Lorentey
a8dad62bc9
Remove obsolete swift(>=5.5)/swift(>=5.6) checks
2023-04-10 18:33:52 -07:00
Karoy Lorentey
cc181a3bce
HeapModule: _Node → _HeapNode
...
This makes this name unique throughout the package, allowing this code to be built as a single, huge module.
2023-03-21 16:39:03 -07:00
Karoy Lorentey
fbebb69a1b
[Heap] Doc updates
2022-10-13 14:50:18 -07:00
Karoy Lorentey
1228e9c162
[Heap] Update docs for replaceMin/replaceMax
2022-10-12 16:01:48 -07:00
Karoy Lorentey
7138144f37
[Heap] Remove unnecessary testing APIs
...
We do not need a _raw initializer in the Heap implementation. The
heapify algorithm will not modify storage if it’s already in the
expected shape, so we can simply define one locally that double checks
that the order remains unchanged.
2022-10-12 16:01:23 -07:00
Karoy Lorentey
92d808d179
Merge branch 'heap-replace-extrema' into release/1.1
2022-10-12 15:23:17 -07:00
Karoy Lorentey
33b759b842
[Heap] PriorityQueueModule → HeapModule
2022-10-09 15:44:44 -07:00