Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About TheHoff

  • Rank

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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!