Timeline for Recursive Quadtree implementation in C++
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 10, 2020 at 13:24 | history | edited | Community Bot |
Commonmark migration
|
|
May 23, 2018 at 3:22 | comment | added | user1118321 |
My first thought was to use a std::set instead of std::vector , since you don't care about the order of the elements. But there's a tradeoff in that insertions are O(log(n)). If the above swap and delete works, I'd just keep that.
|
|
May 22, 2018 at 20:18 | comment | added | m-byte |
Also why insert was slow makes a lot of sense now. I didn't realize how muchvector::erase() was bottle necking my code until I actually thought about what it was doing. I'll try your method and see if it holds up, if not Ill try your suggestion of using another container. Which one would you suggest would work best in this scenario?
|
|
May 22, 2018 at 20:06 | comment | added | m-byte |
Thank you! I'm in the process of renaming most of the program now. I thought that contains() would be a useful since an object's qt isn't meant to be accessed by anything other than the QuadTree itself, so anyone who would like to check can just use that instead of the if statement. Also the reason why I had default constructors for every class is so I could initialize them later before I insert them into the quadtree.. but I see now that it was a bad idea haha. I'll make sure that isn't possible.
|
|
May 22, 2018 at 13:52 | comment | added | Summer | stackoverflow.com/q/347441/5416291 there's a term for that. | |
May 22, 2018 at 5:08 | history | answered | user1118321 | CC BY-SA 4.0 |