{"modulePath":"github.com/pgvector/pgvector-go","version":"v0.4.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pgvector\n\n## Types\n\n```go\ntype HalfVector struct {\n\t// contains filtered or unexported fields\n}\n```\nHalfVector is a wrapper for \\[]float32 to implement sql.Scanner and driver.Valuer.\n\n```go\nfunc NewHalfVector(vec []float32) HalfVector\n```\nNewHalfVector creates a new HalfVector from a slice of float32.\n\n```go\nfunc (v HalfVector) EncodeText(buf []byte) (newBuf []byte, err error)\n```\nEncodeText encodes a text representation of the half vector.\n\n```go\nfunc (v HalfVector) MarshalJSON() ([]byte, error)\n```\nMarshalJSON implements the json.Marshaler interface.\n\n```go\nfunc (v *HalfVector) Parse(s string) error\n```\nParse parses a string representation of a half vector.\n\n```go\nfunc (v *HalfVector) Scan(src interface{}) (err error)\n```\nScan implements the sql.Scanner interface.\n\n```go\nfunc (v *HalfVector) SetSlice(vec []float32)\n```\nSetSlice sets the underlying slice of float32.\n\n```go\nfunc (v HalfVector) Slice() []float32\n```\nSlice returns the underlying slice of float32.\n\n```go\nfunc (v HalfVector) String() string\n```\nString returns a string representation of the half vector.\n\n```go\nfunc (v *HalfVector) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON implements the json.Unmarshaler interface.\n\n```go\nfunc (v HalfVector) Value() (driver.Value, error)\n```\nValue implements the driver.Valuer interface.\n\n```go\ntype SparseVector struct {\n\t// contains filtered or unexported fields\n}\n```\nSparseVector is a wrapper to implement sql.Scanner and driver.Valuer.\n\n```go\nfunc NewSparseVector(vec []float32) SparseVector\n```\nNewSparseVector creates a new SparseVector from a slice of float32.\n\n```go\nfunc NewSparseVectorFromMap(elements map[int32]float32, dim int32) SparseVector\n```\nNewSparseVectorFromMap creates a new SparseVector from a map of non-zero elements.\n\n```go\nfunc (v *SparseVector) DecodeBinary(buf []byte) error\n```\nDecodeBinary decodes a binary representation of a sparse vector.\n\n```go\nfunc (v SparseVector) Dimensions() int32\n```\nDimensions returns the number of dimensions.\n\n```go\nfunc (v SparseVector) EncodeBinary(buf []byte) (newBuf []byte, err error)\n```\nEncodeBinary encodes a binary representation of the sparse vector.\n\n```go\nfunc (v SparseVector) Indices() []int32\n```\nIndices returns the non-zero indices.\n\n```go\nfunc (v *SparseVector) Parse(s string) error\n```\nParse parses a string representation of a sparse vector.\n\n```go\nfunc (v *SparseVector) Scan(src interface{}) (err error)\n```\nScan implements the sql.Scanner interface.\n\n```go\nfunc (v SparseVector) Slice() []float32\n```\nSlice returns a slice of float32.\n\n```go\nfunc (v SparseVector) String() string\n```\nString returns a string representation of the sparse vector.\n\n```go\nfunc (v SparseVector) Value() (driver.Value, error)\n```\nValue implements the driver.Valuer interface.\n\n```go\nfunc (v SparseVector) Values() []float32\n```\nValues returns the non-zero values.\n\n```go\ntype Vector struct {\n\t// contains filtered or unexported fields\n}\n```\nVector is a wrapper for \\[]float32 to implement sql.Scanner and driver.Valuer.\n\n```go\nfunc NewVector(vec []float32) Vector\n```\nNewVector creates a new Vector from a slice of float32.\n\n```go\nfunc (v *Vector) DecodeBinary(buf []byte) error\n```\nDecodeBinary decodes a binary representation of a vector.\n\n```go\nfunc (v Vector) EncodeBinary(buf []byte) (newBuf []byte, err error)\n```\nEncodeBinary encodes a binary representation of the vector.\n\n```go\nfunc (v Vector) MarshalJSON() ([]byte, error)\n```\nMarshalJSON implements the json.Marshaler interface.\n\n```go\nfunc (v *Vector) Parse(s string) error\n```\nParse parses a string representation of a vector.\n\n```go\nfunc (v *Vector) Scan(src interface{}) (err error)\n```\nScan implements the sql.Scanner interface.\n\n```go\nfunc (v Vector) Slice() []float32\n```\nSlice returns the underlying slice of float32.\n\n```go\nfunc (v Vector) String() string\n```\nString returns a string representation of the vector.\n\n```go\nfunc (v *Vector) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON implements the json.Unmarshaler interface.\n\n```go\nfunc (v Vector) Value() (driver.Value, error)\n```\nValue implements the driver.Valuer interface.\n\n","path":"github.com/pgvector/pgvector-go","name":"pgvector","synopsis":"","isRedistributable":true}
