Skip to content

Commit

Permalink
Fix distance computation (#251)
Browse files Browse the repository at this point in the history
Signed-off-by: zh Wang <[email protected]>
  • Loading branch information
hhy3 authored Dec 5, 2023
1 parent 981a204 commit 63b28e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thirdparty/DiskANN/src/pq_flash_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ namespace diskann {
distances[i] *= (max_base_norm * query_norm);
}
} else if (metric == diskann::Metric::COSINE) {
distances[i] = 1.0 - distances[i];
distances[i] = -distances[i];
}
}
} else {
Expand Down

0 comments on commit 63b28e1

Please sign in to comment.