Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Begin MainProgram
- results = a new SET (a kd-tree)
- search(space,root,results)
- return results
- endMainProgram
- Subroutine search(space,node,results)
- if (space contains node.region) then
- add node.point to the results
- for each descendant of node
- add d.point to results
- return
- if (space contains node.point) then
- add node.point to results
- if (space extends below node.coordinate) then
- search(space,node.below,results)
- if (space extends above node.coordinate) then
- search(space,node.above,results)
- endsubroutine
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement