Skip to content

Commit

Permalink
moving back to 2 for loop impl for common nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitiraj Rathore committed Nov 16, 2023
1 parent d9211dd commit 60d7bb9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ private int findWorstNonDiverse(NeighborArray neighbors, int nodeOrd, int level)
for (int i = neighbors.size() - 1; i >= 0 ; i--) {
int currNode = neighbors.node[i];
NeighborArray currNodeNeighbours = hnsw.getNeighbors(level, currNode);
NeighborArray commonNeighbours = findCommonIntMap(neighbors, currNodeNeighbours);
NeighborArray commonNeighbours = findCommonBruteforce(neighbors, currNodeNeighbours);

if (commonNeighbours.size() > maxCommonConnectionCount) {
maxCommonConnectionCount = commonNeighbours.size();
Expand Down

0 comments on commit 60d7bb9

Please sign in to comment.