rebalance method
void
rebalance()
Rebalances the tree structure.
Mathematical Operation:
- Collects all particles.
- Rebuilds tree from scratch with optimal structure.
Implementation
void rebalance() {
_root.rebalance();
}