Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retset vector index issue #40

Open
yangzq50 opened this issue Nov 28, 2023 · 3 comments
Open

retset vector index issue #40

yangzq50 opened this issue Nov 28, 2023 · 3 comments

Comments

@yangzq50
Copy link

https://github.com/ZJULearning/nsg/blob/eceb09e2754d978b4c8b07e3248018987feb597a/src/index_nsg.cpp#L111C1-L123C49

118 行是否应改为 retset[L] ?之后 123 行只对前 L 个排序
这样的问题在这个文件中应该有四处?

@yangzq50
Copy link
Author

retset[L] 和 retset[i] 在这些地方应该是效果相同的,因为 if (id >= nd_) continue; 事实上不会发生,所有的 id 都是互异的、有效的(假如输入的kNN图满足所有出边互异且有效的性质)
那么, if (id >= nd_) continue; 这个判断是否可以删除?

@fc731097343
Copy link
Member

if (id >= nd_) continue;可以删除

@fc731097343
Copy link
Member

改为 retset[L]是可以的,这部分类似的循环逻辑都可以重写。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants