Move priority queue to pq package; improve docs.

This commit is contained in:
2023-03-02 01:53:12 -08:00
parent 5e23a92314
commit b3b491d9a9
8 changed files with 255 additions and 155 deletions

View File

@@ -1,8 +1,9 @@
// Package binheap implements a binary max-heap.
package binheap
import "golang.org/x/exp/constraints"
// H is a generic, non-concurrent binary max-heap.
// H is a binary max-heap.
//
// `I` is the type of the priority IDs, and `E` the type of the elements.
type H[I constraints.Ordered, E any] struct {