pq

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 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 Item

type Item struct {
	// contains filtered or unexported fields
}

Item is something we manage in a priority queue.

func NewItem

func NewItem(value Value) *Item

type PriorityQueue

type PriorityQueue struct {
	// contains filtered or unexported fields
}

func NewPriorityQueue

func NewPriorityQueue() *PriorityQueue

func (*PriorityQueue) Len

func (pq *PriorityQueue) Len() int

func (*PriorityQueue) Peek

func (pq *PriorityQueue) Peek() Value

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() Value

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(value Value)

func (*PriorityQueue) Release

func (pq *PriorityQueue) Release(value Value)

func (*PriorityQueue) Values

func (pq *PriorityQueue) Values() []Value

type Value

type Value interface {
	Less(other Value) bool
}

Jump to

Keyboard shortcuts

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