From d598526bfe3429a81c3d3e3ed35552ae4c2d97f0 Mon Sep 17 00:00:00 2001 From: "m.overtheil" Date: Tue, 4 Nov 2014 11:15:07 +0100 Subject: [PATCH] added dimension template argument to doc --- .../doc/Spatial_searching/CGAL/Search_traits.h | 12 ++++++++++-- .../Spatial_searching/CGAL/Search_traits_2.h | 9 ++++++++- .../Spatial_searching/CGAL/Search_traits_3.h | 8 +++++++- .../Spatial_searching/CGAL/Search_traits_d.h | 17 +++++++++++++---- .../Spatial_searching/Concepts/SearchTraits.h | 10 ++++++++++ 5 files changed, 48 insertions(+), 8 deletions(-) diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h index 37fac8b60c2..1f91c10d060 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits.h @@ -6,7 +6,9 @@ namespace CGAL { The class `Search_traits` can be used as a template parameter of the kd tree and the search classes. It is a mere wrapper for the geometric types needed by these classes. - +\cgalModifBegin +Added Dimension +\cgalModifEnd \cgalModels `SearchTraits` \sa `Search_traits_2` @@ -14,13 +16,19 @@ by these classes. \sa `Search_traits_d` */ -template< typename NT, typename Point, typename CartesianIterator, typename ConstructCartesianIterator, typename ConstructMinVertex, typename ConstructMaxVertex > +template< typename NT, typename Point, typename CartesianIterator, typename ConstructCartesianIterator, typename ConstructMinVertex, typename ConstructMaxVertex, typename Dim > class Search_traits { public: /// \name Types /// @{ +/*! +Dimension type. Either `Dimension_tag` +or `Dynamic_dimension_tag`. +*/ +typedef unspecified_type Dimension; + /*! The number type of the coordinates. */ diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h index a4c74419dee..dd9a24a1fe7 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_2.h @@ -5,7 +5,9 @@ namespace CGAL { The class `Search_traits_2` can be used as a template parameter of the kd tree and the search classes. - +\cgalModifBegin +Added Dimension +\cgalModifEnd \cgalHeading{Parameters} Expects for the template argument a model of the concept `Kernel`, @@ -25,6 +27,11 @@ public: /// \name Types /// @{ +/*! +Dimension type. +*/ +typedef Dimension_tag<2> Dimension; + /*! Number type. */ diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h index f68d21ff3f4..21e9c8e7f74 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_3.h @@ -5,7 +5,9 @@ namespace CGAL { The class `Search_traits_3` can be used as a template parameter of the kd tree and the search classes. `Kernel` must be a \cgal kernel. - +\cgalModifBegin +Added Dimension +\cgalModifEnd \cgalHeading{Parameters} Expects for the template argument a model of the concept `Kernel`, @@ -25,6 +27,10 @@ public: /// \name Types /// @{ +/*! +Dimension type. +*/ +typedef Dimension_tag<3> Dimension; /*! Number type. */ diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h index ac8f8ebf44e..4c173266eaf 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Search_traits_d.h @@ -5,13 +5,16 @@ namespace CGAL { The class `Search_traits_d` can be used as a template parameter of the kd tree and the search classes. `Kernel` must be a \cgal kernel. - +\cgalModifBegin +Added Dimension +\cgalModifEnd `Kernel` must be a d-dimensional \cgal kernel. \cgalHeading{Parameters} -Expects for the template argument a model of the concept `Kernel_d`, -for example `Cartesian_d`. +Expects for the first template argument a model of the concept `Kernel_d` +(for example `Cartesian_d`) and for the second argument a `Dimension_tag` +(default value is `Dynamic_dimension_tag`). \cgalModels `SearchTraits` \cgalModels `RangeSearchTraits` @@ -21,13 +24,19 @@ for example `Cartesian_d`. \sa `Search_traits` */ -template< typename Kernel > +template< typename Kernel, typename Dim > class Search_traits_d { public: /// \name Types /// @{ +/*! +Dimension type. Either `Dimension_tag` +or `Dynamic_dimension_tag`. +*/ +typedef Dim Dimension; + /*! Number type. */ diff --git a/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h b/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h index 89a9fb559d7..87a7d6a1e5f 100644 --- a/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h +++ b/Spatial_searching/doc/Spatial_searching/Concepts/SearchTraits.h @@ -4,11 +4,15 @@ The concept `SearchTraits` defines the requirements for the template parameter of the search classes. +\cgalModifBegin +Added Search_traits_d and Dimension +\cgalModifEnd \cgalHasModel `CGAL::Cartesian_d` \cgalHasModel `CGAL::Homogeneous_d` \cgalHasModel `CGAL::Search_traits_2` \cgalHasModel `CGAL::Search_traits_3` +\cgalHasModel `CGAL::Search_traits_d` \cgalHasModel `CGAL::Search_traits` \sa `RangeSearchTraits` @@ -22,6 +26,12 @@ public: /// \name Types /// @{ +/*! +Dimension type. Either `CGAL::Dimension_tag` +or `CGAL::Dynamic_dimension_tag`. +*/ +typedef unspecified_type Dimension; + /*! Point type. `CGAL::Kernel_traits` has to be specialized for this type.