Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #282. Part of #204.
Adds the theory layer of section 9.1 as
doc/perception/kd_tree.md, following the writing guide and the sections of chapter 4:depth % k, and why the tree hasKdTreevisits every node until Skip subtrees in the kd-tree search #281 is fixed, the worst case, many dimensions, and rebuilding the tree for every scan.Two figure scripts in
doc/perception/figures/draw a tree of seven points (kd_tree_build.py) and one search in it with the skipped cells shaded (kd_tree_pruning.py). The second script runs the search it draws. The page is linked on the chapter page, whose note now says the chapter is being written, and the new symbols are in a Perception table of Notation and Units.How I checked it works
sphinx-build -W --keep-going -b html doc doc/_build/htmlbuilds without warnings,pytest test/test_book_chapters.pypasses, and the whole suite passes (138 passed). I didn't run macOS or Windows.kd_tree_pruning.pyasserts its result against comparing every point, and the same search with the query point of question 1 gives the answer written there.KdTreebuilds from random points in the unit square: 7, 10 and 14 levels for 100, 1000 and 10000 points. On those trees, a pruned search I wrote for the check visited 11.1, 15.8 and 19.5 nodes on average (1000 queries each), and every result equals the brute-force one.Images
Book text only, no change under
src/.Book