heap

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 0 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, V Interface[T]] []T

func NewHeap

func NewHeap[T any, V Interface[T]](arr V) Heap[T, V]

func (Heap[T, V]) First

func (heap Heap[T, V]) First() T

func (Heap[T, V]) Init

func (heap Heap[T, V]) Init()

func (Heap[T, V]) Last

func (heap Heap[T, V]) Last() T

func (*Heap[T, V]) Pop

func (heap *Heap[T, V]) Pop() T

func (*Heap[T, V]) Push

func (heap *Heap[T, V]) Push(x T)

func (*Heap[T, V]) Put added in v1.8.0

func (heap *Heap[T, V]) Put(val T)

func (*Heap[T, V]) Remove

func (heap *Heap[T, V]) Remove(i int) T

type Interface

type Interface[T any] interface {
	~[]T
	Less(i, j int) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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