The highest tagged major version is
v5.
package
Version:
v3.6.1+incompatible
Opens a new window with list of versions in this module.
Published: Jun 29, 2020
License: GPL-3.0, LGPL-3.0, LGPL-3.0-or-later
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 10
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.