From a86d84e68c382964302b144c6ef587dd1ca6f846 Mon Sep 17 00:00:00 2001 From: Weisheng Si Date: Sun, 5 Jun 2016 12:29:52 +1000 Subject: [PATCH] Improve comments and remove useless comments --- .../include/CGAL/Compute_cone_boundaries_2.h | 14 ++++--------- .../CGAL/Cone_spanners_2/Plane_scan_tree.h | 2 +- .../include/CGAL/Construct_yao_graph_2.h | 20 ++++++------------- .../include/CGAL/gnuplot_output_2.h | 2 +- 4 files changed, 12 insertions(+), 26 deletions(-) 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 3bff27f7545..4140fc7e701 100644 --- a/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h +++ b/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h @@ -27,9 +27,6 @@ #ifndef CGAL_COMPUTE_CONE_BOUNDARIES_2_H #define CGAL_COMPUTE_CONE_BOUNDARIES_2_H -// if leda::real is used, pls modify the following definition -//#define CGAL_USE_CORE 1 - #include #include #include @@ -58,7 +55,8 @@ namespace CGAL { * Of course, this functor can also be used in other applications where the plane needs to be divided * into equally-angled cones. * - * \tparam Traits_ must be either `CGAL::Exact_predicates_exact_constructions_kernel_with_root_of` or `CGAL::Exact_predicates_inexact_constructions_kernel`. + * \tparam Traits_ Must be either `CGAL::Exact_predicates_exact_constructions_kernel_with_root_of` + * or `CGAL::Exact_predicates_inexact_constructions_kernel`. * */ template @@ -76,8 +74,7 @@ private: typedef typename Traits::Aff_transformation_2 Transformation; public: - /* No member variables in this class, so a custom constructor is not needed. */ - // Compute_cone_boundaries_2() {}; + /* Note: No member variables in this class, so a custom constructor is not needed. */ /*! \brief The operator(). * @@ -137,8 +134,7 @@ private: typedef Kernel_type::Aff_transformation_2 Transformation; public: - /* No member variables in this class, so a Constructor is not needed. */ - // Compute_cone_boundaries_2() {}; + /* Note: No member variables in this class, so a Constructor is not needed. */ /* The operator(). @@ -160,8 +156,6 @@ public: std::exit(1); } - //std::cout << "Specialization is called!" << std::endl; - // Since CGAL::root_of() gives the k-th smallest root, // here -x is actually used instead of x. // But we want the second largest one with no need to count. diff --git a/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree.h b/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree.h index 04637431ba7..d62123dbae0 100644 --- a/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree.h +++ b/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree.h @@ -211,7 +211,7 @@ public: return res; } - /* Constant Reverse order End Iterator */ + /* Constant Reverse order End Iterator */ const_reverse_iterator rend() const { static const_reverse_iterator res; 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 6ab0ad08ef8..b3e0af398bf 100644 --- a/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h @@ -39,14 +39,15 @@ namespace CGAL { /*! \ingroup PkgConeBasedSpanners - \brief A template functor for constructing Yao graphs with a given set of 2D points and + \brief A template functor for constructing Yao graphs with a given set of 2D points and a given initial direction for the cone boundaries. - \tparam Traits_ must be either `CGAL::Exact_predicates_exact_constructions_kernel_with_root_of` or `CGAL::Exact_predicates_inexact_constructions_kernel`. - -\tparam Graph_ is the graph type to store the constructed cone based spanner. - It must be `boost::adjacency_list` with `Traits_::Point_2` as `VertexProperties` + \tparam Traits_ Must be either `CGAL::Exact_predicates_exact_constructions_kernel_with_root_of` + or `CGAL::Exact_predicates_inexact_constructions_kernel`. + \tparam Graph_ The graph type to store the constructed cone based spanner. + It must be `boost::adjacency_list` + with `Traits_::Point_2` as `VertexProperties` */ template class Construct_yao_graph_2 { @@ -102,12 +103,6 @@ public: compute_cones(k, initial_direction, rays.begin()); } - /* \brief Copy constructor. Not needed. - \param x another Construct_yao_graph_2 object to copy from. - - Construct_yao_graph_2 (const Construct_yao_graph_2& x) : cone_number(x.cone_number), rays(x.rays) {} - */ - /*! \brief Function operator to construct a Yao graph. @@ -123,7 +118,6 @@ public: Graph_& operator()(const PointInputIterator& start, const PointInputIterator& end, Graph_& g) { - // add vertices into the graph for (PointInputIterator curr = start; curr != end; ++curr) { g[boost::add_vertex(g)] = *curr; @@ -210,8 +204,6 @@ protected: boost::tie(existing_e, existing)=boost::edge(*it, *min, g); if (!existing) boost::add_edge(*it, *min, g); - //else - // std::cout << "Edge " << *it << ", " << *min << " already exists!" << std::endl; } } // end of for diff --git a/Cone_spanners_2/include/CGAL/gnuplot_output_2.h b/Cone_spanners_2/include/CGAL/gnuplot_output_2.h index 339b85c5a0d..5e206b5c0a1 100644 --- a/Cone_spanners_2/include/CGAL/gnuplot_output_2.h +++ b/Cone_spanners_2/include/CGAL/gnuplot_output_2.h @@ -172,7 +172,7 @@ void gnuplot_output_2 (const Graph& g, const std::string& prefix) fs << "unset ytics" << std::endl; fs << "unset border" << std::endl; - /* + /* Uncomment if you need the following: ss << "set xtics" << std::endl; ss << "set ytics" << std::endl; ss << "set border" << std::endl;