CGAL 6.1.1 - Spatial Sorting

Loading...
Searching...
No Matches
List of all members
SpatialSortingTraits_d Concept Reference
Reference Manual » Concepts

## Definition

All higher dimensional spatial sorting algorithms provided in CGAL are parameterized by a traits class `Traits`, which defines the primitives (objects and predicates) that the sorting algorithms use. `SpatialSortingTraits_d` defines the complete set of primitives required in these functions and functors.

Has models
  Any CGAL `d`-dimensional kernel.
  `CGAL::Spatial_sort_traits_adapter_d<Base_traits,PointPropertyMap>`

## Types
typedef unspecified_type | Point_d
| The point type on which the sorting algorithms operate.
typedef unspecified_type | Point_dimension_d
| Functor object type returning the dimension of a `Point_d`.
typedef unspecified_type | Compute_coordinate_d
| Functor object type returning the coordinates of a `Point_d`.
typedef unspecified_type | Less_coordinate_d
| Binary predicate object type comparing `Point_d`s along some coordinate.

## Creation
Only a copy constructor is required.
| SpatialSortingTraits_d (const SpatialSortingTraits_d &t)

## Operations
The following member functions to create instances of the above predicate object types must exist.
Point_dimension_d | point_dimension_d_object ()
Compute_coordinate_d | compute_coordinate_d_object ()
Less_coordinate_d | less_coordinate_d_object ()

## Member Typedef Documentation

## ◆ Compute_coordinate_d

typedef unspecified_type SpatialSortingTraits_d::Compute_coordinate_d

Functor object type returning the coordinates of a `Point_d`.

Must provide `FT operator()(Point_d p, int i)` returning the \( i\)th coordinate of \( p\). `FT` is a type that can be used as argument of `CGAL::to_double`.

## ◆ Less_coordinate_d

typedef unspecified_type SpatialSortingTraits_d::Less_coordinate_d

Binary predicate object type comparing `Point_d`s along some coordinate.

Must provide `bool operator()(Point_d p, Point_d q, int i)` where `true` is returned iff \( p_i < q_i\), where \( p_i\) and \( q_i\) denote \( i\)th coordinate of point \( p\) and \( q\), respectively.

## ◆ Point_dimension_d

typedef unspecified_type SpatialSortingTraits_d::Point_dimension_d

Functor object type returning the dimension of a `Point_d`.

Must provide `int operator()(Point_d p)` returning the dimension of \( p\).