Documentation ¶
Index ¶
Constants ¶
View Source
const ( PMin = false PMax = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P ¶ added in v0.2.0
type P bool
P is the queue priority type, i.e. a queue backed by a min- or max-heap.
type PQ ¶
type PQ[T any] struct { // contains filtered or unexported fields }
PQ is a priority queue of arbitrary data with a maximum queue size. Data popped from the queue is of highest priority. The priority queue may be a max or min queue.
func New ¶
New creates a priority queue instance. Size indicates the maximum size of the heap -- a size of 0 indicates no limit on the queue size.
Click to show internal directories.
Click to hide internal directories.