kd
-trees
Order of discussion
Order
of
presentation
:
The
kd
-tree
as a
main memory
data structure
Adaptation
of the
kd
-tree
for
disk storage
Review: Binary Search Tree
Binary Search Tree:
Binary Search Tree (BST)
= a
binary tree
where:
The
values
in the
nodes
in the
left
subtree
of the node
x
in the tree has a
smaller
value
than
x
The
values
in the
nodes
in the
right
subtree
of the node
x
in the tree has a
greater
value
than
x
Example
of a
binary
search
tree
:
Notice the above
property
holds for
every
node
in the
binary tree
:
Node
3
:
Node
1
:
Node
6
:
Node
9
:
The
kd
-tree
kd
-tree:
The
kd
-tree
is a
generalization
of the classic
Binary Search Tree (BST)
The
search key
used at
different
levels
belongs to a
different
dimension (domain)
The
dimensions
at
different levels
will
wrap around (i.e., circulate)
Example:
a
2-dimensional
kd
-tree
:
Properties:
Subtrees
of
x
_{1}
must satisfy this
property
:
Subtrees
of
y
_{1}
and
y
_{2}
must satisfy this
property
:
And so on
(for
every level
of the
kd
-tree
)