heap

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 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 Max

type Max[T int | uint64] struct {
	// contains filtered or unexported fields
}

Max is a max-heap used to keep track of nearest neighbors.

func MakeMax

func MakeMax[T int | uint64](distances []int, value []T) Max[T]

func (*Max[T]) Len added in v0.3.3

func (me *Max[T]) Len() int

func (*Max[T]) Push

func (me *Max[T]) Push(dist int, value T)

func (*Max[T]) PushPop

func (me *Max[T]) PushPop(dist int, value T)

Jump to

Keyboard shortcuts

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