From 1974128e9935e7a9efbf8b06aa4eae8ff084ccbb Mon Sep 17 00:00:00 2001 From: Weisheng Si Date: Tue, 21 Jul 2015 09:45:52 +1000 Subject: [PATCH] Fix the typos and Better the comments --- .../doc/Cone_spanners_2/Cone_spanners_2.txt | 2 +- .../include/CGAL/Compute_cone_boundaries_2.h | 40 +++++++++---------- .../include/CGAL/Construct_theta_graph_2.h | 16 ++++---- .../include/CGAL/Construct_yao_graph_2.h | 17 ++++---- 4 files changed, 39 insertions(+), 36 deletions(-) diff --git a/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt b/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt index c69f4435153..81cb82ae2b5 100644 --- a/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt +++ b/Cone_spanners_2/doc/Cone_spanners_2/Cone_spanners_2.txt @@ -8,7 +8,7 @@ namespace CGAL { \author Weisheng Si and Quincy Tse This chapter describes the package for constructing cone-based spanners given a set of vertices on the plane. -Specifically, this package provides funtors for constructing two kinds of cone-based spanners: +Specifically, this package provides functors for constructing two kinds of cone-based spanners: Yao graph and Theta. Both exact and inexact constructions are supported. In exact construction, the cone boundaries are calculated using roots of polynomials (requiring `CORE::Expr` or `LEDA::real`). In inexact construction, the cone boundaries are calculated using an approximate \f$ \pi = 3.14159265358979323846 \f$, diff --git a/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h b/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h index 03d47f7ca89..b2cc8738ae5 100644 --- a/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h +++ b/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h @@ -82,15 +82,15 @@ public: /* No member variables in this class, so a custom constructor is not needed. */ // Compute_cone_boundaries_2() {}; - /*! \brief The operator(). + /*! \brief The operator(). + * + * \details The direction of the first ray can be specified by the parameter `initial_direction`, + * which allows the first ray to start at any direction. The remaining rays are calculated in + * counter-clockwise order. * - * The direction of the first ray can be specified by the parameter - * \p initial_direction, which allows the first ray to start at any direction. The remaining rays are calculated in - * counter-clockwise order. - * - * \param[in] cone_number The number of cones - * \param[in] initial_direction The direction of the first ray - * \param[out] rays The results, a vector of directions + * \param[in] cone_number The number of cones + * \param[in] initial_direction The direction of the first ray + * \param[out] rays The results, a vector of directions */ void operator()(const unsigned int cone_number, Direction_2& initial_direction, @@ -121,9 +121,9 @@ public: /* - * The specialised functor for computing the directions of cone boundaries exactly - * with a given cone number and a given initial direction. - */ + The specialised functor for computing the directions of cone boundaries exactly + with a given cone number and a given initial direction. +*/ template <> class Compute_cone_boundaries_2 { @@ -141,15 +141,15 @@ public: // Compute_cone_boundaries_2() {}; /* The operator(). - * - * The direction of the first ray can be specified by the parameter - * initial_direction, which allows the first ray to start at any direction. The remaining rays are calculated in - * counter-clockwise order. - * - * \param[in] cone_number The number of cones - * \param[in] initial_direction The direction of the first ray - * \param[out] rays The results, a vector of directions - */ + + The direction of the first ray can be specified by the parameter + initial_direction, which allows the first ray to start at any direction. + The remaining rays are calculated in counter-clockwise order. + + \param[in] cone_number The number of cones + \param[in] initial_direction The direction of the first ray + \param[out] rays The results, a vector of directions + */ void operator()(const unsigned int cone_number, Direction_2& initial_direction, std::vector< Direction_2 >& rays) { diff --git a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h index 3bae1e02dd8..ff5ac3dcbe4 100644 --- a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h @@ -79,7 +79,7 @@ private: public: /*! \brief Constructor. - Constructs a `Construct_theta_graph_2` object. + \details Constructs a `Construct_theta_graph_2` object. \param k Number of cones to divide space into \param initial_direction A direction denoting one of the rays deviding the @@ -108,12 +108,14 @@ public: */ Construct_theta_graph_2 (const Construct_theta_graph_2& x) : cone_number(x.cone_number), rays(x.rays) {} - /*! \brief Operator to construct a Theta graph. - This operator implements the algorithm for adding edges to build the Theta graph. - The algorithm implemented is described in: - Giri Narasimhan and Michiel Smid, Chapter 4: Spanners based on the Theta graph, Geometric Spanner Networks, - Cambridge University Press, 2007. - This algorithm has the complexity of O(n*log(n)), which is optimal. + /*! + \brief Operator to construct a Theta graph. + + \details This operator implements the algorithm for adding edges to build the Theta graph. + The algorithm implemented is described in: + Giri Narasimhan and Michiel Smid, Chapter 4: Spanners based on the Theta graph, + Geometric Spanner Networks, Cambridge University Press, 2007. + This algorithm has the complexity of O(n*log(n)), which is optimal. \param start[in] An iterator pointing to the first point (vertex). \param end[in] An iterator pointing to the place that passes the last point. diff --git a/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h b/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h index f4eda45b7c5..df35be5bd83 100644 --- a/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h @@ -76,8 +76,9 @@ private: std::vector rays; public: - /*! \brief Constructor. - Constructs a `Construct_yao_graph_2` object. + /*! + \brief Constructor. + \details Constructs a `Construct_yao_graph_2` object. \param k Number of cones to divide space into \param initial_direction A direction denoting one of the rays dividing the @@ -106,12 +107,12 @@ public: */ Construct_yao_graph_2 (const Construct_yao_graph_2& x) : cone_number(x.cone_number), rays(x.rays) {} - /*! \brief Operator to construct a Yao graph. - This operator implements the algorithm for adding edges to build the Yao graph. - The algorithm implemented is described in: - Giri Narasimhan and Michiel Smid, Chapter 4: Spanners based on the Yao graph, Geometric Spanner Networks, - Cambridge University Press, 2007. - This algorithm has the complexity of O(n*log(n)), which is optimal. + /*! + \brief Operator to construct a Yao graph. + + \details This operator implements the algorithm for adding edges to build the Yao graph. + The algorithm implemented is an adaptation from the algorithm for constructing Theta graph. + For more details, please refer to the user manual. \param start[in] An iterator pointing to the first point (vertex). \param end[in] An iterator pointing to the place that passes the last point.