Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. That's not a programming question...

That's not a programming question...

Scheduled Pinned Locked Moved The Lounge
data-structuresquestion
8 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nagy Vilmos
    wrote on last edited by
    #1

    ... 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

    J Sander RosselS P S G 6 Replies Last reply
    0
    • N Nagy Vilmos

      ... 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

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #2

      Just got a headache just thinking about it.

      Wrong is evil and must be defeated. - Jeff Ello

      1 Reply Last reply
      0
      • N Nagy Vilmos

        ... 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

        Sander RosselS Offline
        Sander RosselS Offline
        Sander Rossel
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • N Nagy Vilmos

          ... 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

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          By transforming it into a linked-list first instead? And would it be "middle down"?

          1 Reply Last reply
          0
          • N Nagy Vilmos

            ... 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

            S Offline
            S Offline
            Slacker007
            wrote on last edited by
            #5

            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

            P 1 Reply Last reply
            0
            • S Slacker007

              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

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #6

              bugger -- n. Software that is used to add bugs to software. See IDE

              1 Reply Last reply
              0
              • N Nagy Vilmos

                ... 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

                G Offline
                G Offline
                Gary Wheeler
                wrote on last edited by
                #7

                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;

                1 Reply Last reply
                0
                • N Nagy Vilmos

                  ... 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

                  Y Offline
                  Y Offline
                  Yuriy Loginov
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups