Documentation
¶
Overview ¶
Package prque implements a priority queue data structure supporting arbitrary value types and int64 priorities.
If you would like to use a min-priority queue, simply negate the priorities.
Internally the queue is based on the standard heap package working on a sortable version of the block based stack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prque ¶
type Prque struct {
// contains filtered or unexported fields
}
Priority queue data structure.
func (*Prque) Pop ¶
Pops the value with the greates priority off the stack and returns it. Currently no shrinking is done.
func (*Prque) PopItem ¶
func (p *Prque) PopItem() interface{}
Pops only the item from the queue, dropping the associated priority value.
Click to show internal directories.
Click to hide internal directories.