vector

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cosine

func Cosine(left, right []float64) float64

Types

type Item

type Item struct {
	ThreadID int64
	Vector   []float64
}

type Neighbor

type Neighbor struct {
	ThreadID int64   `json:"thread_id"`
	Score    float64 `json:"score"`
}

func Query

func Query(items []Item, query []float64, limit int, excludeThreadID int64) []Neighbor

Jump to

Keyboard shortcuts

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