gqueue

package
v0.0.0-...-f30b17c Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyQueue = errors.New("empty queue")

Functions

This section is empty.

Types

type PriorityQueue

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

func NewPriorityQueue

func NewPriorityQueue[T any](capacity int, compareFunc func(src T, dst T) bool) *PriorityQueue[T]

func (*PriorityQueue[T]) Dequeue

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

func (*PriorityQueue[T]) Enqueue

func (p *PriorityQueue[T]) Enqueue(elem T)

func (*PriorityQueue[T]) Len

func (p *PriorityQueue[T]) Len() int

Jump to

Keyboard shortcuts

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