tinyqueue

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: ISC Imports: 0 Imported by: 10

README

tinyqueue

GoDoc

tinyqueue is a Go package for binary heap priority queues. Ported from the tinyqueue Javascript library.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item interface {
	Less(Item) bool
}

type Queue

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

func New

func New(data []Item) *Queue

func (*Queue) Len

func (q *Queue) Len() int

func (*Queue) Peek

func (q *Queue) Peek() Item

func (*Queue) Pop

func (q *Queue) Pop() Item

func (*Queue) Push

func (q *Queue) Push(item Item)

Jump to

Keyboard shortcuts

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