for (NodeIdAndDistance<TDistance> secondPair : returnList) {
TDistance curdist = distanceFunction.distance(
nodes.get(secondPair.nodeId).item.vector(),
nodes.get(currentPair.nodeId).item.vector()
);
if (lt(curdist, distToQuery)) {
good = false;
break;
}
}
according to HNSW's paper Algorithm 4
i think,curdist = distance(q, every element in returnList),not curdist = distance(e, every element in returnList),the definition of q and e is same as Algorithm 4, am i right?
HnswIndex.java > getNeighborsByHeuristic2:
according to HNSW's paper Algorithm 4 i think,curdist = distance(q, every element in returnList),not curdist = distance(e, every element in returnList),the definition of q and e is same as Algorithm 4, am i right?