FunctionObjectClass

CGAL::Sliding_midpoint<Traits, SpatialSeparator>

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.

#include <CGAL/Splitters.h>

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 Separator. It has as default value the type, CGAL::Plane_separator<Traits::FT>.

Is Model for the Concepts

Splitter

Creation

Sliding_midpoint<Traits, SpatialSeparator> s ( unsigned int bucket_size);
Constructor.

Operations

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

See Also

Splitter
SpatialSeparator