priorityqueue

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 4 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 comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](comparator func(T, T) int) *PriorityQueue[T]

func (*PriorityQueue[T]) Add

func (pq *PriorityQueue[T]) Add(t ...T) error

func (*PriorityQueue[T]) Clear

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

func (*PriorityQueue[T]) IsEmpty

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

func (*PriorityQueue[T]) Iter

func (pq *PriorityQueue[T]) Iter(yield func(int, T) bool)

func (*PriorityQueue[T]) Peek

func (pq *PriorityQueue[T]) Peek() (T, error)

func (*PriorityQueue[T]) Poll

func (pq *PriorityQueue[T]) Poll() (T, error)

func (*PriorityQueue[T]) Size

func (pq *PriorityQueue[T]) Size() int

func (*PriorityQueue[T]) Stream

func (pq *PriorityQueue[T]) Stream() *stream.Stream[T]

func (*PriorityQueue[T]) ToArray

func (pq *PriorityQueue[T]) ToArray() []T

Jump to

Keyboard shortcuts

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