POV-Ray : Newsgroups : povray.off-topic : 10 things to use a Min Heap for : Re: 10 things to use a Min Heap for Server Time
7 Sep 2024 23:24:15 EDT (-0400)
  Re: 10 things to use a Min Heap for  
From: Warp
Date: 20 Jun 2008 06:19:30
Message: <485b8432@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> I wonder if any BST self-balancing algorithms are applicable to BSP?

  AFAIK, no.

  A Kd-tree is basically a binary search tree for dimensions higher than 1.
It's a binary tree, and at each node in the tree you go to the left or the
right subtree depending on which side of the axis (or axial plane in 3
dimensions) the searched point is in relation to the current node. (The axis
or axial plane changes at each level in the tree.)

  Adding a node to a balanced Kd-tree is a difficult operation and, AFAIK,
cannot be optimized in the same way as regular BSTs can. Wikipedia seems
to confirm that: http://en.wikipedia.org/wiki/Kd-tree

  "Balancing a kd-tree requires care. Because kd-trees are sorted in
multiple dimensions, the tree rotation technique cannot be used to
balance them - this may break the invariant."

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.