Discover Packages
github.com/HAOYUATHZ/quorum
common
prque
package
Version:
v2.2.3+incompatible
Opens a new window with list of versions in this module.
Published: Apr 4, 2019
License: GPL-3.0, LGPL-3.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
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.