20 lines
514 B
Go
20 lines
514 B
Go
package pgvector
|
|
|
|
// Vector represents a vector for similarity search.
|
|
// Stub implementation for building without PostgreSQL/pgvector extension.
|
|
type Vector []float32
|
|
|
|
// NewVector creates a new vector from a slice of float32.
|
|
func NewVector(slice []float32) Vector {
|
|
return Vector(slice)
|
|
}
|
|
|
|
// String returns the string representation of the vector.
|
|
func (v Vector) String() string {
|
|
return ""
|
|
}
|
|
|
|
// Dimensions returns the number of dimensions in the vector.
|
|
func (v Vector) Dimensions() int {
|
|
return len(v)
|
|
} |