CGAL 6.1.1 - dD Spatial Searching

Loading...
Searching...
No Matches
List of all members
CGAL::Sliding_midpoint< Traits, SpatialSeparator > Class Template Reference
Reference Manual » Splitter Classes

`#include <CGAL/Splitters.h>`

## Definition

template<typename Traits, typename SpatialSeparator>
class CGAL::Sliding_midpoint< Traits, SpatialSeparator >

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.