queue

package
v0.0.0-...-df6d6b4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 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 PQI

type PQI interface {
	Priority() int
}

PQI is an item in a PriorityQueue.

type PriorityQueue

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

A PriorityQueue of items.

func NewPriority

func NewPriority() PriorityQueue

NewPriority creates a new PriorityQueue.

func (PriorityQueue) Len

func (p PriorityQueue) Len() int

Len returns the length of the pqueue.

func (PriorityQueue) Pop

func (p PriorityQueue) Pop() PQI

Pop pops an item off of the pqueue.

func (PriorityQueue) Push

func (p PriorityQueue) Push(i PQI)

Push pushes an item onto the pqueue.

type Queue

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

A Queue of items.

func New

func New() Queue

New creates a new queue.

func (Queue) Len

func (q Queue) Len() int

Len returns the length of the queue.

func (Queue) Pop

func (q Queue) Pop() interface{}

Pop pops an item off the queue.

func (Queue) Push

func (q Queue) Push(v interface{})

Push pushes an item onto the queue.

Jump to

Keyboard shortcuts

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