CGAL 5.2.1 - Spatial Sorting
CGAL::Hilbert_sort_3< Traits, PolicyTag, ConcurrencyTag > Class Template Reference

#include <CGAL/Hilbert_sort_3.h>

Definition

template<typename Traits, typename PolicyTag, typename ConcurrencyTag = Sequential_tag>
class CGAL::Hilbert_sort_3< Traits, PolicyTag, ConcurrencyTag >

The function object Hilbert_sort_3 sorts iterator ranges of Traits::Point_3 along a Hilbert curve by recursively subdividing at the median or the middle, depending on the PolicyTag(see Section Hilbert Sorting for more information on the policies).

Template Parameters
Traitsmust be a model of the concept SpatialSortingTraits_3.
PolicyTagis used to specify the strategy policy. Possible values are Hilbert_sort_median_policy (the default policy) or Hilbert_sort_middle_policy .
ConcurrencyTagenables sequential versus parallel algorithm. Possible values are Sequential_tag, Parallel_tag, and Parallel_if_available_tag. With parallelism enabled, sorting will be performed using up to eight threads. Parallel sorting is available only when the median strategy policy (the default policy) is used.

Creation

 Hilbert_sort_3 (const Traits &traits=Traits())
 constructs an instance with traits as traits class instance.
 

Operations

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

Member Function Documentation

◆ operator()()

template<typename Traits , typename PolicyTag , typename ConcurrencyTag = Sequential_tag>
template<class InputPointIterator >
void CGAL::Hilbert_sort_3< Traits, PolicyTag, ConcurrencyTag >::operator() ( InputPointIterator  begin,
InputPointIterator  end 
) const

It sorts the range [begin, end).

Template Parameters
InputPointIteratormust be a model of RandomAccessIterator with value type Traits::Point_3.