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

Build逻辑中,InterInsert函数实现有问题 #32

Open
liql2007 opened this issue Dec 29, 2020 · 0 comments
Open

Build逻辑中,InterInsert函数实现有问题 #32

liql2007 opened this issue Dec 29, 2020 · 0 comments

Comments

@liql2007
Copy link

for (unsigned t = 0; t < result.size(); t++) {

根据三角不等式裁边之后, 遗留的边的个数,即result中的元素个数,很可能小于range,此时需要将末尾下一个元素的distance置为-1.

即,需要在 for 循环之后,加上代码:
if (result.size() < range) { des_pool[result.size()].distance = -1; }

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

1 participant