ZJULearning / nsg

Navigating Spreading-out Graph For Approximate Nearest Neighbor Search
MIT License
621 stars 148 forks source link

a simple question #29

Closed op-hunter closed 4 years ago

op-hunter commented 4 years ago

hello, I'm reading the implemention of NSG again, in file index_nsg.cpp:330, after execute the strategy of edge selection, I think it still cannot ensure result.size() == range, so after put result into dest_pool, I think there is a need to judge whether result.size() < range and put the first invalid element's distance=-1 if necessary.

DelightRun commented 4 years ago

Yes, you a right. That's a bug.