priority_queue

package
v0.0.0-...-8859e38 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexMinPriorityQueue

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

IndexMinPriorityQueue is an indexed minimum priority queue using an indexed binary heap as underlying data structure

func NewIndexMinPriorityQueue

func NewIndexMinPriorityQueue(maxSize int) *IndexMinPriorityQueue

func (*IndexMinPriorityQueue) ChangeWeight

func (pq *IndexMinPriorityQueue) ChangeWeight(i int, weight Weight)

func (*IndexMinPriorityQueue) Contains

func (pq *IndexMinPriorityQueue) Contains(i int) bool

func (*IndexMinPriorityQueue) DecreaseWeight

func (pq *IndexMinPriorityQueue) DecreaseWeight(i int, weight Weight)

func (*IndexMinPriorityQueue) DelMin

func (pq *IndexMinPriorityQueue) DelMin() (int, error)

func (*IndexMinPriorityQueue) Delete

func (pq *IndexMinPriorityQueue) Delete(i int)

func (*IndexMinPriorityQueue) Empty

func (pq *IndexMinPriorityQueue) Empty() bool

func (*IndexMinPriorityQueue) IncreaseWeight

func (pq *IndexMinPriorityQueue) IncreaseWeight(i int, weight Weight)

func (*IndexMinPriorityQueue) Insert

func (pq *IndexMinPriorityQueue) Insert(i int, weight Weight)

func (*IndexMinPriorityQueue) MinIndex

func (pq *IndexMinPriorityQueue) MinIndex() int

func (*IndexMinPriorityQueue) MinWeight

func (pq *IndexMinPriorityQueue) MinWeight() Weight

func (*IndexMinPriorityQueue) Size

func (pq *IndexMinPriorityQueue) Size() int

func (*IndexMinPriorityQueue) WeightOf

func (pq *IndexMinPriorityQueue) WeightOf(i int) Weight

type MinPriorityQueue

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

MinPriorityQueue is a minimum priority queue using a binary heap as underlying data structure

func NewMinPriorityQueue

func NewMinPriorityQueue() MinPriorityQueue

func (*MinPriorityQueue) DelMin

func (pq *MinPriorityQueue) DelMin() (edge.Edge, error)

func (*MinPriorityQueue) Insert

func (pq *MinPriorityQueue) Insert(i edge.Edge)

func (*MinPriorityQueue) IsEmpty

func (pq *MinPriorityQueue) IsEmpty() bool

func (*MinPriorityQueue) Min

func (pq *MinPriorityQueue) Min() edge.Edge

func (*MinPriorityQueue) Size

func (pq *MinPriorityQueue) Size() int

type Weight

type Weight float64

func (Weight) Compare

func (this Weight) Compare(that Weight) int

Jump to

Keyboard shortcuts

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