vector

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CosineDistance

func CosineDistance(a, b []float32) float32

CosineDistance calculates the cosine distance between two vectors. The cosine distance is defined as 1 - (dot product of a and b) / (magnitude of a * magnitude of b). The result is in the range [0, 2], where 0 means the vectors are identical and 2 means they are opposite.

Types

This section is empty.

Jump to

Keyboard shortcuts

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