Spatial C++ Library
Generic MultiDimensional Containers and Spatial Operations

This policy triggers rebalancing for the node when the difference in weight between left or right is more than a half. More...
#include <spatial_relaxed_kdtree.hpp>
Public Member Functions  
template<typename Rank >  
bool  operator() (const Rank &, weight_type left, weight_type right) const 
Rebalancing predicate. More...  
This policy triggers rebalancing for the node when the difference in weight between left or right is more than a half.
The default policy for rebalancing.
In effect, this policy leaves the tree roughly balanced: the path from the root to the furthest leaf is no more than twice as long as the path from the root to the nearest leaf.
This policy is adequate in many cases cause it prevents worsecase insertion or deletion time, and worstcase runtime on many search algorithms, and does not require a large amount of rebalancing.
Definition at line 60 of file spatial_relaxed_kdtree.hpp.
bool spatial::loose_balancing::operator()  (  const Rank &  , 
weight_type  left,  
weight_type  right  
)  const 
Rebalancing predicate.
left  The weight at the left 
right  The weight at the right 
Definition at line 70 of file spatial_relaxed_kdtree.hpp.