utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InTest bool

Functions

func CopyNode

func CopyNode[TV interfaces.VectorType, TIX interfaces.IndexTypes](
	dst, src interfaces.Node[TV, TIX], size TIX,
)

CopyNode copies the source node to the destination node. Note that the destination node must be of the same type and take up the same amount of memory as the source node.

func DumpNode

func DumpNode[TV interfaces.VectorType, TIX interfaces.IndexTypes](
	distance interfaces.Distance[TV, TIX],
	node interfaces.Node[TV, TIX],
) string

func GetPtr

func GetPtr[TV interfaces.VectorType, TIX interfaces.IndexTypes](
	node interfaces.Node[TV, TIX],
) unsafe.Pointer

func InTesting

func InTesting() bool

func Intersection

func Intersection[TIX interfaces.IndexTypes](a, b []TIX) []TIX

func Max

func Max[T interfaces.IndexTypes](a, b T) T

func Measure

func Measure(f func()) (elapsed time.Duration)

func MeasureWithReturn

func MeasureWithReturn[T any](f func() T) (elapsed time.Duration, ret T)

func Round

func Round(f float64) float64

func RoundPlus

func RoundPlus(f float64, places int) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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