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

Bugs in range method in RTree #27

Closed
ChenZhongPu opened this issue Jun 9, 2016 · 3 comments
Closed

Bugs in range method in RTree #27

ChenZhongPu opened this issue Jun 9, 2016 · 3 comments
Assignees
Labels

Comments

@ChenZhongPu
Copy link
Collaborator

There are bugs in the range method for limited level searching.

You use queue, but never dequeue from it (just front). And when cur_level == level_limit, we should also enqueue the internal node.

A fixing:

  • replace all front with dequeue
  • when cur_level == level_limit,
else if (cur_level == level_limit) {
          estimate += cur_node.m_mbr.calcRatio(query) * cur_node.size
          cur_node.m_child.foreach {
            case RTreeInternalEntry(mbr, node) =>
              if (query.intersects(mbr)) q.enqueue((node, cur_level + 1))
          }
@ChenZhongPu ChenZhongPu added the bug label Jun 9, 2016
@dongx-psu
Copy link
Member

Agreed. I haven't test by the time I merge it. You have fixed that? I can fix it if you didn't,

@ChenZhongPu
Copy link
Collaborator Author

I have fixed.

@dongx-psu
Copy link
Member

Fixed in PR #23.

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

No branches or pull requests

2 participants