Documentation
¶
Overview ¶
Package vector256 represents a 256-dimensional float32 vector for pgvector part of aerth/mostly project
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BitSize = 32 // should match F
View Source
var VarLen = 256
VarLen used to work with non-256 dimensions
Functions ¶
This section is empty.
Types ¶
type F ¶ added in v0.3.1
type F = float32 // F is for use instead of float32(x) or float64(x)
Vector256 represents a 256-dimensional float32 vector for pgvector and may be zero-length or a slice of 256 float32
type SearchEmbeddings ¶
type SearchEmbeddings struct {
Embeddings Vector256 `gorm:"type:vector(256);default:null" json:"-"`
}
SearchEmbeddings helper embedded type (for 256 specific)
type Vector256 ¶
type Vector256 []F // []float32, length enforced at [Vector256.Value] and [Vector256.Scan], must be [VarLen] and [BitSize]
Vector256 represents a 256-dimensional float32 vector for pgvector and may be zero-length or a slice of 256 float32
Click to show internal directories.
Click to hide internal directories.