CGAL 6.1 - Quadtrees, Octrees, and Orthtrees
Loading...
Searching...
No Matches
CGAL::Orthtrees::Maximum_depth_and_maximum_contained_elements Class Reference

#include <CGAL/Orthtree/Split_predicates.h>

Definition

A class used to choose when a node should be split depending on the depth and the number of contained elements.

This predicate makes a note split if it contains more than a certain number of items and if its depth is lower than a certain limit.

The refinement is stopped as soon as one of the conditions is violated: if a node has more elements than bucket_size but is already at max_depth, it is not split. Similarly, a node that is at a depth smaller than max_depth but already has fewer elements than bucket_size, it is not split.

Warning
This split predicate is only appropriate for trees with traits classes which are models of OrthtreeTraitsWithData and where Node_data is a model of Range. RandomAccessRange is suggested for performance.

Public Member Functions

 Maximum_depth_and_maximum_contained_elements (std::size_t max_depth, std::size_t bucket_size)
 creates a predicate using maximum depth or bucket size.
 
template<typename GeomTraits >
bool operator() (typename Orthtree< GeomTraits >::Node_index i, const Orthtree< GeomTraits > &tree) const
 returns true if the node with index i should be split, false otherwise.