heap

package
v0.16.13 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MutexHeap added in v0.10.8

type MutexHeap[T cmp.Comparable[T]] struct {
	// contains filtered or unexported fields
}

func New

func New[T cmp.Comparable[T]](l int) MutexHeap[T]

func NewFromArray

func NewFromArray[T cmp.Comparable[T]](arr []T) MutexHeap[T]

func (*MutexHeap[T]) First added in v0.10.8

func (h *MutexHeap[T]) First() (T, bool)

func (*MutexHeap[T]) Init added in v0.10.8

func (h *MutexHeap[T]) Init()

func (MutexHeap[T]) Last added in v0.10.8

func (h MutexHeap[T]) Last() (T, bool)

func (*MutexHeap[T]) Pop added in v0.10.8

func (h *MutexHeap[T]) Pop() (T, bool)

func (*MutexHeap[T]) Push added in v0.10.8

func (h *MutexHeap[T]) Push(x T)

func (*MutexHeap[T]) Remove added in v0.10.8

func (h *MutexHeap[T]) Remove(i int) (T, bool)

Jump to

Keyboard shortcuts

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