class Pgvector::SparseVector
def to_binary
def to_binary nnz = @indices.size buffer = [dimensions, nnz, 0].pack("l>l>l>") @indices.pack("l>#{nnz}", buffer: buffer) @values.pack("g#{nnz}", buffer: buffer) buffer end
def to_binary nnz = @indices.size buffer = [dimensions, nnz, 0].pack("l>l>l>") @indices.pack("l>#{nnz}", buffer: buffer) @values.pack("g#{nnz}", buffer: buffer) buffer end