mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-02 10:40:57 +08:00
Renamed functions to l2_norm [skip ci]
This commit is contained in:
@@ -727,9 +727,9 @@ halfvec_dims(PG_FUNCTION_ARGS)
|
||||
/*
|
||||
* Get the L2 norm of a half vector
|
||||
*/
|
||||
PGDLLEXPORT PG_FUNCTION_INFO_V1(halfvec_norm);
|
||||
PGDLLEXPORT PG_FUNCTION_INFO_V1(halfvec_l2_norm);
|
||||
Datum
|
||||
halfvec_norm(PG_FUNCTION_ARGS)
|
||||
halfvec_l2_norm(PG_FUNCTION_ARGS)
|
||||
{
|
||||
HalfVector *a = PG_GETARG_HALFVEC_P(0);
|
||||
half *ax = a->x;
|
||||
|
||||
@@ -784,9 +784,9 @@ sparsevec_cosine_distance(PG_FUNCTION_ARGS)
|
||||
/*
|
||||
* Get the L2 norm of a sparse vector
|
||||
*/
|
||||
PGDLLEXPORT PG_FUNCTION_INFO_V1(sparsevec_norm);
|
||||
PGDLLEXPORT PG_FUNCTION_INFO_V1(sparsevec_l2_norm);
|
||||
Datum
|
||||
sparsevec_norm(PG_FUNCTION_ARGS)
|
||||
sparsevec_l2_norm(PG_FUNCTION_ARGS)
|
||||
{
|
||||
SparseVector *a = PG_GETARG_SPARSEVEC_P(0);
|
||||
float *ax = SPARSEVEC_VALUES(a);
|
||||
|
||||
Reference in New Issue
Block a user