package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

Add returns t+t2, pointwise.
CosDistance returns the cosine distance between t and t2.
Decode decodes the byte array into a vector.
Encode encodes the vector as a byte array suitable for storing in KV.
InnerProduct returns the negative inner product of t1 and t2.
L1Distance returns the L1 (Manhattan) distance between t and t2.
L2Distance returns the Euclidean distance between t and t2.
MakeSet constructs a new empty vector set with the given number of dimensions.
MakeSetFromRawData constructs a new vector set from a raw slice of vectors.
Minus returns t-t2, pointwise.
Mult returns t*t2, pointwise.
NegInnerProduct returns the negative inner product of t1 and t2.
Norm returns the L2 norm of t.
ParseVector parses the Postgres string representation of a vector.
Random returns a random vector with the number of dimensions in [1, maxDim] range.

# Constants

MaxDim is the maximum number of dimensions a vector can have.

# Type aliases

T is the type of a PGVector-like vector.