CGAL 4.7 - Spatial Sorting: CGAL::Hilbert_sort_2< Traits, PolicyTag > Class Template Reference

\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.7 - Spatial Sorting

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
CGAL::Hilbert_sort_2< Traits, PolicyTag > Class Template Reference
Function Objects

`#include <CGAL/Hilbert_sort_2.h>`

## Definition

The function object `Hilbert_sort_2` sorts iterator ranges of `Traits::Point_2` along a Hilbert curve by recursively subdividing at the median or the middle depending on the `PolicyTag`.

Template Parameters

  Traits | must be a model for `SpatialSortingTraits`.

## Creation

| Hilbert_sort_2 (const Traits &traits=Traits())
| constructs an instance with `traits` as traits class instance.

## Operations

template<class RandomAccessIterator >
void | operator() (RandomAccessIterator begin, RandomAccessIterator end) const
| It sorts the range `[begin, end)`. More...

## Member Function Documentation

template<typename Traits , typename PolicyTag >
template<class RandomAccessIterator >

void CGAL::Hilbert_sort_2< Traits, PolicyTag >::operator() | ( | RandomAccessIterator | begin,
|  | RandomAccessIterator | end
| ) |  | const

It sorts the range `[begin, end)`.

Template Parameters

  RandomAccessIterator | must be an iterator with value type `Traits::Point_2`.