cmuparlay / ParlayANN

A library of algorithms for approximate nearest neighbor search in high dimensions, along with a set of useful tools for designing such algorithms.
MIT License
108 stars 23 forks source link

add "#include "NSGDist.h"" to beamsearch.h? #5

Closed yushangdi closed 1 year ago

yushangdi commented 1 year ago

I got some errors like this "ParlayANN/algorithms/utils/beamSearch.h:314:9: error: ‘Distance’ has not been declared" when including vamana.h in my own programs. Should we add "#include "NSGDist.h"" to beamsearch.h?

yushangdi commented 1 year ago

Also should we add if (a == -1) continue; on line 130 in beamSearch.h? I'm getting some segfaults because (-1, nan) is included in candidates. Adding this line resolves the issue.

yushangdi commented 1 year ago

@ldhulipala @magdalendobson Do you think these changes make sense? Thanks!

yushangdi commented 1 year ago

actually, maybe we should add if (a == -1) break; instead of continue?