Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyQueueError = fmt.Errorf("Trying to pop from an empty queue")
Functions ¶
This section is empty.
Types ¶
type PriorityQueue ¶
type PriorityQueue[V any] struct { // contains filtered or unexported fields }
PriorityQueue uses uint priority values for queue items the priority value is inverted meaning that zero is the highest priority item and higher numbers have lower priority
func NewPriorityQueue ¶
func NewPriorityQueue[V any]() PriorityQueue[V]
func (*PriorityQueue[V]) Add ¶
func (this *PriorityQueue[V]) Add(priority uint, value V)
func (PriorityQueue[V]) Empty ¶
func (this PriorityQueue[V]) Empty() bool
func (PriorityQueue[V]) Len ¶
func (this PriorityQueue[V]) Len() int
func (*PriorityQueue[V]) Remove ¶
func (this *PriorityQueue[V]) Remove() (V, error)
Click to show internal directories.
Click to hide internal directories.