A sparse vector struct for pgvector
Summary
Functions
Returns the number of dimensions
Creates a new sparse vector from its binary representation
Returns the non-zero indices
Creates a new sparse vector from a list, tensor or sparse vector
Creates a new sparse vector from a map of non-zero elements
Returns the non-zero values
Types
@type t() :: %Pgvector.SparseVector{data: binary()}
A sparse vector
Functions
Returns the number of dimensions
Creates a new sparse vector from its binary representation
Returns the non-zero indices
Creates a new sparse vector from a list, tensor or sparse vector
Creates a new sparse vector from a map of non-zero elements
Returns the non-zero values