heap

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heap

type Heap[T constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func Init

func Init[T constraints.Ordered](min bool) Heap[T]

func InitN

func InitN[T constraints.Ordered](min bool, size int) Heap[T]

func (Heap[T]) Fix

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

func (Heap[T]) Pop

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

func (Heap[T]) Push

func (h Heap[T]) Push(e 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