Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial::tight_balancing Struct Reference

A policy that balances a node if the difference in weight between left and right is higher than the current rank of the tree. More...

#include <spatial_relaxed_kdtree.hpp>

Public Member Functions

template<typename Rank >
bool operator() (const Rank &rank, weight_type left, weight_type right) const
 Rebalancing predicate. More...
 

Detailed Description

A policy that balances a node if the difference in weight between left and right is higher than the current rank of the tree.

The dimension is choosen as a limiter because balancing the tree even more strictly will not have an impact on most search algorithm, since dimensions at each level of the k-d tree are rotated.

Definition at line 87 of file spatial_relaxed_kdtree.hpp.

Member Function Documentation

template<typename Rank >
bool spatial::tight_balancing::operator() ( const Rank &  rank,
weight_type  left,
weight_type  right 
) const

Rebalancing predicate.

Parameters
rankThe current dimension function to use for examination.
leftThe weight at the left
rightThe weight at the right
Returns
true Indicate that reblancing must occurs, otherwise false.

Definition at line 98 of file spatial_relaxed_kdtree.hpp.


The documentation for this struct was generated from the following file: