From 64a901a863cd3940ba236ec6b9cfa720cfe1d2d8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 13 Oct 2016 10:07:48 +0200 Subject: [PATCH] Add the documentation for Kd_tree::build() and unify it with AABB_tree::build. The latter was in a Section 'Advanced' (not \cgalAdvanced, just a \heading). They are now both in the Section `Creation`. --- AABB_tree/include/CGAL/AABB_tree.h | 24 +++++++------------ .../doc/Spatial_searching/CGAL/Kd_tree.h | 10 ++++++++ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index d3117a48094..0e38064d066 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -143,6 +143,15 @@ namespace CGAL { AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&); #endif + /// After one or more calls to `insert()` the internal data + /// structure of the tree must be reconstructed. This procedure + /// has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of + /// primitives of the tree. This procedure is called implicitly + /// at the first call to a query member function. You can call + /// `build()` explicitly to ensure that the next call to + /// query functions will not trigger the reconstruction of the + /// data structure. + void build(); ///@} /// \name Operations @@ -236,21 +245,6 @@ namespace CGAL { bool empty() const { return m_primitives.empty(); } ///@} - /// \name Advanced - ///@{ - - /// After one or more calls to `AABB_tree::insert()` the internal data - /// structure of the tree must be reconstructed. This procedure - /// has a complexity of \f$O(n log(n))\f$, where \f$n\f$ is the number of - /// primitives of the tree. This procedure is called implicitly - /// at the first call to a query member function. You can call - /// AABB_tree::build() explicitly to ensure that the next call to - /// query functions will not trigger the reconstruction of the - /// data structure. - void build(); - - ///@} - private: #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h index 6ac72a4c3d1..0fa724504ed 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Kd_tree.h @@ -92,6 +92,16 @@ The value type of the `InputIterator` must be `Point_d`. */ template Kd_tree(InputIterator first, InputIterator beyond, Splitter s=Splitter(),Traits t=Traits()); +/*! +The constructor does not build the internal data structure, and it +is also not updated after calls to `insert()`. +The method `build()` is called implicitly +at the first call to a query member function. You can call +`build()` explicitly to ensure that the next call to +query functions will not trigger the reconstruction of the +data structure. +*/ +void build(); /// @} /// \name Operations