priority

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2015 License: MIT 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 {
	Value    string // The value of the item; arbitrary.
	Priority int64  // The priority of the item in the queue.
	// contains filtered or unexported fields
}

An Item is something we manage in a priority queue.

type Queue

type Queue []*Item

A Queue implements heap.Interface and holds Items.

func MakeQueue

func MakeQueue() Queue

func (Queue) Len

func (pq Queue) Len() int

func (Queue) Less

func (pq Queue) Less(i, j int) bool

func (*Queue) Pop

func (pq *Queue) Pop() interface{}

func (*Queue) Push

func (pq *Queue) Push(x interface{})

func (Queue) Swap

func (pq Queue) Swap(i, j int)

Jump to

Keyboard shortcuts

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