package
Version:
v0.28.2
Opens a new window with list of versions in this module.
Published: Dec 7, 2021
License: LGPL-3.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Priority queue data structure.
func New(setIndex setIndexCallback) *Prque
Creates a new priority queue.
Checks whether the priority queue is empty.
Pops the value with the greates priority off the stack and returns it.
Currently no shrinking is done.
func (p *Prque) PopItem() interface{}
Pops only the item from the queue, dropping the associated priority value.
func (p *Prque) Push(data interface{}, priority int64)
Pushes a value with a given priority into the queue, expanding if necessary.
func (p *Prque) Remove(i int) interface{}
Remove removes the element with the given index.
Clears the contents of the priority queue.
Returns the number of element in the priority queue.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.