heap

package
v0.0.0-...-225fc4e Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heap

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

func New

func New[T any](less func(a, b T) bool, newIndex func(t T, i int)) *Heap[T]

func (*Heap[T]) Fix

func (h *Heap[T]) Fix(i int)

func (*Heap[T]) Get

func (h *Heap[T]) Get(i int) T

func (*Heap[T]) Len

func (h *Heap[T]) Len() int

func (*Heap[T]) Pop

func (h *Heap[T]) Pop() T

func (*Heap[T]) PopAll

func (h *Heap[T]) PopAll() iter.Seq[T]

func (*Heap[T]) Push

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

func (*Heap[T]) Remove

func (h *Heap[T]) Remove(i int) T

Jump to

Keyboard shortcuts

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