Jump to content
  • Advertisement

TheHoff

Member
  • Content Count

    47
  • Joined

  • Last visited

Community Reputation

122 Neutral

About TheHoff

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. TheHoff

    Data structure question

    I'm experimenting with LOD algorithms -- I'd like to be able to order nodes by how large their rendering error is, which is view-dependent and hence requires a data structure that can be updated quickly. I've gone ahead with the binary tree: I liked the idea of a heap because the canonical implementation allows inserting the same key several times. I know there's always std::multimap, but I'm not using C++. My language of choice (Scheme) has surprisingly little available in the way of data struct libraries so I was just wondering what people around here thought about the problem.
  2. I need a data structure that contains a bunch of sorted keys. I'd like insertion and deletion to be pretty fast -- better than linear time. I should also be able to update the keys pretty quickly while maintaining the sorted-ness of the structure. What do you guys think? It sounds to me like a heap is pretty close. The canonical heap implementation does not allow arbitrary deletion, but I guess that can be faked pretty easilyby forcing it to be the max and removing (after re-heapifying). Assuming that updating a key and then walking it up/down the heap would work, which it seems like it would. Does anyone have any suggestions?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!