문제

I have trouble understanding the quadtree split operation. Say the maximum number of items a node can hold is 2; when we add a third element we create four sub-nodes. The question is, does the parent node keep its 2 items and the one who caused the overflow is inserted in a child-node or all three nodes are inserted in the sub-nodes?

도움이 되었습니까?

해결책

All three nodes get inserted into a child node. Only the leaves node can hold some data in a tree.

This can make a difference with say, for example, kd-tree, where the space partition is more data oriented instead of fixed space partitioning, thus saving memory. On the other hand, fixed space partitions are easier to handle and can even be precomputed for even faster access.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top