MCPcopy Create free account
hub / github.com/apache/madlib / svec_from_float8arr

Function svec_from_float8arr

methods/svec/src/pg_gp/sparse_vector.c:339–344  ·  view source on GitHub ↗

* Produces an svec from an array */

Source from the content-addressed store, hash-verified

337 * Produces an svec from an array
338 */
339SvecType *svec_from_float8arr(float8 *array, int dimension)
340{
341 SparseData sdata = float8arr_to_sdata(array,dimension);
342 SvecType *result = svec_from_sparsedata(sdata,true);
343 return result;
344}
345
346/**
347 * Makes an empty svec with sufficient memory allocated for the input number

Callers 2

classify_documentFunction · 0.85
generate_sparse_vectorFunction · 0.85

Calls 2

float8arr_to_sdataFunction · 0.85
svec_from_sparsedataFunction · 0.85

Tested by

no test coverage detected