priorityqueue

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-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 Priority

type Priority bool
const (
	SmallerFirst Priority = false
	BiggerFirst  Priority = true
)

type PriorityQueue

type PriorityQueue[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](priority Priority) PriorityQueue[T]

func (PriorityQueue[T]) Empty

func (queue PriorityQueue[T]) Empty() bool

func (PriorityQueue[T]) ForEach

func (queue PriorityQueue[T]) ForEach(callback functions.ParamCallback[T])

func (PriorityQueue[T]) Peek

func (queue PriorityQueue[T]) Peek() T

func (PriorityQueue[T]) Pop

func (queue PriorityQueue[T]) Pop() T

func (PriorityQueue[T]) Push

func (queue PriorityQueue[T]) Push(value T, priority int)

Jump to

Keyboard shortcuts

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