CGAL 5.6.1 - dD Spatial Searching
CGAL::Sliding_midpoint< Traits, SpatialSeparator > Class Template Reference

#include <CGAL/Splitters.h>

Definition

Implements the sliding midpoint splitting rule.

This is a modification of the Midpoint_of_rectangle splitting rule. It first attempts to perform a midpoint of rectangle split as described above. If data points lie on both sides of the separating plane the sliding midpoint rule computes the same separator as the midpoint of rectangle rule. If the data points lie only on one side it avoids this by sliding the separator, computed by the midpoint of rectangle rule, to the nearest data point.

Parameters

Expects for the first template argument a model of the concept SearchTraits, for example CGAL::Cartesian_d<double>.

Expects for the second template argument a model of the concept SpatialSeparator. It has as default value the type, CGAL::Plane_separator<Traits::FT>.

Is Model Of:
Splitter
See also
Splitter
SpatialSeparator
Examples:
Spatial_searching/splitter_worst_cases.cpp.

Creation

 Sliding_midpoint (unsigned int bucket_size)
 Constructor.
 

Operations

unsigned int bucket_size ()
 Returns the bucket size of the leaf nodes.