prioqueue

package module
v0.0.0-...-2cf2cf8 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 1 Imported by: 0

README

prioqueue-go

Simple generic Priority queue implementation in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrioQueue

type PrioQueue[T any, H comparable] struct {
	// contains filtered or unexported fields
}

func NewPrioQueue

func NewPrioQueue[T any, H comparable](
	compareFn compareFn[T],
	hashFn hashFn[T, H],
) PrioQueue[T, H]

func (*PrioQueue[T, H]) Len

func (pq *PrioQueue[T, H]) Len() int

func (*PrioQueue[T, H]) Pop

func (pq *PrioQueue[T, H]) Pop() (T, bool)

func (*PrioQueue[T, H]) Push

func (pq *PrioQueue[T, H]) Push(v T)

func (*PrioQueue[T, H]) Update

func (pq *PrioQueue[T, H]) Update(hash H, updateFn func(T) T) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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