heap

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: AGPL-3.0 Imports: 2 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](data []T, less func(a, b T) bool) *Heap[T]

func (*Heap[T]) Cap

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

func (*Heap[T]) DESCSort

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

func (*Heap[T]) Len

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

func (*Heap[T]) Peek

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

func (*Heap[T]) Pop

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

func (*Heap[T]) PopLast

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

func (*Heap[T]) Push

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

func (*Heap[T]) Slice

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

func (*Heap[T]) TryEvictPush

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

Jump to

Keyboard shortcuts

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