mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-12 07:36:55 +08:00
Updated comments [skip ci]
This commit is contained in:
@@ -770,16 +770,20 @@ SelectNeighbors(List *c, int m, int lc, FmgrInfo *procinfo, Oid collation, HnswE
|
|||||||
w = list_delete_last(w);
|
w = list_delete_last(w);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* r and wd will be the same as previous calls until the new element,
|
* r and wd will be the same as previous calls until the new
|
||||||
* so can skip distance calculations for as many elements as there is
|
* candidate, so can skip distance calculations for as many candidates
|
||||||
* state for
|
* as there is state for
|
||||||
*/
|
*/
|
||||||
if (mustCalculate)
|
if (mustCalculate)
|
||||||
closer = CheckElementCloser(e, r, lc, procinfo, collation);
|
closer = CheckElementCloser(e, r, lc, procinfo, collation);
|
||||||
else if (e->element == e2->neighbors[lc].firstPruned)
|
else if (e->element == e2->neighbors[lc].firstPruned)
|
||||||
{
|
{
|
||||||
closer = false;
|
closer = false;
|
||||||
/* TODO Store multiple pruned and only calculate when exhausted */
|
|
||||||
|
/*
|
||||||
|
* Could store multiple pruned and only calculate when exhausted
|
||||||
|
* (or store full state) at the expense of memory
|
||||||
|
*/
|
||||||
mustCalculate = true;
|
mustCalculate = true;
|
||||||
}
|
}
|
||||||
else if (e == newCandidate)
|
else if (e == newCandidate)
|
||||||
|
|||||||
Reference in New Issue
Block a user