priorityqueue

package
v0.0.0-...-51d7257 Latest Latest
Warning

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

Go to latest
Published: May 7, 2014 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityQueue

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

PriorityQueue is a generic priority queue implementation. Items all implement gil.Interface and so are ordered according to their Less method

func New

func New() *PriorityQueue

New creates and initializes a PriorityQueue

func (*PriorityQueue) Len

func (q *PriorityQueue) Len() int

Len returns the number of items in the queue

func (*PriorityQueue) Peek

func (q *PriorityQueue) Peek() gil.Interface

Peek at the next item in the queue without removing it

func (*PriorityQueue) Pop

func (q *PriorityQueue) Pop() gil.Interface

Pop off the next item in the queue

func (*PriorityQueue) Push

func (q *PriorityQueue) Push(value gil.Interface) gil.QueueInterface

Push an item into the queue

Jump to

Keyboard shortcuts

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