Closed half-empty closed 5 years ago
Thanks.
看完源码后,还有两个问题。
greedy best-first search并没有完全按照论文中的描述实现,是一种类似DFS+剪枝的做法。但搜索范围是否太宽了?因为在源码中是将查询数据与初始中心的已选邻点进行比较,将最远距离作为阈值。这样相当于是以查询数据为中心,最远距离作为半径的一个超球体作为最大限定范围的一种查询,但是这个最远距离很可能很大,导致搜索实际上遍历了大量的点。这是为了增加精度做的一种优化吗?因为实际上高维空间中的相似度传递性质其实很差。
2个月前的一次提交把保证连通性的DFS生成树tree_grow部分给注释掉了,只增加了通过边的双向性来完善节点的邻点。不再使用DFS的原因是什么?
如果代码理解有误,请告知,谢谢。
多谢解答,之前看到search和get_neighbors代码很类似时没有细看。现在看到在search中去掉了"if(L+1 < retset.size()) ++L;",也就是构图阶段的遍历点数规模很大,但是搜索阶段并不大,L并不会扩增,效率极高。
Best wishes.