priority_queue

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 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 OpFunc

type OpFunc[T any] func(bl *PriorityQueue[T])

func WithRWMutex

func WithRWMutex[T any]() OpFunc[T]

WithRWMutex 赋值函数

type PriorityQueue

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

func New

func New[T any](cmp compare.CmpFunc[T], ops ...OpFunc[T]) *PriorityQueue[T]

func (*PriorityQueue[T]) Clear

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

func (*PriorityQueue[T]) Empty

func (q *PriorityQueue[T]) Empty() bool

func (*PriorityQueue[T]) Pop

func (q *PriorityQueue[T]) Pop() T

func (*PriorityQueue[T]) Push

func (q *PriorityQueue[T]) Push(elem T)

func (*PriorityQueue[T]) Size

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

func (*PriorityQueue[T]) Top

func (q *PriorityQueue[T]) Top() T

Jump to

Keyboard shortcuts

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