pq

package
v0.0.0-...-736f5eb Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2015 License: MIT Imports: 2 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 {
	Value    interface{}
	Priority int
}

func NewItem

func NewItem(value interface{}, priority int) (i *Item)

func (Item) Less

func (x Item) Less(than heap.Item) bool

type PQ

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

func NewMax

func NewMax() (q *PQ)

func NewMin

func NewMin() (q *PQ)

func (*PQ) ChangePriority

func (pq *PQ) ChangePriority(val interface{}, priority int)

func (*PQ) Extract

func (pq *PQ) Extract() (el Item)

func (*PQ) Insert

func (pq *PQ) Insert(el Item)

func (*PQ) Len

func (pq *PQ) Len() int

Jump to

Keyboard shortcuts

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