Presentation is loading. Please wait.

Presentation is loading. Please wait.

K-d tree k-dimensional indexing. Jaruloj Chongstitvatana k-d trees 2 Definition Let k be a positive integer. Let t be a k -d tree, with a root node p.

Similar presentations


Presentation on theme: "K-d tree k-dimensional indexing. Jaruloj Chongstitvatana k-d trees 2 Definition Let k be a positive integer. Let t be a k -d tree, with a root node p."— Presentation transcript:

1 k-d tree k-dimensional indexing

2 Jaruloj Chongstitvatana k-d trees 2 Definition Let k be a positive integer. Let t be a k -d tree, with a root node p. Then, for any node n in t : The key j,j+1, …, j-1 of any node q in the left subtree of n is smaller than that of node p, The key j,j+1, …, j-1 of any node q in the right subtree of n is larger than that of node p.

3 Jaruloj Chongstitvatana k-d trees 3 Example 20,31 36,10 31,40 15,15 40,36 6,6 25,16

4 Jaruloj Chongstitvatana k-d trees 4 Insertion 20,31 36,10 31,40 15,15 40,36 6,6 25,16

5 Jaruloj Chongstitvatana k-d trees 5 Exact Search 20,31 36,10 31,40 15,15 40,36 6,6 25,16 (40, 36)

6 Jaruloj Chongstitvatana k-d trees 6 Range search 20,31 36,10 31,40 15,15 40,36 6,6 25,16

7 Jaruloj Chongstitvatana k-d trees 7 Deletion 20,31 36,10 38,40 15,15 40,36 32,16 28,5 45,8 Delete the blue pointCopy the pink point up

8 Jaruloj Chongstitvatana k-d trees 8 Deletion 36,10 38,40 15,15 40,36 32,1645,8 Delete the old pink point 28,5


Download ppt "K-d tree k-dimensional indexing. Jaruloj Chongstitvatana k-d trees 2 Definition Let k be a positive integer. Let t be a k -d tree, with a root node p."

Similar presentations


Ads by Google