priority_queue

package
v0.0.0-...-048a247 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 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 Item

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

func (Item[T]) Index

func (i Item[T]) Index() int

func (Item[T]) Priority

func (i Item[T]) Priority() int

func (Item[T]) Rank

func (i Item[T]) Rank() int

func (*Item[T]) SetIndex

func (i *Item[T]) SetIndex(idx int)

func (Item[T]) Value

func (i Item[T]) Value() T

type PriorityQueue

type PriorityQueue[T any] struct {
	heap.Heap[*Item[T]]
}

func (*PriorityQueue[T]) Push

func (pq *PriorityQueue[T]) Push(item T, priority int) *Item[T]

Jump to

Keyboard shortcuts

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