![]() 35
untuk membentuk p ohon berdimesi dua, p ertama kali titik dibagi menurut
koordinat x, lalu
koord inat
y
, dan
kembali
k
e
koordin at x, demikian
seterusny a.
Gambar 2.8 Contoh Pohon Berdimensi
K
Algorithm BUILDKDTREE(P,depth)
Input. A set of p oint P and the current depth depth
Output. The root of a kd-tree storing P.
1. if P contains only
one p oint
2. then return a leaf storing this p oint
3. else if depth is even
|