pq

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntItem

type IntItem struct {
	Val   int
	Prior int
}

func (*IntItem) Priority

func (i *IntItem) Priority() int

func (*IntItem) UUID

func (i *IntItem) UUID() uint64

func (*IntItem) Value

func (i *IntItem) Value() interface{}

type Item

type Item interface {
	Value() interface{}
	Priority() int
	UUID() uint64
}

type MinMaxPriorityQueue

type MinMaxPriorityQueue interface {
	Push(Item)
	PeekMin() Item
	PeekMax() Item
	PopMin() Item
	PopMax() Item
	Update(Item)
	Len() int
}

func New

func New(bound int) MinMaxPriorityQueue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL