priorityqueue

package
v0.136.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 1 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[V any, P PriorityValueType] []*QueueItem[V, P]

func (PriorityQueue[V, P]) Len

func (pq PriorityQueue[V, P]) Len() int

func (PriorityQueue[V, P]) Less

func (pq PriorityQueue[V, P]) Less(i, j int) bool

func (*PriorityQueue[V, P]) Pop

func (pq *PriorityQueue[V, P]) Pop() any

func (*PriorityQueue[V, P]) Push

func (pq *PriorityQueue[V, P]) Push(x any)

func (PriorityQueue[V, P]) Swap

func (pq PriorityQueue[V, P]) Swap(i, j int)

type PriorityValueType

type PriorityValueType cmp.Ordered

type QueueItem

type QueueItem[V any, P PriorityValueType] struct {
	Value    V
	Priority P
	Index    int
}

Jump to

Keyboard shortcuts

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