mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-10 06:40:57 +08:00
Updated comments [skip ci]
This commit is contained in:
@@ -75,7 +75,10 @@
|
|||||||
#define HnswIsElementTuple(tup) ((tup)->type == HNSW_ELEMENT_TUPLE_TYPE)
|
#define HnswIsElementTuple(tup) ((tup)->type == HNSW_ELEMENT_TUPLE_TYPE)
|
||||||
#define HnswIsNeighborTuple(tup) ((tup)->type == HNSW_NEIGHBOR_TUPLE_TYPE)
|
#define HnswIsNeighborTuple(tup) ((tup)->type == HNSW_NEIGHBOR_TUPLE_TYPE)
|
||||||
|
|
||||||
|
/* 2 * M connections for ground layer */
|
||||||
#define HnswGetLayerM(m, layer) (layer == 0 ? m * 2 : m)
|
#define HnswGetLayerM(m, layer) (layer == 0 ? m * 2 : m)
|
||||||
|
|
||||||
|
/* Optimal ML from paper */
|
||||||
#define HnswGetMl(m) (1 / log(m))
|
#define HnswGetMl(m) (1 / log(m))
|
||||||
|
|
||||||
/* Ensure fits in uint8 */
|
/* Ensure fits in uint8 */
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "vector.h"
|
#include "vector.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the number of connection in the index
|
* Get the max number of connections in an upper layer for each element in the index
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
HnswGetM(Relation index)
|
HnswGetM(Relation index)
|
||||||
|
|||||||
Reference in New Issue
Block a user