That's not a programming question...
-
... THIS is :) How in the name of flying gibbon muck do you balance a k-d tree without extracting every entry into an array first and rebuilding it top down? This is really getting to be an embuggerrement!
veni bibi saltavi
-
... THIS is :) How in the name of flying gibbon muck do you balance a k-d tree without extracting every entry into an array first and rebuilding it top down? This is really getting to be an embuggerrement!
veni bibi saltavi
Just got a headache just thinking about it.
Wrong is evil and must be defeated. - Jeff Ello
-
... THIS is :) How in the name of flying gibbon muck do you balance a k-d tree without extracting every entry into an array first and rebuilding it top down? This is really getting to be an embuggerrement!
veni bibi saltavi
Please post in the appropriate forum[^] :D
Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
... THIS is :) How in the name of flying gibbon muck do you balance a k-d tree without extracting every entry into an array first and rebuilding it top down? This is really getting to be an embuggerrement!
veni bibi saltavi
By transforming it into a linked-list first instead? And would it be "middle down"?
-
... THIS is :) How in the name of flying gibbon muck do you balance a k-d tree without extracting every entry into an array first and rebuilding it top down? This is really getting to be an embuggerrement!
veni bibi saltavi
Did you mean: embuggerance? Can't find the word "embuggerrement" with Google. I found the word "bugger" but I'm sure that is not what you meant. :-O
-
Did you mean: embuggerance? Can't find the word "embuggerrement" with Google. I found the word "bugger" but I'm sure that is not what you meant. :-O
bugger
-- n. Software that is used to add bugs to software. SeeIDE
-
... THIS is :) How in the name of flying gibbon muck do you balance a k-d tree without extracting every entry into an array first and rebuilding it top down? This is really getting to be an embuggerrement!
veni bibi saltavi
For those of us who don't have the faintest clue what Vilmos' gin-perfused mutterings are about: https://en.wikipedia.org/wiki/K-d_tree[^]. For what it's worth, I can't see a way of balancing a tree in-place. Any tree balancing algorithm I've ever seen traversed a source tree, dismantling it in the process, and created a balanced destination tree.
Software Zen:
delete this;
-
... THIS is :) How in the name of flying gibbon muck do you balance a k-d tree without extracting every entry into an array first and rebuilding it top down? This is really getting to be an embuggerrement!
veni bibi saltavi
If your tree is implemented using pointers you may be able to do it by swapping references. That is, if you find a branch that is unbalanced you may mount the branch to another node to make the tree balanced. Same applies to nodes that are unbalanced, just swap them with each other until the tree becomes balanced.