
15 Aug
2010
15 Aug
'10
10:07 a.m.
Mathias Gaunard wrote:
09/08/2010 17:35, Adam Wulkiewicz wrote:
Yes, you're right. Although, there may be more than one allocators used in the tree building algorithm. There may be allocators for tree nodes, temporary objects at each recursive step and for objects in leafs.
I don't see why you'd need dynamic memory allocation other than for the nodes, assuming you're storing values and not not trying to store polymorphic objects through pointers.
It strongly depends on used algorithm if you need it or not. If you use some kind of internal, temporary objects you need it. See e.g. http://www.cgg.cvut.cz/members/havran/ARTICLES/ingo06rtKdtree.pdf or http://kesen.realtimerendering.com/Intel-EG07.pdf