PriorityQueue

package
v0.0.0-...-36e34b5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 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 PriorityQueue

type PriorityQueue[T utils.Ordered] struct {
	// contains filtered or unexported fields
}

func New

func New[T utils.Ordered](storage heap.Heap[T]) *PriorityQueue[T]

func (*PriorityQueue[T]) Clear

func (Q *PriorityQueue[T]) Clear()

func (*PriorityQueue[T]) Contains

func (Q *PriorityQueue[T]) Contains(element T) bool

func (*PriorityQueue[T]) Dequeue

func (Q *PriorityQueue[T]) Dequeue() (T, error)

func (*PriorityQueue[T]) Enqueue

func (Q *PriorityQueue[T]) Enqueue(elements ...T) error

func (*PriorityQueue[T]) Front

func (Q *PriorityQueue[T]) Front() (T, error)

func (*PriorityQueue[T]) IsEmpty

func (Q *PriorityQueue[T]) IsEmpty() bool

func (*PriorityQueue[T]) Length

func (Q *PriorityQueue[T]) Length() int

func (*PriorityQueue[T]) Update

func (Q *PriorityQueue[T]) Update(element, newElement T) error

Jump to

Keyboard shortcuts

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