Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
ds2-notes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
datovky
ds2-notes
Commits
2f1bc8de
Commit
2f1bc8de
authored
5 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Geometric: Which -> with
parent
fb122d64
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
07-geom/geom.tex
+1
-1
1 addition, 1 deletion
07-geom/geom.tex
with
1 addition
and
1 deletion
07-geom/geom.tex
+
1
−
1
View file @
2f1bc8de
...
...
@@ -229,7 +229,7 @@ We can build the 2-d tree recursively. First we create two lists of points:
one sorted by the
$
x
$
~coordinate, one by~
$
y
$
. Then we construct the
$
x
$
-tree.
We find the point with median~
$
x
$
coordinate in constant time. This point
becomes the root of the
$
x
$
-tree. We recursively construct the left subtree
from points w
hic
h less than median
$
x
$
~coordinate --- we can construct the
from points w
it
h less than median
$
x
$
~coordinate --- we can construct the
corresponding sub-lists of both the
$
x
$
and~
$
y
$
list in
$
\O
(
n
)
$
time. We
construct the right subtree similarly. Finally, we build the
$
y
$
-tree
for the root: it contains all the points and we can build it from the
$
y
$
-sorted
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment