Added l2_normalize function for sparsevec

This commit is contained in:
Andrew Kane
2024-04-15 14:05:18 -07:00
parent 10dacfd991
commit 127ecdd650
8 changed files with 89 additions and 14 deletions

View File

@@ -1,6 +1,8 @@
#ifndef SPARSEVEC_H
#define SPARSEVEC_H
#include "fmgr.h"
#define SPARSEVEC_MAX_DIM 100000
#define SPARSEVEC_MAX_NNZ 16000
@@ -21,5 +23,6 @@ typedef struct SparseVector
} SparseVector;
SparseVector *InitSparseVector(int dim, int nnz);
Datum sparsevec_l2_normalize(PG_FUNCTION_ARGS);
#endif