From 9055efd3b1017b78da10121a5b952eaa5f532983 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sun, 25 Aug 2024 12:26:04 +0300 Subject: [PATCH 01/34] Cleaned up and enhanced metadata decorator traits --- .../include/CGAL/Arr_counting_traits_2.h | 799 ++++++++---------- .../include/CGAL/Arr_tracing_traits_2.h | 562 ++++++------ 2 files changed, 659 insertions(+), 702 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 4707748fff6..4ced780ccf2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -32,63 +32,62 @@ #include #include #include +#include namespace CGAL { /*! \class * A model of the ArrangementTraits_2 concept that counts the methods invoked. */ -template -class Arr_counting_traits_2 : public Base_traits { +template +class Arr_counting_traits_2 : public BaseTraits { public: enum Operation_id { - COMPARE_X_OP = 0, - COMPARE_XY_OP, - CONSTRUCT_MIN_VERTEX_OP, - CONSTRUCT_MAX_VERTEX_OP, - IS_VERTICAL_OP, - COMPARE_Y_AT_X_OP, - EQUAL_POINTS_OP, - EQUAL_CURVES_OP, - COMPARE_Y_AT_X_LEFT_OP, - COMPARE_Y_AT_X_RIGHT_OP, - MAKE_X_MONOTONE_OP, - SPLIT_OP, - INTERSECT_OP, - ARE_MERGEABLE_OP, - MERGE_OP, - CONSTRUCT_OPPOSITE_OP, - COMPARE_ENDPOINTS_XY_OP, + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_2_POINTS_OP, + EQUAL_2_CURVES_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_COORD_OP, + APPROXIMATE_2_POINT_OP, + APPROXIMATE_2_CURVE_OP, - PARAMETER_SPACE_IN_X_CURVE_END_OP, - PARAMETER_SPACE_IN_X_POINT_OP, - PARAMETER_SPACE_IN_X_CURVE_OP, - IS_ON_X_IDENTIFICATION_POINT_OP, - IS_ON_X_IDENTIFICATION_CURVE_OP, - COMPARE_Y_ON_BOUNDARY_OP, - COMPARE_Y_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_X_2_CURVE_END_OP, + PARAMETER_SPACE_IN_X_2_POINT_OP, + IS_ON_X_IDENTIFICATION_POINT_2_OP, + IS_ON_X_IDENTIFICATION_CURVE_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, - PARAMETER_SPACE_IN_Y_CURVE_END_OP, - PARAMETER_SPACE_IN_Y_POINT_OP, - PARAMETER_SPACE_IN_Y_CURVE_OP, - IS_ON_Y_IDENTIFICATION_POINT_OP, - IS_ON_Y_IDENTIFICATION_CURVE_OP, - COMPARE_X_ON_BOUNDARY_POINTS_OP, - COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP, - COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP, - COMPARE_X_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_Y_2_CURVE_END_OP, + PARAMETER_SPACE_IN_Y_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_CURVE_OP, + COMPARE_X_ON_BOUNDARY_2_POINTS_OP, + COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP, + COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, NUMBER_OF_OPERATIONS }; - typedef Base_traits Base; - typedef Arr_counting_traits_2 Self; + using Base = BaseTraits; /*! Construct default */ - template - Arr_counting_traits_2(Args ... args) : - Base(args...) - { + template + Arr_counting_traits_2(Args ... args) : Base(std::forward(args)...) { clear_counters(); increment(); } @@ -98,144 +97,47 @@ public: Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; /*! Obtain the counter of the given operation */ - size_t count(Operation_id id) const - { return m_counters[id]; } + std::size_t count(Operation_id id) const { return m_counters[id]; } - size_t count_compare_x() const - { return m_counters[COMPARE_X_OP]; } - - size_t count_compare_xy() const - { return m_counters[COMPARE_XY_OP]; } - - size_t count_construct_min_vertex() const - { return m_counters[CONSTRUCT_MIN_VERTEX_OP]; } - - size_t count_construct_max_vertex() const - { return m_counters[CONSTRUCT_MAX_VERTEX_OP]; } - - size_t count_is_vertical() const - { return m_counters[IS_VERTICAL_OP]; } - - size_t count_compare_y_at_x() const - { return m_counters[COMPARE_Y_AT_X_OP]; } - - size_t count_equal_points() const - { return m_counters[EQUAL_POINTS_OP]; } - - size_t count_equal_curves() const - { return m_counters[EQUAL_CURVES_OP]; } - - size_t count_compare_y_at_x_left() const - { return m_counters[COMPARE_Y_AT_X_LEFT_OP]; } - - size_t count_compare_y_at_x_right() const - { return m_counters[COMPARE_Y_AT_X_RIGHT_OP]; } - - size_t count_make_x_monotone() const - { return m_counters[MAKE_X_MONOTONE_OP]; } - - size_t count_split() const - { return m_counters[SPLIT_OP]; } - - size_t count_intersect() const - { return m_counters[INTERSECT_OP]; } - - size_t count_are_mergeable() const - { return m_counters[ARE_MERGEABLE_OP]; } - - size_t count_merge() const - { return m_counters[MERGE_OP]; } - - size_t count_construct_opposite() const - { return m_counters[CONSTRUCT_OPPOSITE_OP]; } - - size_t count_compare_endpoints_xy() const - { return m_counters[COMPARE_ENDPOINTS_XY_OP]; } - - // left-right - - size_t count_parameter_space_in_x_curve_end() const - { return m_counters[PARAMETER_SPACE_IN_X_CURVE_END_OP]; } - - size_t count_parameter_space_in_x_curve() const - { return m_counters[PARAMETER_SPACE_IN_X_CURVE_OP]; } - - size_t count_parameter_space_in_x_point() const - { return m_counters[PARAMETER_SPACE_IN_X_POINT_OP]; } - - size_t count_is_on_x_identification_point() const - { return m_counters[IS_ON_X_IDENTIFICATION_POINT_OP]; } - - size_t count_is_on_x_identification_curve() const - { return m_counters[IS_ON_X_IDENTIFICATION_CURVE_OP]; } - - size_t count_compare_y_on_boundary() const - { return m_counters[COMPARE_Y_ON_BOUNDARY_OP]; } - - size_t count_compare_y_near_boundary() const - { return m_counters[COMPARE_Y_NEAR_BOUNDARY_OP]; } - - - // bottom-top - - size_t count_parameter_space_in_y_curve_end() const - { return m_counters[PARAMETER_SPACE_IN_Y_CURVE_END_OP]; } - - size_t count_parameter_space_in_y_curve() const - { return m_counters[PARAMETER_SPACE_IN_Y_CURVE_OP]; } - - size_t count_parameter_space_in_y_point() const - { return m_counters[PARAMETER_SPACE_IN_Y_POINT_OP]; } - - size_t count_is_on_y_identification_point() const - { return m_counters[IS_ON_Y_IDENTIFICATION_POINT_OP]; } - - size_t count_is_on_y_identification_curve() const - { return m_counters[IS_ON_Y_IDENTIFICATION_CURVE_OP]; } - - size_t count_compare_x_on_boundary_points() const - { return m_counters[COMPARE_X_ON_BOUNDARY_POINTS_OP]; } - - size_t count_compare_x_on_boundary_point_curve_end() const - { return m_counters[COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP]; } - - size_t count_compare_x_on_boundary_curve_ends() const - { return m_counters[COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP]; } - - size_t count_compare_x_near_boundary() const - { return m_counters[COMPARE_X_NEAR_BOUNDARY_OP]; } + /*! Print the compare_x counter */ + template + OutStream& print(OutStream& os, Operation_id id) const { + if (! m_exist[id]) return os; + os << m_names[id] << ": " << m_counters[id] << std::endl; + return os; + } /// \name Types and functors inherited from the base //@{ // Traits types: - typedef typename Base::Has_left_category Has_left_category; - typedef typename Base::Has_merge_category Has_merge_category; - typedef typename Base::Has_do_intersect_category Has_do_intersect_category; + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Base >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Base >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Base >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Base >::Category - Right_side_category; + using Left_side_category = + typename internal::Arr_complete_left_side_category::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category::Category; - typedef typename Base::Point_2 Point_2; - typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; - typedef typename Base::Curve_2 Curve_2; + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_x_2 { private: typename Base::Compare_x_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_x_2(const Base* base, size_t& counter) : - m_object(base->compare_x_2_object()), m_counter(counter) {} + Compare_x_2(const Base& base, std::size_t& counter) : + m_object(base.compare_x_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const @@ -246,60 +148,60 @@ public: class Compare_xy_2 { private: typename Base::Compare_xy_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_xy_2(const Base* base, size_t& counter) : - m_object(base->compare_xy_2_object()), m_counter(counter) {} + Compare_xy_2(const Base& base, std::size_t& counter) : + m_object(base.compare_xy_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that obtains the left endpoint of an x-monotone curve. */ + /*! A functor that obtains the left endpoint of an \f$x\f$-monotone curve. */ class Construct_min_vertex_2 { private: typename Base::Construct_min_vertex_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Construct_min_vertex_2(const Base* base, size_t& counter) : - m_object(base->construct_min_vertex_2_object()), m_counter(counter) {} + Construct_min_vertex_2(const Base& base, std::size_t& counter) : + m_object(base.construct_min_vertex_2_object()), m_counter(counter) {} /*! Operate */ const Point_2 operator()(const X_monotone_curve_2& xc) const { ++m_counter; return m_object(xc); } }; - /*! A functor that obtains the right endpoint of an x-monotone curve. */ + /*! A functor that obtains the right endpoint of an \f$x\f$-monotone curve. */ class Construct_max_vertex_2 { private: typename Base::Construct_max_vertex_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Construct_max_vertex_2(const Base* base, size_t& counter) : - m_object(base->construct_max_vertex_2_object()), m_counter(counter) {} + Construct_max_vertex_2(const Base& base, std::size_t& counter) : + m_object(base.construct_max_vertex_2_object()), m_counter(counter) {} /*! Operate */ const Point_2 operator()(const X_monotone_curve_2& xc) const { ++m_counter; return m_object(xc); } }; - /*! A functor that checks whether a given x-monotone curve is vertical. */ + /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. */ class Is_vertical_2 { private: typename Base::Is_vertical_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Is_vertical_2(const Base* base, size_t& counter) : - m_object(base->is_vertical_2_object()), m_counter(counter) {} + Is_vertical_2(const Base& base, std::size_t& counter) : + m_object(base.is_vertical_2_object()), m_counter(counter) {} /*! Operate */ bool operator()(const X_monotone_curve_2& xc) const @@ -307,17 +209,17 @@ public: }; /*! A functor that compares the y-coordinates of a point and an - * x-monotone curve at the point x-coordinate. + * \f$x\f$-monotone curve at the point \f$x\f$-coordinate. */ class Compare_y_at_x_2 { private: typename Base::Compare_y_at_x_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_y_at_x_2(const Base* base, size_t& counter) : - m_object(base->compare_y_at_x_2_object()), m_counter(counter) {} + Compare_y_at_x_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_at_x_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const Point_2& p, @@ -325,19 +227,19 @@ public: { ++m_counter; return m_object(p, xc); } }; - /*! A functor that checks whether two points and two x-monotone curves are + /*! A functor that checks whether two points and two \f$x\f$-monotone curves are * identical. */ class Equal_2 { private: typename Base::Equal_2 m_object; - size_t& m_counter1; - size_t& m_counter2; + std::size_t& m_counter1; + std::size_t& m_counter2; public: /*! Construct */ - Equal_2(const Base* base, size_t& counter1, size_t& counter2) : - m_object(base->equal_2_object()), + Equal_2(const Base& base, std::size_t& counter1, std::size_t& counter2) : + m_object(base.equal_2_object()), m_counter1(counter1), m_counter2(counter2) {} @@ -351,18 +253,18 @@ public: { ++m_counter2; return m_object(p1, p2); } }; - /*! A functor that compares compares the y-coordinates of two x-monotone + /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone * curves immediately to the left of their intersection point. */ class Compare_y_at_x_left_2 { private: typename Base::Compare_y_at_x_left_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_y_at_x_left_2(const Base* base, size_t& counter) : - m_object(base->compare_y_at_x_left_2_object()), m_counter(counter) {} + Compare_y_at_x_left_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_at_x_left_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const X_monotone_curve_2& xc1, @@ -371,18 +273,18 @@ public: { ++m_counter; return m_object(xc1, xc2, p); } }; - /*! A functor that compares compares the y-coordinates of two x-monotone + /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone * curves immediately to the right of their intersection point. */ class Compare_y_at_x_right_2 { private: typename Base::Compare_y_at_x_right_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_y_at_x_right_2(const Base* base, size_t& counter) : - m_object(base->compare_y_at_x_right_2_object()), m_counter(counter) {} + Compare_y_at_x_right_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_at_x_right_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const X_monotone_curve_2& xc1, @@ -392,19 +294,19 @@ public: }; /*! \class Make_x_monotone_2 - * A functor that subdivides a curve into x-monotone curves. + * A functor that subdivides a curve into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { private: typename Base::Make_x_monotone_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Make_x_monotone_2(const Base* base, size_t& counter) : - m_object(base->make_x_monotone_2_object()), m_counter(counter) {} + Make_x_monotone_2(const Base& base, std::size_t& counter) : + m_object(base.make_x_monotone_2_object()), m_counter(counter) {} - /*! Subdivide a given curve into x-monotone subcurves and insert them into + /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them into * a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its value type is a variant @@ -420,12 +322,12 @@ public: class Split_2 { private: typename Base::Split_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Split_2(const Base* base, size_t& counter) : - m_object(base->split_2_object()), m_counter(counter) {} + Split_2(const Base& base, std::size_t& counter) : + m_object(base.split_2_object()), m_counter(counter) {} /*! Operate */ void operator()(const X_monotone_curve_2& xc, const Point_2& p, @@ -433,16 +335,16 @@ public: { ++m_counter; m_object(xc, p, xc1, xc2); } }; - /*! A functor that computes intersections between x-monotone curves. */ + /*! A functor that computes intersections between \f$x\f$-monotone curves. */ class Intersect_2 { private: typename Base::Intersect_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Intersect_2(const Base* base, size_t& counter) : - m_object(base->intersect_2_object()), m_counter(counter) {} + Intersect_2(const Base& base, std::size_t& counter) : + m_object(base.intersect_2_object()), m_counter(counter) {} /*! Operate */ template @@ -452,16 +354,16 @@ public: { ++m_counter; return m_object(xc1, xc2, oi); } }; - /*! A functor that tests whether two x-monotone curves can be merged. */ + /*! A functor that tests whether two \f$x\f$-monotone curves can be merged. */ class Are_mergeable_2 { private: typename Base::Are_mergeable_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Are_mergeable_2(const Base* base, size_t& counter) : - m_object(base->are_mergeable_2_object()), m_counter(counter) {} + Are_mergeable_2(const Base& base, std::size_t& counter) : + m_object(base.are_mergeable_2_object()), m_counter(counter) {} /*! Operate */ bool operator()(const X_monotone_curve_2& xc1, @@ -469,16 +371,16 @@ public: { ++m_counter; return m_object(xc1, xc2); } }; - /*! A functor that merges two x-monotone curves into one. */ + /*! A functor that merges two \f$x\f$-monotone curves into one. */ class Merge_2 { private: typename Base::Merge_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Merge_2(const Base* base, size_t& counter) : - m_object(base->merge_2_object()), m_counter(counter) {} + Merge_2(const Base& base, std::size_t& counter) : + m_object(base.merge_2_object()), m_counter(counter) {} /*! Operate */ void operator()(const X_monotone_curve_2& xc1, @@ -487,75 +389,115 @@ public: { ++m_counter; m_object(xc1, xc2, xc); } }; - /*! A fnuctor that constructs an opposite x-monotone curve. */ + /*! A fnuctor that constructs an opposite \f$x\f$-monotone curve. */ class Construct_opposite_2 { private: typename Base::Construct_opposite_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Construct_opposite_2(const Base* base, size_t& counter) : - m_object(base->construct_opposite_2_object()), m_counter(counter) {} + Construct_opposite_2(const Base& base, std::size_t& counter) : + m_object(base.construct_opposite_2_object()), m_counter(counter) {} /*! Operate */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xc) { ++m_counter; return m_object(xc); } }; - /*! A functor that compares the two endpoints of an x-monotone curve + /*! A functor that compares the two endpoints of an \f$x\f$-monotone curve * lexigoraphically. */ class Compare_endpoints_xy_2 { private: typename Base::Compare_endpoints_xy_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_endpoints_xy_2(const Base* base, size_t& counter) : - m_object(base->compare_endpoints_xy_2_object()), m_counter(counter) {} + Compare_endpoints_xy_2(const Base& base, std::size_t& counter) : + m_object(base.compare_endpoints_xy_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const X_monotone_curve_2& xc) { ++m_counter; return m_object(xc); } }; - // left-right - - /*! A functor that determines whether an endpoint of an x-monotone curve lies - * on a boundary of the parameter space along the x axis. + /*! A functor that approximates coordinates, points, and \f$x\f$-monotone curves. */ - class Parameter_space_in_x_2 { + class Approximate_2 { private: - typename Base::Parameter_space_in_x_2 m_object; - size_t& m_counter1; - size_t& m_counter2; - size_t& m_counter3; + using Approximate_number_type = typename Base::Approximate_number_type; + using Approximate_point_2 = typename Base::Approximate_point_2; + + typename Base::Approximate_2 m_object; + std::size_t& m_counter1; + std::size_t& m_counter2; + std::size_t& m_counter3; public: /*! Construct */ - Parameter_space_in_x_2(const Base* base, size_t& counter1, - size_t& counter2, size_t& counter3) : - m_object(base->parameter_space_in_x_2_object()), + Approximate_2(const Base& base, std::size_t& counter1, + std::size_t& counter2, std::size_t& counter3) : + m_object(base.approximate_2_object()), m_counter1(counter1), m_counter2(counter2), m_counter3(counter3) {} + /*! Operate */ + /*! Obtain an approximation of a point coordinate. + * \param p the exact point. + * \param i the coordinate index (either 0 or 1). + * \pre i is either 0 or 1. + * \return An approximation of p's \f$x\f$-coordinate (if i == 0), or an + * approximation of p's y-coordinate (if i == 1). + */ + Approximate_number_type operator()(const Point_2& p, std::size_t i) const + { ++m_counter1; return m_object(p, i); } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const + { ++m_counter2; return m_object(p); } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double error, + OutputIterator oi, bool l2r = true) const + { ++m_counter3; return m_object(xcv, error, oi, l2r); } + }; + + // left-right + + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve lies + * on a boundary of the parameter space along the x axis. + */ + class Parameter_space_in_x_2 { + private: + typename Base::Parameter_space_in_x_2 m_object; + std::size_t& m_counter1; + std::size_t& m_counter2; + + public: + /*! Construct */ + Parameter_space_in_x_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.parameter_space_in_x_2_object()), + m_counter1(counter1), + m_counter2(counter2) + {} + /*! Operate */ Arr_parameter_space operator()(const X_monotone_curve_2& xc, - Arr_curve_end ce) const + Arr_curve_end ce) const { ++m_counter1; return m_object(xc, ce); } /*! Operate */ Arr_parameter_space operator()(const Point_2& p) const { ++m_counter2; return m_object(p); } - - /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc) const - { ++m_counter3; return m_object(xc); } }; /*! A functor that determines whether a point or a curve lies on an @@ -563,15 +505,15 @@ public: */ class Is_on_x_identification_2 { private: - typename Base::Is_on_x_identificiation_2 m_object; - size_t& m_counter1; - size_t& m_counter2; + typename Base::Is_on_x_identification_2 m_object; + std::size_t& m_counter1; + std::size_t& m_counter2; public: /*! Construct */ - Is_on_x_identification_2(const Base* base, - size_t& counter1, size_t& counter2) : - m_object(base->is_on_x_identificiation_2_object()), + Is_on_x_identification_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.is_on_x_identification_2_object()), m_counter1(counter1), m_counter2(counter2) {} @@ -591,14 +533,12 @@ public: class Compare_y_on_boundary_2 { private: typename Base::Compare_y_on_boundary_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_y_on_boundary_2(const Base* base, size_t& counter) : - m_object(base->compare_y_on_boundary_2_object()), - m_counter(counter) - {} + Compare_y_on_boundary_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_on_boundary_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const @@ -611,12 +551,12 @@ public: class Compare_y_near_boundary_2 { private: typename Base::Compare_y_near_boundary_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_y_near_boundary_2(const Base* base, size_t& counter) : - m_object(base->compare_y_near_boundary_2_object()), m_counter(counter) {} + Compare_y_near_boundary_2(const Base& base, std::size_t& counter) : + m_object(base.compare_y_near_boundary_2_object()), m_counter(counter) {} /*! Operate */ Comparison_result operator()(const X_monotone_curve_2& xc1, @@ -627,24 +567,22 @@ public: // bottom-top - /*! A functor that determines whether an endpoint of an x-monotone arc lies + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc lies * on a boundary of the parameter space along the y axis. */ class Parameter_space_in_y_2 { private: typename Base::Parameter_space_in_y_2 m_object; - size_t& m_counter1; - size_t& m_counter2; - size_t& m_counter3; + std::size_t& m_counter1; + std::size_t& m_counter2; public: /*! Construct */ - Parameter_space_in_y_2(const Base* base, size_t& counter1, - size_t& counter2, size_t& counter3) : - m_object(base->parameter_space_in_y_2_object()), + Parameter_space_in_y_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.parameter_space_in_y_2_object()), m_counter1(counter1), - m_counter2(counter2), - m_counter3(counter3) + m_counter2(counter2) {} /*! Operate */ @@ -655,10 +593,6 @@ public: /*! Operate */ Arr_parameter_space operator()(const Point_2& p) const { ++m_counter2; return m_object(p); } - - /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc) const - { ++m_counter3; return m_object(xc); } }; /*! A functor that determines whether a point or a curve lies on an @@ -666,44 +600,44 @@ public: */ class Is_on_y_identification_2 { private: - typename Base::Is_on_y_identificiation_2 m_object; - size_t& m_counter1; - size_t& m_counter2; + typename Base::Is_on_y_identification_2 m_object; + std::size_t& m_counter1; + std::size_t& m_counter2; public: /*! Construct */ - Is_on_y_identification_2(const Base* base, - size_t& counter1, size_t& counter2) : - m_object(base->is_on_y_identificiation_2_object()), + Is_on_y_identification_2(const Base& base, + std::size_t& counter1, std::size_t& counter2) : + m_object(base.is_on_y_identification_2_object()), m_counter1(counter1), m_counter2(counter2) {} /*! Operate */ - Arr_parameter_space operator()(const Point_2& p) const + bool operator()(const Point_2& p) const { ++m_counter1; return m_object(p); } /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc) const + bool operator()(const X_monotone_curve_2& xc) const { ++m_counter2; return m_object(xc); } }; - /*! A functor that compares the x-coordinate of two given points + /*! A functor that compares the \f$x\f$-coordinate of two given points * that lie on horizontal boundaries. */ class Compare_x_on_boundary_2 { private: typename Base::Compare_x_on_boundary_2 m_object; - size_t& m_counter1; - size_t& m_counter2; - size_t& m_counter3; + std::size_t& m_counter1; + std::size_t& m_counter2; + std::size_t& m_counter3; public: /*! Construct */ - Compare_x_on_boundary_2(const Base* base, size_t& counter1, - size_t& counter2, size_t& counter3 ) : - m_object(base->compare_x_on_boundary_2_object()), + Compare_x_on_boundary_2(const Base& base, std::size_t& counter1, + std::size_t& counter2, std::size_t& counter3 ) : + m_object(base.compare_x_on_boundary_2_object()), m_counter1(counter1), m_counter2(counter2), m_counter3(counter3) @@ -727,18 +661,18 @@ public: { ++m_counter3; return m_object(xcv1, ce1, xcv2, ce2); } }; - /*! A functor that compares the x-coordinates of curve ends near the + /*! A functor that compares the \f$x\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_x_near_boundary_2 { private: typename Base::Compare_x_near_boundary_2 m_object; - size_t& m_counter; + std::size_t& m_counter; public: /*! Construct */ - Compare_x_near_boundary_2(const Base* base, size_t& counter) : - m_object(base->compare_x_near_boundary_2_object()), + Compare_x_near_boundary_2(const Base& base, std::size_t& counter) : + m_object(base.compare_x_near_boundary_2_object()), m_counter(counter) {} @@ -751,119 +685,112 @@ public: //@} - - /// \name Obtain the appropriate functor //@{ Compare_x_2 compare_x_2_object() const - { return Compare_x_2(this, m_counters[COMPARE_X_OP]); } + { return Compare_x_2(*this, m_counters[COMPARE_X_2_OP]); } Compare_xy_2 compare_xy_2_object() const - { return Compare_xy_2(this, m_counters[COMPARE_XY_OP]); } + { return Compare_xy_2(*this, m_counters[COMPARE_XY_2_OP]); } Construct_min_vertex_2 construct_min_vertex_2_object() const - { return Construct_min_vertex_2(this, m_counters[CONSTRUCT_MIN_VERTEX_OP]); } + { return Construct_min_vertex_2(*this, m_counters[CONSTRUCT_MIN_VERTEX_2_OP]); } Construct_max_vertex_2 construct_max_vertex_2_object() const - { return Construct_max_vertex_2(this, m_counters[CONSTRUCT_MAX_VERTEX_OP]); } + { return Construct_max_vertex_2(*this, m_counters[CONSTRUCT_MAX_VERTEX_2_OP]); } Is_vertical_2 is_vertical_2_object() const - { return Is_vertical_2(this, m_counters[IS_VERTICAL_OP]); } + { return Is_vertical_2(*this, m_counters[IS_VERTICAL_2_OP]); } Compare_y_at_x_2 compare_y_at_x_2_object() const - { return Compare_y_at_x_2(this, m_counters[COMPARE_Y_AT_X_OP]); } + { return Compare_y_at_x_2(*this, m_counters[COMPARE_Y_AT_X_2_OP]); } - Equal_2 equal_2_object() const - { - return Equal_2(this, m_counters[EQUAL_POINTS_OP], - m_counters[EQUAL_CURVES_OP]); + Equal_2 equal_2_object() const { + return Equal_2(*this, m_counters[EQUAL_2_POINTS_OP], + m_counters[EQUAL_2_CURVES_OP]); } Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const - { return Compare_y_at_x_left_2(this, m_counters[COMPARE_Y_AT_X_LEFT_OP]); } + { return Compare_y_at_x_left_2(*this, m_counters[COMPARE_Y_AT_X_LEFT_2_OP]); } Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { return Compare_y_at_x_right_2(this, m_counters[COMPARE_Y_AT_X_RIGHT_OP]); } + { return Compare_y_at_x_right_2(*this, m_counters[COMPARE_Y_AT_X_RIGHT_2_OP]); } Make_x_monotone_2 make_x_monotone_2_object() const - { return Make_x_monotone_2(this, m_counters[MAKE_X_MONOTONE_OP]); } + { return Make_x_monotone_2(*this, m_counters[MAKE_X_MONOTONE_2_OP]); } Split_2 split_2_object() const - { return Split_2(this, m_counters[SPLIT_OP]); } + { return Split_2(*this, m_counters[SPLIT_2_OP]); } Intersect_2 intersect_2_object() const - { return Intersect_2(this, m_counters[INTERSECT_OP]); } + { return Intersect_2(*this, m_counters[INTERSECT_2_OP]); } Are_mergeable_2 are_mergeable_2_object() const - { return Are_mergeable_2(this, m_counters[ARE_MERGEABLE_OP]); } + { return Are_mergeable_2(*this, m_counters[ARE_MERGEABLE_2_OP]); } Merge_2 merge_2_object() const - { return Merge_2(this, m_counters[MERGE_OP]); } + { return Merge_2(*this, m_counters[MERGE_2_OP]); } Construct_opposite_2 construct_opposite_2_object() const - { return Construct_opposite_2(this, m_counters[CONSTRUCT_OPPOSITE_OP]); } + { return Construct_opposite_2(*this, m_counters[CONSTRUCT_2_OPPOSITE_2_OP]); } Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const - { return Compare_endpoints_xy_2(this, m_counters[COMPARE_ENDPOINTS_XY_OP]); } + { return Compare_endpoints_xy_2(*this, m_counters[COMPARE_ENDPOINTS_XY_2_OP]); } + + Approximate_2 approximate_2_object() const { + return Approximate_2(*this, + m_counters[APPROXIMATE_2_COORD_OP], + m_counters[APPROXIMATE_2_POINT_OP], + m_counters[APPROXIMATE_2_CURVE_OP]); + } // left-right - Parameter_space_in_x_2 parameter_space_in_x_2_object() const - { return Parameter_space_in_x_2( - this, - m_counters[PARAMETER_SPACE_IN_X_CURVE_END_OP], - m_counters[PARAMETER_SPACE_IN_X_POINT_OP], - m_counters[PARAMETER_SPACE_IN_X_CURVE_OP] - ); + Parameter_space_in_x_2 parameter_space_in_x_2_object() const { + return Parameter_space_in_x_2(*this, + m_counters[PARAMETER_SPACE_IN_X_2_CURVE_END_OP], + m_counters[PARAMETER_SPACE_IN_X_2_POINT_OP]); } - Is_on_x_identification_2 is_on_x_identification_2_object() const - { - return Is_on_x_identification_2(this, - m_counters[IS_ON_X_IDENTIFICATION_POINT_OP], - m_counters[IS_ON_X_IDENTIFICATION_CURVE_OP]); + Is_on_x_identification_2 is_on_x_identification_2_object() const { + return Is_on_x_identification_2(*this, + m_counters[IS_ON_X_IDENTIFICATION_POINT_2_OP], + m_counters[IS_ON_X_IDENTIFICATION_CURVE_2_OP]); } - Compare_y_on_boundary_2 compare_on_boundary_2_object() const - { return Compare_y_on_boundary_2(this, m_counters[COMPARE_Y_ON_BOUNDARY_OP]); } + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { + return Compare_y_on_boundary_2(*this, m_counters[COMPARE_Y_ON_BOUNDARY_2_OP]); + } - Compare_y_near_boundary_2 compare_near_boundary_2_object() const - { - return Compare_y_near_boundary_2(this, - m_counters[COMPARE_Y_NEAR_BOUNDARY_OP]); + Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { + return Compare_y_near_boundary_2(*this, + m_counters[COMPARE_Y_NEAR_BOUNDARY_2_OP]); } // bottom-top - Parameter_space_in_y_2 parameter_space_in_y_2_object() const - { return Parameter_space_in_y_2( - this, - m_counters[PARAMETER_SPACE_IN_Y_CURVE_END_OP], - m_counters[PARAMETER_SPACE_IN_Y_POINT_OP], - m_counters[PARAMETER_SPACE_IN_Y_CURVE_OP] - ); + Parameter_space_in_y_2 parameter_space_in_y_2_object() const { + return Parameter_space_in_y_2(*this, + m_counters[PARAMETER_SPACE_IN_Y_2_CURVE_END_OP], + m_counters[PARAMETER_SPACE_IN_Y_2_POINT_OP]); } - Is_on_y_identification_2 is_on_y_identification_2_object() const - { return Is_on_y_identification_2( - this, - m_counters[IS_ON_Y_IDENTIFICATION_POINT_OP], - m_counters[IS_ON_Y_IDENTIFICATION_CURVE_OP] - ); + Is_on_y_identification_2 is_on_y_identification_2_object() const { + return Is_on_y_identification_2(*this, + m_counters[IS_ON_Y_IDENTIFICATION_2_POINT_OP], + m_counters[IS_ON_Y_IDENTIFICATION_2_CURVE_OP]); } - Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const - { + Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return - Compare_x_on_boundary_2(this, - m_counters[COMPARE_X_ON_BOUNDARY_POINTS_OP], - m_counters[COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP], - m_counters[COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP]); + Compare_x_on_boundary_2(*this, + m_counters[COMPARE_X_ON_BOUNDARY_2_POINTS_OP], + m_counters[COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP], + m_counters[COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP]); } - Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const - { - return Compare_x_near_boundary_2(this, - m_counters[COMPARE_X_NEAR_BOUNDARY_OP]); + Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { + return Compare_x_near_boundary_2(*this, + m_counters[COMPARE_X_NEAR_BOUNDARY_2_OP]); } //@} @@ -872,106 +799,108 @@ public: * \param doit indicates whethet to actually inceremnt the counter or not * \return the counter at the end of the operation */ - static size_t increment(bool doit = true) - { + static std::size_t increment(bool doit = true) { #ifdef CGAL_NO_ATOMIC - static size_t counter; + static std::size_t counter; #else - static std::atomic counter; + static std::atomic counter; #endif if (doit) ++counter; return counter; } /*! Clean all operation counters */ - void clear_counters() - { m_counters = {}; } + void clear_counters() { m_counters = {}; } private: /*! The operation counters */ - mutable std::array m_counters; + mutable std::array m_counters; + const std::array m_names = { + "COMPARE_X_2_OP", + "COMPARE_XY_2_OP", + "CONSTRUCT_MIN_VERTEX_2_OP", + "CONSTRUCT_MAX_VERTEX_2_OP", + "IS_VERTICAL_2_OP", + "COMPARE_Y_AT_X_2_OP", + "EQUAL_2_POINTS_OP", + "EQUAL_2_CURVES_OP", + "COMPARE_Y_AT_X_LEFT_2_OP", + "COMPARE_Y_AT_X_RIGHT_2_OP", + "MAKE_X_MONOTONE_2_OP", + "SPLIT_2_OP", + "INTERSECT_2_OP", + "ARE_MERGEABLE_2_OP", + "MERGE_2_OP", + "CONSTRUCT_2_OPPOSITE_2_OP", + "COMPARE_ENDPOINTS_XY_2_OP", + "APPROXIMATE_2_COORD_OP", + "APPROXIMATE_2_POINT_OP", + "APPROXIMATE_2_CURVE_OP", + + "PARAMETER_SPACE_IN_X_2_CURVE_END_OP", + "PARAMETER_SPACE_IN_X_2_POINT_OP", + "IS_ON_X_IDENTIFICATION_POINT_2_OP", + "IS_ON_X_IDENTIFICATION_CURVE_2_OP", + "COMPARE_Y_ON_BOUNDARY_2_OP", + "COMPARE_Y_NEAR_BOUNDARY_2_OP", + + "PARAMETER_SPACE_IN_Y_2_CURVE_END_OP", + "PARAMETER_SPACE_IN_Y_2_POINT_OP", + "IS_ON_Y_IDENTIFICATION_2_POINT_OP", + "IS_ON_Y_IDENTIFICATION_2_CURVE_OP", + "COMPARE_X_ON_BOUNDARY_2_POINTS_OP", + "COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP", + "COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP", + "COMPARE_X_NEAR_BOUNDARY_2_OP" + }; + const std::array m_exist = { + has_compare_x_2::value, + has_compare_xy_2::value, + has_construct_min_vertex_2::value, + has_construct_max_vertex_2::value, + has_is_vertical_2::value, + has_compare_y_at_x_2::value, + has_equal_2::value, // points + has_equal_2::value, // curves + has_compare_y_at_x_left_2::value, + has_compare_y_at_x_right_2::value, + has_make_x_monotone_2::value, + has_split_2::value, + has_intersect_2::value, + has_are_mergeable_2::value, + has_merge_2::value, + has_construct_opposite_2::value, + has_compare_endpoints_xy_2::value, + has_approximate_2::value, // coordinate + has_approximate_2::value, // point + has_approximate_2::value, // curve + has_parameter_space_in_x_2::value, // curve end + has_parameter_space_in_x_2::value, // point + has_is_on_x_identification_2::value, // point + has_is_on_x_identification_2::value, // curve + has_compare_y_on_boundary_2::value, + has_compare_y_near_boundary_2::value, + has_parameter_space_in_y_2::value, // curve end + has_parameter_space_in_y_2::value, // point + has_is_on_y_identification_2::value, // point + has_is_on_y_identification_2::value, // curve + has_compare_x_on_boundary_2::value, // points + has_compare_x_on_boundary_2::value, // point, curve end + has_compare_x_on_boundary_2::value, // curve ends + has_compare_x_near_boundary_2::value + }; }; -template -inline -Out_stream& operator<<(Out_stream& os, - const Arr_counting_traits_2& traits) -{ - typedef Arr_counting_traits_2 Traits; - size_t sum = 0; - size_t i; - for (i = 0; i < Traits::NUMBER_OF_OPERATIONS; ++i) +template +inline OutStream& operator<<(OutStream& os, + const Arr_counting_traits_2& traits) { + using Traits = Arr_counting_traits_2; + std::size_t sum = 0; + for (auto i = 0; i < Traits::NUMBER_OF_OPERATIONS; ++i) { sum += traits.count(static_cast(i)); - os << "# of COMPARE_X operation = " - << traits.count_compare_x() << std::endl - << "# of COMPARE_XY operation = " - << traits.count_compare_xy() << std::endl - << "# of CONSTRUCT_MIN_VERTEX operation = " - << traits.count_construct_min_vertex() << std::endl - << "# of CONSTRUCT_MAX_VERTEX operation = " - << traits.count_construct_max_vertex() << std::endl - << "# of IS_VERTICAL operation = " - << traits.count_is_vertical() << std::endl - << "# of COMPARE_Y_AT_X operation = " - << traits.count_compare_y_at_x() << std::endl - << "# of EQUAL_POINTS operation = " - << traits.count_equal_points() << std::endl - << "# of EQUAL_CURVES operation = " - << traits.count_equal_curves() << std::endl - << "# of COMPARE_Y_AT_X_LEFT operation = " - << traits.count_compare_y_at_x_left() << std::endl - << "# of COMPARE_Y_AT_X_RIGHT operation = " - << traits.count_compare_y_at_x_right() << std::endl - << "# of MAKE_X_MONOTONE operation = " - << traits.count_make_x_monotone() << std::endl - << "# of SPLIT operation = " - << traits.count_split() << std::endl - << "# of INTERSECT operation = " - << traits.count_intersect() << std::endl - << "# of ARE_MERGEABLE operation = " - << traits.count_are_mergeable() << std::endl - << "# of MERGE operation = " - << traits.count_merge() << std::endl - << "# of CONSTRUCT_OPPOSITE operation = " - << traits.count_construct_opposite() << std::endl - << "# of COMPARE_ENDPOINTS_XY operation = " - << traits.count_compare_endpoints_xy() << std::endl - // left-right - << "# of PARAMETER_SPACE_IN_X curve-end operation = " - << traits.count_parameter_space_in_x_curve_end() << std::endl - << "# of PARAMETER_SPACE_IN_X point operation = " - << traits.count_parameter_space_in_x_point() << std::endl - << "# of PARAMETER_SPACE_IN_X curve operation = " - << traits.count_parameter_space_in_x_curve() << std::endl - << "# of IS_ON_X_IDENTIFICIATION point operation = " - << traits.count_is_on_x_identification_point() << std::endl - << "# of IS_ON_X_IDENTIFICATION curve operation = " - << traits.count_is_on_x_identification_curve() << std::endl - << "# of COMPARE_Y_ON_BOUNDARY operation = " - << traits.count_compare_y_on_boundary() << std::endl - << "# of COMPARE_Y_NEAR_BOUNDARY operation = " - << traits.count_compare_y_near_boundary() << std::endl - // bottom-top - << "# of PARAMETER_SPACE_IN_Y curve-end operation = " - << traits.count_parameter_space_in_y_curve_end() << std::endl - << "# of PARAMETER_SPACE_IN_Y point operation = " - << traits.count_parameter_space_in_y_point() << std::endl - << "# of PARAMETER_SPACE_IN_Y curve operation = " - << traits.count_parameter_space_in_y_curve() << std::endl - << "# of IS_ON_Y_IDENTIFICIATION point operation = " - << traits.count_is_on_y_identification_point() << std::endl - << "# of IS_ON_Y_IDENTIFICATION curve operation = " - << traits.count_is_on_y_identification_curve() << std::endl - << "# of COMPARE_X_ON_BOUNDARY points operation = " - << traits.count_compare_x_on_boundary_points() << std::endl - << "# of COMPARE_X_ON_BOUNDARY point/curve-end operation = " - << traits.count_compare_x_on_boundary_point_curve_end() << std::endl - << "# of COMPARE_X_ON_BOUNDARY curve-ends operation = " - << traits.count_compare_x_on_boundary_curve_ends() << std::endl - << "# of COMPARE_X_NEAR_BOUNDARY operation = " - << traits.count_compare_x_near_boundary() << std::endl - - << "total # = " << sum << std::endl + traits.print(os, static_cast(i)); + } + os << "total # = " << sum << std::endl << "# of traits constructed = " << Traits::increment(false) << std::endl; return os; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 66dd1834a8c..af384ee199d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -25,8 +25,8 @@ #include #include - #include +#include #include #include @@ -37,138 +37,138 @@ namespace CGAL { /*! \class * A model of the ArrangementTraits_2 concept that counts the methods invoked. */ -template -class Arr_tracing_traits_2 : public Base_traits { +template +class Arr_tracing_traits_2 : public BaseTraits { public: enum Operation_id { - COMPARE_X_OP = 0, - COMPARE_XY_OP, - CONSTRUCT_MIN_VERTEX_OP, - CONSTRUCT_MAX_VERTEX_OP, - IS_VERTICAL_OP, - COMPARE_Y_AT_X_OP, - EQUAL_POINTS_OP, - EQUAL_CURVES_OP, - COMPARE_Y_AT_X_LEFT_OP, - COMPARE_Y_AT_X_RIGHT_OP, + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_POINTS_2_OP, + EQUAL_CURVES_2_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, - MAKE_X_MONOTONE_OP, - SPLIT_OP, - INTERSECT_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, - ARE_MERGEABLE_OP, - MERGE_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, - CONSTRUCT_OPPOSITE_OP, - COMPARE_ENDPOINTS_XY_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_OP, - PARAMETER_SPACE_IN_X_OP, - IS_ON_X_IDENTIFICATION_OP, - COMPARE_Y_ON_BOUNDARY_OP, - COMPARE_Y_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_X_2_OP, + IS_ON_X_IDENTIFICATION_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, - PARAMETER_SPACE_IN_Y_OP, - IS_ON_Y_IDENTIFICATION_OP, - COMPARE_X_ON_BOUNDARY_OP, - COMPARE_X_NEAR_BOUNDARY_OP, + PARAMETER_SPACE_IN_Y_2_OP, + IS_ON_Y_IDENTIFICATION_2_OP, + COMPARE_X_ON_BOUNDARY_2_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, NUMBER_OF_OPERATIONS }; private: - typedef Base_traits Base; - typedef Arr_tracing_traits_2 Self; + using Base = BaseTraits; /*! A set of bits that indicate whether operations should be traced */ - unsigned int m_flags; + std::size_t m_flags; bool compare_x_op() const - { return (0 != (m_flags & (0x1 << COMPARE_X_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_X_2_OP))); } bool compare_xy_op() const - { return (0 != (m_flags & (0x1 << COMPARE_XY_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_XY_2_OP))); } bool construct_min_vertex_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_MIN_VERTEX_OP))); } + { return (0 != (m_flags & (0x1 << CONSTRUCT_MIN_VERTEX_2_OP))); } bool construct_max_vertex_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_MAX_VERTEX_OP))); } + { return (0 != (m_flags & (0x1 << CONSTRUCT_MAX_VERTEX_2_OP))); } bool is_vertical_op() const - { return (0 != (m_flags & (0x1 << IS_VERTICAL_OP))); } + { return (0 != (m_flags & (0x1 << IS_VERTICAL_2_OP))); } bool compare_y_at_x_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_2_OP))); } bool equal_points_op() const - { return (0 != (m_flags & (0x1 << EQUAL_POINTS_OP))); } + { return (0 != (m_flags & (0x1 << EQUAL_POINTS_2_OP))); } bool equal_curves_op() const - { return (0 != (m_flags & (0x1 << EQUAL_CURVES_OP))); } + { return (0 != (m_flags & (0x1 << EQUAL_CURVES_2_OP))); } bool compare_y_at_x_left_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_LEFT_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_LEFT_2_OP))); } bool compare_y_at_x_right_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_RIGHT_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_RIGHT_2_OP))); } bool make_x_monotone_op() const - { return (0 != (m_flags & (0x1 << MAKE_X_MONOTONE_OP))); } + { return (0 != (m_flags & (0x1 << MAKE_X_MONOTONE_2_OP))); } bool split_op() const - { return (0 != (m_flags & (0x1 << SPLIT_OP))); } + { return (0 != (m_flags & (0x1 << SPLIT_2_OP))); } bool intersect_op() const - { return (0 != (m_flags & (0x1 << INTERSECT_OP))); } + { return (0 != (m_flags & (0x1 << INTERSECT_2_OP))); } bool are_mergeable_op() const - { return (0 != (m_flags & (0x1 << ARE_MERGEABLE_OP))); } + { return (0 != (m_flags & (0x1 << ARE_MERGEABLE_2_OP))); } bool merge_op() const - { return (0 != (m_flags & (0x1 << MERGE_OP))); } + { return (0 != (m_flags & (0x1 << MERGE_2_OP))); } bool construct_opposite_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_OPPOSITE_OP))); } + { return (0 != (m_flags & (0x1 << CONSTRUCT_2_OPPOSITE_2_OP))); } bool compare_endpoints_xy_op() const - { return (0 != (m_flags & (0x1 << COMPARE_ENDPOINTS_XY_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_ENDPOINTS_XY_2_OP))); } + + bool approximate_op() const + { return (0 != (m_flags & (0x1 << APPROXIMATE_2_OP))); } // left-right bool parameter_space_in_x_op() const - { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_X_OP))); } + { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_X_2_OP))); } bool is_on_x_identification_op() const - { return m_flags & (0x1 << IS_ON_X_IDENTIFICATION_OP); } + { return m_flags & (0x1 << IS_ON_X_IDENTIFICATION_2_OP); } bool compare_y_on_boundary_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_ON_BOUNDARY_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_Y_ON_BOUNDARY_2_OP))); } bool compare_y_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_Y_NEAR_BOUNDARY_OP); } + { return m_flags & (0x1 << COMPARE_Y_NEAR_BOUNDARY_2_OP); } // bottom-top bool parameter_space_in_y_op() const - { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_Y_OP))); } + { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_Y_2_OP))); } bool is_on_y_identification_op() const - { return m_flags & (0x1 << IS_ON_Y_IDENTIFICATION_OP); } + { return m_flags & (0x1 << IS_ON_Y_IDENTIFICATION_2_OP); } bool compare_x_on_boundary_op() const - { return (0 != (m_flags & (0x1 << COMPARE_X_ON_BOUNDARY_OP))); } + { return (0 != (m_flags & (0x1 << COMPARE_X_ON_BOUNDARY_2_OP))); } bool compare_x_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP); } + { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_2_OP); } public: /*! Construct default */ template - Arr_tracing_traits_2(Args ... args) : - Base(args...) - { - enable_all_traces(); - } + Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) + { enable_all_traces(); } /*! Disable copy constructor. */ @@ -198,25 +198,25 @@ public: //@{ // Traits types: - typedef typename Base::Has_left_category Has_left_category; - typedef typename Base::Has_merge_category Has_merge_category; - typedef typename Base::Has_do_intersect_category Has_do_intersect_category; + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Base >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Base >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Base >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Base >::Category - Right_side_category; + using Left_side_category = + typename internal::Arr_complete_left_side_category< Base >::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category< Base >::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category< Base >::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category< Base >::Category; - typedef typename Base::Point_2 Point_2; - typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; - typedef typename Base::Curve_2 Curve_2; - typedef typename Base::Multiplicity Multiplicity; + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; + using Multiplicity = typename Base::Multiplicity; - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_x_2 { private: typename Base::Compare_x_2 m_object; @@ -224,17 +224,16 @@ public: public: /*! Construct */ - Compare_x_2(const Base* base, bool enabled = true) : - m_object(base->compare_x_2_object()), m_enabled(enabled) {} + Compare_x_2(const Base& base, bool enabled = true) : + m_object(base.compare_x_2_object()), m_enabled(enabled) {} /*! Operate * \param p1 first point * \param p2 second point * \return the comparison result */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_x" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -252,17 +251,16 @@ public: public: /*! Construct */ - Compare_xy_2(const Base* base, bool enabled = true) : - m_object(base->compare_xy_2_object()), m_enabled(enabled) {} + Compare_xy_2(const Base& base, bool enabled = true) : + m_object(base.compare_xy_2_object()), m_enabled(enabled) {} /*! Operate * \param p1 the first point * \param p2 the second point * \return the comparison result */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_xy" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -272,7 +270,7 @@ public: } }; - /*! A functor that obtains the left endpoint of an x-monotone curve. */ + /*! A functor that obtains the left endpoint of an \f$x\f$-monotone curve. */ class Construct_min_vertex_2 { private: typename Base::Construct_min_vertex_2 m_object; @@ -280,16 +278,15 @@ public: public: /*! Construct */ - Construct_min_vertex_2(const Base* base, bool enabled = true) : - m_object(base->construct_min_vertex_2_object()), m_enabled(enabled) {} + Construct_min_vertex_2(const Base& base, bool enabled = true) : + m_object(base.construct_min_vertex_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv the curve the left endpoint of which is obtained * \return the left endpoint */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + const Point_2 operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "construct_min_vertex" << std::endl << " xcv: " << xcv << std::endl; Point_2 p = m_object(xcv); @@ -298,7 +295,7 @@ public: } }; - /*! A functor that obtains the right endpoint of an x-monotone curve. */ + /*! A functor that obtains the right endpoint of an \f$x\f$-monotone curve. */ class Construct_max_vertex_2 { private: typename Base::Construct_max_vertex_2 m_object; @@ -306,16 +303,15 @@ public: public: /*! Construct */ - Construct_max_vertex_2(const Base* base, bool enabled = true) : - m_object(base->construct_max_vertex_2_object()), m_enabled(enabled) {} + Construct_max_vertex_2(const Base& base, bool enabled = true) : + m_object(base.construct_max_vertex_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv the curve the right endpoint of which is obtained * \return the right endpoint */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + const Point_2 operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "construct_max_vertex" << std::endl << " xcv: " << xcv << std::endl; Point_2 p = m_object(xcv); @@ -324,7 +320,7 @@ public: } }; - /*! A functor that checks whether a given x-monotone curve is vertical. */ + /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. */ class Is_vertical_2 { private: typename Base::Is_vertical_2 m_object; @@ -332,16 +328,15 @@ public: public: /*! Construct */ - Is_vertical_2(const Base* base, bool enabled = true) : - m_object(base->is_vertical_2_object()), m_enabled(enabled) {} + Is_vertical_2(const Base& base, bool enabled = true) : + m_object(base.is_vertical_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv the curve * \return a Boolean that indicates whether the curve is vertical or not */ - bool operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + bool operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "is_vertical" << std::endl << " xcv: " << xcv << std::endl; bool is_vertical = m_object(xcv); @@ -351,7 +346,7 @@ public: }; /*! A functor that compares the y-coordinates of a point and an - * x-monotone curve at the point x-coordinate. + * \f$x\f$-monotone curve at the point \f$x\f$-coordinate. */ class Compare_y_at_x_2 { private: @@ -360,8 +355,8 @@ public: public: /*! Construct */ - Compare_y_at_x_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_at_x_2_object()), m_enabled(enabled) {} + Compare_y_at_x_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_at_x_2_object()), m_enabled(enabled) {} /*! Operate * \param p the point @@ -369,9 +364,8 @@ public: * \return the comparison result */ Comparison_result operator()(const Point_2& p, - const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(p, xcv); + const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(p, xcv); std::cout << "compare_y_at_x" << std::endl << " p: " << p << std::endl << " xcv: " << xcv << std::endl; @@ -381,7 +375,7 @@ public: } }; - /*! A functor that checks whether two points and two x-monotone curves are + /*! A functor that checks whether two points and two \f$x\f$-monotone curves are * identical. */ class Equal_2 { @@ -392,9 +386,9 @@ public: public: /*! Construct */ - Equal_2(const Base* base, + Equal_2(const Base& base, bool enabled_point = true, bool enabled_curve = true) : - m_object(base->equal_2_object()), + m_object(base.equal_2_object()), m_enabled_point(enabled_point), m_enabled_curve(enabled_curve) {} @@ -402,12 +396,11 @@ public: /*! Operate * \param xcv1 the first curve * \param xcv2 the second curve - * \return true if the x-monotone curves are equal and false otherwise + * \return true if the \f$x\f$-monotone curves are equal and false otherwise */ bool operator()(const X_monotone_curve_2& xcv1, - const X_monotone_curve_2& xcv2) const - { - if (!m_enabled_curve) return m_object(xcv1, xcv2); + const X_monotone_curve_2& xcv2) const { + if (! m_enabled_curve) return m_object(xcv1, xcv2); std::cout << "equal 1" << std::endl << " xcv1: " << xcv1 << std::endl << " xcv1: " << xcv1 << std::endl; @@ -421,9 +414,8 @@ public: * \param p2 the second point * \return true if the points are equal and false otherwise */ - bool operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled_point) return m_object(p1, p2); + bool operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled_point) return m_object(p1, p2); std::cout << "equal 2" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -433,7 +425,7 @@ public: } }; - /*! A functor that compares compares the y-coordinates of two x-monotone + /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone * curves immediately to the left of their intersection point. */ class Compare_y_at_x_left_2 { @@ -443,8 +435,8 @@ public: public: /*! Construct */ - Compare_y_at_x_left_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_at_x_left_2_object()), m_enabled(enabled) {} + Compare_y_at_x_left_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_at_x_left_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv1 the first curve @@ -454,9 +446,8 @@ public: */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - const Point_2& p) const - { - if (!m_enabled) return m_object(xcv1, xcv2, p); + const Point_2& p) const { + if (! m_enabled) return m_object(xcv1, xcv2, p); std::cout << "compare_y_at_x_left" << std::endl << " p: " << p << std::endl << " xcv1: " << xcv1 << std::endl @@ -467,7 +458,7 @@ public: } }; - /*! A functor that compares compares the y-coordinates of two x-monotone + /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone * curves immediately to the right of their intersection point. */ class Compare_y_at_x_right_2 { @@ -477,8 +468,8 @@ public: public: /*! Construct */ - Compare_y_at_x_right_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_at_x_right_2_object()), m_enabled(enabled) {} + Compare_y_at_x_right_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_at_x_right_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv1 the first curve @@ -488,9 +479,8 @@ public: */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - const Point_2& p) const - { - if (!m_enabled) return m_object(xcv1, xcv2, p); + const Point_2& p) const { + if (! m_enabled) return m_object(xcv1, xcv2, p); std::cout << "compare_y_at_x_right" << std::endl << " p: " << p << std::endl << " xcv1: " << xcv1 << std::endl @@ -505,7 +495,7 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing curves into x-monotone curves. + * A functor for subdividing curves into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { private: @@ -514,10 +504,10 @@ public: public: /*! Construct */ - Make_x_monotone_2(const Base* base, bool enabled = true) : - m_object(base->make_x_monotone_2_object()), m_enabled(enabled) {} + Make_x_monotone_2(const Base& base, bool enabled = true) : + m_object(base.make_x_monotone_2_object()), m_enabled(enabled) {} - /*! Subdivide a given curve into x-monotone subcurves and insert them into + /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them into * a given output iterator. * \param cv the curve. * \param oi an output iterator for the result. Its value type is a variant @@ -525,20 +515,18 @@ public: * \return the output iterator. */ template - OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const - { + OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const { if (! m_enabled) return m_object(cv, oi); std::cout << "make_x_monotone" << std::endl << " cv: " << cv << std::endl; - typedef std::variant - Make_x_monotone_result; + using Make_x_monotone_result = std::variant; std::list container; m_object(cv, std::back_inserter(container)); if (container.empty()) return oi; - size_t i = 0; + std::size_t i = 0; for (auto it = container.begin(); it != container.end(); ++it) { if (const auto* xcv = std::get_if(&*it)) { std::cout << " result[" << i++ << "]: xcv: " << *xcv << std::endl; @@ -559,7 +547,7 @@ public: } }; - /*! A functor that splits an x-monotone curve at a point. */ + /*! A functor that splits an \f$x\f$-monotone curve at a point. */ class Split_2 { private: typename Base::Split_2 m_object; @@ -567,8 +555,8 @@ public: public: /*! Construct */ - Split_2(const Base* base, bool enabled = true) : - m_object(base->split_2_object()), m_enabled(enabled) {} + Split_2(const Base& base, bool enabled = true) : + m_object(base.split_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv @@ -577,9 +565,8 @@ public: * \param xcv2 */ void operator()(const X_monotone_curve_2& xcv, const Point_2& p, - X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const - { - if (!m_enabled) { + X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const { + if (! m_enabled) { m_object(xcv, p, xcv1, xcv2); return; } @@ -592,7 +579,7 @@ public: } }; - /*! A functor that computes intersections between two x-monotone curves. */ + /*! A functor that computes intersections between two \f$x\f$-monotone curves. */ class Intersect_2 { private: typename Base::Intersect_2 m_object; @@ -600,26 +587,25 @@ public: public: /*! Construct */ - Intersect_2(const Base* base, bool enabled = true) : - m_object(base->intersect_2_object()), m_enabled(enabled) {} + Intersect_2(const Base& base, bool enabled = true) : + m_object(base.intersect_2_object()), m_enabled(enabled) {} /*! Compute the intersections of the two given curves and insert them into * a given output iterator. * \param xcv1 the first curve * \param xcv2 the ssecond curve * \param oi the output iterator for the result. It value type is a variant - * that wraps an x-monotone overlapping curve or a pair that + * that wraps an \f$x\f$-monotone overlapping curve or a pair that * consists of the intersection point and its multiplicity * \return the past-the-end output iterator. */ template OutputIterator operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - OutputIterator oi) const - { - typedef std::pair Intersection_point; - typedef std::variant - Intersection_result; + OutputIterator oi) const { + using Intersection_point = std::pair; + using Intersection_result = + std::variant; if (! m_enabled) return m_object(xcv1, xcv2, oi); @@ -630,7 +616,7 @@ public: m_object(xcv1, xcv2, std::back_inserter(container)); if (container.empty()) return oi; - unsigned int i = 0; + std::size_t i = 0; for (const auto& item : container) { const X_monotone_curve_2* xcv = std::get_if(&item); if (xcv != nullptr) { @@ -652,7 +638,7 @@ public: } }; - /*! A functor that tests whether two x-monotone curves can be merged. */ + /*! A functor that tests whether two \f$x\f$-monotone curves can be merged. */ class Are_mergeable_2 { private: const Base& m_base_traits; @@ -701,7 +687,7 @@ public: } }; - /*! A functor that merges two x-monotone curves into one. */ + /*! A functor that merges two \f$x\f$-monotone curves into one. */ class Merge_2 { private: typename Base::Merge_2 m_object; @@ -709,8 +695,8 @@ public: public: /*! Construct */ - Merge_2(const Base* base, bool enabled = true) : - m_object(base->merge_2_object()), m_enabled(enabled) {} + Merge_2(const Base& base, bool enabled = true) : + m_object(base.merge_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv1 the first curve @@ -719,8 +705,7 @@ public: */ void operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - X_monotone_curve_2& xcv) const - { + X_monotone_curve_2& xcv) const { std::cout << "merge" << std::endl << " xcv1: " << xcv1 << std::endl << " xcv2: " << xcv2 << std::endl; @@ -729,7 +714,7 @@ public: } }; - /*! A fnuctor that constructs an opposite x-monotone curve. */ + /*! A fnuctor that constructs an opposite \f$x\f$-monotone curve. */ class Construct_opposite_2 { private: typename Base::Construct_opposite_2 m_object; @@ -737,16 +722,15 @@ public: public: /*! Construct */ - Construct_opposite_2(const Base* base, bool enabled = true) : - m_object(base->construct_opposite_2_object()), m_enabled(enabled) {} + Construct_opposite_2(const Base& base, bool enabled = true) : + m_object(base.construct_opposite_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv the curve * \return the opposite curve */ - X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) - { - if (!m_enabled) return m_object(xcv); + X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "construct_opposite" << std::endl << " xcv: " << xcv << std::endl; X_monotone_curve_2 xcv_out = m_object(xcv); @@ -755,7 +739,7 @@ public: } }; - /*! A functor that compares the two endpoints of an x-monotone curve + /*! A functor that compares the two endpoints of an \f$x\f$-monotone curve * lexigoraphically. */ class Compare_endpoints_xy_2 { @@ -765,16 +749,15 @@ public: public: /*! Construct */ - Compare_endpoints_xy_2(const Base* base, bool enabled = true) : - m_object(base->compare_endpoints_xy_2_object()), m_enabled(enabled) {} + Compare_endpoints_xy_2(const Base& base, bool enabled = true) : + m_object(base.compare_endpoints_xy_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv the curve * \return the comparison result */ - Comparison_result operator()(const X_monotone_curve_2& xcv) - { - if (!m_enabled) return m_object(xcv); + Comparison_result operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "compare_endpoints_xy" << std::endl << " xcv: " << xcv << std::endl; Comparison_result cr = m_object(xcv); @@ -783,9 +766,66 @@ public: } }; + /*! A functor that approximates coordinates, points, and \f$x\f$-monotone curves. + */ + class Approximate_2 { + private: + using Approximate_number_type = typename Base::Approximate_number_type; + using Approximate_point_2 = typename Base::Approximate_point_2; + + typename Base::Approximate_2 m_object; + bool m_enabled; + + public: + /*! Construct */ + Approximate_2(const Base& base, bool enabled = true) : + m_object(base.approximate_2_object()), m_enabled(enabled) + {} + + /*! Obtain an approximation of a point coordinate. + * \param p the exact point. + * \param i the coordinate index (either 0 or 1). + * \pre i is either 0 or 1. + * \return An approximation of p's \f$x\f$-coordinate (if i == 0), or an + * approximation of p's y-coordinate (if i == 1). + */ + Approximate_number_type operator()(const Point_2& p, std::size_t i) const { + if (! m_enabled) return m_object(p, i); + std::cout << "approximate_2" << std::endl + << " p: " << p << ", i: " << i << std::endl; + auto res = m_object(p, i); + std::cout << " result: " << res << std::endl; + return res; + } + + /*! Obtain an approximation of a point. + */ + Approximate_point_2 operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); + std::cout << "approximate_2" << std::endl + << " p: " << p << std::endl; + auto res = m_object(p); + std::cout << " result: " << res << std::endl; + return res; + } + + /*! Obtain an approximation of an \f$x\f$-monotone curve. + */ + template + OutputIterator operator()(const X_monotone_curve_2& xcv, double error, + OutputIterator oi, bool l2r = true) const { + if (! m_enabled) return m_object(xcv, error, oi, l2r); + std::cout << "approximate_2" << std::endl + << " xcv: " << xcv << ", error: " << error << ", l2r: " << l2r << std::endl; + auto res = m_object(xcv, error, oi, l2r); + std::cout << " result: " << res << std::endl; + return res; + } + }; + // left-right - /*! A functor that determines whether an endpoint of an x-monotone curve lies + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve lies * on a boundary of the parameter space along the x axis. */ class Parameter_space_in_x_2 { @@ -795,8 +835,8 @@ public: public: /*! Construct */ - Parameter_space_in_x_2(const Base* base, bool enabled = true) : - m_object(base->parameter_space_in_x_2_object()), m_enabled(enabled) + Parameter_space_in_x_2(const Base& base, bool enabled = true) : + m_object(base.parameter_space_in_x_2_object()), m_enabled(enabled) {} /*! Operate @@ -805,26 +845,24 @@ public: * \return the boundary type */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv, ce); std::cout << "parameter_space_in_x" << std::endl - << " ce: " << ce << ", xcv: " << xcv << std::endl; + << " xcv: " << xcv << ", ce: " << ce << std::endl; Arr_parameter_space bt = m_object(xcv, ce); std::cout << " result: " << bt << std::endl; return bt; } - /*! A functor that obtains the parameter space at a point along the x-axis. + /*! A functor that obtains the parameter space at a point along the \f$x\f$-axis. * Every non-interior point is assumed to lie on the left-right * identification. * Points at the poles additionally lie on the bottom or top boundary. * \param p the point. * \return the parameter space at p. */ - Arr_parameter_space operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + Arr_parameter_space operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "parameter_space_in_x" << std::endl << " p: " << p << std::endl; Arr_parameter_space bt = m_object(p); @@ -834,7 +872,7 @@ public: }; /*! A functor that determines whether a point or curve is on - * x-identification. + * \f$x\f$-identification. */ class Is_on_x_identification_2 { private: @@ -843,14 +881,13 @@ public: public: /*! Construct */ - Is_on_x_identification_2(const Base* base, bool enabled = true) : - m_object(base->is_on_x_identification_2_object()), m_enabled(enabled) {} + Is_on_x_identification_2(const Base& base, bool enabled = true) : + m_object(base.is_on_x_identification_2_object()), m_enabled(enabled) {} /*! Operate * \param p1 the point. */ - bool operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + bool operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "is_on_x_identification" << std::endl << " p: " << p << std::endl; bool cr = m_object(p); @@ -861,9 +898,8 @@ public: /*! Operate * \param xcv1 the curve */ - bool operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + bool operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "is_on_x_identification" << std::endl << " xcv: " << xcv << std::endl; bool cr = m_object(xcv); @@ -882,8 +918,8 @@ public: public: /*! Construct */ - Compare_y_on_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_on_boundary_2_object()), + Compare_y_on_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_on_boundary_2_object()), m_enabled(enabled) {} @@ -891,9 +927,8 @@ public: * \param p1 the first point. * \param p2 the second point. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_y_on_boundary" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -913,8 +948,8 @@ public: public: /*! Construct */ - Compare_y_near_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_y_near_boundary_2_object()), m_enabled(enabled) {} + Compare_y_near_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_y_near_boundary_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv1 the first curve the end point of which is tested @@ -924,9 +959,8 @@ public: */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv1, xcv2, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv1, xcv2, ce); std::cout << "compare_y_near_boundary" << std::endl << " ce: " << ce << std::endl << " xcv1: " << xcv1 << std::endl @@ -939,7 +973,7 @@ public: // bottom-top - /*! A functor that determines whether an endpoint of an x-monotone arc lies + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc lies * on a boundary of the parameter space along the y axis. */ class Parameter_space_in_y_2 { @@ -949,8 +983,8 @@ public: public: /*! Construct */ - Parameter_space_in_y_2(const Base* base, bool enabled = true) : - m_object(base->parameter_space_in_y_2_object()), m_enabled(enabled) {} + Parameter_space_in_y_2(const Base& base, bool enabled = true) : + m_object(base.parameter_space_in_y_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv the curve the end of which is tested @@ -958,9 +992,8 @@ public: * \return the boundary type */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv, ce); std::cout << "parameter_space_in_y" << std::endl << " ce: " << ce << ", xcv: " << xcv << std::endl; Arr_parameter_space bt = m_object(xcv, ce); @@ -972,9 +1005,8 @@ public: * \param p the point * \return the boundary type */ - Arr_parameter_space operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + Arr_parameter_space operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "parameter_space_in_y" << std::endl << " point: " << p << std::endl; Arr_parameter_space bt = m_object(p); @@ -993,14 +1025,13 @@ public: public: /*! Construct */ - Is_on_y_identification_2(const Base* base, bool enabled = true) : - m_object(base->is_on_y_identification_2_object()), m_enabled(enabled) {} + Is_on_y_identification_2(const Base& base, bool enabled = true) : + m_object(base.is_on_y_identification_2_object()), m_enabled(enabled) {} /*! Operate * \param p1 the point. */ - bool operator()(const Point_2& p) const - { - if (!m_enabled) return m_object(p); + bool operator()(const Point_2& p) const { + if (! m_enabled) return m_object(p); std::cout << "is_on_y_identification" << std::endl << " p: " << p << std::endl; bool cr = m_object(p); @@ -1011,9 +1042,8 @@ public: /*! Operate * \param xcv1 the curve */ - bool operator()(const X_monotone_curve_2& xcv) const - { - if (!m_enabled) return m_object(xcv); + bool operator()(const X_monotone_curve_2& xcv) const { + if (! m_enabled) return m_object(xcv); std::cout << "is_on_y_identification" << std::endl << " xcv: " << xcv << std::endl; bool cr = m_object(xcv); @@ -1022,7 +1052,7 @@ public: } }; - /*! A functor that compares the x-coordinate of two given points + /*! A functor that compares the \f$x\f$-coordinate of two given points * that lie on horizontal boundaries. */ class Compare_x_on_boundary_2 { @@ -1032,15 +1062,14 @@ public: public: /*! Construct */ - Compare_x_on_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_x_on_boundary_2_object()), m_enabled(enabled) {} + Compare_x_on_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_x_on_boundary_2_object()), m_enabled(enabled) {} /*! Operate * \param p1 the first point. * \param p2 the second point. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - if (!m_enabled) return m_object(p1, p2); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + if (! m_enabled) return m_object(p1, p2); std::cout << "compare_x_on_boundary" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; @@ -1056,9 +1085,8 @@ public: */ Comparison_result operator()(const Point_2& pt, const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(pt, xcv, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(pt, xcv, ce); std::cout << "compare_x_on_boundary" << std::endl << " pt: " << pt << std::endl << " xcv: " << xcv << std::endl @@ -1077,9 +1105,8 @@ public: Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce2) const - { - if (!m_enabled) return m_object(xcv2, ce1, xcv2, ce2); + Arr_curve_end ce2) const { + if (! m_enabled) return m_object(xcv2, ce1, xcv2, ce2); std::cout << "compare_x_on_boundary" << std::endl << "xcv1: " << xcv1 << std::endl << " ce1: " << ce1 << std::endl @@ -1091,7 +1118,7 @@ public: } }; - /*! A functor that compares the x-coordinates of curve ends near the + /*! A functor that compares the \f$x\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_x_near_boundary_2 { @@ -1101,8 +1128,8 @@ public: public: /*! Construct */ - Compare_x_near_boundary_2(const Base* base, bool enabled = true) : - m_object(base->compare_x_near_boundary_2_object()), m_enabled(enabled) {} + Compare_x_near_boundary_2(const Base& base, bool enabled = true) : + m_object(base.compare_x_near_boundary_2_object()), m_enabled(enabled) {} /*! Operate * \param xcv1 the first curve the end of which is to be compared @@ -1113,9 +1140,8 @@ public: */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(xcv1, xcv2, ce); + Arr_curve_end ce) const { + if (! m_enabled) return m_object(xcv1, xcv2, ce); std::cout << "compare_x_near_boundary 2" << std::endl << " xcv1: " << xcv1 << std::endl << " xcv2: " << xcv2 << std::endl @@ -1132,87 +1158,89 @@ public: //@{ Compare_x_2 compare_x_2_object() const - { return Compare_x_2(this, compare_x_op()); } + { return Compare_x_2(*this, compare_x_op()); } Compare_xy_2 compare_xy_2_object() const - { return Compare_xy_2(this, compare_xy_op()); } + { return Compare_xy_2(*this, compare_xy_op()); } Construct_min_vertex_2 construct_min_vertex_2_object() const - { return Construct_min_vertex_2(this, construct_min_vertex_op()); } + { return Construct_min_vertex_2(*this, construct_min_vertex_op()); } Construct_max_vertex_2 construct_max_vertex_2_object() const - { return Construct_max_vertex_2(this, construct_max_vertex_op()); } + { return Construct_max_vertex_2(*this, construct_max_vertex_op()); } Is_vertical_2 is_vertical_2_object() const - { return Is_vertical_2(this, is_vertical_op()); } + { return Is_vertical_2(*this, is_vertical_op()); } Compare_y_at_x_2 compare_y_at_x_2_object() const - { return Compare_y_at_x_2(this, compare_y_at_x_op()); } + { return Compare_y_at_x_2(*this, compare_y_at_x_op()); } Equal_2 equal_2_object() const - { return Equal_2(this, equal_points_op(), equal_curves_op()); } + { return Equal_2(*this, equal_points_op(), equal_curves_op()); } Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const - { return Compare_y_at_x_left_2(this, compare_y_at_x_left_op()); } + { return Compare_y_at_x_left_2(*this, compare_y_at_x_left_op()); } Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { return Compare_y_at_x_right_2(this, compare_y_at_x_right_op()); } + { return Compare_y_at_x_right_2(*this, compare_y_at_x_right_op()); } Make_x_monotone_2 make_x_monotone_2_object() const - { return Make_x_monotone_2(this, make_x_monotone_op()); } + { return Make_x_monotone_2(*this, make_x_monotone_op()); } Split_2 split_2_object() const - { return Split_2(this, split_op()); } + { return Split_2(*this, split_op()); } Intersect_2 intersect_2_object() const - { return Intersect_2(this, intersect_op()); } + { return Intersect_2(*this, intersect_op()); } Are_mergeable_2 are_mergeable_2_object() const - { return Are_mergeable_2(this, are_mergeable_op()); } + { return Are_mergeable_2(*this, are_mergeable_op()); } Merge_2 merge_2_object() const - { return Merge_2(this, merge_op()); } + { return Merge_2(*this, merge_op()); } Construct_opposite_2 construct_opposite_2_object() const - { return Construct_opposite_2(this, construct_opposite_op()); } + { return Construct_opposite_2(*this, construct_opposite_op()); } Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const - { return Compare_endpoints_xy_2(this, compare_endpoints_xy_op()); } + { return Compare_endpoints_xy_2(*this, compare_endpoints_xy_op()); } + + Approximate_2 approximate_2_object() const + { return Approximate_2(*this, approximate_op()); } // left-right Parameter_space_in_x_2 parameter_space_in_x_2_object() const - { return Parameter_space_in_x_2(this, parameter_space_in_x_op()); } + { return Parameter_space_in_x_2(*this, parameter_space_in_x_op()); } Is_on_x_identification_2 is_on_x_identification_2_object() const - { return Is_on_x_identification_2(this, is_on_x_identification_op()); } + { return Is_on_x_identification_2(*this, is_on_x_identification_op()); } Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const - { return Compare_y_on_boundary_2(this, compare_y_on_boundary_op()); } + { return Compare_y_on_boundary_2(*this, compare_y_on_boundary_op()); } Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const - { return Compare_y_near_boundary_2(this, compare_y_near_boundary_op()); } + { return Compare_y_near_boundary_2(*this, compare_y_near_boundary_op()); } // bottom-top Parameter_space_in_y_2 parameter_space_in_y_2_object() const - { return Parameter_space_in_y_2(this, parameter_space_in_y_op()); } + { return Parameter_space_in_y_2(*this, parameter_space_in_y_op()); } Is_on_y_identification_2 is_on_y_identification_2_object() const - { return Is_on_y_identification_2(this, is_on_y_identification_op()); } + { return Is_on_y_identification_2(*this, is_on_y_identification_op()); } Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const - { return Compare_x_on_boundary_2(this, compare_x_on_boundary_op()); } + { return Compare_x_on_boundary_2(*this, compare_x_on_boundary_op()); } Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const - { return Compare_x_near_boundary_2(this, compare_x_near_boundary_op()); } + { return Compare_x_near_boundary_2(*this, compare_x_near_boundary_op()); } //@} }; template -OutputStream& operator<<(OutputStream& os, Comparison_result cr) -{ +OutputStream& operator<<(OutputStream& os, Comparison_result cr) { os << ((cr == SMALLER) ? "SMALLER" : (cr == EQUAL) ? "EQUAL" : "LARGER"); return os; } From e36db6e4de5ee2d5cf10f172ee8e5c4907c80e0a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sun, 25 Aug 2024 13:11:33 +0300 Subject: [PATCH 02/34] 1st revision --- .../count_and_trace.cpp | 80 ++++++ .../include/CGAL/Arr_has.h | 252 ++++++++++++++++++ 2 files changed, 332 insertions(+) create mode 100644 Arrangement_on_surface_2/examples/Arrangement_on_surface_2/count_and_trace.cpp create mode 100644 Arrangement_on_surface_2/include/CGAL/Arr_has.h diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/count_and_trace.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/count_and_trace.cpp new file mode 100644 index 00000000000..3d95cacd096 --- /dev/null +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/count_and_trace.cpp @@ -0,0 +1,80 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "arr_print.h" + +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; + +using Segment_base_traits = CGAL::Arr_segment_traits_2; +using Segment_cnt_traits = CGAL::Arr_counting_traits_2; +using Segment_traits = CGAL::Arr_tracing_traits_2; +using Segment_arrangement = CGAL::Arrangement_2; +using Point = Segment_traits::Point_2; +using Segment = Segment_traits::Curve_2; + +using Geodesic_base_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2; +using Geodesic_cnt_traits = CGAL::Arr_counting_traits_2; +using Geodesic_traits = CGAL::Arr_tracing_traits_2; +using Topol_traits = CGAL::Arr_spherical_topology_traits_2; +using Geodesic_arrangement = + CGAL::Arrangement_on_surface_2; +using Geodesic_point = Geodesic_traits::Point_2; +using Geodesic_curve = Geodesic_traits::Curve_2; + +using Nt_traits = CGAL::CORE_algebraic_number_traits; +using NT = Nt_traits::Rational; +using Rational = Nt_traits::Rational; +using Algebraic = Nt_traits::Algebraic; +using Rat_kernel = CGAL::Cartesian; +using Alg_kernel = CGAL::Cartesian; +using Rat_point = Rat_kernel::Point_2; +using Bezier_base_traits = + CGAL::Arr_Bezier_curve_traits_2; +using Bezier_cnt_traits = CGAL::Arr_counting_traits_2; +using Bezier_traits = CGAL::Arr_tracing_traits_2; +using Bezier_arrangement = CGAL::Arrangement_2; + +int main() { + Segment_traits seg_traits; + seg_traits.disable_all_traces(); + seg_traits.enable_trace(Segment_traits::COMPARE_Y_AT_X_2_OP); + Segment_arrangement seg_arr(&seg_traits); + std::vector ps = { Point(0,0), Point(1,0), Point(0,1) }; + std::vector segs = + { Segment(ps[0], ps[1]), Segment(ps[1], ps[2]), Segment(ps[2], ps[0]) }; + CGAL::insert(seg_arr, segs.begin(), segs.end()); + std::cout << seg_traits; + print_arrangement_size(seg_arr); + std::cout << std::endl; + + Geodesic_traits geodesic_traits; + geodesic_traits.disable_all_traces(); + geodesic_traits.enable_trace(Geodesic_traits::COMPARE_XY_2_OP); + auto ctr_p = geodesic_traits.construct_point_2_object(); + auto ctr_cv = geodesic_traits.construct_curve_2_object(); + std::vector gps = + { ctr_p(-1,0,0), ctr_p(0,-1,0), ctr_p(0,0,-1) }; + std::vector gas = + { ctr_cv(gps[0], gps[1]), ctr_cv(gps[1], gps[2]), ctr_cv(gps[2], gps[0]) }; + Geodesic_arrangement geodesic_arr(&geodesic_traits); + CGAL::insert(geodesic_arr, gas.begin(), gas.end()); + std::cout << geodesic_traits; + print_arrangement_size(geodesic_arr); + + Bezier_traits bezier_traits; + bezier_traits.disable_all_traces(); + std::cout << bezier_traits; + + return 0; +} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_has.h b/Arrangement_on_surface_2/include/CGAL/Arr_has.h new file mode 100644 index 00000000000..bba7bbf7862 --- /dev/null +++ b/Arrangement_on_surface_2/include/CGAL/Arr_has.h @@ -0,0 +1,252 @@ +// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s): Efi Fogel +// Eric Berberich + +#ifndef CGAL_ARR_HAS_H +#define CGAL_ARR_HAS_H + +#include + +#include + +namespace CGAL { + +// Compare_x_2 +// Helper trait to check for the presence of nested Compare_x_2 +template > +struct has_compare_x_2 : std::false_type {}; + +// Specialization if the nested type Compare_x_2 exists +template +struct has_compare_x_2> : std::true_type {}; + +// Compare_xy_2 +// Helper trait to check for the presence of nested Compare_xy_2 +template > +struct has_compare_xy_2 : std::false_type {}; + +// Specialization if the nested type Compare_xy_2 exists +template +struct has_compare_xy_2> : std::true_type {}; + +// Construct_min_vertex_2 +// Helper trait to check for the presence of nested Construct_min_vertex_2 +template > +struct has_construct_min_vertex_2 : std::false_type {}; + +// Specialization if the nested type Construct_min_vertex_2 exists +template +struct has_construct_min_vertex_2> : std::true_type {}; + +// Construct_max_vertex_2 +// Helper trait to check for the presence of nested Construct_max_vertex_2 +template > +struct has_construct_max_vertex_2 : std::false_type {}; + +// Specialization if the nested type Construct_max_vertex_2 exists +template +struct has_construct_max_vertex_2> : std::true_type {}; + +// Is_vertical_2 +// Helper trait to check for the presence of nested Is_vertical_2 +template > +struct has_is_vertical_2 : std::false_type {}; + +// Specialization if the nested type Is_vertical_2 exists +template +struct has_is_vertical_2> : std::true_type {}; + +// Compare_y_at_x_2 +// Helper trait to check for the presence of nested Compare_y_at_x_2 +template > +struct has_compare_y_at_x_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_at_x_2 exists +template +struct has_compare_y_at_x_2> : std::true_type {}; + +// Equal +// Helper trait to check for the presence of nested Equal +template > +struct has_equal_2 : std::false_type {}; + +// Specialization if the nested type Equal exists +template +struct has_equal_2> : std::true_type {}; + +// Compare_y_at_x_left_2 +// Helper trait to check for the presence of nested Compare_y_at_x_left_2 +template > +struct has_compare_y_at_x_left_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_at_x_left_2 exists +template +struct has_compare_y_at_x_left_2> : std::true_type {}; + +// Compare_y_at_x_right_2 +// Helper trait to check for the presence of nested Compare_y_at_x_right_2 +template > +struct has_compare_y_at_x_right_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_at_x_right_2 exists +template +struct has_compare_y_at_x_right_2> : std::true_type {}; + +// Make_x_monotone_2 +// Helper trait to check for the presence of nested Make_x_monotone_2 +template > +struct has_make_x_monotone_2 : std::false_type {}; + +// Specialization if the nested type Make_x_monotone_2 exists +template +struct has_make_x_monotone_2> : std::true_type {}; + +// Split_2 +// Helper trait to check for the presence of nested Split_2 +template > +struct has_split_2 : std::false_type {}; + +// Specialization if the nested type Split_2 exists +template +struct has_split_2> : std::true_type {}; + +// Intersect_2 +// Helper trait to check for the presence of nested Intersect_2 +template > +struct has_intersect_2 : std::false_type {}; + +// Specialization if the nested type Intersect_2 exists +template +struct has_intersect_2> : std::true_type {}; + +// Are_mergeable_2 +// Helper trait to check for the presence of nested Are_mergeable_2 +template > +struct has_are_mergeable_2 : std::false_type {}; + +// Specialization if the nested type Are_mergeable_2 exists +template +struct has_are_mergeable_2> : std::true_type {}; + +// Merge_2 +// Helper trait to check for the presence of nested Merge_2 +template > +struct has_merge_2 : std::false_type {}; + +// Specialization if the nested type Merge_2 exists +template +struct has_merge_2> : std::true_type {}; + +// Construct_opposite_2 +// Helper trait to check for the presence of nested Construct_opposite_2 +template > +struct has_construct_opposite_2 : std::false_type {}; + +// Specialization if the nested type Construct_opposite_2 exists +template +struct has_construct_opposite_2> : std::true_type {}; + +// Compare_endpoints_xy_2 +// Helper trait to check for the presence of nested Compare_endpoints_xy_2 +template > +struct has_compare_endpoints_xy_2 : std::false_type {}; + +// Specialization if the nested type Compare_endpoints_xy_2 exists +template +struct has_compare_endpoints_xy_2> : std::true_type {}; + + + +// Approximate_2 +// Helper trait to check for the presence of nested Approximate_2 +template > +struct has_approximate_2 : std::false_type {}; + +// Specialization if the nested type Approximate_2 exists +template +struct has_approximate_2> : std::true_type {}; + + +// Parameter_space_in_x_2 +// Helper trait to check for the presence of nested Parameter_space_in_x_2 +template > +struct has_parameter_space_in_x_2 : std::false_type {}; + +// Specialization if the nested type Parameter_space_in_x_2 exists +template +struct has_parameter_space_in_x_2> : std::true_type {}; + +// Is_on_x_identification_2 +// Helper trait to check for the presence of nested Is_on_x_identification_2 +template > +struct has_is_on_x_identification_2 : std::false_type {}; + +// Specialization if the nested type Is_on_x_identification_2 exists +template +struct has_is_on_x_identification_2> : std::true_type {}; + +// Compare_y_on_boundary_2 +// Helper trait to check for the presence of nested Compare_y_on_boundary_2 +template > +struct has_compare_y_on_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_on_boundary_2 exists +template +struct has_compare_y_on_boundary_2> : std::true_type {}; + +// Compare_y_near_boundary_2 +// Helper trait to check for the presence of nested Compare_y_near_boundary_2 +template > +struct has_compare_y_near_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_y_near_boundary_2 exists +template +struct has_compare_y_near_boundary_2> : std::true_type {}; + +// Parameter_space_in_y_2 +// Helper trait to check for the presence of nested Parameter_space_in_y_2 +template > +struct has_parameter_space_in_y_2 : std::false_type {}; + +// Specialization if the nested type Parameter_space_in_y_2 exists +template +struct has_parameter_space_in_y_2> : std::true_type {}; + +// Is_on_y_identification_2 +// Helper trait to check for the presence of nested Is_on_y_identification_2 +template > +struct has_is_on_y_identification_2 : std::false_type {}; + +// Specialization if the nested type Is_on_y_identification_2 exists +template +struct has_is_on_y_identification_2> : std::true_type {}; + +// Compare_x_on_boundary_2 +// Helper trait to check for the presence of nested Compare_x_on_boundary_2 +template > +struct has_compare_x_on_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_x_on_boundary_2 exists +template +struct has_compare_x_on_boundary_2> : std::true_type {}; + +// Compare_x_near_boundary_2 +// Helper trait to check for the presence of nested Compare_x_near_boundary_2 +template > +struct has_compare_x_near_boundary_2 : std::false_type {}; + +// Specialization if the nested type Compare_x_near_boundary_2 exists +template +struct has_compare_x_near_boundary_2> : std::true_type {}; + +} + +#endif From 8b6fde416d98ba393754db546a4c3c4865bde2fd Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sun, 25 Aug 2024 16:45:24 +0300 Subject: [PATCH 03/34] 1st revision --- .../CGAL/Arr_counting_traits_2.h | 146 ++++++++++++++++++ .../CGAL/Arr_tracing_traits_2.h | 146 ++++++++++++++++++ 2 files changed, 292 insertions(+) create mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h create mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h new file mode 100644 index 00000000000..95afeefeaef --- /dev/null +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h @@ -0,0 +1,146 @@ +// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s): Efi Fogel +// Eric Berberich + +namespace CGAL { + +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * A meradata traits-class decorator for the arrangement package. It counts the + * number of invocations of traits-class functors. It is parameterized with + * another traits class and inherits from it. For each traits method it + * maintains a counter that counts the number of invocations into the method. + * + * It models all the concept that the original trais models. + */ + +template +class Arr_counting_traits_2 : public BaseTraits { +public: + enum Operation_id { + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_2_POINTS_OP, + EQUAL_2_CURVES_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_COORD_OP, + APPROXIMATE_2_POINT_OP, + APPROXIMATE_2_CURVE_OP, + PARAMETER_SPACE_IN_X_2_CURVE_END_OP, + PARAMETER_SPACE_IN_X_2_POINT_OP, + IS_ON_X_IDENTIFICATION_POINT_2_OP, + IS_ON_X_IDENTIFICATION_CURVE_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, + PARAMETER_SPACE_IN_Y_2_CURVE_END_OP, + PARAMETER_SPACE_IN_Y_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_POINT_OP, + IS_ON_Y_IDENTIFICATION_2_CURVE_OP, + COMPARE_X_ON_BOUNDARY_2_POINTS_OP, + COMPARE_X_ON_BOUNDARY_2_POINT_CURVE_END_OP, + COMPARE_X_ON_BOUNDARY_2_CURVE_ENDS_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, + NUMBER_OF_OPERATIONS + }; + + /// \name Creation + /// @{ + + /*! Construct default */ + template + Arr_counting_traits_2(Args ... args) : Base(std::forward(args)...) {} + + /*! Disable copy constructor. + */ + Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; + + /// @} + + /*! Obtain the counter of the given operation */ + std::size_t count(Operation_id id) const; + + /*! Print the compare_x counter */ + template + OutStream& print(OutStream& os, Operation_id id) const; + + /// \name Types and functors inherited from the base + /// @{ + + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; + + using Left_side_category = + typename internal::Arr_complete_left_side_category::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category::Category; + + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; + + /// @} + + /// \name Obtain the appropriate functor + /// @{ + + Compare_x_2 compare_x_2_object() const; + Compare_xy_2 compare_xy_2_object() const; + Construct_min_vertex_2 construct_min_vertex_2_object() const; + Construct_max_vertex_2 construct_max_vertex_2_object() const; + Is_vertical_2 is_vertical_2_object() const; + Compare_y_at_x_2 compare_y_at_x_2_object() const; + Equal_2 equal_2_object() const; + Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const; + Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const; + Make_x_monotone_2 make_x_monotone_2_object() const; + Split_2 split_2_object() const; + Intersect_2 intersect_2_object() const; + Are_mergeable_2 are_mergeable_2_object() const; + Merge_2 merge_2_object() const; + Construct_opposite_2 construct_opposite_2_object() const; + Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const; + Approximate_2 approximate_2_object() const; + Parameter_space_in_x_2 parameter_space_in_x_2_object() const; + Is_on_x_identification_2 is_on_x_identification_2_object() const; + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const; + Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const; + Parameter_space_in_y_2 parameter_space_in_y_2_object() const; + Is_on_y_identification_2 is_on_y_identification_2_object() const; + Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const; + Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const; + + /// @} + + /*! Clean all operation counters */ + void clear_counters(); +}; + +template +inline OutStream& operator<<(OutStream& os, + const Arr_counting_traits_2& traits); +} //namespace CGAL diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h new file mode 100644 index 00000000000..bf8f2e983a3 --- /dev/null +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h @@ -0,0 +1,146 @@ +// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s): Efi Fogel + +namespace CGAL { + +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * A meradata traits-class decorator for the arrangement package. It traces the + * invocations of traits-class functors. It is parameterized with another traits + * class and inherits from it. For each traits method it prints out its input + * parameters and its output result + * + * It models all the concept that the original trais models. + */ +template +class Arr_tracing_traits_2 : public BaseTraits { +public: + enum Operation_id { + COMPARE_X_2_OP = 0, + COMPARE_XY_2_OP, + CONSTRUCT_MIN_VERTEX_2_OP, + CONSTRUCT_MAX_VERTEX_2_OP, + IS_VERTICAL_2_OP, + COMPARE_Y_AT_X_2_OP, + EQUAL_POINTS_2_OP, + EQUAL_CURVES_2_OP, + COMPARE_Y_AT_X_LEFT_2_OP, + COMPARE_Y_AT_X_RIGHT_2_OP, + MAKE_X_MONOTONE_2_OP, + SPLIT_2_OP, + INTERSECT_2_OP, + ARE_MERGEABLE_2_OP, + MERGE_2_OP, + CONSTRUCT_2_OPPOSITE_2_OP, + COMPARE_ENDPOINTS_XY_2_OP, + APPROXIMATE_2_OP, + PARAMETER_SPACE_IN_X_2_OP, + IS_ON_X_IDENTIFICATION_2_OP, + COMPARE_Y_ON_BOUNDARY_2_OP, + COMPARE_Y_NEAR_BOUNDARY_2_OP, + PARAMETER_SPACE_IN_Y_2_OP, + IS_ON_Y_IDENTIFICATION_2_OP, + COMPARE_X_ON_BOUNDARY_2_OP, + COMPARE_X_NEAR_BOUNDARY_2_OP, + NUMBER_OF_OPERATIONS + }; + +public: + /// \name Creation + /// @{ + + /*! Construct default */ + template + Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) {} + + /*! Disable copy constructor. + */ + Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; + + /// @} + + /*! Enable the trace of a traits operation + * \param id the operation identifier + */ + void enable_trace(Operation_id id); + + /*! Enable the trace of all traits operations + */ + void enable_all_traces(); + + /*! Disable the trace of a traits operation + * \param id the operation identifier + */ + void disable_trace(Operation_id id); + + /*! Disable the trace of all traits operations + */ + void disable_all_traces(); + + /// \name Types and functors inherited from the base + /// @{ + + using Has_left_category = typename Base::Has_left_category; + using Has_merge_category = typename Base::Has_merge_category; + using Has_do_intersect_category = typename Base::Has_do_intersect_category; + + using Left_side_category = + typename internal::Arr_complete_left_side_category< Base >::Category; + using Bottom_side_category = + typename internal::Arr_complete_bottom_side_category< Base >::Category; + using Top_side_category = + typename internal::Arr_complete_top_side_category< Base >::Category; + using Right_side_category = + typename internal::Arr_complete_right_side_category< Base >::Category; + + using Point_2 = typename Base::Point_2; + using X_monotone_curve_2 = typename Base::X_monotone_curve_2; + using Curve_2 = typename Base::Curve_2; + using Multiplicity = typename Base::Multiplicity; + + /// @} + + /// \name Obtain the appropriate functor + /// @{ + + Compare_x_2 compare_x_2_object() const; + Compare_xy_2 compare_xy_2_object() const; + Construct_min_vertex_2 construct_min_vertex_2_object() const; + Construct_max_vertex_2 construct_max_vertex_2_object() const; + Is_vertical_2 is_vertical_2_object() const; + Compare_y_at_x_2 compare_y_at_x_2_object() const; + Equal_2 equal_2_object() const; + Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const; + Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const; + Make_x_monotone_2 make_x_monotone_2_object() const; + Split_2 split_2_object() const; + Intersect_2 intersect_2_object() const; + Are_mergeable_2 are_mergeable_2_object() const; + Merge_2 merge_2_object() const; + Construct_opposite_2 construct_opposite_2_object() const; + Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const; + Approximate_2 approximate_2_object() const; + Parameter_space_in_x_2 parameter_space_in_x_2_object() const; + Is_on_x_identification_2 is_on_x_identification_2_object() const; + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const; + Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const; + Parameter_space_in_y_2 parameter_space_in_y_2_object() const; + Is_on_y_identification_2 is_on_y_identification_2_object() const; + Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const; + Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const; + + /// @} +}; + +template +OutputStream& operator<<(OutputStream& os, Comparison_result cr); + +} //namespace CGAL From b80737e72aa86b056c0656051f342260526921fc Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sun, 25 Aug 2024 16:51:34 +0300 Subject: [PATCH 04/34] Added documentation for the metadata traits decorators Arr_tracing_traits_2 and Arr_counting_traits_2 --- .../Arrangement_on_surface_2.txt | 595 ++++++++++-------- .../PackageDescription.txt | 62 +- .../doc/Arrangement_on_surface_2/examples.txt | 1 + .../include/CGAL/Arr_counting_traits_2.h | 11 +- .../include/CGAL/Arr_tracing_traits_2.h | 14 +- 5 files changed, 362 insertions(+), 321 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 5b4b9ed9051..29b5fe371b4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -9,9 +9,9 @@ namespace CGAL { \authors Ron Wein, Eric Berberich, Efi Fogel, Dan Halperin, Michael Hemmer, Oren Salzman, and Baruch Zukerman - + \section aos_sec-intro Introduction - + Geometric arrangements, or arrangements for short, are subdivisions of some space induced by geometric objects. @@ -42,9 +42,9 @@ computational-geometry literature and have many applications; see, e.g., \cgalCite{as-aa-00}, \cgalCite{cgal:bfhks-apsca-10}, \cgalCite{cgal:bfhmw-apsgf-10}, and \cgalCite{cgal:h-a-04}. - + \subsection aos_ssec-intro-sep Separation of Topology and Geometry - + The use of the generic programming paradigm enables a convenient separation of the topology and the geometry of data @@ -123,9 +123,9 @@ themselves. The precise minimal sets of requirements the actual traits classes must conform to are organized as a hierarchy of concepts; see Section \ref aos_sec-geom_traits. - + \subsection aos_ssec-intro-well_behaved Well-Behaved Curves - + What constitutes valid curves that can be handled by the \ref PkgArrangementOnSurface2 package is discussed in detail in Section @@ -172,9 +172,9 @@ Remarks - + \subsection aos_ssec-intro-outline Outline - + In Section \ref aos_sec-basic we provide the minimum material you need to know in order to use \cgal 2D arrangements in the plane. In Section @@ -207,9 +207,9 @@ to apply the graph algorithms implemented in the Boost Graph Library to arrangement types. Finally, in Section \ref aos_sec-tips we provide some tips that can be applied to expedite computation. - + \section aos_sec-basic Basic Arrangements - + We start with a formal definition of two-dimensional arrangements, and proceed with an introduction to the data structure used to represent @@ -220,9 +220,9 @@ describe a central component in the \ref PkgArrangementOnSurface2 package, namely, the `Arrangement_2` class-template, which can be used to represent arrangements in the plane. - + \subsection aos_ssec-basic-dcel Representation of Arrangements: The Dcel - + Given a set \f$\mathcal{C}\f$ of curves embedded in a two-dimensional surface, the arrangement \f$\mathcal{A}(\mathcal{C})\f$ is @@ -346,7 +346,7 @@ theoretically, the former are degenerate holes. See \dcel features. For more details on the \dcel data structure see \cgalCite{bkos-cgaa-00} Chapter 2. - + \cgalFigureBegin{aos_fig-arr_segs,arr_segs.png} An arrangement of interior-disjoint line segments with some of the \dcel records that represent it. The unbounded face \f$ f_0\f$ has @@ -364,11 +364,11 @@ adjacent faces \f$ f_3\f$ and \f$ f_4\f$, while the other hole comprises of two edges. \f$ f_1\f$ also contains two isolated vertices \f$ u_1\f$ and \f$ u_2\f$ in its interior. \cgalFigureEnd - + - + \subsection aos_ssec-basic-arr_class The Arrangement Class Template - + One of the main components of the \ref PkgArrangementOnSurface2 package is the `Arrangement_2` class template. An @@ -502,9 +502,9 @@ int main() { } \endcode - + \subsection arr_ssectraverse Traversing the Arrangement - + The simplest and most fundamental arrangement operations are the various traversal methods, which allow users to systematically go over @@ -573,9 +573,9 @@ The call \link Arrangement_on_surface_2::non_const_handle() `non_const_handle()`\endlink can be issued only if the arrangement object `arr` is mutable; see, e.g., Section \ref arr_ssecpl. - + \subsubsection arr_sssectr_vertex Traversal Methods for an Arrangement Vertex - + A vertex \f$v\f$ of an arrangement induced by bounded curves is always associated with a geometric entity, namely with an \link @@ -625,9 +625,9 @@ If \f$v\f$ is an isolated vertex, the call \link Arrangement_on_surface_2::Vertex::face() `v->face()`\endlink can be used to obtain the face that contains \f$v\f$. - + \subsubsection arr_sssectr_halfedge Traversal Methods for an Arrangement Halfedge - + A halfedge \f$e\f$ of an arrangement induced by bounded curves is associated with an \link Arrangement_on_surface_2::X_monotone_curve_2 @@ -698,9 +698,9 @@ void print_ccb(typename Arrangement::Ccb_halfedge_const_circulator circ) { } \endcode - + \subsubsection arr_sssectr_face Traversal Methods for an Arrangement Face - + An `Arrangement_2` object `arr` that identifies an arrangement of bounded curves always has a single unbounded face. The call \link @@ -811,9 +811,9 @@ void print_arrangement (const Arrangement_2& arr) { } \endcode - + \subsection arr_ssecmodify Modifying the Arrangement - + In this section we review the various member functions of the `Arrangement_2` class that allow users to modify the topological @@ -834,9 +834,9 @@ terms of the specialized insertion functions, we start by describing the fundamental functionality of the arrangement class, and describe the operation of the free functions in Section \ref arr_secgl_funcs. - + \subsection arr_sssecmf_insert_cv Inserting Pairwise Disjoint x-Monotone Curves - + The most trivial functions that allow users to modify the arrangement are the specialized functions for the insertion of an \f$x\f$-monotone @@ -858,7 +858,7 @@ free functions that operate on the arrangement and the inserted curve(s); see Section \ref arr_secgl_funcs for more details and examples. - + \cgalFigureBegin{aos_fig-insert,insert.png} Illustrations of the various specialized insertion procedures. The inserted \f$x\f$-monotone curve is drawn as a dashed line, surrounded @@ -874,7 +874,7 @@ endpoints of which correspond to existing vertices \f$u_1\f$ and \f$f'\f$. The hole \f$h_1\f$, which belonged to \f$f\f$ before the insertion, becomes a hole in this new face. \cgalFigureEnd - + When an \f$x\f$-monotone curve is inserted into an existing arrangement, such that the interior of this curve is disjoint from the @@ -965,14 +965,14 @@ halfedge directed from \f$v_1\f$ to \f$v_2\f$. - + \cgalFigureBegin{aos_fig-edge_insertion,edge_insertion.png} The arrangement of the line segments \f$s_1, \ldots, s_5\f$ constructed in \ref Arrangement_on_surface_2/edge_insertion.cpp. The arrows mark the direction of the halfedges returned from the various insertion functions. \cgalFigureEnd - + The program below demonstrates the usage of the four specialized insertion functions. It creates an arrangement of five line segments @@ -1030,9 +1030,9 @@ typedef Arrangement::Halfedge_handle Halfedge_handle; typedef Arrangement::Face_handle Face_handle; \endcode - + \subsection arr_sssecmf_iso_verts Manipulating Isolated Vertices - + Isolated points are simpler geometric entities than curves, and indeed the member functions that manipulate them are easier to understand. @@ -1052,14 +1052,14 @@ function accepts a handle to an isolated vertex and removes it from the arrangement. - + \cgalFigureBegin{aos_fig-isolated_vertices,isolated_vertices.png} An arrangement of line segments containing three isolated vertices, as constructed in \ref Arrangement_on_surface_2/isolated_vertices.cpp. The vertices \f$u_2\f$ and \f$u_3\f$ are eventually removed from the arrangement. \cgalFigureEnd - + The following program demonstrates the usage of the arrangement member-functions for manipulating isolated vertices. It first inserts @@ -1073,9 +1073,9 @@ isolated vertices that are still contained in the unbounded face \cgalExample{Arrangement_on_surface_2/isolated_vertices.cpp} - + \subsection arr_sssecmf_halfedges Manipulating Halfedges - + While reading the previous subsection you learned how to insert new points that induce isolated vertices into the arrangement. You may @@ -1136,7 +1136,7 @@ Arrangement_on_surface_2::remove_edge `remove_edge()`\endlink indicating whether the source or the target vertices are to be removed should they become isolated. - + \cgalFigureBegin{aos_fig-edge_manipulation,edge_manipulation.png} The three steps of the example program \ref Arrangement_on_surface_2/edge_manipulation.cpp. In Step (a) it @@ -1148,7 +1148,7 @@ arrangement, rendering its end vertices \f$u_1\f$ and \f$u_2\f$ redundant. We therefore remove these vertices by merging their incident edges and go back to the arrangement depicted in (a). \cgalFigureEnd - + The following example program shows how the edge-manipulation functions can be used. The program works in three steps, as @@ -1188,7 +1188,7 @@ functions are of little use. However, you should keep in mind that there may be extraneous data (probably non-geometric) associated with the point objects or with the curve objects, as defined by the traits class. With these two functions you can modify this data; see more -details in Section \ref arr_ssecmeta_tr. In addition, you can use +details in Section \ref arr_sssec_tr_data_decorators. In addition, you can use these functions to replace a geometric object (a point or a curve) with an equivalent object that has a more compact representation. For example, if we use some simple rational-number type to represent the @@ -1197,9 +1197,9 @@ point coordinates, we can replace the point \f$(\frac{20}{40}, equivalent point with normalized coordinates, namely \f$(\frac{1}{2}, 3)\f$. - + \subsection arr_sssecadv_insert Advanced Insertion Functions - + \cgalAdvancedBegin @@ -1255,14 +1255,14 @@ respectively, that correspond to the curve endpoints. The other one accepts a handle to one vertex and a handle to the predecessor halfedge around the other vertex. - + \cgalFigureBegin{aos_fig-special_edge_insertion,special_edge_insertion.png} An arrangement of line segments, as constructed in \ref Arrangement_on_surface_2/special_edge_insertion.cpp. Note that \f$p_0\f$ is initially inserted as an isolated point and later on connected to the other four vertices. \cgalFigureEnd - + The following program shows how to construct the arrangement depicted in \cgalFigureRef{aos_fig-special_edge_insertion} using the specialized @@ -1279,9 +1279,9 @@ in the public interface of the arrangement class. Instead, the arrangement operations; see more details in the Reference Manual. \cgalAdvancedEnd - + \section arr_secqueries Issuing Queries on an Arrangement - + One of the most useful query types defined on arrangements is the point-location query: Given a point, find the arrangement @@ -1295,9 +1295,9 @@ play an important role in the incremental construction of arrangements Section \ref arr_secgl_funcs). Therefore, it is crucial to have the ability to answer such queries effectively. - + \subsection arr_ssecpl Point-Location Queries - + Recall that the arrangement representation is decoupled from the geometric algorithms that operate on it. Thus, the `Arrangement_2` @@ -1397,9 +1397,9 @@ void print_point_location } \endcode - + \subsection aos_sssec-pl_strategy Choosing a Point-Location Strategy - + Each of the various point-location class templates employs a different algorithm or strategy\cgalFootnote{The term strategy @@ -1519,7 +1519,7 @@ dynamic and is frequently going through changes, the `Arr_trapezoid_ric_point_location` class template should be the selected point-location strategy. - + \cgalFigureBegin{aos_fig-point_location,point_location.png} The arrangement of line segments, as constructed in \ref Arrangement_on_surface_2/point_location.cpp, \ref @@ -1528,7 +1528,7 @@ Arrangement_on_surface_2/batched_point_location.cpp. The arrangement vertices are drawn as small rings, while the query points \f$q_1, \ldots, q_6\f$ are drawn as crosses. \cgalFigureEnd - + The program listed below constructs a simple arrangement of five line segments that form a pentagonal face, with a single isolated @@ -1546,9 +1546,9 @@ Note that the program uses the `locate_point()` function template to locate a point and nicely print the result of each query; see \ref lst_pl "code example" in Section \ref arr_ssecpl. - + \subsection arr_ssecray_shoot Vertical Ray Shooting - + Another query frequently issued on arrangements is the vertical ray-shooting query: Given a query point, which arrangement cell @@ -1624,9 +1624,9 @@ arrangement and the query points are exactly the same as in \cgalFigureRef{aos_fig-point_location}. \cgalExample{Arrangement_on_surface_2/vertical_ray_shooting.cpp} - + \subsection arr_ssecbatched_pl Batched Point-Location - + Suppose that at a given moment our application has to issue a relatively large number \f$m\f$ of point-location queries on a @@ -1666,9 +1666,9 @@ is essentially equivalent to the six separate queries performed in \ref arr_ssecpl. \cgalExample{Arrangement_on_surface_2/batched_point_location.cpp} - + \section arr_secgl_funcs Free Functions - + The `Arrangement_on_surface_2` class template is used to represent subdivisions of two-dimensional surfaces induced by curves that lie on @@ -1689,9 +1689,9 @@ defines the minimal set of geometric primitives, among other things, required to perform the algorithms of the surface-sweep and zone-construction frameworks. - + \subsection arr_ssec_zone The Zone Construction Algorithm - + Given an arrangement of curves \f$\mathcal{A} = \mathcal{A}(\mathcal{C})\f$ embedded in a two-dimensional surface, the @@ -1710,9 +1710,9 @@ operations that incrementally construct arrangements induced by sets of curves that lie in two-dimensional surfaces. For simplicity, however, we continue to consider arrangements embedded in the plane. - + - + Section \ref aos_ssec-basic-arr_class explains how to construct arrangements of \f$x\f$-monotone curves that are pairwise disjoint in @@ -1721,9 +1721,9 @@ arrangement is known. Here we relax this constraint, and allow the location of the inserted \f$x\f$-monotone curve endpoints to be unknown at the time of insertion. - + \subsubsection arr_sssecinsert_non_x Inserting Pairwise Disjoint Curves - + We retain, for the moment, the requirement that the interior of the inserted curve is disjoint from all existing arrangement edges and @@ -1764,9 +1764,9 @@ the walk point-location type, namely, an instance of the `Arr_walk_along_line_point_location` class template, and uses it to insert the curve. - + \subsubsection arr_sssecinsert_x_mon Inserting X-monotone Curves - + The time it takes to insert a curve \f$c\f$ using the `insert_non_intersecting_curve()` function template is the sum of the @@ -1800,7 +1800,7 @@ the variant `CGAL::insert<>(arr, c)` is also available). The running-time of this insertion function is proportional to the complexity of the zone of the curve \f$c\f$. - + \cgalAdvancedBegin In some cases users may have a prior knowledge of the location of the left endpoint of the \f$x\f$-monotone curve \f$c\f$ they wish to insert, so they can perform the insertion without @@ -1817,11 +1817,11 @@ Arrangement_on_surface_2::Halfedge_const_handle Arrangement_on_surface_2::Face_const_handle `Face_const_handle`\endlink; see also Section \ref arr_ssecpl. \cgalAdvancedEnd - + - + \subsubsection aos_ssec-insert_gen Inserting General Curves - + So far, all the examples have constructed arrangements of line segments, where the `Arrangement_2` template was instantiated with an @@ -1863,9 +1863,9 @@ performs the insertion of the curve \f$c\f$ that does not need to be `pl`, or use the default walk point-location strategy by calling `CGAL::insert<>(arr, c)`. - + \subsubsection arr_sssecinsert_point Inserting Points - + The `Arrangement_2` class template has a member function that inserts a point as an isolated vertex in a given face. The free function @@ -1895,11 +1895,11 @@ template instantiated with a traits class that models the `ArrangementXMonotoneTraits_2` concept, as the insertion operation may involve the splitting of curves. - + \subsubsection arr_sssecinsert_ex Inserting Intersecting Line Segments (code example) - + - + \cgalFigureBegin{aos_fig-incremental_insertion,incremental_insertion.png} An arrangement of five intersecting line segments, as constructed in \ref Arrangement_on_surface_2/incremental_insertion.cpp and @@ -1909,7 +1909,7 @@ vertices that correspond to intersection points are marked by circles. The query point \f$q\f$ is marked with a cross and the face that contains it is shaded. \cgalFigureEnd - + The program below constructs an arrangement of five intersecting line-segments \f$s_1, \ldots, s_5\f$. It is known that \f$s_1\f$ and @@ -1943,9 +1943,9 @@ quantitative measures of the arrangement; see \ref lst_paz \cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp} - + \subsection arr_ssseczone Other Zone Related Functions - + In this section we have described so far free functions that insert curves and points into a given arrangement. Now we describe functions @@ -1988,9 +1988,9 @@ instance of the `Arr_walk_along_line_point_location` class template, and uses it to locate the endpoint. The traits type must model the `ArrangementXMonotoneTraits_2` concept. - + \subsection arr_ssec_sweep The Surface-Sweep Algorithm - + The famous plane-sweep algorithm introduced by Bentley and Ottmann was originally formulated for sets of line segments in the plane. The \ref @@ -2007,9 +2007,9 @@ this section, such as aggregately constructing an arrangement induced by a set of curves that lie in a two-dimensional surface and outputting the overlay of two arrangements. - + - + Given a set of \f$n\f$ input curves, you can insert the curves in the set into an arrangement incrementally one by one. However, the \ref @@ -2074,7 +2074,7 @@ edges in the arrangement. If \f$n\f$ is very small compared to insert the curves one by one. For larger input sets, we use the aggregate insertion procedures. - + \cgalFigureBegin{aos_fig-global_insertion,global_insertion.png} An arrangement of intersecting line segments, as constructed in \ref Arrangement_on_surface_2/global_insertion.cpp. The segments of @@ -2082,7 +2082,7 @@ Arrangement_on_surface_2/global_insertion.cpp. The segments of \f$\mathcal{S}_2\f$ are drawn in dark dashed lines. Note that the segment \f$ s\f$ (light dashed line) overlaps one of the segments in \f$\mathcal{S}_1\f$. \cgalFigureEnd - + The program below aggregately construct an arrangement of a set \f$\mathcal{S}_1\f$ containing five line segments (drawn as solid @@ -2127,9 +2127,9 @@ The `CGAL::insert_non_intersecting_curves<>()` function template aggregately inserts a set of \f$x\f$-monotone pairwise interior-disjoint curves into an arrangement. - + \subsection arr_ssecgl_remove Removing Vertices and Edges - + The free functions `remove_vertex()` and `remove_edge()` handle the removal of vertices and edges from an arrangement, respectively. The @@ -2173,9 +2173,9 @@ and \f$s_4\f$. \cgalExample{Arrangement_on_surface_2/global_removal.cpp} - + \subsection arr_ssec_decompose Vertical Decomposition - + As you have already seen, an arrangement face may have a fairly complicated structure; its outer boundary may be very large, and it @@ -2210,7 +2210,7 @@ vertex and the remaining one is vertical. - + \cgalFigureBegin{aos_fig-bounded_vd,bounded_vertical_decomposition.png} An arrangement of four line segments and its vertical decomposition into pseudo trapezoids, as constructed in \ref @@ -2218,7 +2218,7 @@ Arrangement_on_surface_2/bounded_vertical_decomposition.cpp. The segments of the arrangement are drawn in solid blue lines and the segments of the vertical decomposition are drawn in dark dotted lines. \cgalFigureEnd - + In the case of an arrangement of line segments, two-dimensional cells of the former type are trapezoids (as they have a pair of parallel @@ -2290,9 +2290,9 @@ above (respectively below) \f$v\f$ returned by the function template \cgalAdvancedEnd - + \section aos_sec-unbounded Arrangements of Unbounded Curves - + All the arrangements constructed and manipulated in previous chapters were induced only by line segments, which are, in particular, bounded @@ -2304,9 +2304,9 @@ this section to lines and rays. However, the discussion in this section, as well as the software described, apply more generally to arbitrary curves in two-dimensional surfaces. - + \subsection aos_ssec-unbounded-rep Representing Arrangements of Unbounded Curves - + Given a set \f$\mathcal{C}\f$ of unbounded curves, a simple approach for representing the arrangement induced by \f$\mathcal{C}\f$ would be @@ -2321,7 +2321,7 @@ we are not given all the curves inducing the arrangement in advance, then the choice of a good bounding rectangle may change as more curves are introduced. - + \cgalFigureBegin{aos_fig-unb_dcel,unb_dcel.png} A \dcel representing an arrangement of four lines. Halfedges are drawn as thin arrows. The vertices \f$v_1, \ldots, v_8\f$ lie at @@ -2333,7 +2333,7 @@ that bounds the actual arrangement. The four fictitious vertices \f$v_{\rm bl}, v_{\rm tl}, v_{\rm br}\f$ and \f$v_{\rm tr}\f$ represent the four corners of the imaginary bounding rectangle. \cgalFigureEnd - + Instead of an explicit approach, we use an implicit bounding rectangle embedded in the \dcel structure. \cgalFigureRef{aos_fig-unb_dcel} @@ -2405,13 +2405,13 @@ bounding rectangle as follows: - + \cgalFigureBegin{aos_fig-unb_asymptote,unb_asymptote.png} The portions of a horizontal line, a vertical line, and two rectangular hyperbolas with horizontal and vertical asymptotes confined to the imaginary bounding rectangle. \cgalFigureEnd - + A vertex (at infinity) of Type 2 or Type 3 above always has three incident edges---one concrete edge that is associated with an @@ -2437,9 +2437,9 @@ that all input curves that induce a particular arrangement are bounded, define your arrangement accordingly. That is, use a traits class that does not support unbounded curves. - + \subsubsection arr_sssecunb_basic Basic Manipulation and Traversal Methods - + The types \link Arrangement_on_surface_2::Vertex `Vertex`\endlink, \link Arrangement_on_surface_2::Halfedge `Halfedge`\endlink, and \link @@ -2642,12 +2642,12 @@ defined by the traits class-template `Arr_linear_traits_2` to be the corresponding types of the kernel used to instantiate the traits class-template; see Paragraph \ref arr_sssectr_linear. - + \cgalFigureBegin{aos_fig-unbounded_non_intersecting,unbounded_non_intersecting.png} An arrangement of unbounded linear objects, as constructed in \ref Arrangement_on_surface_2/unbounded_non_intersecting.cpp. \cgalFigureEnd - + The first three curves, \f$c_1\f$, \f$c_2\f$, and \f$c_3\f$, are inserted using the specialized insertion functions for @@ -2696,9 +2696,9 @@ typedef Arrangement::Halfedge_handle Halfedge_handle; typedef Arrangement::Face_handle Face_handle; \endcode - + \subsubsection arr_sssec-unb_global Free Functions - + All the free functions that operate on arrangements of bounded curves (see Section \ref arr_secgl_funcs) can also be applied to arrangements @@ -2724,9 +2724,9 @@ point has finite coordinates. Note that all the point-location strategies mentioned above, except the trapezoidal map strategy, are capable of handling arrangements of unbounded curves. - + \subsection arr_ssec-unb_duality Point-Line Duality - + In the following example we show how an arrangement of unbounded lines is utilized to solve the following problem: Given a set of points, @@ -2752,9 +2752,9 @@ introduced, and inserted into the arrangement. This operation is followed by a test that verifies that a vertex of degree greater than \f$4\f$ exists. - + \section aos_sec-curved_surfaces Arrangements on Curved Surfaces - + We are given a surface \f$S\f$ in \f$\mathbb{R}^3\f$ and a set \f$\mathcal{C}\f$ of curves embedded in this surface. The curves @@ -2798,9 +2798,9 @@ Various two-dimensional parametric surfaces, arrangements on which are supported by the framework. \cgalFigureCaptionEnd - + \subsection aos_ssec-curved_surfaces-parameteric Parametric Surfaces - + We use \f$\overline{\mathbb{R}}\f$ to denote the compactified real line \f$\mathbb{R} \cup \{-\infty,+\infty\}\f$. The mapping @@ -2939,9 +2939,9 @@ t_2\f$. For instance, every Meridian curve of a sphere parameterized as above is vertical. An \f$x\f$-monotone curve is either vertical or strongly \f$x\f$-monotone. - + \subsection aos_ssec-curved_surfaces-aos_class The Arrangement on Surface Class Template - + The class template `Arrangement_on_surface_2` can be used to represent a 2D arrangement embedded in a 3D @@ -3005,9 +3005,9 @@ Sites are drawn in red and Voronoi edges are drawn in blue. (d) A degenerate power diagram of 14 sites on the sphere. \cgalFigureCaptionEnd - + \subsection aos_ssec-curved_surfaces-basic Basic Manipulation and Traversal Methods - + The types \link Arrangement_on_surface_2::Vertex `Vertex`\endlink, \link Arrangement_on_surface_2::Halfedge `Halfedge`\endlink, and \link @@ -3184,9 +3184,9 @@ bool is_in_x_range(const typename GeometryTraits::X_monotone_curve_2& c, \cgalAdvancedEnd - + \section aos_sec-geom_traits The Geometry Traits - + A geometry traits class encapsulates the definitions of the geometric entities and the implementation of the geometric predicates and @@ -3227,9 +3227,9 @@ geometric traits classes. A decorator of a traits class attaches auxiliary data to the geometric objects handled by the original traits class, thereby extending it. - + \subsection aos_ssec-geom_traits-concepts The Hierarchy of the Geometry Traits Concepts - + A hierarchy of related concepts can be viewed as a directed acyclic graph, where a node of the graph represents a concept and an arc @@ -3243,15 +3243,15 @@ clusters of the graph and describe the relations between them. \cgalFigureRef{aos_fig-central_concept_cluster} depicts the central cluster. - + \cgalFigureBegin{aos_fig-central_concept_cluster,central_concept_cluster.png} The hierarchy of the main geometry traits concepts. \cgalFigureEnd - + - + \subsubsection aos_sssec-geom_traits-concepts_basic The Basic Concept - + A model of the basic concept `ArrangementBasicTraits_2` needs to define the types \link ArrangementBasicTraits_2::Point_2 @@ -3358,9 +3358,9 @@ Each of those types must be convertible to the type `Arr_oblivious_side_tag` for the class to be a model of the concept `ArrangementBasicTraits_2`. - + \subsubsection aos_sssec-geom_traits-concepts_intersecting Intersections - + Constructing an arrangement induced by \f$x\f$-monotone curves that may intersect in their interior requires operations that are not part @@ -3436,9 +3436,9 @@ Otherwise, it is not possible to merge \f$x\f$-monotone curve and redundant vertices may be left in the arrangement due to the removal of edges. - + \subsubsection aos_sssec-geom_traits-concepts_arbitrary Supporting Arbitrary Curves - + The concept `ArrangementTraits_2` refines the `ArrangementXMonotoneTraits_2` concept. A model of the refined concept @@ -3472,16 +3472,16 @@ ArrangementTraits_2::Curve_2 `Curve_2`\endlink or a range of objects of that type. In all other cases it is sufficient to use a model of the `ArrangementXMonotoneTraits_2` concept. - + \subsubsection aos_sssec-tr_landmarks_concept The Landmark Concept - + - + \cgalFigureBegin{aos_fig-landmark_concept_cluster,landmark_concept_cluster.png} The traits-concept hierarchy for arrangements associated with the landmark point-location strategy. \cgalFigureEnd - + The type of an arrangement associated with the landmark point-location strategy (see Section \ref arr_ssecpl) must be an instance of the @@ -3528,9 +3528,9 @@ an \f$x\f$-monotone curve connecting \f$p_1\f$ and \f$p_2\f$. Most traits classes model the `ArrangementTraits_2` concept, and some also model the `ArrangementLandmarkTraits_2` concept. - + \subsubsection aos_sssec-tr_additional_concepts The Construct Curve Concept - + The concept `ArrangementConstructCurveTraits_2` refines the concept `ArrangementTraits_2`. A model of the @@ -3551,9 +3551,9 @@ when `Arr_polyline_traits_2` is instantiated must be a geometry-traits class that models the concept `ArrangementConstructCurveTraits_2` to enable the construction of polylines from a sequence of two or more points. - + \subsubsection aos_ssec-traits-curved Supporting Unbounded Curves or Curved Surfaces - + We descend to the bottom level of the hierarchy. The refinements described in this section provide the requirements imposed on traits @@ -3625,13 +3625,13 @@ Section \ref arr_ssectr_segs) only handle bounded curves. Thus, the four category types nested in these models are defined to be `Arr_oblivious_side_tag`. - + \cgalFigureBegin{aos_fig-open_concept_hierarchy,open_concept_hierarchy.png} Bottom portion of the refinement hierarchy of the geometry-traits concepts for curves embedded in an open surface, for instance, the entire plane. \cgalFigureEnd - + Several predicates are required to handle \f$x\f$-monotone curves that approach the boundary of the parameter space. These predicates are @@ -3653,12 +3653,12 @@ instantiated with a model of the `ArrangementOpenBoundaryTraits_2` concept.\cgalFootnote{A curve that reaches the boundary of the parameter space in this case is open and unbounded.} - + \cgalFigureBegin{aos_fig-spherical_concept_hierarchy,spherical_concept_hierarchy.png} Bottom portion of the refinement hierarchy of the geometry-traits concepts for curves embedded in a sphere-like parameterized surface \cgalFigureEnd - + A suitable geometry-traits component for arrangements embedded in surfaces homeomorphic to a sphere is a model of the combined concept @@ -3667,14 +3667,14 @@ surfaces homeomorphic to a sphere is a model of the combined concept vertical sides of the parameter space are identified and the two horizontal sides are contracted. - + \cgalFigureBegin{aos_fig-left_side_cluster,left_side_cluster.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that either reach the left side of the boundary of the parameter space or approach it. A similar hierarchy also exists for the right, bottom, and top sides. \cgalFigureEnd - + The shared requirements for the four options of a side are collected in abstract layers called `ArrangementLeftSideTraits_2`, @@ -3682,14 +3682,14 @@ in abstract layers called `ArrangementLeftSideTraits_2`, `ArrangementTopSideTraits_2`; see, e.g., \cgalFigureRef{aos_fig-left_side_cluster}. - + \cgalFigureBegin{aos_fig-side_clusters,side_clusters.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that either reach the vertical sides of the boundary of the parameter space or approach it, and similarly for curves that either reach or approach horizontal sides. \cgalFigureEnd - + The shared requirements for the options of opposite sides are collected in two additional abstract layers called @@ -3697,14 +3697,14 @@ collected in two additional abstract layers called `ArrangementHorizontalSideTraits_2`; see \cgalFigureRef{aos_fig-side_clusters}. - + \cgalFigureBegin{aos_fig-identified_clusters,identified_clusters.png} Top portion of the refinement hierarchy of the geometry-traits concepts for curves that reach the identified vertical sides of the parameter space and for curves that reach the identified horizontal sides of the parameter space. \cgalFigureEnd - + Individual concepts for curves that reach the identified left side of the parameter space and for curves that reach the identified right @@ -4019,9 +4019,9 @@ boundary. - + \subsection aos_ssec-geom_traits-models Models of the Geometry Traits Concepts - + In this section we review the traits classes that are models of concepts introduced in the previous sections. They handle line @@ -4031,9 +4031,9 @@ subsection describes decorators for geometric traits classes distributed with \cgal, which extend geometric traits-classes by attaching auxiliary data with the geometric objects. - + \subsubsection arr_ssectr_segs Traits Classes for Line Segments and Linear Objects - + There are two distinct traits classes that handle line segments. One caches information in the curve records (see Section \ref @@ -4046,9 +4046,9 @@ intersections). Another model handles not only (bounded) line segments, but also rays and lines; see Section \ref arr_sssectr_linear. - + \paragraph arr_sssectr_caching_segs The Caching Segment-Traits Class - + An instance of the `Arr_segment_traits_2` class template used in most example programs so far is instantiated by substituting the @@ -4112,13 +4112,13 @@ predefined filtered kernel `Exact_predicates_exact_constructions_kernel` is used to instantiate the line-segment traits class. - + \cgalFigureBegin{aos_figpredef_kernels,fan_grids.png,Europe.png} (a) An arrangement of \f$104\f$ line segments from the input file `fan_grids.dat`. (b) An arrangement of more than \f$3000\f$ interior disjoint line segments, defined in the input file `Europe.dat`. \cgalFigureEnd - + In the following example we use the predefined `Exact_predicates_exact_constructions_kernel` for instantiating our @@ -4132,9 +4132,9 @@ in \cgalFigureRef{aos_figpredef_kernels} (a): \cgalExample{Arrangement_on_surface_2/predefined_kernel.cpp} - + \paragraph arr_sssectr_non_caching_segs The Non-Caching Segment-Traits Class - + The arrangement package offers an alternative segment-traits class template that handles line segments, namely the @@ -4187,9 +4187,9 @@ the map of Europe, as depicted in \cgalExample{Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp} - + \paragraph arr_sssectr_linear The Linear-Traits Class - + The `Arr_linear_traits_2` class used in Section \ref aos_sec-unbounded for demonstrating the construction of arrangements @@ -4214,9 +4214,9 @@ cast a curve into a `Kernel::Line_2`, a `Kernel::Ray_2`, or a class, the linear-curve traits class uses caching techniques to speed up its predicate evaluations and object constructions. - + \subsubsection arr_ssectr_polylines The Polyline and Polycurve Traits Classes - + Polylines are continuous piecewise linear curves. Polylines are of particular interest, as they can be used to approximate more complex @@ -4233,9 +4233,9 @@ handles continuous piecewise curves that are not necessarily linear and are not subject to the aforementioned constraint; see Section \ref arr_sssectr_polycurves. - + \paragraph arr_sssectr_polylines The Polyline Traits Class - + The `Arr_polyline_traits_2` class template handles polylines. It models the following four concepts: @@ -4351,14 +4351,15 @@ size \f$m\f$ typically take \cgalBigO{\log m} time. You are free to choose the underlying segment traits class. Your decision could be based, for example, on the number of expected -intersection points; see Section \ref arr_ssectr_segs. Moreover, it -is possible to substitute the `SubcurveTraits_2` template parameter -with a traits class that handles segments with some additional data -attached to each individual segment; see Section -\ref arr_ssecmeta_tr. This makes it possible to associate different -data objects with the different segments that compose a polyline. +intersection points; see Section \ref arr_ssectr_segs. Moreover, it is +possible to substitute the `SubcurveTraits_2` template parameter with +a traits class that handles segments with some additional data +attached to each individual segment; see Section \ref +arr_sssec_tr_data_decorators. This makes it possible to associate +different data objects with the different segments that compose a +polyline. - + \cgalFigureBegin{aos_fig-polylines,polylines.png} An arrangement of three polylines, as constructed in \ref @@ -4370,7 +4371,7 @@ the polyline \f$\pi_2\f$ is split into three \f$x\f$-monotone polylines, and that the two curves \f$\pi_1\f$ and \f$\pi_3\f$ have two overlapping sections---an impossible scenario in arrangements of line segments. \cgalFigureEnd - + The following example program constructs an arrangement of three polylines, \f$\pi_1\f$, \f$\pi_2\f$, and \f$\pi_3\f$, as depicted in @@ -4410,9 +4411,9 @@ typedef Traits::Curve_2 Polyline; typedef CGAL::Arrangement_2 Arrangement; \endcode - + \paragraph arr_sssectr_polycurves The Polycurve Traits Class - + The traits class `Arr_polycurve_traits_2` handles piecewise curves that are not necessarily linear, such as conic arcs, @@ -4432,9 +4433,9 @@ it does not support the operations that (i) construct a polycurve from a sequence of points, and (ii) push a point at the back or at the front of a non-empty polycurve. - + \subsubsection arr_ssectr_algebraic Traits Classes for Algebraic Curves - + A curve in our context is typically (but not necessarily) defined as the zero set of a bivariate nonzero polynomial with rational (or, @@ -4466,9 +4467,9 @@ developed. As a general rule, you should always use the minimal traits model that still satisfies your needs, as the most dedicated model is most likely to be the most efficient. - + \paragraph arr_sssectr_circ_seg Circular Arcs and Line Segments - + Arrangement of circular arcs and of line segments are very useful and frequently arise in applications, where curves of interleaved line @@ -4552,7 +4553,7 @@ typically algebraic numbers of degree 2, is \a not the same as the `Kernel::Point_2` type. The coordinates of a point are represented using the number type `CoordNT`, nested in the traits class-template. - + \cgalFigureBegin{aos_fig-circles,circles.png} An arrangement of three circles constructed in \ref Arrangement_on_surface_2/circles.cpp. Each circle is split into two @@ -4561,7 +4562,7 @@ disks. Rings mark vertices that correspond to intersection points. The vertex \f$v_{\rm max}\f$ is a common intersection point of all three circles. \cgalFigureEnd - + In the following example an arrangement of three full circles is constructed, as shown in \cgalFigureRef{aos_fig-circles}. Each Index is @@ -4628,14 +4629,14 @@ interior point that lies on the arc in between its endpoints. In this case, all three points are required to have rational coordinates; namely, they are all given as `Kernel::Point_2` objects. - + \cgalFigureBegin{aos_fig-circular_arcs,circular_arcs.png} An arrangement of two full circles, two line segments, and three circular arcs as constructed in \ref Arrangement_on_surface_2/circular_arcs.cpp. Endpoints are drawn as red disks and intersection points are drawn as rings. \cgalFigureEnd - + The following example demonstrates the usage of the various construction methods for circular arcs and line segments. The @@ -4665,9 +4666,9 @@ their performance, and use the most suitable for your case. which I should choose one over the other --> - + \paragraph arr_sssectr_conic A Traits Class for Conic Arcs - + A conic curve is an algebraic curve of degree 2. Namely, it is the locus of all points \f$(x,y)\f$ satisfying the equation \f$c:\ @@ -4783,11 +4784,11 @@ Arr_conic_traits_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink classes also support basic access functions such as `source()`, `target()`, and `%orientation()`. - + \cgalFigureBegin{aos_fig-conics,conics.png} An arrangement of mixed conic arcs, as constructed in conics.cpp \cgalFigureEnd - + The following example demonstrates the usage of the various constructors for conic arcs. The resulting arrangement is depicted in @@ -4835,12 +4836,12 @@ using X_monotone_conic_arc = Traits::X_monotone_curve_2; using Arrangement = CGAL::Arrangement_2; \endcode - + \cgalFigureBegin{aos_fig-conic_multiplicities,conic_multiplicities.png} An arrangement of a circular arc and an hyperbolic arc, as constructed in \ref Arrangement_on_surface_2/conic_multiplicities.cpp. \cgalFigureEnd - + The last example in this section demonstrates how the conic-traits class can handle intersection points with multiplicity. The resulting @@ -4858,9 +4859,9 @@ they have another intersection point at \cgalExample{Arrangement_on_surface_2/conic_multiplicities.cpp} - + \paragraph arr_sssectr_ratfunc A Traits Class for Arcs of Rational Functions - + A rational function is given by the equation \f$y = \frac{P(x)}{Q(x)}\f$, where \f$P\f$ and \f$Q\f$ are polynomials of @@ -4889,12 +4890,12 @@ Note that it is not a model of `ArrangementLandmarkTraits_2` concept, so it is impossible to use the landmark point-location strategy with this traits class. - + \cgalFigureBegin{aos_fig-rat_func_singular,rational_function_singular.png} An arrangement of an arc of a rational functions that has singularities at \f$x = 1\f$ and at \f$x = 2\f$. \cgalFigureEnd - + A rational arc is always \f$x\f$-monotone in the mathematical sense. However, it is not necessarily continuous, as it may have @@ -4985,12 +4986,12 @@ cache is automatically cleaned up from time to time. The amortized clean up costs are constant. In addition, there is also a separate member function that cleans up the cache upon request. - + \cgalFigureBegin{aos_fig-rational_functions,rational_functions.png} An arrangement of four arcs of rational functions, as constructed in \ref Arrangement_on_surface_2/rational_functions.cpp. \cgalFigureEnd - + The following example demonstrates the construction of an arrangement induced by rational arcs depicted in @@ -4999,12 +5000,12 @@ for polynomial arcs and for rational arcs. \cgalExample{Arrangement_on_surface_2/rational_functions.cpp} - + \cgalFigureBegin{aos_fig-unbounded_rational_functions,unbounded_rational_functions.png} An arrangement of six arcs of rational functions, as constructed in \ref Arrangement_on_surface_2/unbounded_rational_functions.cpp. \cgalFigureEnd - + The following example demonstrates the construction of an arrangement of six rational arcs, four unbounded arcs and two bounded ones, as @@ -5036,9 +5037,9 @@ polynomial coefficients as well as polynomials. The coefficients in a given range must be in the order of the degrees of the corresponding variables starting from the constant term. - + \paragraph arr_sssectr_bez A Traits Class for Planar Bézier Curves - + A planar Bézier curve \f$B\f$ is a parametric curve defined by a sequence of control points \f$p_0, \ldots, @@ -5116,12 +5117,12 @@ models the concept `ArrangementTraits_2` (but it does not model the concept `ArrangementDirectionalXMonotoneTraits_2`, which enables Boolean set operations; see Package \ref PkgBooleanSetOperations2Ref. - + \cgalFigureBegin{aos_fig-bezier_curves,bezier_curves.png} An arrangement of ten Bézier curves of degree \f$5\f$, as constructed in \ref Arrangement_on_surface_2/Bezier_curves.cpp. \cgalFigureEnd - + The following example reads a set of Bézier curves from an input file, where each file is specified by an integer stating its @@ -5133,9 +5134,9 @@ each; their resulting arrangement is depicted in \cgalExample{Arrangement_on_surface_2/Bezier_curves.cpp} - + \paragraph arr_sssectr_alg A Traits Class for Planar Algebraic Curves of Arbitrary Degree - + The traits class, namely `Arr_algebraic_segment_traits_2`, is based on the `Algebraic_kernel_d_1` class template, which models the @@ -5201,13 +5202,13 @@ constructed in a few convenient ways, some are exemplified by the programs listed below. Consult the reference guide for the complete set of options. - + \cgalFigureBegin{aos_fig-algebraic_curves,algebraic_curves.png} An arrangement of algebraic curves of degrees \f$1\f$, \f$2\f$, \f$3\f$, and \f$6\f$, as constructed in \ref Arrangement_on_surface_2/algebraic_curves.cpp. \cgalFigureEnd - + The following examples computes the arrangement depicted in in \cgalFigureRef{aos_fig-algebraic_curves}. The arrangement is induced @@ -5298,7 +5299,7 @@ segments. Notice that six vertices split the curve into the corresponding \f$x\f$-monotone segments into terminal segments. \cgalAdvancedEnd - + \cgalFigureBegin{aos_fig-algebraic_curves_decomposition,algebraic_curves_decomposition.png} The critical \f$x\f$-coordinates of an algebraic curve (dashed @@ -5306,7 +5307,7 @@ lines), and its decomposition into terminal segments (in different colors). The segment from \f$p\f$ to \f$q\f$ consists of the union of three terminal segments. \cgalFigureEnd - + The type `Algebraic_real_1` must be defined by any model of the `AlgebraicKernel_d_1` concept. The traits class-template @@ -5347,13 +5348,13 @@ type `Algebraic_real_1` can be obtained, we advise caution with that option, since computing an explicit representation of the \f$y\f$-coordinate can be rather expensive. - + \cgalFigureBegin{aos_fig-algebraic_segments,algebraic_segments.png} An arrangement of algebraic segments (solid lines), as constructed in \ref Arrangement_on_surface_2/algebraic_segments.cpp. The supporting curves are drawn as dashed lines. \cgalFigureEnd - + The following code exemplifies the method to construct points and the various methods to construct algebraic segments. The computed @@ -5361,9 +5362,9 @@ arrangement is depicted in \cgalFigureRef{aos_fig-algebraic_segments}. \cgalExample{Arrangement_on_surface_2/algebraic_segments.cpp} - + \subsubsection arr_ssectr_spherical Arcs of Great Circles Embedded in the Sphere - + A great circle of a sphere is the intersection of the sphere and a plane that passes through the center point of the sphere. For all @@ -5422,7 +5423,7 @@ The following example constructs an arrangement induced by 12 arcs of great circles embedded in the sphere. The arrangement is depicted in \cgalFigureRef{spherical_insert}. - + \cgalFigureBegin{spherical_insert,spherical_insert.png} An arrangement induced by 12 arcs of great circles, as constructed in \ref Arrangement_on_surface_2/spherical_insert.cpp. The number of @@ -5433,7 +5434,7 @@ with the identification curve induces a vertex at in green. The north and south poles are drawn as little spheres. The identification curve is drawn as a gray tube. \cgalFigureEnd - + \cgalExample{Arrangement_on_surface_2/spherical_insert.cpp} @@ -5457,17 +5458,27 @@ point of the arc. See \cgalFigureRef{aos_fig-right_hand_rule} for an illustration of the right-hand rule, which depicts the relation between the arc and the normal. - + \cgalFigureBegin{aos_fig-right_hand_rule,right_hand_rule.png} To use the right hand rule, point your right thumb in the direction of the normal and curl your fingers in the direction of the arc starting with source endpoint and ending at the target endpoint. \cgalFigureEnd - + - -\subsection arr_ssecmeta_tr Traits-Class Decorators - + +\subsection arr_ssec_tr_decorators Traits-Class Decorators + + +Decorator is a structural pattern that allows adding new behaviors to +objects by placing them inside special wrapper objects, called +decorators. One type of decoretors attaches auxiliary data to the +geometric objects handled by the original traits. Another type enables +the extraction of debugging and informative metadata. + + +\subsubsection arr_sssec_tr_data_decorators Data Decorators + Geometric traits-class decorators allow you to attach auxiliary data to the geometric objects (curves and to points). The data is @@ -5579,14 +5590,14 @@ and \f$c_2\f$ with associated data sets \f$S_1\f$ and \f$S_2\f$, respectively, the overlapping subcurve is associated with the consolidated set \f$S_1 \cup S_2\f$. - + \cgalFigureBegin{aos_fig-consolidated_curve_data,consolidated_curve_data.png} An arrangement of six red and blue segments, as constructed in \ref Arrangement_on_surface_2/consolidated_curve_data.cpp. Disks correspond to red-blue intersection points, while circles mark the endpoints of red-blue overlaps. \cgalFigureEnd - + The following example uses `Arr_segment_traits_2` as the base-traits class, attaching an additional color field to the segments @@ -5602,12 +5613,12 @@ endpoints are also drawn as black discs) \cgalExample{Arrangement_on_surface_2/consolidated_curve_data.cpp} - + \cgalFigureBegin{aos_fig-generic_curve_data,generic_curve_data.png} An arrangement of four polylines, named A-D, as constructed in \ref Arrangement_on_surface_2/generic_curve_data.cpp. \cgalFigureEnd - + The following example uses `Arr_polyline_traits_2` as the base-traits class, attaching an additional name field to each polyline @@ -5640,9 +5651,37 @@ the curve-data traits: \cgalExample{Arrangement_on_surface_2/dual_with_data.cpp} - + +\subsubsection arr_sssec_tr_metadata_decorators Metadata Decorators + + +The package provides two traits-class decorators, namely +`Arr_counting_traits_2` and +`Arr_tracing_traits_2`, that can be used to insert +debuging and informative metadata to an output stream. The former is +used to count the number of invocations of traits-class functors, and +the latter is used to trace these invocations. Note that the +constructors of each of these calss templates applies prefect +forwarding. The counting traits also export the count of traits-class +objects of specific types constructed during the execution of the +program . The tracing traits supports filtering of traced +functors. The calls `traits.enable_trace(id)` and +`traits.disable_trace(id)` enables and disables the tracing of a +functor identified by `id`, respectively. A functor is identified by +an enumeration. For example, the functor \link +ArrangementTraits_2::Make_x_monotone_2 `Make_x_monotone_2`\endlink is +idenfied by the enumeration +`Arr_tracing_traits_2::MAKE_X_MONOTONE_OP`. The calls +`traits.enable_all_traces()` and `traits.disable_all_traces()` enables +and disables the traces of all functors, respectively. The example +program listed below and coded in the file `count_and_trace.cpp` +demonstrates the use of both of these metadata decorators. + +\cgalExample{Arrangement_on_surface_2/count_and_trace.cpp} + + \section aos_sec-topol_traits The Topology Traits - + A topology traits class encapsulates the definitions of the topological entities and the implementation of the functions that handle these topological entities, used by the @@ -5674,9 +5713,9 @@ arrangement embedded on a sphere defined over a parameter space, the left and right boundary sides of which are identified, and the top and bottom boundary sides are contracted. - + \section arr_sec_extending Extending the Arrangement - + Developing applications that use arrangements to solve problems that are a bit more complicated than the problems presented in previous @@ -5686,9 +5725,9 @@ arrangement with auxiliary, usually non-geometric, data. In this chapter we describe several ways to extend an arrangement data structure. - + \subsection arr_ssecnotif The Notification Mechanism - + In some cases it is essential to know exactly what happens inside a specific arrangement object. For example, when a new curve is inserted @@ -5826,14 +5865,14 @@ up-to-date. In addition, you can define your own observer classes, inheriting from the base observer class and overriding the relevant notification functions, as required by their applications. - + \cgalFigureBegin{aos_fig-observer,observer.png} An arrangement of six line segments, as constructed in \ref Arrangement_on_surface_2/observer.cpp. The halfedge \f$e_v\f$ (dashed) is eventually removed, so that the final arrangement consists of four faces (one unbounded and three bounded ones). \cgalFigureEnd - + The following example shows how to define and use an observer class. The observer in the example responds to changes in the @@ -5860,9 +5899,9 @@ Observers are especially useful when the \dcel records are extended and store additional data-fields, since they help update this data stored in these fields, as the following sections reveal. - + \subsection arr_ssecex_dcel Extending the DCEL - + For many applications of the \ref PkgArrangementOnSurface2 package it is necessary to store additional information (perhaps of non-geometric @@ -5872,7 +5911,7 @@ edges (halfedge pairs) are associated with \link Arrangement_on_surface_2::X_monotone_curve_2 `X_monotone_curve_2`\endlink objects, both defined by the traits class. Extending the geometric traits-class types by using a -traits-class decorator, as explained in Section \ref arr_ssecmeta_tr, +traits-class decorator, as explained in Section \ref arr_ssec_tr_decorators, might be a sufficient solution for some applications. However, the \dcel faces are not associated with any geometric object, so traits-class decorators cannot help here. Extending the \dcel face @@ -5890,9 +5929,9 @@ class associates points with vertices and \f$x\f$-monotone curves with halfedges, but nothing more. In this section we show how to use alternative \dcel types to extend the desired \dcel records. - + \subsubsection arr_sssecex_dcel_face Extending the DCEL Faces - + The `Arr_face_extended_dcel` class-template is used to associate auxiliary data field of type `FaceData` to each face @@ -5912,7 +5951,7 @@ face or merged with another face). In such cases one can use an arrangement observer tailored for this task, which receives updates whenever a face is modified and sets its data field accordingly. - + \cgalFigureBegin{aos_fig-dcel_extension,dcel_extension.png} An arrangement of six line segments, as constructed in \ref Arrangement_on_surface_2/face_extension.cpp and \ref @@ -5922,7 +5961,7 @@ directed, so they are drawn as arrows directed from the source to the target). The indices associated with the halfedges in \ref Arrangement_on_surface_2/face_extension.cpp are shown in brackets. \cgalFigureEnd - + The next example constructs an arrangement that contains seven bounded faces induced by six line segments, \f$s_1, \ldots, s_6\f$, as shown @@ -5939,9 +5978,9 @@ similar observer to a non-empty arrangement.} \cgalExample{Arrangement_on_surface_2/face_extension.cpp} - + \subsubsection arr_sssecex_dcel_all Extending All DCEL Records - + As you continue to use arrangements to solve various problems you will find out that the ability to extend the face records is @@ -6062,9 +6101,9 @@ class Arr_map_dcel : public \cgalAdvancedEnd - + \subsection arr_ssecoverlay Overlaying Arrangements - + Assume that we are given two geographic maps represented as arrangements, with some data objects attached to their faces, @@ -6089,7 +6128,7 @@ The overlay of two given arrangements, conveniently referred to as the algorithm employing a dedicated visitor; see Section \ref arr_ssec_sweep. The \f$x\f$-monotone curve type is extended with a color attribute (whose value is either blue or red); see Section \ref -arr_ssecmeta_tr. With the help of the extended type unnecessary +arr_ssec_tr_decorators. With the help of the extended type unnecessary computations are filtered out while the plane is swept, yielding an efficient process. For example, monochromatic intersections are not computed. @@ -6129,7 +6168,7 @@ is possible to obtain the same result using the standard insertion-operations instead, but, as mentioned above, this is less efficient. - + \cgalFigureBegin{aos_figex_overlay,overlay.png} Overlaying two simple arrangements of line segments, as done in \ref Arrangement_on_surface_2/overlay.cpp and \ref @@ -6138,7 +6177,7 @@ Arrangement_on_surface_2/face_extension_overlay.cpp the two bounded faces are considered as marked, and the octagonal face which is the intersection of the two marked faces is denoted by \f$f_0\f$. \cgalFigureEnd - + The next program constructs two simple arrangements; each comprises four line segments that form a square, as depicted in @@ -6222,12 +6261,12 @@ arrangement depicted in \cgalFigureRef{aos_figex_overlay}. \cgalExample{Arrangement_on_surface_2/face_extension_overlay.cpp} - + \cgalFigureBegin{aos_figex_overlay_unbounded,overlay_unbounded.png} Overlaying two arrangements of lines that have unbounded faces, as done in \ref Arrangement_on_surface_2/overlay_unbounded.cpp. \cgalFigureEnd - + The next example, depicted in \cgalFigureRef{aos_figex_overlay_unbounded}, demonstrates the face @@ -6357,7 +6396,7 @@ template struct Overlay_color_traits { }; \endcode - + \cgalFigureBegin{aos_figex_overlay_color,overlay_color.png} The overlay of two extended arrangements]{The overlay (c) of two @@ -6366,7 +6405,7 @@ with a color. The color of each feature of the overlay arrangement is the blend of the colors of the two inducing features. \cgalFigureEnd - + The example program listed below computes the overlay, depicted in \cgalFigureRef{aos_figex_overlay_color}, of the two arrangements @@ -6382,9 +6421,9 @@ of the colors attached to the inducing features. \cgalExample{Arrangement_on_surface_2/overlay_color.cpp} - + \subsection arr_ssecarr_with_hist Storing the Curve History - + When you constructs an arrangement induced by a set \f$\mathcal{C}\f$ of arbitrary two-dimensional curves, you end up with a collection @@ -6422,9 +6461,9 @@ arrangements with history. However, the explanation applies also to `Arrangement_on_surface_with_history_2<>`, as the type of the embedding surface is irrelevant to the discussion. - + \subsubsection arr_sssecarrwh_traverse Traversing an Arrangement with History - + The `Arrangement_with_history_2` class template extends the `Arrangement_2` class template. Thus, all the iterator and circulator @@ -6497,9 +6536,9 @@ edges and the consolidated curve-set. You may also employ an overlay-traits class to maintain any type of auxiliary data stored with the \dcel cells; see Section \ref arr_ssecoverlay. - + \subsubsection arr_sssecmodif_traverse Modifying an Arrangement with History - + The `Arrangement_with_history_2` class template extends the `Arrangement_2` class template; thus, it inherits the fundamental @@ -6572,14 +6611,14 @@ arrangement-with-history object in order to get detailed notifications of the changes the arrangements undergoes; see Section \ref arr_ssecnotif for the details). - + \cgalFigureBegin{aos_fig-curve_history,curve_history.png} An arrangement with history as constructed in \ref Arrangement_on_surface_2/curve_history.cpp. Note that \f$s_1\f$ and \f$s_3\f$ overlap over two edges. The point-location query points \f$q_1\f$, \f$q_2\f$, and \f$q_3\f$ are drawn as lightly shaded dots. \cgalFigureEnd - + In the following example we construct a simple arrangement of six line segments, as depicted in \cgalFigureRef{aos_fig-curve_history}, while @@ -6593,7 +6632,7 @@ auxiliary function `locate_point()` defined in the header file \cgalExample{Arrangement_on_surface_2/curve_history.cpp} - + \cgalFigureBegin{aos_fig-edge_manipulation_curve_hostory,edge_manipulation_curve_history.png} An arrangement with history of nine circles as constructed in \ref Arrangement_on_surface_2/edge_manipulation_curve_history.cpp. Note the @@ -6602,7 +6641,7 @@ subdivide this circle into an upper half and a lower half, each consists of 9 edges. The large circle \f$c_0\f$ is eventually removed from the arrangement, with all 18 edges it induces. \cgalFigureEnd - + The following example demonstrates the usage of the free `remove_curve()` function. We construct an arrangement of nine @@ -6616,9 +6655,9 @@ member functions when operating on an arrangement-with-history object. \cgalExample{Arrangement_on_surface_2/edge_manipulation_curve_history.cpp} - + \section aos_sec-io Input/Output Streams and Visualization - + In some cases, one would like to save an arrangement object constructed by some application, so that later on it can be @@ -6626,9 +6665,9 @@ restored. In other cases one would like to create nice drawings that represent arrangements constructed by some application. These drawings can be hard printed or displayed on a computer screen. - + \subsection aos_ssec-io-stream Input/Output Stream - + Consider an arrangement that represents a very complicated geographical map, and assume that there are various applications that need to answer @@ -6665,9 +6704,9 @@ a file. \cgalExample{Arrangement_on_surface_2/io.cpp} - + \subsection arr_ssecarr_io_aux_data Arrangements with Auxiliary Data - + \cgalAdvancedBegin The inserter and extractor both ignore any auxiliary data stored with the arrangement features. Thus, they are @@ -6721,9 +6760,9 @@ Doing so, you can define other I/O formats, such as an XML-based format or a binary format. \cgalAdvancedEnd - + \subsection arr_ssecarr_io_hist Arrangements with Curve History - + Section \ref arr_ssecarr_with_hist introduces the `Arrangement_with_history_2` class, which saves the @@ -6762,9 +6801,9 @@ arrangement formatter class (see Section \ref arr_ssecarr_io_aux_data) and defines a simple textual input/output format. \cgalAdvancedEnd - + \subsection arr_ssecarr_io_vis Drawing an Arrangement - + An arrangement data structure can be visualized by calling the \link PkgArrangementOnSurface2Draw CGAL::draw() \endlink function as shown in the following example. This function opens a new window showing the given arrangement. A call to this function is blocking; that is, the program continues execution only after the user closes the window. @@ -6780,9 +6819,9 @@ of 14 vertices, 15 edges, and 3 faces. Notice that the colors are generated at r \cgalFigureEnd - + \section aos_sec-bgl Adapting to Boost Graphs - + \boost\cgalFootnote{See also \boost's homepage at: \cgalFootnoteCode{www.boost.org}.} is a collection of portable \cpp libraries @@ -6806,9 +6845,9 @@ graph vertex with each \dcel face, such that two vertices are connected, iff there is a \dcel halfedge that connects the two corresponding faces. - + \subsection arr_ssecbgl_primal The Primal Arrangement Representation - + Arrangement instances are adapted to \boost graphs by specializing the \link BGLArgtGT `boost::graph_traits` \endlink template for @@ -6913,13 +6952,13 @@ template struct Edge_length { }; \endcode - + \cgalFigureBegin{aos_fig-bgl_primal_adapter,bgl_primal_adapter.png} An arrangement of seven line segments, as constructed by \ref Arrangement_on_surface_2/bgl_primal_adapter.cpp and \ref Arrangement_on_surface_2/bgl_dual_adapter.cpp. \cgalFigureEnd - + In the following example we construct an arrangement of seven line segments, as shown in \cgalFigureRef{aos_fig-bgl_primal_adapter}. @@ -6935,9 +6974,9 @@ squared distances of the vertex from \f$v_0\f$. \cgalExample{Arrangement_on_surface_2/bgl_primal_adapter.cpp} - + \subsection arr_ssecbgl_dual The Dual Arrangement Representation - + An arrangement instance can be represented as a graph other than the one described in the previous section. A dual-graph representation @@ -7002,7 +7041,7 @@ public: }; \endcode - + \cgalFigureBegin{aos_fig-bgl_dual_adapter,bgl_dual_adapter.png} An arrangement of seven line segments, as constructed by \ref Arrangement_on_surface_2/bgl_dual_adapter.cpp and its dual face graph, @@ -7010,7 +7049,7 @@ where every arrangement face is a vertex of the graph. The index of a dual vertex is the discovery time of a breadth-first search applied to the face graph, starting from the unbounded face \f$f_0\f$. \cgalFigureEnd - + The following example constructs the same arrangement constructed by the program coded in \ref @@ -7029,9 +7068,9 @@ is discovered at time \f$0\f$, the neighboring faces \f$f_1\f$, \cgalExample{Arrangement_on_surface_2/bgl_dual_adapter.cpp} - + \section aos_sec-tips How To Speed Up Your Computation - + Before the specific tips, we remind you that compiling programs with debug flags disabled and with optimization flags enabled significantly @@ -7132,9 +7171,9 @@ be avoided by storing the results obtained by the first call, and reusing them when needed. - + \section aos_sec-design Design and Implementation History - + The code of this package is the result of a long development process. Initially (and until version 3.1), the code was spread among several diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt index 1a82a431b56..300970a336e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/PackageDescription.txt @@ -198,46 +198,48 @@ implemented as peripheral classes or as free (global) functions. - `CGAL::Arrangement_on_surface_with_history_2` - `CGAL::Arrangement_2` - `CGAL::Arrangement_with_history_2` -- `CGAL::Arr_accessor` -- `CGAL::Aos_observer` -- `CGAL::Arr_observer` - `CGAL::Arrangement_2::Vertex` - `CGAL::Arrangement_2::Halfedge` - `CGAL::Arrangement_2::Face` +- `CGAL::Arr_accessor` +- `CGAL::Arr_algebraic_segment_traits_2` +- `CGAL::Arr_Bezier_curve_traits_2` +- `CGAL::Arr_bounded_planar_topology_traits_2` +- `CGAL::Arr_circle_segment_traits_2` +- `CGAL::Arr_circular_arc_traits_2` +- `CGAL::Arr_circular_line_arc_traits_2` +- `CGAL::Arr_conic_traits_2` +- `CGAL::Arr_consolidated_curve_data_traits_2` +- `CGAL::Arr_counting_traits_2` +- `CGAL::Arr_curve_data_traits_2` - `CGAL::Arr_dcel_base` - `CGAL::Arr_dcel` - `CGAL::Arr_default_dcel` - `CGAL::Arr_face_extended_dcel` -- `CGAL::Arr_extended_dcel` -- `CGAL::Arr_segment_traits_2` -- `CGAL::Arr_non_caching_segment_traits_2` -- `CGAL::Arr_linear_traits_2` -- `CGAL::Arr_polyline_traits_2` -- `CGAL::Arr_circle_segment_traits_2` -- `CGAL::Arr_line_arc_traits_2` -- `CGAL::Arr_circular_arc_traits_2` -- `CGAL::Arr_circular_line_arc_traits_2` -- `CGAL::Arr_conic_traits_2` -- `CGAL::Arr_rational_function_traits_2` -- `CGAL::Arr_Bezier_curve_traits_2` -- `CGAL::Arr_algebraic_segment_traits_2` -- `CGAL::Arr_geodesic_arc_on_sphere_traits_2` -- `CGAL::Arr_curve_data_traits_2` -- `CGAL::Arr_consolidated_curve_data_traits_2` -- `CGAL::Arr_text_formatter` -- `CGAL::Arr_face_extended_text_formatter` -- `CGAL::Arr_extended_dcel_text_formatter` -- `CGAL::Arr_with_history_text_formatter` -- `CGAL::Arr_naive_point_location` -- `CGAL::Arr_walk_along_line_point_location` -- `CGAL::Arr_trapezoid_ric_point_location` -- `CGAL::Arr_landmarks_point_location` -- `CGAL::Arr_vertex_index_map` - `CGAL::Arr_face_index_map` +- `CGAL::Arr_extended_dcel` +- `CGAL::Arr_extended_dcel_text_formatter` +- `CGAL::Arr_face_extended_text_formatter` +- `CGAL::Arr_geodesic_arc_on_sphere_traits_2` +- `CGAL::Arr_landmarks_point_location` +- `CGAL::Arr_line_arc_traits_2` +- `CGAL::Arr_linear_traits_2` +- `CGAL::Arr_naive_point_location` +- `CGAL::Arr_non_caching_segment_traits_2` +- `CGAL::Arr_observer` +- `CGAL::Arr_polyline_traits_2` - `CGAL::Arr_point_location_result` -- `CGAL::Arr_bounded_planar_topology_traits_2` -- `CGAL::Arr_unb_planar_topology_traits_2` +- `CGAL::Arr_rational_function_traits_2` +- `CGAL::Arr_segment_traits_2` - `CGAL::Arr_spherical_topology_traits_2` +- `CGAL::Arr_text_formatter` +- `CGAL::Arr_tracing_traits_2` +- `CGAL::Arr_trapezoid_ric_point_location` +- `CGAL::Arr_unb_planar_topology_traits_2` +- `CGAL::Arr_vertex_index_map` +- `CGAL::Arr_walk_along_line_point_location` +- `CGAL::Arr_with_history_text_formatter` +- `CGAL::Aos_observer` - `CGAL::CORE_algebraic_number_traits` \cgalCRPSection{Functions} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt index 1196580e382..f3d19cb4c94 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/examples.txt @@ -12,6 +12,7 @@ \example Arrangement_on_surface_2/conics.cpp \example Arrangement_on_surface_2/conic_multiplicities.cpp \example Arrangement_on_surface_2/consolidated_curve_data.cpp +\example Arrangement_on_surface_2/count_and_trace.cpp \example Arrangement_on_surface_2/curve_history.cpp \example Arrangement_on_surface_2/dcel_extension.cpp \example Arrangement_on_surface_2/dcel_extension_io.cpp diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 4ced780ccf2..24fc9354bf6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -18,10 +18,6 @@ #include /*! \file - * A counting traits-class for the arrangement package. - * This is a meta-traits class. It is parameterized with another traits class - * and inherits from it. For each traits method it maintains a counter that - * counts the number of invocations into the method. */ #include @@ -37,7 +33,12 @@ namespace CGAL { /*! \class - * A model of the ArrangementTraits_2 concept that counts the methods invoked. + * A meradata traits-class decorator for the arrangement package. It counts the + * number of invocations of traits-class functors. It is parameterized with + * another traits class and inherits from it. For each traits method it + * maintains a counter that counts the number of invocations into the method. + * + * It models all the concept that the original trais models. */ template class Arr_counting_traits_2 : public BaseTraits { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index af384ee199d..8cf226d4d92 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -17,16 +17,11 @@ #include /*! \file - * A tracing traits-class for the arrangement package. - * This is a meta-traits class. It is parameterized with another traits class - * and inherits from it. For each traits method it prints out its input - * parameters and its output result */ #include #include #include -#include #include #include @@ -35,7 +30,12 @@ namespace CGAL { /*! \class - * A model of the ArrangementTraits_2 concept that counts the methods invoked. + * A meradata traits-class decorator for the arrangement package. It traces the + * invocations of traits-class functors. It is parameterized with another traits + * class and inherits from it. For each traits method it prints out its input + * parameters and its output result + * + * It models all the concept that the original trais models. */ template class Arr_tracing_traits_2 : public BaseTraits { @@ -180,7 +180,6 @@ public: void enable_trace(Operation_id id) { m_flags |= 0x1 << id; } /*! Enable the trace of all traits operations - * \param id the operation identifier */ void enable_all_traces() { m_flags = 0xffffffff; } @@ -190,7 +189,6 @@ public: void disable_trace(Operation_id id) { m_flags &= ~(0x1 << id); } /*! Disable the trace of all traits operations - * \param id the operation identifier */ void disable_all_traces() { m_flags = 0x0; } From cbdadd46f3a5f79468f895bfa78e0de8bc08a63c Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 26 Aug 2024 13:42:53 +0300 Subject: [PATCH 05/34] Fixed spelling --- .../Arrangement_on_surface_2.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 29b5fe371b4..3fc74ccd644 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -168,7 +168,8 @@ Remarks of segments in all the polylines together. The same holds for the more general type polycurve, which are piecewise curves that are not necessarily linear; see Section \ref - arr_sssectr_polycurves. + arr_sssectr_polycurves. + @@ -5472,9 +5473,9 @@ with source endpoint and ending at the target endpoint. Decorator is a structural pattern that allows adding new behaviors to objects by placing them inside special wrapper objects, called -decorators. One type of decoretors attaches auxiliary data to the +decorators. One type of decorators attaches auxiliary data to the geometric objects handled by the original traits. Another type enables -the extraction of debugging and informative metadata. +the retrieval of debugging and informative metadata. \subsubsection arr_sssec_tr_data_decorators Data Decorators @@ -5658,19 +5659,19 @@ the curve-data traits: The package provides two traits-class decorators, namely `Arr_counting_traits_2` and `Arr_tracing_traits_2`, that can be used to insert -debuging and informative metadata to an output stream. The former is +debugging and informative metadata to an output stream. The former is used to count the number of invocations of traits-class functors, and the latter is used to trace these invocations. Note that the -constructors of each of these calss templates applies prefect -forwarding. The counting traits also export the count of traits-class +constructors of each of these calls templates applies prefect +forwarding. The counting traits also exports the count of traits-class objects of specific types constructed during the execution of the -program . The tracing traits supports filtering of traced +program. The tracing traits supports filtering of traced functors. The calls `traits.enable_trace(id)` and `traits.disable_trace(id)` enables and disables the tracing of a functor identified by `id`, respectively. A functor is identified by an enumeration. For example, the functor \link ArrangementTraits_2::Make_x_monotone_2 `Make_x_monotone_2`\endlink is -idenfied by the enumeration +identified by the enumeration `Arr_tracing_traits_2::MAKE_X_MONOTONE_OP`. The calls `traits.enable_all_traces()` and `traits.disable_all_traces()` enables and disables the traces of all functors, respectively. The example From 8644a3d4830a4bb2f53da15cc427d636ea52f3b9 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 11 Sep 2024 10:45:09 +0300 Subject: [PATCH 06/34] Added support for construct_point_2 --- Arrangement_on_surface_2/include/CGAL/Arr_has.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_has.h b/Arrangement_on_surface_2/include/CGAL/Arr_has.h index bba7bbf7862..c5e05b616f4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_has.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_has.h @@ -154,6 +154,15 @@ struct has_construct_opposite_2 : std::false_type {}; template struct has_construct_opposite_2> : std::true_type {}; +// Construct_point_2 +// Helper trait to check for the presence of nested Construct_point_2 +template > +struct has_construct_point_2 : std::false_type {}; + +// Specialization if the nested type Construct_point_2 exists +template +struct has_construct_point_2> : std::true_type {}; + // Compare_endpoints_xy_2 // Helper trait to check for the presence of nested Compare_endpoints_xy_2 template > @@ -163,8 +172,6 @@ struct has_compare_endpoints_xy_2 : std::false_type {}; template struct has_compare_endpoints_xy_2> : std::true_type {}; - - // Approximate_2 // Helper trait to check for the presence of nested Approximate_2 template > @@ -174,7 +181,6 @@ struct has_approximate_2 : std::false_type {}; template struct has_approximate_2> : std::true_type {}; - // Parameter_space_in_x_2 // Helper trait to check for the presence of nested Parameter_space_in_x_2 template > From 2b5b7cea00838cc9c353a50ce39fafb82fe77a0f Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 16 Sep 2024 19:51:30 +0300 Subject: [PATCH 07/34] Fixed return type of operators of Construct_{min,max}_vertex_2 --- .../include/CGAL/Arr_counting_traits_2.h | 14 ++++++++++---- .../include/CGAL/Arr_tracing_traits_2.h | 10 ++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 24fc9354bf6..a477f17a3d5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -173,8 +173,11 @@ public: m_object(base.construct_min_vertex_2_object()), m_counter(counter) {} /*! Operate */ - const Point_2 operator()(const X_monotone_curve_2& xc) const - { ++m_counter; return m_object(xc); } + using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const + { ++m_counter; return m_object(xcv); } }; /*! A functor that obtains the right endpoint of an \f$x\f$-monotone curve. */ @@ -189,8 +192,11 @@ public: m_object(base.construct_max_vertex_2_object()), m_counter(counter) {} /*! Operate */ - const Point_2 operator()(const X_monotone_curve_2& xc) const - { ++m_counter; return m_object(xc); } + using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const + { ++m_counter; return m_object(xcv); } }; /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 8cf226d4d92..4c62763d2f2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -283,7 +283,10 @@ public: * \param xcv the curve the left endpoint of which is obtained * \return the left endpoint */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const { + using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); std::cout << "construct_min_vertex" << std::endl << " xcv: " << xcv << std::endl; @@ -308,7 +311,10 @@ public: * \param xcv the curve the right endpoint of which is obtained * \return the right endpoint */ - const Point_2 operator()(const X_monotone_curve_2& xcv) const { + using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); std::cout << "construct_max_vertex" << std::endl << " xcv: " << xcv << std::endl; From 5a672aadbc70338e886595cb79a60219e0678594 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 6 Nov 2024 17:29:21 +0200 Subject: [PATCH 08/34] Fixed return type --- .../include/CGAL/Arr_tracing_traits_2.h | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 4c62763d2f2..0404654079e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -284,13 +284,14 @@ public: * \return the left endpoint */ using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; - decltype(std::declval(). - operator()(std::declval())) - operator()(const X_monotone_curve_2& xcv) const { + using Return_type = + decltype(std::declval(). + operator()(std::declval())); + Return_type operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); std::cout << "construct_min_vertex" << std::endl << " xcv: " << xcv << std::endl; - Point_2 p = m_object(xcv); + Return_type p = m_object(xcv); std::cout << " result: " << p << std::endl; return p; } @@ -312,19 +313,21 @@ public: * \return the right endpoint */ using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; - decltype(std::declval(). - operator()(std::declval())) - operator()(const X_monotone_curve_2& xcv) const { + using Return_type = + decltype(std::declval(). + operator()(std::declval())); + Return_type operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); std::cout << "construct_max_vertex" << std::endl << " xcv: " << xcv << std::endl; - Point_2 p = m_object(xcv); + Return_type p = m_object(xcv); std::cout << " result: " << p << std::endl; return p; } }; - /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. */ + /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. + */ class Is_vertical_2 { private: typename Base::Is_vertical_2 m_object; @@ -379,8 +382,8 @@ public: } }; - /*! A functor that checks whether two points and two \f$x\f$-monotone curves are - * identical. + /*! A functor that checks whether two points and two \f$x\f$-monotone curves + * are identical. */ class Equal_2 { private: @@ -977,8 +980,8 @@ public: // bottom-top - /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc lies - * on a boundary of the parameter space along the y axis. + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc + * lies on a boundary of the parameter space along the y axis. */ class Parameter_space_in_y_2 { private: From 67ab177f0965ab992dbcab59b44314b01373bc7a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 6 Nov 2024 17:33:57 +0200 Subject: [PATCH 09/34] Updated the changes file --- Installation/CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a393148dc40..7a159e087bf 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -7,6 +7,9 @@ - **Breaking change**: Classes based on the RS Library are no longer provided. +### [2D Arrangements](https://doc.cgal.org/6.1/Manual/packages.html#PkgArrangementOnSurface2) + +- Introduces two traits decorators, namely `Arr_tracing_traits_2` and `Arr_counting_traits_2`, which can be used to extract debugging and informative metadata about the traits in use while a program is being executed. ## [Release 6.0.1](https://github.com/CGAL/cgal/releases/tag/v6.0.1) From bb16c9b1e87f6d90c3f0fdecf25c6f26a9244f7a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 7 Nov 2024 19:21:40 +0200 Subject: [PATCH 10/34] Fixed typos (pointed out by Sebstien) --- .../CGAL/Arr_counting_traits_2.h | 9 ++++----- .../Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h | 7 +++---- .../include/CGAL/Arr_counting_traits_2.h | 9 ++++----- .../include/CGAL/Arr_tracing_traits_2.h | 7 +++---- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h index 95afeefeaef..ba643bb62de 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h @@ -14,12 +14,12 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * - * A meradata traits-class decorator for the arrangement package. It counts the + * A metadata traits-class decorator for the arrangement package. It counts the * number of invocations of traits-class functors. It is parameterized with * another traits class and inherits from it. For each traits method it * maintains a counter that counts the number of invocations into the method. * - * It models all the concept that the original trais models. + * It models all the concepts that the original traits models. */ template @@ -70,8 +70,7 @@ public: template Arr_counting_traits_2(Args ... args) : Base(std::forward(args)...) {} - /*! Disable copy constructor. - */ + /*! Disable copy constructor. */ Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; /// @} @@ -79,7 +78,7 @@ public: /*! Obtain the counter of the given operation */ std::size_t count(Operation_id id) const; - /*! Print the compare_x counter */ + /*! Print the counter associated with an operation. */ template OutStream& print(OutStream& os, Operation_id id) const; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h index bf8f2e983a3..196003aa510 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h @@ -13,12 +13,12 @@ namespace CGAL { /*! \ingroup PkgArrangementOnSurface2TraitsClasses * - * A meradata traits-class decorator for the arrangement package. It traces the + * A metadata traits-class decorator for the arrangement package. It traces the * invocations of traits-class functors. It is parameterized with another traits * class and inherits from it. For each traits method it prints out its input * parameters and its output result * - * It models all the concept that the original trais models. + * It models all the concepts that the original traits models. */ template class Arr_tracing_traits_2 : public BaseTraits { @@ -61,8 +61,7 @@ public: template Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) {} - /*! Disable copy constructor. - */ + /*! Disable copy constructor. */ Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; /// @} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 45900997550..5829e4e7ea5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -33,12 +33,12 @@ namespace CGAL { /*! \class - * A meradata traits-class decorator for the arrangement package. It counts the + * A metadata traits-class decorator for the arrangement package. It counts the * number of invocations of traits-class functors. It is parameterized with * another traits class and inherits from it. For each traits method it * maintains a counter that counts the number of invocations into the method. * - * It models all the concept that the original trais models. + * It models all the concepts that the original traits models. */ template class Arr_counting_traits_2 : public BaseTraits { @@ -93,14 +93,13 @@ public: increment(); } - /*! Disable copy constructor. - */ + /*! Disable copy constructor. */ Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; /*! Obtain the counter of the given operation */ std::size_t count(Operation_id id) const { return m_counters[id]; } - /*! Print the compare_x counter */ + /*! Print the counter associated with an operation. */ template OutStream& print(OutStream& os, Operation_id id) const { if (! m_exist[id]) return os; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 0404654079e..ae5370ed1a9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -30,12 +30,12 @@ namespace CGAL { /*! \class - * A meradata traits-class decorator for the arrangement package. It traces the + * A metadata traits-class decorator for the arrangement package. It traces the * invocations of traits-class functors. It is parameterized with another traits * class and inherits from it. For each traits method it prints out its input * parameters and its output result * - * It models all the concept that the original trais models. + * It models all the concepts that the original traits models. */ template class Arr_tracing_traits_2 : public BaseTraits { @@ -170,8 +170,7 @@ public: Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) { enable_all_traces(); } - /*! Disable copy constructor. - */ + /*! Disable copy constructor. */ Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; /*! Enable the trace of a traits operation From 661b7185f10518eca339dced89ddadcd8fabdcc6 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sun, 10 Nov 2024 12:31:22 +0200 Subject: [PATCH 11/34] Fixed comments: added code-escape and latex-escape symbols. --- .../Arrangement_on_surface_2.txt | 2 +- .../Concepts/ArrTraits--Approximate_2.h | 4 +- .../CGAL/Arr_circle_segment_traits_2.h | 120 +++--- .../include/CGAL/Arr_conic_traits_2.h | 262 ++++++------ .../include/CGAL/Arr_counting_traits_2.h | 54 +-- .../Arr_geodesic_arc_on_sphere_traits_2.h | 402 +++++++++--------- .../include/CGAL/Arr_linear_traits_2.h | 254 +++++------ .../Arr_non_caching_segment_basic_traits_2.h | 58 ++- .../include/CGAL/Arr_segment_traits_2.h | 147 ++++--- .../include/CGAL/Arr_tracing_traits_2.h | 217 +++++----- 10 files changed, 780 insertions(+), 740 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 3fc74ccd644..f178276edab 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -5662,7 +5662,7 @@ The package provides two traits-class decorators, namely debugging and informative metadata to an output stream. The former is used to count the number of invocations of traits-class functors, and the latter is used to trace these invocations. Note that the -constructors of each of these calls templates applies prefect +constructors of each of these class templates applies perfect forwarding. The counting traits also exports the count of traits-class objects of specific types constructed during the execution of the program. The tracing traits supports filtering of traced diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h index 3a43a08c1a2..fc450689a0d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Approximate_2.h @@ -16,8 +16,8 @@ public: /// A model of this concept must provide: /// @{ - /*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i == 0`), or of - * `p`'s \f$y\f$-coordinate (if `i == 1`). + /*! obtains an approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or of + * `p`'s \f$y\f$-coordinate (if `i` == 1). */ CGAL::Approximate_number_type operator()(ArrTraits::Point_2 p, int i); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index f6fbe621739..cc37c9d3534 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -94,8 +94,7 @@ public: class Compare_x_2 { public: - /*! - * Compare the x-coordinates of two points. + /*! Compare the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -111,7 +110,7 @@ public: } }; - /*! Get a Compare_x_2 functor object. */ + /*! Obtain a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object () const { return Compare_x_2(); @@ -151,8 +150,7 @@ public: class Construct_min_vertex_2 { public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! Get the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \return The left endpoint. */ @@ -162,7 +160,7 @@ public: } }; - /*! Get a Construct_min_vertex_2 functor object. */ + /*! Obtain a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object () const { return Construct_min_vertex_2(); @@ -171,8 +169,7 @@ public: class Construct_max_vertex_2 { public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! Get the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -191,8 +188,7 @@ public: class Is_vertical_2 { public: - /*! - * Check whether the given x-monotone curve is a vertical segment. + /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -202,7 +198,7 @@ public: } }; - /*! Get an Is_vertical_2 functor object. */ + /*! Obtain an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); @@ -211,11 +207,10 @@ public: class Compare_y_at_x_2 { public: - /*! - * Return the location of the given point with respect to the input curve. + /*! Return the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. - * \pre p is in the x-range of cv. + * \pre p is in the \f$x\f$-range of `cv`. * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; * EQUAL if p lies on the curve. @@ -229,7 +224,7 @@ public: } }; - /*! Get a Compare_y_at_x_2 functor object. */ + /*! Obtain a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object () const { return Compare_y_at_x_2(); @@ -238,9 +233,8 @@ public: class Compare_y_at_x_right_2 { public: - /*! - * Compares the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! Compares the y value of two \f$x\f$-monotone curves immediately to the + * right of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. @@ -283,7 +277,7 @@ public: } }; - /*! Get a Compare_y_at_x_right_2 functor object. */ + /*! Obtain a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const { return Compare_y_at_x_right_2(); @@ -292,16 +286,15 @@ public: class Compare_y_at_x_left_2 { public: - /*! - * Compares the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! Compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \pre The point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator() (const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -338,7 +331,7 @@ public: } }; - /*! Get a Compare_y_at_x_left_2 functor object. */ + /*! Obtain a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const { return Compare_y_at_x_left_2(); @@ -347,8 +340,8 @@ public: class Equal_2 { public: - /*! - * Check if the two x-monotone curves are the same (have the same graph). + /*! Check if the two \f$x\f$-monotone curves are the same (have the same + * graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -374,7 +367,7 @@ public: } }; - /*! Get an Equal_2 functor object. */ + /*! Obtain an `Equal_2` functor object. */ Equal_2 equal_2_object () const { return Equal_2(); @@ -406,9 +399,9 @@ public: /*! Obtain an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1)); @@ -554,7 +547,7 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! Obtain an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //@} @@ -562,7 +555,7 @@ public: //@{ /*! \class - * A functor for subdividing a curve into x-monotone curves. + * A functor for subdividing a curve into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { private: @@ -573,8 +566,8 @@ public: public: Make_x_monotone_2(bool use_cache = false) : m_use_cache(use_cache) {} - /*! Subdivide a given circular arc or line segment into x-monotone subcurves - * and insert them to a given output iterator. + /*! Subdivide a given circular arc or line segment into \f$x\f$-monotone + * subcurves and insert them to a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -632,7 +625,7 @@ public: else { // Act according to the number of vertical tangency points. if (n_vpts == 2) { - // Subdivide the circular arc into three x-monotone arcs. + // Subdivide the circular arc into three \f$x\f$-monotone arcs. *oi++ = X_monotone_curve_2(circ, cv.source(), vpts[0], cv.orientation(), @@ -650,7 +643,7 @@ public: index); } else if (n_vpts == 1) { - // Subdivide the circular arc into two x-monotone arcs. + // Subdivide the circular arc into two \f$x\f$-monotone arcs. *oi++ = X_monotone_curve_2(circ, cv.source(), vpts[0], @@ -666,7 +659,7 @@ public: else { CGAL_assertion(n_vpts == 0); - // The arc is already x-monotone: + // The arc is already \f$x\f$-monotone: *oi++ = X_monotone_curve_2(circ, cv.source(), cv.target(), @@ -679,7 +672,7 @@ public: } }; - /*! Get a Make_x_monotone_2 functor object. */ + /*! Obtain a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(m_use_cache); } @@ -687,13 +680,13 @@ public: { public: - /*! - * Split a given x-monotone curve at a given point into two sub-curves. + /*! Split a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param cv The curve to split * \param p The split point. - * \param c1 Output: The left resulting subcurve (p is its right endpoint). - * \param c2 Output: The right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its end-points. + * \param c1 Output: The left resulting subcurve (`p` is its right endpoint). + * \param c2 Output: The right resulting subcurve (`p` is its left endpoint). + * \pre `p` lies on cv but is not one of its end-points. */ void operator() (const X_monotone_curve_2& cv, const Point_2& p, X_monotone_curve_2& c1, X_monotone_curve_2& c2) const @@ -707,7 +700,7 @@ public: } }; - /*! Get a Split_2 functor object. */ + /*! Obtain a `Split_2` functor object. */ Split_2 split_2_object () const { return Split_2(); @@ -736,18 +729,18 @@ public: { return (cv1.intersect(cv2, oi, &_inter_map)); } }; - /*! Get an Intersect_2 functor object. */ + /*! Obtain an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return (Intersect_2(inter_map)); } class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. - * \return (true) if the two curves are mergeable - if they are supported - * by the same line and share a common endpoint; (false) otherwise. + * \return (true) if `cv1` and `cv2` are mergeable, that is, if they are + * supported by the same line and share a common endpoint; (false) + * otherwise. */ bool operator() (const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const @@ -756,14 +749,14 @@ public: } }; - /*! Get an Are_mergeable_2 functor object. */ + /*! Obtain an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { @@ -781,8 +774,7 @@ public: friend class Arr_circle_segment_traits_2; public: - /*! - * Merge two given x-monotone curves into a single curve. + /*! Merge two given \f$x\f$-monotone curves into a single curve. * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -799,7 +791,7 @@ public: } }; - /*! Get a Merge_2 functor object. */ + /*! Obtain a `Merge_2` functor object. */ Merge_2 merge_2_object () const { return Merge_2(this); @@ -808,10 +800,9 @@ public: class Compare_endpoints_xy_2 { public: - /*! - * compare lexicogrphic the endpoints of a x-monotone curve. + /*! compare lexicogrphic the endpoints of a \f$x\f$-monotone curve. * \param cv the curve - * \return SMALLER if the curve is directed right, else return SMALLER + * \return `SMALLER` if the curve is directed right, else return `LARGER`. */ Comparison_result operator()(const X_monotone_curve_2& cv) const { @@ -821,7 +812,7 @@ public: } }; - /*! Get a Compare_endpoints_xy_2 functor object. */ + /*! Obtain a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); @@ -830,10 +821,9 @@ public: class Construct_opposite_2 { public: - /*! - * construct an opposite x-monotone curve. + /*! construct an opposite \f$x\f$-monotone curve. * \param cv the curve - * \return an opposite x-monotone curve. + * \return an opposite \f$x\f$-monotone curve. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) const { @@ -841,7 +831,7 @@ public: } }; - /*! Get a Construct_opposite_2 functor object. */ + /*! Obtain a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); @@ -893,7 +883,7 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! Obtain a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } // @} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 6a5f37ec4cf..290e9e1e22e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -179,7 +179,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compare the x-coordinates of two points. + /*! Compare the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -190,7 +190,7 @@ public: { return m_traits.m_alg_kernel->compare_x_2_object()(p1, p2); } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! Obtain a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } class Compare_xy_2 { @@ -219,12 +219,12 @@ public: { return m_traits.m_alg_kernel->compare_xy_2_object()(p1, p2); } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! Obtain a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of an x-monotone arc. + /*! Obtain the left endpoint of an \f$x\f$-monotone arc. * \param cv The arc. * \return The left endpoint. */ @@ -232,13 +232,13 @@ public: { return xcv.left(); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! Obtain a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the x-monotone arc. + /*! Obtain the right endpoint of the \f$x\f$-monotone arc. * \param cv The arc. * \return The right endpoint. */ @@ -252,7 +252,7 @@ public: class Is_vertical_2 { public: - /*! Check whether a given x-monotone arc is a vertical segment. + /*! Check whether a given \f$x\f$-monotone arc is a vertical segment. * \param cv The vertical segment. * \return `true` if the arc is a vertical segment; `false` otherwise. */ @@ -260,7 +260,7 @@ public: { return cv.is_vertical(); } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! Obtain an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } class Compare_y_at_x_2 { @@ -292,8 +292,8 @@ public: if (xcv.is_vertical()) { // A special treatment for vertical segments: - // In case p has the same x c-ordinate of the vertical segment, compare - // it to the segment endpoints to determine its position. + // In case p has the same \f$x\f$-coordinate of the vertical segment, + // compare it to the segment endpoints to determine its position. Comparison_result res1 = cmp_y(p, xcv.left()); Comparison_result res2 = cmp_y(p, xcv.right()); return (res1 == res2) ? res1 : EQUAL; @@ -302,7 +302,8 @@ public: // Check whether the point is exactly on the curve. if (m_traits.contains_point(xcv, p)) return EQUAL; - // Obtain a point q on the x-monotone arc with the same x coordinate as p. + // Obtain a point q on the \f$x\f$-monotone arc with the same + // \f$x\f$-coordinate as p. Point_2 q; auto cmp_x = m_traits.m_alg_kernel->compare_x_2_object(); @@ -318,12 +319,13 @@ public: } } - // Compare p with the a point of the curve with the same x coordinate. + // Compare p with the a point of the curve with the same + // \f$x\f$-coordinate. return cmp_y(p, q); } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! Obtain a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -470,14 +472,14 @@ public: xcv2.test_flag(X_monotone_curve_2::FACING_UP)) return SMALLER; - // Compute the second-order derivative by y and act according to it. + // Compute the second-order derivative by \f$y\f$ and act according to it. xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); Comparison_result slope_res = CGAL::compare(slope2_numer*slope1_denom, slope1_numer*slope2_denom); - // If necessary, use the third-order derivative by y. + // If necessary, use the third-order derivative by \f$y\f$. if (slope_res == EQUAL) { // \todo Check this! xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); @@ -501,7 +503,7 @@ public: }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! Obtain a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -643,14 +645,14 @@ public: else if (xcv1.test_flag(X_monotone_curve_2::FACING_DOWN) && xcv2.test_flag(X_monotone_curve_2::FACING_UP)) return SMALLER; - // Compute the second-order derivative by y and act according to it. + // Compute the second-order derivative by \f$y\f$ and act according to it. xcv1.derive_by_y_at(p, 2, slope1_numer, slope1_denom); xcv2.derive_by_y_at(p, 2, slope2_numer, slope2_denom); Comparison_result slope_res = CGAL::compare(slope1_numer*slope2_denom, slope2_numer*slope1_denom); - // If necessary, use the third-order derivative by y. + // If necessary, use the third-order derivative by \f$y\f$. if (slope_res == EQUAL) { // \todo Check this! xcv1.derive_by_y_at(p, 3, slope1_numer, slope1_denom); @@ -671,7 +673,7 @@ public: }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! Obtain a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -747,7 +749,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! Obtain an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -755,7 +757,7 @@ public: //@{ /*! A function object that obtains the parameter space of a geometric - * entity along the \f$x-\f$xaxis. + * entity along the \f$x\f$x-axis. */ class Parameter_space_in_x_2 { public: @@ -785,12 +787,12 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! Obtain a `Parameter_space_in_x_2` function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis + * entity along the \f$y\f$-axis */ class Parameter_space_in_y_2 { public: @@ -825,7 +827,7 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! Obtain a `Parameter_space_in_y_2` function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } @@ -835,7 +837,7 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing curves into x-monotone curves. + * A functor for subdividing curves into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { protected: @@ -874,17 +876,17 @@ public: Alg_point_2 vtan_ps[2]; auto n_vtan_ps = m_traits.vertical_tangency_points(cv, vtan_ps); if (n_vtan_ps == 0) { - // In case the given curve is already x-monotone: + // In case the given curve is already \f$x\f$-monotone: *oi++ = ctr_xcv(cv, conic_id); return oi; } - // Split the conic arc into x-monotone sub-curves. + // Split the conic arc into \f$x\f$-monotone sub-curves. if (cv.is_full_conic()) { // Make sure we have two vertical tangency points. CGAL_assertion(n_vtan_ps == 2); - // In case the curve is a full conic, split it into two x-monotone + // In case the curve is a full conic, split it into two \f$x\f$-monotone // arcs, one going from ps[0] to ps[1], and the other from ps[1] to // ps[0]. *oi++ = ctr_xcv(cv, vtan_ps[0], vtan_ps[1], conic_id); @@ -892,8 +894,8 @@ public: } else { if (n_vtan_ps == 1) { - // Split the arc into two x-monotone sub-curves: one going from the - // arc source to ps[0], and the other from ps[0] to the target. + // Split the arc into two \f$x\f$-monotone sub-curves: one going from + // the arc source to ps[0], and the other from ps[0] to the target. *oi++ = ctr_xcv(cv, cv.source(), vtan_ps[0], conic_id); *oi++ = ctr_xcv(cv, vtan_ps[0], cv.target(), conic_id); } @@ -924,7 +926,7 @@ public: ind_second = 0; } - // Split the arc into three x-monotone sub-curves. + // Split the arc into three \f$x\f$-monotone sub-curves. *oi++ = ctr_xcv(cv, cv.source(), vtan_ps[ind_first], conic_id); @@ -942,7 +944,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! Obtain a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -1017,7 +1019,7 @@ public: }; - /*! Obtain a Split_2 functor object. */ + /*! Obtain a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -1152,7 +1154,7 @@ public: else { const auto* extra_data2 = xcv2.extra_data(); - // Compute the x-coordinates of the intersection points. + // Compute the \f$x\f$-coordinates of the intersection points. n_xs = compute_resultant_roots(*nt_traits, xcv1.alg_r(), xcv1.alg_s(), xcv1.alg_t(), xcv1.alg_u(), @@ -1164,7 +1166,7 @@ public: xs); CGAL_assertion(n_xs <= 2); - // Compute the y-coordinates of the intersection points. + // Compute the \f$y\f$-coordinates of the intersection points. n_ys = compute_resultant_roots(*nt_traits, xcv1.alg_s(), xcv1.alg_r(), xcv1.alg_t(), xcv1.alg_v(), @@ -1178,7 +1180,7 @@ public: } } else { - // Compute the x-coordinates of the intersection points. + // Compute the \f$x\f$-coordinates of the intersection points. n_xs = compute_resultant_roots(*nt_traits, xcv1.r(), xcv1.s(), xcv1.t(), xcv1.u(), xcv1.v(), xcv1.w(), @@ -1189,7 +1191,7 @@ public: xs); CGAL_assertion(n_xs <= 4); - // Compute the y-coordinates of the intersection points. + // Compute the \f$y\f$-coordinates of the intersection points. n_ys = compute_resultant_roots(*nt_traits, xcv1.s(), xcv1.r(), xcv1.t(), xcv1.v(), xcv1.u(), xcv1.w(), @@ -1202,8 +1204,8 @@ public: } // Pair the coordinates of the intersection points. As the vectors of - // x and y-coordinates are sorted in ascending order, we output the - // intersection points in lexicographically ascending order. + // \f$x\f$- and \f$y\f$-coordinates are sorted in ascending order, we + // output the intersection points in lexicographically ascending order. Multiplicity mult; int i, j; @@ -1249,9 +1251,9 @@ public: else { CGAL_assertion((n_xs == 2) && (n_ys == 2)); - // The x-coordinates and the y-coordinates are given in ascending - // order. If the slope of the segment is positive, we pair the - // coordinates as is - otherwise, we swap the pairs. + // The \f$x\f$-coordinates and the \f$y\f$-coordinates are given in + // ascending order. If the slope of the segment is positive, we pair + // the coordinates as is; otherwise, we swap the pairs. int ind_first_y(0), ind_second_y(1); const auto* extra_data2 = xcv2.extra_data(); @@ -1315,7 +1317,8 @@ public: X_monotone_curve_2 overlap; if (compute_overlap(xcv1, xcv2, overlap)) { - // There can be just a single overlap between two x-monotone arcs: + // There can be just a single overlap between two \f$x\f$-monotone + // arcs: *oi++ = overlap; return oi; } @@ -1382,7 +1385,7 @@ public: } // Go over the list of intersection points and report those that lie on - // both x-monotone arcs. + // both \f$x\f$-monotone arcs. for (auto iter = inter_list.begin(); iter != inter_list.end(); ++iter) { if (m_traits.is_between_endpoints(xcv1, (*iter).first) && m_traits.is_between_endpoints(xcv2, (*iter).first)) @@ -1395,7 +1398,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! Obtain an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -1413,7 +1416,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. * \param xcv1 The first arc. * \param xcv2 The second arc. * \return `true` if the two curves are mergeable; that is, they are @@ -1444,12 +1447,12 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! Obtain an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { protected: @@ -1466,7 +1469,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (segment). + /*! Merge two given \f$x\f$-monotone curves into a single curve (segment). * \param xcv1 The first arc. * \param xcv2 The second arc. * \param xcv The merged arc. @@ -1507,7 +1510,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! Obtain a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -1656,9 +1659,9 @@ public: /*! Obtain an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1)); @@ -1763,7 +1766,8 @@ public: * 𝐶𝑦 = 𝐶𝑥′·𝑠𝑖𝑛𝜃 + 𝐶𝑦′·𝑐𝑜𝑠𝜃 * * The parametric formula of an ellipse centered at the origin with major - * axis parallel to the x-axis and minor axis parallel to the y-axis is: + * axis parallel to the \f$x\f$-axis and minor axis parallel to the + * \f$y\f$-axis is: * 𝑥(𝛼) = a·𝑐𝑜𝑠(𝛼) * 𝑦(𝛼) = b·𝑠𝑖𝑛(𝛼) * where a is the major radius and b is the minor radius. @@ -2048,7 +2052,7 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! Obtain an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //! Functor @@ -2200,7 +2204,7 @@ public: }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! Obtain a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const { return Construct_x_monotone_curve_2(*this); } @@ -2511,8 +2515,8 @@ public: (CGAL::sign(aux_coeffs[1]) == ZERO) && (CGAL::sign(aux_coeffs[2]) == ZERO)) ? 1 : 2; - // Compute the x- and y-coordinates of intersection points of the base - // conic and the k'th auxiliary conic. + // Compute the \f$x\f$- and \f$y\f$-coordinates of intersection points + // of the base conic and the k'th auxiliary conic. int n_xs = compute_resultant_roots(*nt_traits, base_coeffs[0], base_coeffs[1], base_coeffs[2], @@ -2781,7 +2785,7 @@ public: } }; - /*! Obtain a Construct_curve_2 functor object. */ + /*! Obtain a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } //@} @@ -2801,13 +2805,13 @@ public: { return (cv.is_directed_right()) ? SMALLER : LARGER; } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! Obtain a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite x-monotone (with swapped source and target). + /*! Construct an opposite \f$x\f$-monotone (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -2815,7 +2819,7 @@ public: { return cv.flip(); } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! Obtain a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } @@ -2917,7 +2921,7 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! Obtain a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } //@} @@ -3002,7 +3006,8 @@ public: CGAL::to_double(xcv.target().y()) : CGAL::to_double(xcv.source().y()); - // Go over the vertical tangency points and try to update the x-points. + // Go over the vertical tangency points and try to update the + // \f$x\f$-points. Alg_point_2 tan_ps[2]; auto n_tan_ps = m_traits.vertical_tangency_points(xcv, tan_ps); for (decltype(n_tan_ps) i = 0; i < n_tan_ps; ++i) { @@ -3012,7 +3017,8 @@ public: x_max = CGAL::to_double(tan_ps[i].x()); } - // Go over the horizontal tangency points and try to update the y-points. + // Go over the horizontal tangency points and try to update the + // \f$y\f$-points. n_tan_ps = m_traits.horizontal_tangency_points(xcv, tan_ps); for (decltype(n_tan_ps) i = 0; i < n_tan_ps; ++i) { if (CGAL::to_double(tan_ps[i].y()) < y_min) @@ -3027,7 +3033,7 @@ public: } }; - /*! Obtain a Bbox_2 functor object. */ + /*! Obtain a `Bbox_2` functor object. */ Construct_bbox_2 construct_bbox_2_object() const { return Construct_bbox_2(*this); } //@} @@ -3267,23 +3273,24 @@ public: Comparison_result res2; if (m_alg_kernel->compare_x_2_object()(source, target) == EQUAL) { - // In case of a vertical segment - just check whether the y coordinate - // of p is between those of the source's and of the target's. + // In case of a vertical segment - just check whether the + // \f$y\f$-coordinate of p is between those of the source's and of the + // target's. auto cmp_y = m_alg_kernel->compare_y_2_object(); res1 = cmp_y(p, source); res2 = cmp_y(p, target); } else { - // Otherwise, since the segment is x-monotone, just check whether the - // x coordinate of p is between those of the source's and of the - // target's. + // Otherwise, since the segment is \f$x\f$-monotone, just check whether + // the \f$x\f$-coordinate of p is between those of the source's and of + // the target's. auto cmp_x = m_alg_kernel->compare_x_2_object(); res1 = cmp_x(p, source); res2 = cmp_x(p, target); } - // If p is not in the (open) x-range (or y-range) of the segment, it - // cannot be contained in the segment. + // If p is not in the (open) \f$x\f$-range (or \f$y\f$-range) of the + // segment, it cannot be contained in the segment. if ((res1 == EQUAL) || (res2 == EQUAL) || (res1 == res2)) return false; // Perform an orientation test: This is crucial for segment of line @@ -3393,16 +3400,18 @@ public: CGAL_assertion(side == cv.sign_of_extra_data(target.x(), target.y())); } - /*! Find the x coordinates of the underlying conic at a given y coordinate. - * \param y The y coordinate. - * \param xs The output x coordinates. - * \pre The vector xs must be allocated at the size of 2. - * \return The number of x coordinates computed (either 0, 1 or 2). + /*! Find the \f$x\f$-coordinates of the underlying conic at a given + * \f$y\f$-coordinate. + * \param y The \f$y\f$-coordinate. + * \param xs The output \f$x\f$-coordinates. + * \pre The vector `xs` must be allocated at the size of 2. + * \return The number of \f$x\f$-coordinates computed (either 0, 1 or 2). */ int conic_get_x_coordinates(const Curve_2& cv, const Algebraic& y, Algebraic* xs) const { - // Solve the quadratic equation for a given y and find the x values: - // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 + // Solve the quadratic equation for a given \f$y\f$ and find the \f$x\f$ + // values: + // \f$r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0\f$ Algebraic A = m_nt_traits->convert(cv.r()); Algebraic B = m_nt_traits->convert(cv.t())*y + m_nt_traits->convert(cv.u()); Algebraic C = @@ -3412,16 +3421,18 @@ public: return solve_quadratic_equation(A, B, C, xs[0], xs[1]); } - /*! Find the y coordinates of the underlying conic at a given x coordinate. - * \param x The x coordinate. - * \param ys The output y coordinates. - * \pre The vector ys must be allocated at the size of 2. - * \return The number of y coordinates computed (either 0, 1 or 2). + /*! Find the \f$y\f$-coordinates of the underlying conic at a given + * \f$x\f$-coordinate. + * \param x The \f$x\f$-coordinate. + * \param ys The output \f$y\f$-coordinates. + * \pre The vector `ys` must be allocated at the size of 2. + * \return The number of \f$y\f$-coordinates computed (either 0, 1 or 2). */ int conic_get_y_coordinates(const Curve_2& cv, const Algebraic& x, Algebraic* ys) const { - // Solve the quadratic equation for a given x and find the y values: - // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 + // Solve the quadratic equation for a given \f$x\f$ and find the \f$y\f$ + // values: + // \f$s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0\f$ Algebraic A = m_nt_traits->convert(cv.s()); Algebraic B = m_nt_traits->convert(cv.t())*x + m_nt_traits->convert(cv.v()); Algebraic C = @@ -3475,7 +3486,7 @@ public: * \return A point on the arc with the same \f$x\f$-coordiante as `p`. */ Point_2 point_at_x(const X_monotone_curve_2& xcv, const Point_2& p) const { - // Make sure that p is in the x-range of the arc. + // Make sure that p is in the \f$x\f$-range of the arc. CGAL_precondition(! xcv.is_vertical()); CGAL_precondition_code(auto cmp_x = m_alg_kernel->compare_x_2_object()); @@ -3493,14 +3504,14 @@ public: return Point_2(p.x(), y); } - // Compute the y-coordinate according to the degree of the supporting + // Compute the \f$y\f$-coordinate according to the degree of the supporting // conic curve. Algebraic y; if (xcv.degree_mask() == X_monotone_curve_2::degree_1_mask()) { - // In case of a linear curve, the y-coordinate is a simple linear + // In case of a linear curve, the \f$y\f$-coordinate is a simple linear // expression of x(p) (note that v is not 0 as the arc is not vertical): - // y = -(u*x(p) + w) / v + // \f$y = -(u*x(p) + w) / v\f$ y = -(xcv.alg_u()*p.x() + xcv.alg_w()) / xcv.alg_v(); } else if (xcv.orientation() == COLLINEAR) { @@ -3514,8 +3525,8 @@ public: else { CGAL_assertion(xcv.degree_mask() == X_monotone_curve_2::degree_2_mask()); - // In this case the y-coordinate is one of solutions to the quadratic - // equation: + // In this case the \f$y\f$-coordinate is one of solutions to the + // quadratic equation: // s*y^2 + (t*x(p) + v)*y + (r*x(p)^2 + u*x(p) + w) = 0 Algebraic A = xcv.alg_s(); Algebraic B = xcv.alg_t()*p.x() + xcv.alg_v(); @@ -3552,7 +3563,7 @@ public: * \return The number of points found. */ int points_at_x(const Curve_2& cv, const Point_2& p, Alg_point_2* ps) const { - // Get the y coordinates of the points on the conic. + // Get the \f$y\f$-coordinates of the points on the conic. Algebraic ys[2]; int n = conic_get_y_coordinates(cv, p.x(), ys); @@ -3576,7 +3587,7 @@ public: * \return The number of points found. */ int points_at_y(const Curve_2& cv, const Point_2& p, Alg_point_2* ps) const { - // Get the y coordinates of the points on the conic. + // Get the \f$y\f$-coordinates of the points on the conic. Algebraic xs[2]; int n = conic_get_x_coordinates(cv, p.y(), xs); @@ -3593,7 +3604,7 @@ public: return m; } - /*! Set the properties of the x-monotone conic arc (for the usage of the + /*! Set the properties of the \f$x\f$-monotone conic arc (for the usage of the * constructors). */ void set_x_monotone(X_monotone_curve_2& xcv) const { @@ -3650,8 +3661,8 @@ public: xcv.set_flag(X_monotone_curve_2::DEGREE_2); - // Compute a midpoint between the source and the target and get the y-value - // of the arc at its x-coordiante. + // Compute a midpoint between the source and the target and get the + // \f$y\f$-value of the arc at its \f$x\f$-coordiante. Point_2 p_mid = m_alg_kernel->construct_midpoint_2_object()(xcv.source(), xcv.target()); Algebraic ys[2]; @@ -3660,12 +3671,12 @@ public: CGAL_assertion(n_ys != 0); - // Check which solution lies on the x-monotone arc. + // Check which solution lies on the \f$x\f$-monotone arc. Point_2 p_arc_mid(p_mid.x(), ys[0]); if (is_strictly_between_endpoints(xcv, p_arc_mid)) { // Mark that we should use the -sqrt(disc) root for points on this - // x-monotone arc. + // \f$x\f$-monotone arc. xcv.reset_flag(X_monotone_curve_2::PLUS_SQRT_DISC_ROOT); } else { @@ -3674,15 +3685,16 @@ public: CGAL_assertion(is_strictly_between_endpoints(xcv, p_arc_mid)); // Mark that we should use the +sqrt(disc) root for points on this - // x-monotone arc. + // \f$x\f$-monotone arc. xcv.set_flag(X_monotone_curve_2::PLUS_SQRT_DISC_ROOT); } - // Check whether the conic is facing up or facing down: - // Check whether the arc (which is x-monotone of degree 2) lies above or - // below the segment that connects its two end-points (x1,y1) and (x2,y2). - // To do that, we find the y coordinate of a point on the arc whose x - // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2. + // Check whether the conic is facing up or facing down: Check whether the + // arc (which is \f$x\f$-monotone of degree 2) lies above or below the + // segment that connects its two end-points (x1,y1) and (x2,y2). To do + // that, we find the \f$y\f$-coordinate of a point on the arc whose + // \f$x\f$ coordinate is \f$x(x1+x2)/2\f$x and compare it to + // \f$x(y1+y2)/2\f$x. auto cmp_y = m_alg_kernel->compare_y_2_object(); Comparison_result res = cmp_y(p_arc_mid, p_mid); @@ -3788,11 +3800,12 @@ public: // vertical tangency points. if (CGAL::sign(cv.s()) == ZERO) return 0; - // We are interested in the x coordinates where the quadratic equation: - // s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0 - // has a single solution (obviously if s = 0, there are no such points). - // We therefore demand that the discriminant of this equation is zero: - // (t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0 + // We are interested in the \f$x\f$-coordinates where the quadratic + // equation: + // \f$s*y^2 + (t*x + v)*y + (r*x^2 + u*x + w) = 0\f$ + // has a single solution (obviously if \f$s = 0\f$, there are no such + // points). We therefore demand that the discriminant of this equation is + // zero: \f$(t*x + v)^2 - 4*s*(r*x^2 + u*x + w) = 0\f$. const Integer two(2); const Integer four(4); Algebraic xs[2]; @@ -3809,13 +3822,13 @@ public: xs); auto n_xs = static_cast(xs_end - xs); - // Find the y-coordinates of the vertical tangency points. + // Find the \f$y\f$-coordinates of the vertical tangency points. Algebraic ys[2]; Algebraic* ys_end; int n_ys; if (CGAL::sign(cv.t()) == ZERO) { - // The two vertical tangency points have the same y coordinate: + // The two vertical tangency points have the same \f$y\f$-coordinate: ys[0] = m_nt_traits->convert(Integer(- v)) / m_nt_traits->convert(Integer(two * s)); n_ys = 1; } @@ -3828,7 +3841,8 @@ public: n_ys = static_cast(ys_end - ys); } - // Pair the x and y coordinates and obtain the vertical tangency points. + // Pair the \f$x\f$- and \f$y\f$-coordinates and obtain the vertical + // tangency points. int n(0); for (int i = 0; i < n_xs; ++i) { @@ -3889,11 +3903,11 @@ public: // vertical tangency points. if (CGAL::sign(cv.r()) == ZERO) return 0; - // We are interested in the y coordinates were the quadratic equation: - // r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0 - // has a single solution (obviously if r = 0, there are no such points). - // We therefore demand that the discriminant of this equation is zero: - // (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0 + // We are interested in the \f$y\f$-coordinates were the quadratic equation: + // \f$r*x^2 + (t*y + u)*x + (s*y^2 + v*y + w) = 0\f$ + // has a single solution (obviously if \f$r = 0\f$, there are no such + // points). We therefore demand that the discriminant of this equation is + // zero: \f$(t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0\f$ const Integer two(2); const Integer four(4); Algebraic ys[2]; @@ -3911,10 +3925,12 @@ public: ys); auto n = static_cast(ys_end - ys); - // Compute the x coordinates and construct the horizontal tangency points. + // Compute the \f$x\f$-coordinates and construct the horizontal tangency + // points. for (int i = 0; i < n; ++i) { - // Having computed y, x is the single solution to the quadratic equation - // above, and since its discriminant is 0, x is simply given by: + // Having computed \f$y\f$, \f$x\f$ is the single solution to the + // quadratic equation above, and since its discriminant is 0, \f$x\f$ is + // simply given by: Algebraic x = -(m_nt_traits->convert(t)*ys[i] + m_nt_traits->convert(u)) / m_nt_traits->convert(Integer(two*r)); ps[i] = Point_2(x, ys[i]); @@ -4201,7 +4217,7 @@ public: // << ") => (" << xt << "," << yt << ")" // << std::endl; - // If the hyperbola conjugate axis is the Y-axis, add + // If the hyperbola conjugate axis is the \f$Y\f$-axis, add canonical_conic(xcv, r_m, s_m, t_m, u_m, v_m, w_m, cost, sint); // std::cout << r_m << "," << s_m << "," << t_m << "," // << u_m << "," << v_m << "," << w_m << std::endl; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 5829e4e7ea5..3edcd6dadff 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -144,7 +144,8 @@ public: { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that compares two points lexigoraphically: by x, then by y. */ + /*! A functor that compares two points lexigoraphically: by \f$x\f$, then by + * \f$y\f$. */ class Compare_xy_2 { private: typename Base::Compare_xy_2 m_object; @@ -214,7 +215,7 @@ public: { ++m_counter; return m_object(xc); } }; - /*! A functor that compares the y-coordinates of a point and an + /*! A functor that compares the \f$y\f$-coordinates of a point and an * \f$x\f$-monotone curve at the point \f$x\f$-coordinate. */ class Compare_y_at_x_2 { @@ -233,8 +234,8 @@ public: { ++m_counter; return m_object(p, xc); } }; - /*! A functor that checks whether two points and two \f$x\f$-monotone curves are - * identical. + /*! A functor that checks whether two points and two \f$x\f$-monotone curves + * are identical. */ class Equal_2 { private: @@ -259,8 +260,9 @@ public: { ++m_counter2; return m_object(xc1, xc2); } }; - /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone - * curves immediately to the left of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the left of their intersection + * point. */ class Compare_y_at_x_left_2 { private: @@ -279,8 +281,9 @@ public: { ++m_counter; return m_object(xc1, xc2, p); } }; - /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone - * curves immediately to the right of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the right of their intersection + * point. */ class Compare_y_at_x_right_2 { private: @@ -312,11 +315,11 @@ public: Make_x_monotone_2(const Base& base, std::size_t& counter) : m_object(base.make_x_monotone_2_object()), m_counter(counter) {} - /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them into - * a given output iterator. + /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its value type is a variant - * that wraps Point_2 or an X_monotone_curve_2 objects. + * that wraps `Point_2` or an `X_monotone_curve_2` objects. * \return The past-the-end iterator. */ template @@ -429,7 +432,8 @@ public: { ++m_counter; return m_object(xc); } }; - /*! A functor that approximates coordinates, points, and \f$x\f$-monotone curves. + /*! A functor that approximates coordinates, points, and \f$x\f$-monotone + * curves. */ class Approximate_2 { private: @@ -455,9 +459,9 @@ public: /*! Obtain an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's \f$x\f$-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, std::size_t i) const { ++m_counter1; return m_object(p, i); } @@ -477,8 +481,8 @@ public: // left-right - /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve lies - * on a boundary of the parameter space along the x axis. + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve + * lies on a boundary of the parameter space along the \f$x\f$-axis. */ class Parameter_space_in_x_2 { private: @@ -533,7 +537,7 @@ public: { ++m_counter2; return m_object(xc); } }; - /*! A functor that compares the y-coordinate of two given points + /*! A functor that compares the \f$y\f$-coordinate of two given points * that lie on vertical boundaries. */ class Compare_y_on_boundary_2 { @@ -551,7 +555,7 @@ public: { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that compares the y-coordinates of curve ends near the + /*! A functor that compares the \f$y\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -573,8 +577,8 @@ public: // bottom-top - /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc lies - * on a boundary of the parameter space along the y axis. + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc + * lies on a boundary of the parameter space along the \f$y\f$-axis. */ class Parameter_space_in_y_2 { private: @@ -602,7 +606,7 @@ public: }; /*! A functor that determines whether a point or a curve lies on an - * identification in x. + * identification in \f$x\f$. */ class Is_on_y_identification_2 { private: @@ -801,9 +805,9 @@ public: //@} - /*! Increment the construction counter - * \param doit indicates whethet to actually inceremnt the counter or not - * \return the counter at the end of the operation + /*! Increment the construction counter. + * \param doit indicates whethet to actually inceremnt the counter or not. + * \return the counter at the end of the operation. */ static std::size_t increment(bool doit = true) { #ifdef CGAL_NO_ATOMIC diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index 65ab748e0ee..7039cc0167e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -41,7 +41,7 @@ namespace CGAL { /*! Represent an extended 3D direction that is used in turn to represent a * spherical-arc endpoint. The extended data consists of two flags that - * indicate whether the point is on the x and on a y boundaries, + * indicate whether the point is on the \f$x\f$- and on a \f$y\f$-boundaries, * respectively. */ template @@ -162,10 +162,10 @@ public: using Vector_2 = typename Kernel::Vector_2; protected: - /*! Obtain the intersection of the identification arc and the xy plane. - * By default, it is the vector directed along the negative x axis - * (x = -infinity). - * \return the intersection of the identification arc and the xy plane. + /*! Obtain the intersection of the identification arc and the \f$xy\f$-plane. + * By default, it is the vector directed along the negative \f$x\f$-axis + * (\f$x = -\infty\f$). + * \return the intersection of the identification arc and the \f$xy\f$-plane. */ inline static const Direction_2& identification_xy() { static const Direction_2 d(atan_x, atan_y); @@ -173,8 +173,8 @@ protected: } /*! Obtain the normal of the plane that contains the identification arc. - * By default, it is the vector directed along the positive y axis - * (y = infinity). + * By default, it is the vector directed along the positive \f$y\f$-axis + * (\f$y = \infty\f$). * \return the normal of the plane that contains the identification arc. */ inline static const Direction_3& identification_normal() { @@ -182,73 +182,75 @@ protected: return d; } - /*! Obtain the 2D direction directed along the negative x axis - * \return the direction directed at x = -infinity + /*! Obtain the 2D direction directed along the negative \f$x\f$-axis. + * \return the direction directed at \f$x = -\infty\f$. */ inline static const Direction_2& neg_x_2() { CGAL_STATIC_THREAD_LOCAL_VARIABLE_2(Direction_2, d, -1, 0); return d; } - /*! Obtain the 2D direction directed along the negative y axis - * \return the direction directed at y = -infinity + /*! Obtain the 2D direction directed along the negative \f$y\f$-axis. + * \return the direction directed at \f$y = -\infty\f$. */ inline static const Direction_2& neg_y_2() { CGAL_STATIC_THREAD_LOCAL_VARIABLE_2(Direction_2, d, 0, -1); return d; } - /*! Obtain the sign of the x-coordinate of a direction in space - * \param d the direction in space - * \return the sign of the x-coordinate of d + /*! Obtain the sign of the \f$x\f$-coordinate of a direction in space + * \param d the direction in space. + * \return the sign of the \f$x\f$-coordinate of `d`. */ inline static Sign x_sign(Direction_3 d) { return CGAL::sign(d.dx()); } - /*! Obtain the sign of the y-coordinate of a direction in space - * \param d the direction in space - * \return the sign of the y-coordinate of d + /*! Obtain the sign of the \f$y\f$-coordinate of a direction in space + * \param d the direction in space. + * \return the sign of the \f$y\f$-coordinate of `d`. */ inline static Sign y_sign(Direction_3 d) { return CGAL::sign(d.dy()); } - /*! Obtain the sign of the z-coordinate of a direction in space + /*! Obtain the sign of the \f$z\f$-coordinate of a direction in space * \param d the direction in space - * \return the sign of the z-coordinate of d + * \return the sign of the \f$z\f$-coordinate of `d`. */ inline static Sign z_sign(Direction_3 d) { return CGAL::sign(d.dz()); } typedef Direction_2 (*Project)(const Direction_3& d) ; - /*! Project a 3D direction onto the xy-plane - * \param d the 3D direction - * \return the projection onto the xy-plane + /*! Project a 3D direction onto the \f$xy\f$-plane + * \param d the 3D direction. + * \return the projection onto the \f$xy\f$-plane. */ inline static Direction_2 project_xy(const Direction_3& d) { return Direction_2(d.dx(), d.dy()); } - /*! Project a 3D direction onto the yz-plane - * \param d the 3D direction - * \return the projection onto the yz-plane + /*! Project a 3D direction onto the \f$yz\f$-plane. + * \param d the 3D direction. + * \return the projection onto the \f$yz\f$-plane. */ inline static Direction_2 project_yz(const Direction_3& d) { return Direction_2(d.dy(), d.dz()); } - /*! Project a 3D direction onto the zx-plane - * \param d the 3D direction - * \return the projection onto the xz-plane + /*! Project a 3D direction onto the \f$zx\f$-plane. + * \param d the 3D direction. + * \return the projection onto the \f$xz\f$-plane. */ inline static Direction_2 project_xz(const Direction_3& d) { return Direction_2(d.dx(), d.dz()); } - /*! Project a 3D direction onto the yz-plane and reflect the y coordinate - * \param d the 3D direction - * \return the projection onto the yz-plane + /*! Project a 3D direction onto the \f$yz\f$-plane and reflect the + * \f$y\f$-coordinate. + * \param d the 3D direction. + * \return the projection onto the \f$yz\f$-plane. */ inline static Direction_2 project_minus_yz(const Direction_3& d) { return Direction_2(-d.dy(), d.dz()); } - /*! Project a 3D direction onto the zx-plane and reflect the x coordinate - * \param d the 3D direction - * \return the projection onto the xz-plane + /*! Project a 3D direction onto the \f$zx\f$-plane and reflect the + * \f$x\f$- coordinate. + * \param d the 3D direction. + * \return the projection onto the \f$xz\f$-plane. */ inline static Direction_2 project_minus_xz(const Direction_3& d) { return Direction_2(-d.dx(), d.dz()); } @@ -267,7 +269,7 @@ protected: /*! Compute the orientation of two directions. * \param d1 the first direction. * \param d2 the second direction. - * \return the relative orientation of d1 and d2. + * \return the relative orientation of `d1` and `d2`. */ inline Orientation orientation(const Direction_2& d1, const Direction_2& d2) const { @@ -356,8 +358,8 @@ public: * \return SMALLER - u(d1) < u(d2); * EQUAL - u(d1) = u(d2); * LARGER - u(d1) > u(d2). - * \pre d1 does not coincide with any pole. - * \pre d2 does not coincide with any pole. + * \pre `d1` does not coincide with any pole. + * \pre `d2` does not coincide with any pole. */ inline Comparison_result compare_x(const Direction_3& d1, const Direction_3& d2) const { @@ -375,8 +377,8 @@ public: * EQUAL - u(d1) = u(d2) and v(d1) = v(d2); * LARGER - u(d1) = u(d2) and v(d1) > v(d2); * LARGER - u(d1) > u(d2). - * \pre d1 does not lie on the discontinuity arc. - * \pre d2 does not lie on the discontinuity arc. + * \pre `d1` does not lie on the discontinuity arc. + * \pre `d2` does not lie on the discontinuity arc. */ inline Comparison_result compare_xy(const Direction_3& d1, const Direction_3& d2) const { @@ -385,12 +387,12 @@ public: return res; } - /*! Determine whether the given point is in the x-range of the + /*! Determine whether the given point is in the \f$x\f$-range of the * spherical_arc. * \param point the query point direction. - * \return true if point is in the x-range of the (closed) spherical_arc and - * false otherwise. - * \pre point does not coincide with one of the poles + * \return true if point is in the \f$x\f$-range of the (closed) spherical_arc + * and false otherwise. + * \pre point does not coincide with one of the poles. */ bool is_in_x_range(const X_monotone_curve_2& xcv, const Point_2& point) const { @@ -419,7 +421,7 @@ public: } /*! Compute the intersection of a curve and the identification curve. - * \param[in] cv the curve + * \param[in] cv the curve. */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, @@ -431,7 +433,7 @@ public: } /*! Compute the intersection of a curve and the identification curve. - * \param[in] cv the curve + * \param[in] cv the curve. */ void intersection_with_identification(const X_monotone_curve_2& xcv, Direction_3& dp, @@ -454,7 +456,7 @@ public: } /*! Compute the intersection of a curve and the identification curve. - * \param[in] cv the curve + * \param[in] cv the curve. */ bool overlap_with_identification(const X_monotone_curve_2& xcv, std::false_type) const { @@ -493,9 +495,9 @@ public: public: /*! Construct a point on the sphere from three coordinates, which define * a (not necessarily normalized) direction. - * \param[in] x the x coordinate - * \param[in] y the y coordinate - * \param[in] z the z coordinate + * \param[in] x the \f$x\f$-coordinate. + * \param[in] y the \f$y\f$-coordinate. + * \param[in] z the \f$z\f$-coordinate. */ Point_2 operator()(const FT& x, const FT& y, const FT& z) { Point_2 p; @@ -507,7 +509,7 @@ public: /*! Construct a point on the sphere from a (not necessarily normalized) * direction. - * \param other the other direction + * \param other the other direction. */ Point_2 operator()(const Direction_3& other) { Point_2 p; @@ -557,12 +559,13 @@ public: } }; - /*! Obtain an x-monotone geodesic arc construction functor. + /*! Obtain a point construction functor. */ Construct_point_2 construct_point_2_object() const { return Construct_point_2(*this); } - /*! A functor that constructs an x-monotone geodesic arc on the sphere. */ + /*! A functor that constructs an \f$x\f$-monotone geodesic arc on the sphere. + */ class Construct_x_monotone_curve_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -581,13 +584,13 @@ public: /*! Construct the minor arc from two endpoint directions. The minor arc * is the one with the smaller angle among the two geodesic arcs with * the given endpoints. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param[in] source the source point. * \param[in] target the target point. * \pre the source and target must not coincide. @@ -651,13 +654,13 @@ public: /*! Initialize a spherical_arc given that the two endpoint directions * have been set. It is assumed that the arc is the one with the smaller * angle among the two. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param source the source point. * \param target the target point. * \pre the source and target cannot be equal. @@ -746,7 +749,7 @@ public: } }; - /*! Obtain an x-monotone geodesic arc construction functor. + /*! Obtain an \f$x\f$-monotone geodesic arc construction functor. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -769,13 +772,13 @@ public: public: /*! Construct a spherical_arc from two endpoint directions. It is assumed * that the arc is the one with the smaller angle among the two. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param source the source point. * \param target the target point. * \pre the source and target cannot be equal. @@ -952,9 +955,9 @@ public: /* None of the endpoints coincide with a pole. * The projections of both endpoints lie on the same hemi-circle. - * Thus, either the arc is x-monotone, or it includes both poles. + * Thus, either the arc is \f$x\f$-monotone, or it includes both poles. * This means that it is sufficient to check whether one pole lies - * on the arc in order to determine x-monotonicity + * on the arc in order to determine \f$x\f$-monotonicity */ typename Traits::Project project = @@ -1006,7 +1009,8 @@ public: Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } - /*! A functor that compares the x-coordinates of two directional points */ + /*! A functor that compares the \f$x\f$-coordinates of two directional points + */ class Compare_x_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -1022,7 +1026,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the x-coordinates of two directional points. + /*! Compare the \f$x\f$-coordinates of two directional points. * \param p1 the first directional point. * \param p2 the second directional point. * \return SMALLER - x(p1) < x(p2); @@ -1057,7 +1061,7 @@ protected: } public: - /*! Obtain a Compare_x_2 function object */ + /*! Obtain a `Compare_x_2` function object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } /*! A functor that compares two directional points lexigoraphically: @@ -1097,10 +1101,10 @@ public: } }; - /*! Obtain a Compare_xy_2 function object */ + /*! Obtain a `Compare_xy_2` function object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } - /*! A functor that obtain the left endpoint of an x-monotone arc */ + /*! A functor that obtain the left endpoint of an \f$x\f$-monotone arc */ class Construct_min_vertex_2 { public: /*! Obtain the left endpoint of and arc. @@ -1111,11 +1115,11 @@ public: { return xc.left(); } }; - /*! Obtain a Construct_min_vertex_2 function object */ + /*! Obtain a `Construct_min_vertex_2` function object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } - /*! A functor that obtain the right endpoint of an x-monotone arc */ + /*! A functor that obtain the right endpoint of an \f$x\f$-monotone arc */ class Construct_max_vertex_2 { public: /*! Obtain the right endpoint of an arc. @@ -1126,11 +1130,11 @@ public: { return xc.right(); } }; - /*! Obtain a Construct_max_vertex_2 function object */ + /*! Obtain a `Construct_max_vertex_2` function object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } - /*! A functor that checks whether an x-monotone arc is a vertical */ + /*! A functor that checks whether an \f$x\f$-monotone arc is a vertical */ class Is_vertical_2 { public: /*! Check whether a given arc is vertical. @@ -1144,11 +1148,11 @@ public: } }; - /*! Obtain an Is_vertical_2 function object */ + /*! Obtain an `Is_vertical_2` function object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } - /*! A functor that compares the y-coordinates of a directional point and - * an x-monotone arc at the point x-coordinate + /*! A functor that compares the \f$y\f$-coordinates of a directional point and + * an \f$x\f$-monotone arc at the point \f$x\f$-coordinate */ class Compare_y_at_x_2 { protected: @@ -1172,7 +1176,7 @@ public: * EQUAL - p lies on the curve. * LARGER - y(p) > xc(x(p)), i.e. the point is above the curve; * \pre p is not a contraction point. - * \pre p is in the x-range of xc. + * \pre p is in the \f$x\f$-range of `xc`. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xc) const { @@ -1202,12 +1206,12 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 function object */ + /*! Obtain a `Compare_y_at_x_2` function object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } - /*! A functor that compares the y-coordinates of two x-monotone arcs - * immediately to the left of their intersection directional point. + /*! A functor that compares the \f$y\f$-coordinates of two \f$x\f$-monotone + * arcs immediately to the left of their intersection directional point. */ class Compare_y_at_x_left_2 { protected: @@ -1224,14 +1228,14 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param xc1 the first curve. * \param xc2 the second curve. * \param p the intersection point. - * \return the relative position of xc1 with respect to xc2 immdiately to - * the left of p: SMALLER, EQUAL, or LARGER. - * \pre the point p lies on both curves, and both of them must be also be + * \return the relative position of `xc1` with respect to `xc2` immdiately to + * the left of `p`: `SMALLER`, `EQUAL`, or `LARGER`. + * \pre the point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. * \pre the arcs are not degenerate */ @@ -1250,7 +1254,8 @@ public: // Non of the arc is verticel. Thus, non of the endpoints coincide with // a pole. - // Compare the y-coord. at the x-coord of the most right left-endpoint. + // Compare the \f$y\f$-coordinate at the \f$x\f$-coordinate of the most + // right left-endpoint. const Point_2& l1 = xc1.left(); const Point_2& l2 = xc2.left(); @@ -1317,12 +1322,12 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 function object */ + /*! Obtain a `Compare_y_at_x_left_2` function object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } - /*! A functor that compares the y-coordinates of two x-monotone arcs - * immediately to the right of their intersection directional point. + /*! A functor that compares the \f$y\f$-coordinates of two \f$x\f$-monotone + * arcs immediately to the right of their intersection directional point. */ class Compare_y_at_x_right_2 { protected: @@ -1339,14 +1344,14 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the right of their intersection point. * \param xc1 the first curve. * \param xc2 the second curve. * \param p the intersection point. - * \return the relative position of xc1 with respect to xc2 immdiately to - * the right of p: SMALLER, EQUAL, or LARGER. - * \pre the point p lies on both curves, and both of them must also be + * \return the relative position of `xc1` with respect to `xc2` immdiately + * to the right of `p`: `SMALLER`, `EQUAL`, or `LARGER`. + * \pre the point `p` lies on both curves, and both of them must also be * defined to its right (lexicographically). * \pre the arcs are not degenerate */ @@ -1392,7 +1397,8 @@ public: SMALLER : LARGER; } - // Compare the y-coord. at the x-coord of the most left right-endpoint. + // Compare the \f$y\f$-coord. at the \f$x\f$-coordinate of the most left + // right-endpoint. if (! r1.is_no_boundary()) { // use r2 and xc1: Oriented_side os = m_traits.oriented_side(xc1.normal(), r2); @@ -1431,12 +1437,12 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 function object */ + /*! Obtain a `Compare_y_at_x_right_2` function object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } - /*! A functor that checks whether two directional points and two x-monotone - * arcs are identical. + /*! A functor that checks whether two directional points and two + * \f$x\f$-monotone arcs are identical. */ class Equal_2 { protected: @@ -1453,8 +1459,8 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Determines whether the two x-monotone curves are the same (have the - * same graph). + /*! Determines whether the two \f$x\f$-monotone curves are the same (have + * the same graph). * \param xc1 the first curve. * \param xc2 the second curve. * \return true if the two curves are the same; false otherwise. @@ -1490,7 +1496,7 @@ public: } }; - /*! Obtain an Equal_2 function object */ + /*! Obtain an `Equal_2` function object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -1498,7 +1504,7 @@ public: //@{ /*! A function object that obtains the parameter space of a geometric - * entity along the x-axis + * entity along the \f$x\f$-axis */ class Parameter_space_in_x_2 { protected: @@ -1515,7 +1521,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Obtains the parameter space at the end of an arc along the x-axis. + /*! Obtains the parameter space at the end of an arc along the \f$x\f$-axis. * Only called for arcs whose interior lie in the interior of the * parameter space, that is, the arc does not coincide with the * identification. Thus, it returns ARR_LEFT_BOUNDARY or ARR_RIGHT_BOUNDARY @@ -1544,7 +1550,7 @@ public: ((xcv.right().is_no_boundary()) ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY); } - /*! Obtains the parameter space at a point along the x-axis. + /*! Obtains the parameter space at a point along the \f$x\f$-axis. * Every non-interior point is assumed to lie on the left-right * identification. * Points at the poles additionally lie on the bottom or top boundary. @@ -1558,16 +1564,16 @@ public: } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! Obtain a Parameter_space_in_x_2 function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(*this); } /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis + * entity along the \f$y\f$-axis. */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of an arc along the y-axis. + /*! Obtains the parameter space at the end of an arc along the \f$y\f$-axis. * Only called for arcs whose interior lie in the interior of the * parameter space, that is, the arc does not coincide with the * identification. Thus, it returns ARR_BOTTOM_BOUNDARY or ARR_TOP_BOUNDARY @@ -1591,7 +1597,7 @@ public: ((xcv.right().is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR); } - /*! Obtains the parameter space of a point along the y-axis. + /*! Obtains the parameter space of a point along the \f$y\f$-axis. * That is, ARR_BOTTOM_BOUNDARY is returned if p coincides with the * south pole and ARR_TOP_BOUNDARY if p coincides with the north pole. * Otherwise ARR_INTERIOR is returned. @@ -1605,13 +1611,13 @@ public: } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! Obtain a `Parameter_space_in_y_2` function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } - /*! A functor that compares the x-coordinate of arc ends and points on the - * boundary of the parameter space. + /*! A functor that compares the \f$x\f$-coordinate of arc ends and points on + * the boundary of the parameter space. */ class Compare_x_on_boundary_2 { protected: @@ -1628,8 +1634,8 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the x-coordinate of a direction with the x-coordinate of an - * arc end projected onto the boundary. + /*! Compare the \f$x\f$-coordinate of a direction with the + * \f$x\f$-coordinate of an arc end projected onto the boundary. * \param point the point direction. * \param xcv the arc, the endpoint of which is compared. * \param ce the arc-end indicator - @@ -1639,9 +1645,10 @@ public: * SMALLER - x(p) < x(xc, ce); * EQUAL - x(p) = x(xc, ce); * LARGER - x(p) > x(xc, ce). - * \pre p lies in the interior of the parameter space. - * \pre the ce end of the arc xcv lies on a pole (implying ce is vertical). - * \pre xcv does not coincide with the vertical identification curve. + * \pre `p` lies in the interior of the parameter space. + * \pre The `ce` end of the arc `xcv` lies on a pole (implying ce is + * vertical). + * \pre `xcv` does not coincide with the vertical identification curve. */ Comparison_result operator()(const Point_2& point, const X_monotone_curve_2& xcv, @@ -1657,7 +1664,7 @@ public: // xcv is vertical, but does not coincide with the discontinuity arc. // Obtain the direction contained in the underlying plane, which is - // also on the xy-plane: + // also on the \f$xy\f$-plane: Direction_3 normal = xcv.normal(); Direction_2 q = (xcv.is_directed_right()) ? Direction_2(-(normal.dy()), normal.dx()) : @@ -1666,8 +1673,8 @@ public: return m_traits.compare_x(p, q); } - /*! Compare the x-coordinates of two arc ends projected onto the boundary - * of the parameter space. + /*! Compare the \f$x\f$-coordinates of two arc ends projected onto the + * boundary of the parameter space. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - * ARR_MIN_END - the minimal end of xcv1 or @@ -1708,7 +1715,7 @@ public: // Non of the arcs coincide with the identification arc: // Obtain the directions contained in the underlying planes, which are - // also on the xy-plane: + // also on the \f$xy\f$-plane: Direction_3 normal1 = xcv1.normal(); Direction_2 p = (xcv1.is_directed_right()) ? Direction_2(-(normal1.dy()), normal1.dx()) : @@ -1730,12 +1737,12 @@ public: { CGAL_error(); return EQUAL; } }; - /*! Obtain a Compare_x_on_boundary_2 function object. + /*! Obtain a `Compare_x_on_boundary_2` function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } - /*! A functor that compares the x-coordinates of arc ends near the + /*! A functor that compares the \f$x\f$-coordinates of arc ends near the * boundary of the parameter space. */ class Compare_x_near_boundary_2 { @@ -1754,7 +1761,7 @@ public: public: - /*! Compare the x-coordinates of 2 arc ends near the boundary of the + /*! Compare the \f$x\f$-coordinates of 2 arc ends near the boundary of the * parameter space. * \param xcv1 the first arc. * \param xcv2 the second arc. @@ -1794,12 +1801,12 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! Obtain a `Compare_x_near_boundary_2` function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(*this); } - /*! A functor that compares the y-coordinates of arc ends near the + /*! A functor that compares the \f$y\f$-coordinates of arc ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -1817,15 +1824,15 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y-coordinates of 2 curves at their ends near the boundary - * of the parameter space. + /*! Compare the \f$y\f$-coordinates of 2 curves at their ends near the + * boundary of the parameter space. * \param xcv1 the first arc. * \param xcv2 the second arc. * \param ce the arc end indicator. * \return the second comparison result. - * \pre the ce ends of the arcs xcv1 and xcv2 lie either on the left + * \pre The `ce` ends of the arcs `xcv1` and `xcv2` lie either on the left * boundary or on the right boundary of the parameter space. - * \pre the curves cannot reach a pole + * \pre the curves cannot reach a pole. * There is no horizontal identification curve! */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -1870,7 +1877,7 @@ public: if (xcv2.is_vertical()) return SMALLER; // There are 4 cases based on the sign of the z component of the normals - // Compute the sign of the x-component of the normal cross product. + // Compute the sign of the \f$x\f$-component of the normal cross product. // There is no point computing the intermediate cross product: // auto cross_prod = kernel.construct_cross_product_vector_3_object(); // Vector_3 v = cross_prod(n1.vector(), n2.vector()); @@ -1909,7 +1916,7 @@ public: if (xcv2.is_vertical()) return SMALLER; // There are 4 cases based on the sign of the z component of the normals - // Compute the sign of the x-component of the normal cross product. + // Compute the sign of the \f$x\f$-component of the normal cross product. // There is no point computing the intermediate cross product: // auto cross_prod = kernel.construct_cross_product_vector_3_object(); // Vector_3 v = cross_prod(n1.vector(), n2.vector()); @@ -1938,7 +1945,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 function object */ + /*! Obtain a `Compare_y_near_boundary_2` function object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1996,11 +2003,11 @@ public: } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! Obtain an `Is_on_y_identification_2` function object. */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(*this); } - /*! A functor that compares the y-coordinate of two given points + /*! A functor that compares the \f$y\f$-coordinate of two given points * that lie on the vertical identification arc. */ class Compare_y_on_boundary_2 { @@ -2018,15 +2025,15 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the y-coordinate of two given points that lie on the vertical - * identification curve. + /*! Compare the \f$y\f$-coordinate of two given points that lie on the + * vertical identification curve. * \param p1 the first point. * \param p2 the second point. * \return SMALLER - p1 is smaller than p2; * EQUAL - p1 and p2 coincides; * LARGER - p1 is larger than p2; - * \pre p1 lies on the vertical identification arc including the poles! - * \pre p2 lies on the vertical identification arc including the poles! + * \pre `p1` lies on the vertical identification arc including the poles! + * \pre `p2` lies on the vertical identification arc including the poles! */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { // first deal with the 'degenerate' case of poles! @@ -2052,7 +2059,7 @@ public: }; - /*! Obtain a Compare_y_on_boundary_2 function object */ + /*! Obtain a `Compare_y_on_boundary_2` function object. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(*this); } //@} @@ -2061,8 +2068,8 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing arcs into x-monotone arcs that do not cross the - * identification arc. + * A functor for subdividing arcs into \f$x\f$-monotone arcs that do not cross + * the identification arc. */ class Make_x_monotone_2 { protected: @@ -2079,9 +2086,9 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Subdivide a given curve into x-monotone subcurves and insert them into - * a given output iterator. As spherical_arcs are always x_monotone, only - * one object will be contained in the iterator. + /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. As spherical_arcs are always x_monotone, + * only one object will be contained in the iterator. * \param xc the curve. * \param oi the output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -2126,7 +2133,7 @@ public: const X_monotone_curve_2 xc(c.normal()); *oi++ = Make_x_monotone_result(xc); #else - // Full x-monotone arcs are not supported! + // Full \f$x\f$-monotone arcs are not supported! // Split the arc at the intersection point with the complement of the // discontinuity arc: Direction_3 normal = c.normal(); @@ -2219,11 +2226,11 @@ public: } }; - /*! Obtain a Make_x_monotone_2 function object */ + /*! Obtain a `Make_x_monotone_2` function object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } - /*! A functor that splits an x-monotone arc at a directional point. */ + /*! A functor that splits an \f$x\f$-monotone arc at a directional point. */ class Split_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -2239,15 +2246,16 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! Split a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param xc the curve to split * \param p the split point. - * \param xc1 (output) the left resulting subcurve. p is its right + * \param xc1 (output) the left resulting subcurve. `p` is its right * endpoint. - * \param xc2 (output) the right resulting subcurve. p is its left + * \param xc2 (output) the right resulting subcurve. `p` is its left * endpoint. - * \pre p lies on xc but is not one of its endpoints. - * \pre xc is not degenerate + * \pre `p` lies on xc but is not one of its endpoints. + * \pre `xc` is not degenerate */ void operator()(const X_monotone_curve_2& xc, const Point_2& p, X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const { @@ -2287,10 +2295,10 @@ public: } }; - /*! Obtain a Split_2 function object */ + /*! Obtain a `Split_2` function object. */ Split_2 split_2_object() const { return Split_2(*this); } - /*! The clockwise-in-between function object */ + /*! The clockwise-in-between function object. */ class Clockwise_in_between_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -2313,11 +2321,11 @@ public: } }; - /*! Obtain a Clockwise_in_between function object */ + /*! Obtain a `Clockwise_in_between_2` function object. */ Clockwise_in_between_2 clockwise_in_between_2_object() const { return Clockwise_in_between_2(*this); } - /*! A functor that computes intersections between x-monotone arcs. */ + /*! A functor that computes intersections between \f$x\f$-monotone arcs. */ class Intersect_2 { private: @@ -2473,7 +2481,7 @@ public: return oi; } - // Case 6 cannot occur. Two x-monotone curves cannot overlap twice. + // Case 6 cannot occur. Two \f$x\f$-monotone curves cannot overlap twice. CGAL_assertion(! in_between(l2, r2, r1)); // Case 4 @@ -2507,7 +2515,7 @@ public: if (point.is_min_boundary()) return (left.is_min_boundary()); if (xc.is_vertical()) { - // Compare the x coordinates. If they are not equal, return false: + // Compare the \f$x\f$-coordinates. If they are not equal, return false: Direction_3 normal = xc.normal(); bool plane_is_positive, p_is_positive; CGAL::Sign xsign = Traits::x_sign(normal); @@ -2526,14 +2534,15 @@ public: (!xc_is_positive && p_is_positive)) return false; - // Compare the y-coords: + // Compare the \f$y\f$-coordinates: return (((left.is_min_boundary()) || (m_traits.compare_y(point, left) != SMALLER)) && ((right.is_max_boundary()) || (m_traits.compare_y(point, right) != LARGER))); } - // The arc is not vertical. Compare the projections onto the xy-plane: + // The arc is not vertical. Compare the projections onto the + // \f$xy\f$-plane: typename Kernel::Equal_2 equal_2 = kernel.equal_2_object(); Direction_2 p = Traits::project_xy(point); Direction_2 r = Traits::project_xy(right); @@ -2634,12 +2643,12 @@ public: bool p_y_is_positive = Traits::y_sign(point) == POSITIVE; if ((xz_plane && p_x_is_positive) || (!xz_plane && p_y_is_positive)) { - // The endpoints reside in the positive x-halfspace: + // The endpoints reside in the positive \f$x\f$-halfspace: return compute_intersection(xc1.left(), xc1.right(), xc2.left(), xc2.right(), normal, true, ccib, project, oi); } - // The endpoints reside in the negative x-halfspace: + // The endpoints reside in the negative \f$x\f$-halfspace: return compute_intersection(xc1.left(), xc1.right(), xc2.left(), xc2.right(), normal, true, cib, project, oi); @@ -2671,10 +2680,10 @@ public: } }; - /*! Obtain an Intersect_2 function object */ + /*! Obtain an `Intersect_2` function object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } - /*! A functor that tests whether two x-monotone arcs can be merged. */ + /*! A functor that tests whether two \f$x\f$-monotone arcs can be merged. */ class Are_mergeable_2 { using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -2689,7 +2698,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. * \param xc1 the first curve. * \param xc2 the second curve. * \return true if the two arcs are mergeable; false otherwise. @@ -2740,11 +2749,11 @@ public: } }; - /*! Obtain an Are_mergeable_2 function object */ + /*! Obtain an `Are_mergeable_2` function object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } - /*! A functor that merges two x-monotone arcs into one */ + /*! A functor that merges two \f$x\f$-monotone arcs into one */ class Merge_2 { protected: using Traits = Arr_geodesic_arc_on_sphere_traits_2; @@ -2760,7 +2769,8 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (spherical_arc). + /*! Merge two given \f$x\f$-monotone curves into a single curve + * (spherical_arc). * \param xc1 the first curve. * \param xc2 the second curve. * \param xc Output: the merged curve. @@ -2841,7 +2851,7 @@ public: } }; - /*! Obtain a Merge_2 function object */ + /*! Obtain a `Merge_2` function object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -2858,9 +2868,9 @@ public: /*! Return an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return an approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return an approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1) || (i == 2)); @@ -2917,7 +2927,7 @@ public: // Define the spanning vectors of the coordinate system where we are // going to make the approximation: - auto axis_x = vs; // x-axis will coincide with the vector from the + auto axis_x = vs; // \f$x\f$-axis will coincide with the vector from the // origin to the normalized SOURCE-vector auto axis_z = vn; // this will make sure that the orientation of the // approximated curve is consistent with the curve @@ -2925,8 +2935,9 @@ public: normalize(axis_y); // In this coordinate system the source has local coords (0,0), hence its - // initial angle with the X-axis is 0 degrees (radians) - // Compute the local coordinates and the angle it makes with the X-axis + // initial angle with the \f$X\f$-axis is 0 degrees (radians) + // Compute the local coordinates and the angle it makes with the + // \f$X\f$-axis Approximate_number_type theta; if (xcv.is_full()) theta = 2.0 * CGAL_PI; else { @@ -2976,7 +2987,7 @@ public: } }; - /*! Obtain an Approximate_2 function object */ + /*! Obtain an `Approximate_2` function object. */ Approximate_2 approximate_2_object() const { return Approximate_2(); } //@} @@ -2996,13 +3007,13 @@ public: { return (xc.is_directed_right()) ? SMALLER : LARGER; } }; - /*! Obtain a Compare_endpoints_xy_2 function object */ + /*! Obtain a `Compare_endpoints_xy_2` function object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite x-monotone (with swapped source and target). + /*! Construct an opposite \f$x\f$-monotone (with swapped source and target). * \param xc the curve. * \return the opposite curve. */ @@ -3010,7 +3021,7 @@ public: { return xc.opposite(); } }; - /*! Obtain a Construct_opposite_2 function object */ + /*! Obtain a `Construct_opposite_2` function object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } //@} @@ -3043,11 +3054,12 @@ public: #endif }; -/*! A Representation of an x-monotone great circular arc embedded on a sphere, - * as used by the Arr_geodesic_arc_on_sphere_traits_2 traits-class - * An x-monotone great circular arc cannot cross the closed hemi-circle arc of - * discontinuity, defined as the longitude that lies in the zx-plane, and is - * contained in the open halfspace (x > 0). +/*! A Representation of an \f$x\f$-monotone great circular arc embedded on a + * sphere, as used by the `Arr_geodesic_arc_on_sphere_traits_2` traits-class An + * x-monotone great circular arc cannot cross the closed hemi-circle arc of + * discontinuity, defined as the longitude that lies in the \f$zx\f$-plane, and + * is contained in the open halfspace (\f$x > 0\f$). + * * \todo At this point such an arc cannot have an angle of 180 degrees. * \todo It is always directed from its source to its target. */ @@ -3162,13 +3174,13 @@ public: /*! Initialize a spherical_arc given that the two endpoint directions * have been set. It is assumed that the arc is the one with the smaller * angle among the two. - * 1. Find out whether the arc is x-monotone. - * 2. If it is x-monotone, + * 1. Find out whether the arc is \f$x\f$-monotone. + * 2. If it is \f$x\f$-monotone, * 2.1 Find out whether it is vertical, and * 2.2 whether the target is larger than the source (directed right). * The arc is vertical, iff * 1. one of its endpoint direction pierces a pole, or - * 2. the projections onto the xy-plane coincide. + * 2. the projections onto the \f$xy\f$-plane coincide. * \param source the source point. * \param target the target point. * \pre the source and target cannot be equal. @@ -3496,7 +3508,7 @@ protected: using Base::y_sign; using Base::z_sign; - //! Indicates whether the arc is x-monotone + //! Indicates whether the arc is \f$x\f$-monotone bool m_is_x_monotone; public: @@ -3516,7 +3528,7 @@ public: * \param src the source point of the arc * \param trg the target point of the arc * \param normal the normal to the plane that contains the arc - * \param is_x_monotone is arc x-monotone ? + * \param is_x_monotone is arc \f$x\f$-monotone ? * \param is_vertical is the arc vertical ? * \param is_directed_right is the arc directed from left to right? * \param is_full is the arc a full (great) circle? @@ -3631,9 +3643,9 @@ public: /* Non of the endpoints coincide with a pole. * The projections of both endpoints lie on the same hemi-circle. - * Thus, either the arc is x-monotone, or it includes both poles. + * Thus, either the arc is \f$x\f$-monotone, or it includes both poles. * This means that it is sufficient to check whether one pole lies - * on the arc in order to determine x-monotonicity + * on the arc in order to determine \f$x\f$-monotonicity */ typename Traits::Project project = @@ -3676,13 +3688,13 @@ public: set_is_x_monotone(false); } - /*! Indicates whether the arc is x-monotone - * \return true if the arc is x-monotone; false otherwise + /*! Indicates whether the arc is \f$x\f$-monotone + * \return true if the arc is \f$x\f$-monotone; false otherwise */ bool is_x_monotone() const { return m_is_x_monotone; } - /*! Set the flag that indicates whether the arc is x-monotone - * \param flag indicates whether the arc is x-monotone + /*! Set the flag that indicates whether the arc is \f$x\f$-monotone + * \param flag indicates whether the arc is \f$x\f$-monotone */ void set_is_x_monotone(bool flag) { m_is_x_monotone = flag; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h index f712190f0df..623aa0934e6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h @@ -221,9 +221,9 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Check whether the x-coordinate of the left point is infinite. - * \return ARR_LEFT_BOUNDARY if the left point is near the boundary; - * ARR_INTERIOR if the x-coordinate is finite. + /*! Check whether the \f$x\f$-coordinate of the left point is infinite. + * \return `ARR_LEFT_BOUNDARY` if the left point is near the boundary; + * `ARR_INTERIOR` if the \f$x\f$-coordinate is finite. */ Arr_parameter_space left_infinite_in_x() const { @@ -234,10 +234,10 @@ public: (has_target ? ARR_INTERIOR : ARR_LEFT_BOUNDARY); } - /*! Check whether the y-coordinate of the left point is infinite. - * \return ARR_BOTTOM_BOUNDARY if the left point is at y = -oo; - * ARR_INTERIOR if the y-coordinate is finite. - * ARR_TOP_BOUNDARY if the left point is at y = +oo; + /*! Check whether the \f$y\f$-coordinate of the left point is infinite. + * \return `ARR_BOTTOM_BOUNDARY` if the left point is at \f$y = -\infty\f$; + * `ARR_INTERIOR` if the \f$y\f$-coordinate is finite. + * `ARR_TOP_BOUNDARY` if the left point is at \f$y = +\infty\f$; */ Arr_parameter_space left_infinite_in_y() const { @@ -303,9 +303,9 @@ public: else has_target = false; } - /*! Check whether the x-coordinate of the right point is infinite. - * \return ARR_RIGHT_BOUNDARY if the right point is near the boundary; - * ARR_INTERIOR if the x-coordinate is finite. + /*! Check whether the \f$x\f$-coordinate of the right point is infinite. + * \return `ARR_RIGHT_BOUNDARY` if the right point is near the boundary; + * `ARR_INTERIOR` if the \f$x\f$-coordinate is finite. */ Arr_parameter_space right_infinite_in_x() const { @@ -316,10 +316,10 @@ public: (has_source ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY); } - /*! Check whether the y-coordinate of the right point is infinite. - * \return ARR_BOTTOM_BOUNDARY if the right point is at y = -oo; - * ARR_INTERIOR if the y-coordinate is finite. - * ARR_TOP_BOUNDARY if the right point is at y = +oo; + /*! Check whether the \f$y\f$-coordinate of the right point is infinite. + * \return `ARR_BOTTOM_BOUNDARY` if the right point is at \f$y = -\infty\f$; + * `ARR_INTERIOR` if the \f$y\f$-coordinate is finite. + * `ARR_TOP_BOUNDARY` if the right point is at \f$y = +\infty\f$; */ Arr_parameter_space right_infinite_in_y() const { @@ -408,9 +408,10 @@ public: */ bool is_directed_right() const { return (is_right); } - /*! Check whether the given point is in the x-range of the object. + /*! Check whether the given point is in the \f$x\f$-range of the object. * \param p The query point. - * \return (true) is in the x-range of the segment; (false) if it is not. + * \return (true) is in the \f$x\f$-range of the segment; (false) if it is + * not. */ bool is_in_x_range(const Point_2& p) const { @@ -446,10 +447,11 @@ public: return (res2 != LARGER); } - /*! Check whether the given point is in the y-range of the object. + /*! Check whether the given point is in the \f$y\f$-range of the object. * \param p The query point. * \pre The object is vertical. - * \return (true) is in the y-range of the segment; (false) if it is not. + * \return (true) is in the \f$y\f$-range of the segment; (false) if it is + * not. */ bool is_in_y_range(const Point_2& p) const { @@ -508,7 +510,7 @@ public: /// \name Basic functor definitions. //@{ - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_x_2 { protected: typedef Arr_linear_traits_2 Traits; @@ -528,7 +530,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the x-coordinates of two points. + /*! Compare the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -542,7 +544,7 @@ public: } }; - /*! Obtain a Compare_x_2 functor. */ + /*! Obtain a `Compare_x_2` functor. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } /*! A functor that compares the he endpoints of an $x$-monotone curve. */ @@ -558,6 +560,7 @@ public: { return (xcv.is_directed_right()) ? (SMALLER) : (LARGER); } }; + /*! Obtain a `Compare_endpoints_xy_2` functor. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } @@ -610,6 +613,7 @@ public: } }; + /*! Obtain a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } class Construct_opposite_2{ @@ -652,10 +656,10 @@ public: Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(*this); } - /*! A functor that compares the x-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_xy_2 { public: - /*! Compare two points lexigoraphically: by x, then by y. + /*! Compare two points lexigoraphically: by \f$x\f$, then by \f$y\f$. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -669,13 +673,13 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! Obtain a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } /*! A functor that obtains the left endpoint of a segment or a ray. */ class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of the x-monotone curve (segment). + /*! Obtain the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \pre The left end of cv is a valid (bounded) point. * \return The left endpoint. @@ -689,14 +693,14 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! Obtain a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } /*! A functor that obtains the right endpoint of a segment or a ray. */ class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the x-monotone curve (segment). + /*! Obtain the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \pre The right end of cv is a valid (bounded) point. * \return The right endpoint. @@ -710,14 +714,14 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! Obtain a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } /*! A functor that checks whether a given linear curve is vertical. */ class Is_vertical_2 { public: - /*! Check whether the given x-monotone curve is a vertical segment. + /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -728,11 +732,11 @@ public: } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! Obtain an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } - /*! A functor that compares the y-coordinates of a point and a line at - * the point x-coordinate + /*! A functor that compares the \f$y\f$-coordinates of a point and a line at + * the point \f$x\f$-coordinate */ class Compare_y_at_x_2 { protected: @@ -756,7 +760,7 @@ public: /*! Obtain the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. - * \pre p is in the x-range of cv. + * \pre p is in the \f$x\f$-range of cv. * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; * EQUAL if p lies on the curve. @@ -783,24 +787,24 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! Obtain a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } - /*! A functor that compares compares the y-coordinates of two linear + /*! A functor that compares compares the \f$y\f$-coordinates of two linear * curves immediately to the left of their intersection point. */ class Compare_y_at_x_left_2 { public: - /*! Compare the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \pre The point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + * \return The relative position of `cv1` with respect to `cv2` immdiately to + * the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -839,20 +843,20 @@ public: Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(); } - /*! A functor that compares compares the y-coordinates of two linear + /*! A functor that compares compares the \f$y\f$-coordinates of two linear * curves immediately to the right of their intersection point. */ class Compare_y_at_x_right_2 { public: - /*! Compare the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the right of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be + * \pre The point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its right. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the right of p: SMALLER, LARGER or EQUAL. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -885,7 +889,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! Obtain a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(); } @@ -894,8 +898,8 @@ public: */ class Equal_2 { public: - /*! Check whether the two x-monotone curves are the same (have the same - * graph). + /*! Check whether the two \f$x\f$-monotone curves are the same (have the + * same graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -943,7 +947,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! Obtain an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(); } //@} @@ -951,11 +955,11 @@ public: //@{ /*! A function object that obtains the parameter space of a geometric - * entity along the x-axis + * entity along the \f$x\f$-axis */ class Parameter_space_in_x_2 { public: - /*! Obtains the parameter space at the end of a line along the x-axis. + /*! Obtains the parameter space at the end of a line along the \f$x\f$-axis. * \param xcv the line * \param ce the line end indicator: * ARR_MIN_END - the minimal end of xc or @@ -975,24 +979,24 @@ public: xcv.left_infinite_in_x() : xcv.right_infinite_in_x(); } - /*! Obtains the parameter space at a point along the x-axis. + /*! Obtains the parameter space at a point along the \f$x\f$-axis. * \param p the point. - * \return the parameter space at p. + * \return the parameter space at `p`. */ - Arr_parameter_space operator()(const Point_2 ) const + Arr_parameter_space operator()(const Point_2 /* p */) const { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! Obtain a `Parameter_space_in_x_2` function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis + * entity along the \f$y\f$-axis */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of a line along the y-axis . + /*! Obtains the parameter space at the end of a line along the \f$y\f$-axis. * Note that if the line end coincides with a pole, then unless the line * coincides with the identification arc, the line end is considered to * be approaching the boundary, but not on the boundary. @@ -1018,19 +1022,19 @@ public: xcv.left_infinite_in_y() : xcv.right_infinite_in_y(); } - /*! Obtains the parameter space at a point along the y-axis. + /*! Obtains the parameter space at a point along the \f$y\f$-axis. * \param p the point. - * \return the parameter space at p. + * \return the parameter space at `p`. */ Arr_parameter_space operator()(const Point_2 /* p */) const { return ARR_INTERIOR; } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! Obtain a `Parameter_space_in_y_2` function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } - /*! A function object that compares the x-limits of line ends on the + /*! A function object that compares the \f$x\f$-limits of line ends on the * boundary of the parameter space */ class Compare_x_on_boundary_2 { @@ -1052,8 +1056,8 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the x-limit of a vertical line at a point with the x-limit of - * a line end on the boundary at y = +/- oo. + /*! Compare the \f$x\f$-limit of a vertical line at a point with the + * \f$x\f$-limit of a line end on the boundary at \f$y = +/- \infty\f$. * \param p the point direction. * \param xcv the line, the endpoint of which is compared. * \param ce the line-end indicator - @@ -1064,8 +1068,8 @@ public: * EQUAL - x(p) = x(xc, ce); * LARGER - x(p) > x(xc, ce). * \pre p lies in the interior of the parameter space. - * \pre the ce end of the line xcv lies on a boundary, implying - * that xcv1 is vertical. + * \pre the ce end of the line xcv lies on a boundary, implying the + * `xcv1` is vertical. */ Comparison_result operator()(const Point_2 & p, const X_monotone_curve_2 & xcv, @@ -1078,24 +1082,24 @@ public: return (kernel.compare_x_at_y_2_object()(p, xcv.supp_line())); } - /*! Compare the x-limits of 2 arcs ends on the boundary of the - * parameter space at y = +/- oo. + /*! Compare the \f$x\f$-limits of 2 arcs ends on the boundary of the + * parameter space at \f$y = +/- \infty\f$. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - - * ARR_MIN_END - the minimal end of xcv1 or - * ARR_MAX_END - the maximal end of xcv1. + * `ARR_MIN_END` - the minimal end of `xcv1` or + * `ARR_MAX_END` - the maximal end of `xcv1`. * \param xcv2 the second arc. * \param ce2 the second arc end indicator - - * ARR_MIN_END - the minimal end of xcv2 or - * ARR_MAX_END - the maximal end of xcv2. + * `ARR_MIN_END` - the minimal end of `xcv2` or + * `ARR_MAX_END` - the maximal end of `xcv2`. * \return the second comparison result: - * SMALLER - x(xcv1, ce1) < x(xcv2, ce2); - * EQUAL - x(xcv1, ce1) = x(xcv2, ce2); - * LARGER - x(xcv1, ce1) > x(xcv2, ce2). - * \pre the ce1 end of the line xcv1 lies on a boundary, implying - * that xcv1 is vertical. - * \pre the ce2 end of the line xcv2 lies on a boundary, implying - * that xcv2 is vertical. + * `SMALLER` - x(xcv1, ce1) < x(xcv2, ce2); + * `EQUAL` - x(xcv1, ce1) = x(xcv2, ce2); + * `LARGER ` - x(xcv1, ce1) > x(xcv2, ce2). + * \pre the `ce1` end of the line `xcv1` lies on a boundary, implying + * that `xcv1` is vertical. + * \pre the `ce2` end of the line `xcv2` lies on a boundary, implying + * that `xcv2` is vertical. */ Comparison_result operator()(const X_monotone_curve_2 & xcv1, Arr_curve_end /* ce1 */, @@ -1114,33 +1118,33 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 function object */ + /*! Obtain a `Compare_x_on_boundary_2` function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } - /*! A function object that compares the x-coordinates of arc ends near the - * boundary of the parameter space + /*! A function object that compares the \f$x\f$-coordinates of arc ends near + * the boundary of the parameter space */ class Compare_x_near_boundary_2 { public: - /*! Compare the x-coordinates of 2 arcs ends near the boundary of the - * parameter space at y = +/- oo. + /*! Compare the \f$x\f$-coordinates of 2 arcs ends near the boundary of the + * parameter space at y\f$ = +/- \infty\f$. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - - * ARR_MIN_END - the minimal end of xcv1 or - * ARR_MAX_END - the maximal end of xcv1. + * `ARR_MIN_END` - the minimal end of `xcv1` or + * `ARR_MAX_END` - the maximal end of `xcv1`. * \param xcv2 the second arc. * \param ce2 the second arc end indicator - - * ARR_MIN_END - the minimal end of xcv2 or - * ARR_MAX_END - the maximal end of xcv2. + * `ARR_MIN_END` - the minimal end of `xcv2` or + * `ARR_MAX_END` - the maximal end of `xcv2`. * \return the second comparison result: - * SMALLER - x(xcv1, ce1) < x(xcv2, ce2); - * EQUAL - x(xcv1, ce1) = x(xcv2, ce2); - * LARGER - x(xcv1, ce1) > x(xcv2, ce2). - * \pre the ce end of the line xcv1 lies on a boundary, implying - * that xcv1 is vertical. - * \pre the ce end of the line xcv2 lies on a boundary, implying - * that xcv2 is vertical. + * `SMALLER` - x(xcv1, ce1) < x(xcv2, ce2); + * `EQUAL` - x(xcv1, ce1) = x(xcv2, ce2); + * `LARGER ` - x(xcv1, ce1) > x(xcv2, ce2). + * \pre the `ce` end of the line `xcv1` lies on a boundary, implying + * that `xcv1` is vertical. + * \pre the `ce` end of the line `xcv2` lies on a boundary, implying + * that `xcv2` is vertical. * \pre the $x$-coordinates of xcv1 and xcv2 at their ce ends are * equal, implying that the curves overlap! */ @@ -1157,11 +1161,11 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! Obtain a `Compare_x_near_boundary_2` function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(); } - /*! A function object that compares the y-limits of arc ends on the + /*! A function object that compares the \f$y\f$-limits of arc ends on the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -1183,20 +1187,21 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the y-limits of 2 lines at their ends on the boundary - * of the parameter space at x = +/- oo. + /*! Compare the \f$y\f$-limits of 2 lines at their ends on the boundary + * of the parameter space at \f$x = +/- \infty\f$. * \param xcv1 the first arc. * \param xcv2 the second arc. * \param ce the line end indicator. * \return the second comparison result. - * \pre the ce ends of the lines xcv1 and xcv2 lie either on the left + * \pre the `ce` ends of the lines `xcv1` and `xcv2` lie either on the left * boundary or on the right boundary of the parameter space. */ Comparison_result operator()(const X_monotone_curve_2 & xcv1, const X_monotone_curve_2 & xcv2, Arr_curve_end ce) const { - // Make sure both curves are defined at x = -oo (or at x = +oo). + // Make sure both curves are defined at \f$x = -\infty\f$ (or at + // \f$x = +\infty\f$). CGAL_precondition(! xcv1.is_degenerate()); CGAL_precondition(! xcv2.is_degenerate()); CGAL_precondition((ce == ARR_MIN_END && @@ -1213,19 +1218,19 @@ public: if (res_slopes == EQUAL) { // In case the two supporting line are parallel, compare their - // relative position at x = 0, which is the same as their position + // relative position at \f$x = 0\f$, which is the same as their position // at infinity. const Point_2 p = kernel.construct_point_2_object()(ORIGIN); return (kernel.compare_y_at_x_2_object()(p, xcv1.supp_line(), xcv2.supp_line())); } - // Flip the slope result if we compare at x = -oo: + // Flip the slope result if we compare at \f$x = -\infty\f$: return (ce == ARR_MIN_END) ? CGAL::opposite(res_slopes) : res_slopes; } }; - /*! Obtain a Compare_y_limit_on_boundary_2 function object */ + /*! Obtain a `Compare_y_near_boundary_2` function object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1236,8 +1241,8 @@ public: class Make_x_monotone_2 { public: - /*! Cut the given curve into x-monotone subcurves and insert them into the - * given output iterator. As segments are always x_monotone, only one + /*! Cut the given curve into \f$x\f$-monotone subcurves and insert them into + * the given output iterator. As segments are always x_monotone, only one * object will be contained in the iterator. * \param cv The curve. * \param oi an output iterator for the result. Its dereference type is a @@ -1256,18 +1261,19 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! Obtain a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } class Split_2 { public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! Split a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). * \param c2 Output: The right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its end-points. + * \pre `p` lies on `cv` but is not one of its end-points. */ void operator()(const X_monotone_curve_2& cv, const Point_2& p, X_monotone_curve_2& c1, X_monotone_curve_2& c2) const @@ -1294,7 +1300,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! Obtain a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(); } class Intersect_2 { @@ -1415,7 +1421,7 @@ public: class Are_mergeable_2 { public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -1436,8 +1442,8 @@ public: kernel.construct_opposite_line_2_object()(cv2.supp_line()))) return false; - // Check whether the left endpoint of one curve is the right endpoint of the - // other. + // Check whether the left endpoint of one curve is the right endpoint of + // the other. return ((cv1.has_right() && cv2.has_left() && equal(cv1.right(), cv2.left())) || (cv2.has_right() && cv1.has_left() && @@ -1449,7 +1455,7 @@ public: Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { protected: @@ -1466,7 +1472,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (segment). + /*! Merge two given \f$x\f$-monotone curves into a single curve (segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -1506,7 +1512,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! Obtain a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -1519,9 +1525,9 @@ public: /*! Obtain an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { @@ -1530,17 +1536,17 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! Obtain an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(); } //! Functor class Construct_x_monotone_curve_2 { public: - /*! Obtain an x-monotone curve connecting the two given endpoints. + /*! Obtain an \f$x\f$-monotone curve connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. - * \return A segment connecting p and q. + * \return A segment connecting `p` and `q`. */ X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const { @@ -1551,7 +1557,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! Obtain a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(); } //@} @@ -1562,7 +1568,7 @@ public: //! Functor typedef Construct_x_monotone_curve_2 Construct_curve_2; - /*! Obtain a Construct_curve_2 functor object. */ + /*! Obtain a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h index f394e3adf86..2d2fa2e609f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h @@ -24,9 +24,9 @@ #include /*! \file The basic non-caching segment traits-class for the arrangement - * package. This traits class handles x-monotone non-intersecting segments. - * It is a model of the ArrangementBasicTraits_2 concept. The class is - * templated by a kernel and inherits from it all the types and many of the + * package. This traits class handles \f$x\f$-monotone non-intersecting + * segments. It is a model of the ArrangementBasicTraits_2 concept. The class + * is templated by a kernel and inherits from it all the types and many of the * functors required by the concept it models. */ @@ -41,7 +41,7 @@ namespace CGAL { /*! \class - * A model of the ArrangementBasicTraits_2 concept that handles x-monotone + * A model of the ArrangementBasicTraits_2 concept that handles \f$x\f$-monotone * non-intersecting line segments. */ template @@ -85,25 +85,25 @@ public: typedef typename Kernel::Segment_2 X_monotone_curve_2; typedef unsigned int Multiplicity; - /*! Compare the x-coordinates of two points */ + /*! Compare the \f$x\f$-coordinates of two points. */ typedef typename Kernel::Compare_x_2 Compare_x_2; - /*! Compare two points lexigoraphically; by x, then by y */ + /*! Compare two points lexigoraphically; by \f$x\f$, then by \f$y\f$. */ typedef typename Kernel::Compare_xy_2 Compare_xy_2; - /*! Obtain the left endpoint of a given segment */ + /*! Obtain the left endpoint of a given segment. */ typedef typename Kernel::Construct_min_vertex_2 Construct_min_vertex_2; - /*! Obtain the right endpoint of a given segment */ + /*! Obtain the right endpoint of a given segment. */ typedef typename Kernel::Construct_max_vertex_2 Construct_max_vertex_2; - /*! Check whether a given segment is vertical */ + /*! Check whether a given segment is vertical. */ typedef typename Kernel::Is_vertical_2 Is_vertical_2; - /*! Return the location of a given point with respect to an input segment */ + /*! Return the location of a given point with respect to an input segment. */ typedef typename Kernel::Compare_y_at_x_2 Compare_y_at_x_2; - /*! Check if two segments or if two points are identical */ + /*! Check if two segments or if two points are identical. */ typedef typename Kernel::Equal_2 Equal_2; //@} @@ -117,16 +117,15 @@ public: class Compare_y_at_x_left_2 { public: - /* - * Compare the y value of two segments immediately to the left of their - * intersection point. + /* Compare the \f$y\f$-value of two segments immediately to the left of + * their intersection point. * \param cv1 The first segment. * \param cv2 The second segment. * \param p The intersection point. - * \pre The point p lies on both segments, and both of them must be also be - * defined (lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + * \pre The point `p` lies on both segments, and both of them must be also + * be defined (lexicographically) to its left. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -176,16 +175,15 @@ public: class Compare_y_at_x_right_2 { public: - /*! - * Compare the y value of two segments immediately to the right of their - * intersection point. + /*! Compare the \f$y\f$-value of two segments immediately to the right of + * their intersection point. * \param cv1 The first segment. * \param cv2 The second segment. * \param p The intersection point. - * \pre The point p lies on both segments, and both of them must be also be - * defined (lexicographically) to its right. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the right of p: SMALLER, LARGER or EQUAL. + * \pre The point `p` lies on both segments, and both of them must be also + * be defined (lexicographically) to its right. + * \return The relative position of `cv1` with respect to `cv2` immdiately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2 & cv1, @@ -222,7 +220,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! Obtain a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(); @@ -253,9 +251,9 @@ public: /*! Return an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator() (const Point_2& p, int i) const { CGAL_precondition (i == 0 || i == 1); @@ -291,7 +289,7 @@ public: typedef typename Kernel::Construct_segment_2 Construct_x_monotone_curve_2; - /*! Get a Construct_x_monotone_curve_2 functor object. */ + /*! Get a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const { return (this->construct_segment_2_object()); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index b080305c6f8..287c4ea0967 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -208,15 +208,17 @@ public: /// \name Deprecated //@{ - /*! Determine whether the given point is in the x-range of the segment. + /*! Determine whether the given point is in the \f$x\f$-range of the segment. * \param p the query point. - * \return (true) is in the x-range of the segment; (false) if it is not. + * \return (true) is in the \f$x\f$-range of the segment; (false) if it is + * not. */ CGAL_DEPRECATED bool is_in_x_range(const Point_2& p) const; - /*! Determine whether the given point is in the y-range of the segment. + /*! Determine whether the given point is in the \f$y\f$-range of the segment. * \param p the query point. - * \return (true) is in the y-range of the segment; (false) if it is not. + * \return (true) is in the \f$y\f$-range of the segment; (false) if it is + * not. */ CGAL_DEPRECATED bool is_in_y_range(const Point_2& p) const; @@ -252,12 +254,12 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the x-coordinates of two points. + /*! Compare the \f$x\f$-coordinates of two points. * \param p1 the first point. * \param p2 the second point. - * \return LARGER if x(p1) > x(p2); - * SMALLER if x(p1) < x(p2); - * EQUAL if x(p1) = x(p2). + * \return `LARGER` if x(p1) > x(p2); + * `SMALLER` if x(p1) < x(p2); + * `EQUAL` if x(p1) = x(p2). */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { @@ -266,7 +268,7 @@ public: } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! Obtain a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } class Compare_xy_2 { @@ -298,12 +300,12 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! Obtain a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of the x-monotone curve (segment). + /*! Obtain the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv the curve. * \return the left endpoint. */ @@ -311,13 +313,13 @@ public: { return (cv.left()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! Obtain a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the x-monotone curve (segment). + /*! Obtain the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv the curve. * \return the right endpoint. */ @@ -325,13 +327,13 @@ public: { return (cv.right()); } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! Obtain a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } class Is_vertical_2 { public: - /*! Check whether the given x-monotone curve is a vertical segment. + /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv the curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -339,7 +341,7 @@ public: { return (cv.is_vertical()); } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! Obtain an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); } class Compare_y_at_x_2 { @@ -360,10 +362,10 @@ public: /*! Return the location of the given point with respect to the input curve. * \param cv the curve. * \param p the point. - * \pre p is in the x-range of cv. - * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; - * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; - * EQUAL if p lies on the curve. + * \pre `p` is in the \f$x\f$-range of `cv`. + * \return `SMALLER` if y(p) < cv(x(p)), i.e. the point is below the curve; + * `LARGER` if y(p) > cv(x(p)), i.e. the point is above the curve; + * `EQUAL` if `p` lies on the curve. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& cv) const @@ -387,7 +389,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! Obtain a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -406,15 +408,15 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the left - * of their intersection point. + /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the left of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. * \param p the intersection point. - * \pre the point p lies on both curves, and both of them must be also be + * \pre the point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its left. - * \return the relative position of cv1 with respect to cv2 immediately to - * the left of p: SMALLER, LARGER or EQUAL. + * \return the relative position of `cv1` with respect to `cv2` immediately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -441,7 +443,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! Obtain a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -460,15 +462,15 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the y value of two x-monotone curves immediately to the right - * of their intersection point. + /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the right of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. * \param p the intersection point. - * \pre the point p lies on both curves, and both of them must be also be + * \pre the point `p` lies on both curves, and both of them must be also be * defined (lexicographically) to its right. - * \return the relative position of cv1 with respect to cv2 immediately to - * the right of p: SMALLER, LARGER or EQUAL. + * \return the relative position of `cv1` with respect to `cv2` immediately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -493,7 +495,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! Obtain a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -512,8 +514,8 @@ public: friend class Arr_segment_traits_2; public: - /*! Check whether the two x-monotone curves are the same (have the same - * graph). + /*! Check whether the two \f$x\f$-monotone curves are the same (have the + * same graph). * \param cv1 the first curve. * \param cv2 the second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -540,7 +542,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! Obtain an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -549,13 +551,13 @@ public: //@{ /*! \class Make_x_monotone_2 - * A functor for subdividing a curve into x-monotone curves. + * A functor for subdividing a curve into \f$x\f$-monotone curves. */ class Make_x_monotone_2 { public: - /*! Subdivide a given curve into x-monotone subcurves and insert them into - * a given output iterator. As segments are always x_monotone a single - * object is inserted. + /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. As segments are always \f$x\f$_monotone a + * single object is inserted. * \param cv the curve. * \param oi the output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -573,7 +575,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! Obtain a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } @@ -592,12 +594,13 @@ public: friend class Arr_segment_traits_2; public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! Split a given \f$x\f$-monotone curve at a given point into two + * sub-curves. * \param cv the curve to split * \param p the split point. - * \param c1 Output: the left resulting subcurve (p is its right endpoint). - * \param c2 Output: the right resulting subcurve (p is its left endpoint). - * \pre p lies on cv but is not one of its endpoints. + * \param c1 Output: the left resulting subcurve (`p` is its right endpoint). + * \param c2 Output: the right resulting subcurve (`p` is its left endpoint). + * \pre `p` lies on cv but is not one of its endpoints. */ void operator()(const X_monotone_curve_2& cv, const Point_2& p, X_monotone_curve_2& c1, X_monotone_curve_2& c2) const @@ -619,7 +622,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! Obtain a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -778,7 +781,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! Obtain an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -796,12 +799,12 @@ public: friend class Arr_segment_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 the first curve. * \param cv2 the second curve. * \return (true) if the two curves are mergeable, that is, if they are * supported by the same line; (false) otherwise. - * \pre cv1 and cv2 share a common endpoint. + * \pre `cv1` and `cv2` share a common endpoint. */ bool operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const @@ -819,12 +822,12 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! Obtain an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } /*! \class Merge_2 - * A functor that merges two x-monotone arcs into one. + * A functor that merges two \f$x\f$-monotone arcs into one. */ class Merge_2 { protected: @@ -841,7 +844,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Merge two given x-monotone curves into a single curve (segment). + /*! Merge two given \f$x\f$-monotone curves into a single curve (segment). * \param cv1 the first curve. * \param cv2 the second curve. * \param c Output: the merged curve. @@ -872,7 +875,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! Obtain a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -900,9 +903,9 @@ public: /*! Obtain an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's x-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, int i) const { CGAL_precondition((i == 0) || (i == 1)); @@ -933,7 +936,7 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! Obtain an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //! Functor @@ -954,7 +957,7 @@ public: public: typedef typename Kernel::Segment_2 Segment_2; - /*! Obtain an x-monotone curve connecting two given endpoints. + /*! Obtain an \f$x\f$-monotone curve connecting two given endpoints. * \param source the first point. * \param target the second point. * \pre `source` and `target` must not be equal. @@ -1026,7 +1029,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! Obtain a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} @@ -1037,7 +1040,7 @@ public: //! Functor typedef Construct_x_monotone_curve_2 Construct_curve_2; - /*! Obtain a Construct_curve_2 functor object. */ + /*! Obtain a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} @@ -1060,10 +1063,10 @@ public: friend class Arr_segment_traits_2; /*! Obtain a trimmed version of a line. - * \param xseg the x-monotone segment. + * \param xseg the \f$x\f$-monotone segment. * \param src the new start endpoint. * \param tgt the new end endpoint. - * \return the trimmed x-monotone segment. + * \return the trimmed \f$x\f$-monotone segment. * \pre src != tgt * \pre both points must lie on segment */ @@ -1094,7 +1097,7 @@ public: } }; - /*! Obtain a Trim_2 functor object */ + /*! Obtain a `Trim_2` functor object */ Trim_2 trim_2_object() const { return Trim_2(*this); } class Compare_endpoints_xy_2 { @@ -1109,13 +1112,13 @@ public: { return (cv.is_directed_right()) ? (SMALLER) : (LARGER); } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! Obtain a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite x-monotone (with swapped source and target). + /*! Construct an opposite \f$x\f$-monotone (with swapped source and target). * \param cv the curve. * \return the opposite curve. */ @@ -1123,7 +1126,7 @@ public: { return (cv.flip()); } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! Obtain a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } //@} @@ -1166,7 +1169,7 @@ public: } }; - /*! Obtain an Is_in_x_range_2 functor object */ + /*! Obtain an `Is_in_x_range_2` functor object */ Is_in_x_range_2 is_in_x_range_2_object() const { return Is_in_x_range_2(*this); } @@ -1205,7 +1208,7 @@ public: } }; - /*! Obtain an Is_in_y_range_2 functor object */ + /*! Obtain an `Is_in_y_range_2` functor object */ Is_in_y_range_2 is_in_y_range_2_object() const { return Is_in_y_range_2(*this); } @@ -1419,7 +1422,9 @@ void Arr_segment_traits_2::_Segment_cached_2::set_right(const Point_2& p else m_ps = p; } -//! \brief determines whether the given point is in the x-range of the segment. +/*! \brief determines whether the given point is in the \f$x\f$-range of the + * segment. + */ template bool Arr_segment_traits_2::_Segment_cached_2:: is_in_x_range(const Point_2& p) const @@ -1435,7 +1440,9 @@ is_in_x_range(const Point_2& p) const return (res2 != LARGER); } -//! \brief determines whether the given point is in the y-range of the segment. +/*! \brief determines whether the given point is in the \f$y\f$-range of the + * segment. + */ template bool Arr_segment_traits_2::_Segment_cached_2:: is_in_y_range(const Point_2& p) const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index ae5370ed1a9..d9b8d2e790c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -33,7 +33,7 @@ namespace CGAL { * A metadata traits-class decorator for the arrangement package. It traces the * invocations of traits-class functors. It is parameterized with another traits * class and inherits from it. For each traits method it prints out its input - * parameters and its output result + * parameters and its output result. * * It models all the concepts that the original traits models. */ @@ -79,7 +79,7 @@ public: private: using Base = BaseTraits; - /*! A set of bits that indicate whether operations should be traced */ + //! A set of bits that indicate whether operations should be traced. std::size_t m_flags; bool compare_x_op() const @@ -165,7 +165,7 @@ private: { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_2_OP); } public: - /*! Construct default */ + /*! Construct default. */ template Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) { enable_all_traces(); } @@ -173,25 +173,25 @@ public: /*! Disable copy constructor. */ Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; - /*! Enable the trace of a traits operation - * \param id the operation identifier + /*! Enable the trace of a traits operation. + * \param id the operation identifier. */ void enable_trace(Operation_id id) { m_flags |= 0x1 << id; } - /*! Enable the trace of all traits operations + /*! Enable the trace of all traits operations. */ void enable_all_traces() { m_flags = 0xffffffff; } - /*! Disable the trace of a traits operation - * \param id the operation identifier + /*! Disable the trace of a traits operation. + * \param id the operation identifier. */ void disable_trace(Operation_id id) { m_flags &= ~(0x1 << id); } - /*! Disable the trace of all traits operations + /*! Disable the trace of all traits operations. */ void disable_all_traces() { m_flags = 0x0; } - /// \name Types and functors inherited from the base + /// \name Types and functors inherited from the base. //@{ // Traits types: @@ -213,7 +213,7 @@ public: using Curve_2 = typename Base::Curve_2; using Multiplicity = typename Base::Multiplicity; - /*! A functor that compares the \f$x\f$-coordinates of two points */ + /*! A functor that compares the \f$x\f$-coordinates of two points. */ class Compare_x_2 { private: typename Base::Compare_x_2 m_object; @@ -225,9 +225,9 @@ public: m_object(base.compare_x_2_object()), m_enabled(enabled) {} /*! Operate - * \param p1 first point - * \param p2 second point - * \return the comparison result + * \param p1 first point. + * \param p2 second point. + * \return the comparison result. */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { if (! m_enabled) return m_object(p1, p2); @@ -240,7 +240,9 @@ public: } }; - /*! A functor that compares two points lexigoraphically: by x, then by y. */ + /*! A functor that compares two points lexigoraphically: by \f$x\f$, then by + * \f$y\f$. + */ class Compare_xy_2 { private: typename Base::Compare_xy_2 m_object; @@ -252,9 +254,9 @@ public: m_object(base.compare_xy_2_object()), m_enabled(enabled) {} /*! Operate - * \param p1 the first point - * \param p2 the second point - * \return the comparison result + * \param p1 the first point. + * \param p2 the second point. + * \return the comparison result. */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { if (! m_enabled) return m_object(p1, p2); @@ -279,8 +281,8 @@ public: m_object(base.construct_min_vertex_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curve the left endpoint of which is obtained - * \return the left endpoint + * \param xcv the curve the left endpoint of which is obtained. + * \return the left endpoint. */ using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; using Return_type = @@ -308,8 +310,8 @@ public: m_object(base.construct_max_vertex_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curve the right endpoint of which is obtained - * \return the right endpoint + * \param xcv the curve the right endpoint of which is obtained. + * \return the right endpoint. */ using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; using Return_type = @@ -338,8 +340,8 @@ public: m_object(base.is_vertical_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curve - * \return a Boolean that indicates whether the curve is vertical or not + * \param xcv the curve. + * \return a Boolean that indicates whether the curve is vertical or not. */ bool operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); @@ -351,7 +353,7 @@ public: } }; - /*! A functor that compares the y-coordinates of a point and an + /*! A functor that compares the \f$y\f$-coordinates of a point and an * \f$x\f$-monotone curve at the point \f$x\f$-coordinate. */ class Compare_y_at_x_2 { @@ -365,9 +367,9 @@ public: m_object(base.compare_y_at_x_2_object()), m_enabled(enabled) {} /*! Operate - * \param p the point - * \param xcv the curve - * \return the comparison result + * \param p the point. + * \param xcv the curve. + * \return the comparison result. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xcv) const { @@ -400,9 +402,10 @@ public: {} /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \return true if the \f$x\f$-monotone curves are equal and false otherwise + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \return true if the \f$x\f$-monotone curves are equal and false + * otherwise. */ bool operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const { @@ -416,9 +419,9 @@ public: } /*! Operate - * \param p1 the first point - * \param p2 the second point - * \return true if the points are equal and false otherwise + * \param p1 the first point. + * \param p2 the second point. + * \return true if the points are equal and false otherwise. */ bool operator()(const Point_2& p1, const Point_2& p2) const { if (! m_enabled_point) return m_object(p1, p2); @@ -431,8 +434,9 @@ public: } }; - /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone - * curves immediately to the left of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the left of their intersection + * point. */ class Compare_y_at_x_left_2 { private: @@ -445,10 +449,10 @@ public: m_object(base.compare_y_at_x_left_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \param p the reference point - * \return the comparison result + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \param p the reference point. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -464,8 +468,9 @@ public: } }; - /*! A functor that compares compares the y-coordinates of two \f$x\f$-monotone - * curves immediately to the right of their intersection point. + /*! A functor that compares compares the \f$y\f$-coordinates of two + * \f$x\f$-monotone curves immediately to the right of their intersection + * point. */ class Compare_y_at_x_right_2 { private: @@ -478,10 +483,10 @@ public: m_object(base.compare_y_at_x_right_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \param p the reference point - * \return the comparison result + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \param p the reference point. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -513,11 +518,11 @@ public: Make_x_monotone_2(const Base& base, bool enabled = true) : m_object(base.make_x_monotone_2_object()), m_enabled(enabled) {} - /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them into - * a given output iterator. + /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + * into a given output iterator. * \param cv the curve. * \param oi an output iterator for the result. Its value type is a variant - * that wraps Point_2 or X_monotone_curve_2 objects. + * that wraps `Point_2` or `X_monotone_curve_2` objects. * \return the output iterator. */ template @@ -565,10 +570,11 @@ public: m_object(base.split_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv - * \param p - * \param xcv1 - * \param xcv2 + * \param xcv the curve to split. + * \param p the split point. + * \param xcv1 the left resulting subcurve (`p` is its right endpoint).. + * \param xcv2 the right resulting subcurve (`p` is its left endpoint).. + * \pre `p` lies on `cv` but is not one of its end-points. */ void operator()(const X_monotone_curve_2& xcv, const Point_2& p, X_monotone_curve_2& xcv1, X_monotone_curve_2& xcv2) const { @@ -598,11 +604,11 @@ public: /*! Compute the intersections of the two given curves and insert them into * a given output iterator. - * \param xcv1 the first curve - * \param xcv2 the ssecond curve + * \param xcv1 the first curve. + * \param xcv2 the ssecond curve. * \param oi the output iterator for the result. It value type is a variant * that wraps an \f$x\f$-monotone overlapping curve or a pair that - * consists of the intersection point and its multiplicity + * consists of the intersection point and its multiplicity. * \return the past-the-end output iterator. */ template @@ -656,18 +662,18 @@ public: m_base_traits(base), m_enabled(enabled) {} /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve + * \param xcv1 the first curve. + * \param xcv2 the second curve. * \return true if the two curve are mergeable and false otherwise. * Two curves are mergeable if they have the same underlying theoretical - * curve + * curve. */ bool operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const { return are_mergable_2_impl(xcv1, xcv2, 0); } private: - /*! The base does not have Are_mergable_2 + /*! The base does not have `Are_mergable_2`. */ template bool are_mergable_2_impl(const X_monotone_curve_2& /* xcv1 */, @@ -676,7 +682,7 @@ public: return false; } - /*! The base does have Are_mergable_2 + /*! The base does have `Are_mergable_2`. */ template auto are_mergable_2_impl(const X_monotone_curve_2& xcv1, @@ -705,9 +711,9 @@ public: m_object(base.merge_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv1 the first curve - * \param xcv2 the second curve - * \param xcv the merged curve + * \param xcv1 the first curve. + * \param xcv2 the second curve. + * \param xcv the merged curve. */ void operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -732,8 +738,8 @@ public: m_object(base.construct_opposite_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curve - * \return the opposite curve + * \param xcv the curve. + * \return the opposite curve. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); @@ -759,8 +765,8 @@ public: m_object(base.compare_endpoints_xy_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curve - * \return the comparison result + * \param xcv the curve. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); @@ -772,7 +778,8 @@ public: } }; - /*! A functor that approximates coordinates, points, and \f$x\f$-monotone curves. + /*! A functor that approximates coordinates, points, and \f$x\f$-monotone + * curves. */ class Approximate_2 { private: @@ -791,9 +798,9 @@ public: /*! Obtain an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). - * \pre i is either 0 or 1. - * \return An approximation of p's \f$x\f$-coordinate (if i == 0), or an - * approximation of p's y-coordinate (if i == 1). + * \pre `i` is either 0 or 1. + * \return An approximation of `p`'s \f$x\f$-coordinate (if `i` == 0), or an + * approximation of `p`'s \f$y\f$-coordinate (if `i` == 1). */ Approximate_number_type operator()(const Point_2& p, std::size_t i) const { if (! m_enabled) return m_object(p, i); @@ -831,8 +838,8 @@ public: // left-right - /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve lies - * on a boundary of the parameter space along the x axis. + /*! A functor that determines whether an endpoint of an \f$x\f$-monotone curve + * lies on a boundary of the parameter space along the \f$x\f$-axis. */ class Parameter_space_in_x_2 { private: @@ -846,9 +853,9 @@ public: {} /*! Operate - * \param xcv the curve the end of which is tested - * \param ce the curve-end identifier - * \return the boundary type + * \param xcv the curve the end of which is tested. + * \param ce the curve-end identifier. + * \return the boundary type. */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, Arr_curve_end ce) const { @@ -860,12 +867,12 @@ public: return bt; } - /*! A functor that obtains the parameter space at a point along the \f$x\f$-axis. - * Every non-interior point is assumed to lie on the left-right - * identification. - * Points at the poles additionally lie on the bottom or top boundary. + /*! A functor that obtains the parameter space at a point along the + * \f$x\f$-axis. Every non-interior point is assumed to lie on the + * left-right identification. Points at the poles additionally lie on the + * bottom or top boundary. * \param p the point. - * \return the parameter space at p. + * \return the parameter space at `p`. */ Arr_parameter_space operator()(const Point_2& p) const { if (! m_enabled) return m_object(p); @@ -902,7 +909,7 @@ public: } /*! Operate - * \param xcv1 the curve + * \param xcv1 the curve. */ bool operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); @@ -914,7 +921,7 @@ public: } }; - /*! A functor that compares the y-coordinate of two given points + /*! A functor that compares the \f$y\f$-coordinate of two given points * that lie on vertical boundaries. */ class Compare_y_on_boundary_2 { @@ -944,7 +951,7 @@ public: } }; - /*! A functor that compares the y-coordinates of curve ends near the + /*! A functor that compares the \f$y\f$-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -958,10 +965,10 @@ public: m_object(base.compare_y_near_boundary_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv1 the first curve the end point of which is tested - * \param xcv2 the second curve the end point of which is tested - * \param ce the curve-end identifier - * \return the comparison result + * \param xcv1 the first curve the end point of which is tested. + * \param xcv2 the second curve the end point of which is tested. + * \param ce the curve-end identifier. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -980,7 +987,7 @@ public: // bottom-top /*! A functor that determines whether an endpoint of an \f$x\f$-monotone arc - * lies on a boundary of the parameter space along the y axis. + * lies on a boundary of the parameter space along the \f$y\f$-axis. */ class Parameter_space_in_y_2 { private: @@ -993,9 +1000,9 @@ public: m_object(base.parameter_space_in_y_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curve the end of which is tested - * \param ce the curve-end identifier - * \return the boundary type + * \param xcv the curve the end of which is tested. + * \param ce the curve-end identifier. + * \return the boundary type. */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, Arr_curve_end ce) const { @@ -1008,8 +1015,8 @@ public: } /*! Operate - * \param p the point - * \return the boundary type + * \param p the point. + * \return the boundary type. */ Arr_parameter_space operator()(const Point_2& p) const { if (! m_enabled) return m_object(p); @@ -1022,7 +1029,7 @@ public: }; /*! A functor that determines whether a point or curve is on - * y-identification. + * \f$y\f$-identification. */ class Is_on_y_identification_2 { private: @@ -1046,7 +1053,7 @@ public: } /*! Operate - * \param xcv1 the curve + * \param xcv1 the curve. */ bool operator()(const X_monotone_curve_2& xcv) const { if (! m_enabled) return m_object(xcv); @@ -1087,7 +1094,7 @@ public: /*! Operate * \param pt the point. * \param xcv the curve. - * \param ce the curve-end + * \param ce the curve-end. */ Comparison_result operator()(const Point_2& pt, const X_monotone_curve_2& xcv, @@ -1104,9 +1111,9 @@ public: /*! Operate * \param xcv1 the first curve. - * \param ce1 the first curve-end + * \param ce1 the first curve-end. * \param xcv2 the second curve. - * \param ce2 the second curve-end + * \param ce2 the second curve-end. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1, @@ -1138,11 +1145,11 @@ public: m_object(base.compare_x_near_boundary_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv1 the first curve the end of which is to be compared - * \param ce1 the identifier of the end of the first curve - * \param xcv2 the second curve the end of which is to be compared - * \param ce2 the identifier of the end of the second curve - * \return the comparison result + * \param xcv1 the first curve the end of which is to be compared. + * \param ce1 the identifier of the end of the first curve. + * \param xcv2 the second curve the end of which is to be compared. + * \param ce2 the identifier of the end of the second curve. + * \return the comparison result. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, From 982ca628e210b60292c71795591e3761a6acc0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 12 Nov 2024 13:57:53 +0100 Subject: [PATCH 12/34] remove tabs --- .../include/CGAL/Arr_counting_traits_2.h | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 3edcd6dadff..17edd09ee07 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -870,8 +870,8 @@ private: has_construct_max_vertex_2::value, has_is_vertical_2::value, has_compare_y_at_x_2::value, - has_equal_2::value, // points - has_equal_2::value, // curves + has_equal_2::value, // points + has_equal_2::value, // curves has_compare_y_at_x_left_2::value, has_compare_y_at_x_right_2::value, has_make_x_monotone_2::value, @@ -881,22 +881,22 @@ private: has_merge_2::value, has_construct_opposite_2::value, has_compare_endpoints_xy_2::value, - has_approximate_2::value, // coordinate - has_approximate_2::value, // point - has_approximate_2::value, // curve - has_parameter_space_in_x_2::value, // curve end - has_parameter_space_in_x_2::value, // point - has_is_on_x_identification_2::value, // point - has_is_on_x_identification_2::value, // curve + has_approximate_2::value, // coordinate + has_approximate_2::value, // point + has_approximate_2::value, // curve + has_parameter_space_in_x_2::value, // curve end + has_parameter_space_in_x_2::value, // point + has_is_on_x_identification_2::value, // point + has_is_on_x_identification_2::value, // curve has_compare_y_on_boundary_2::value, has_compare_y_near_boundary_2::value, - has_parameter_space_in_y_2::value, // curve end - has_parameter_space_in_y_2::value, // point - has_is_on_y_identification_2::value, // point - has_is_on_y_identification_2::value, // curve - has_compare_x_on_boundary_2::value, // points - has_compare_x_on_boundary_2::value, // point, curve end - has_compare_x_on_boundary_2::value, // curve ends + has_parameter_space_in_y_2::value, // curve end + has_parameter_space_in_y_2::value, // point + has_is_on_y_identification_2::value, // point + has_is_on_y_identification_2::value, // curve + has_compare_x_on_boundary_2::value, // points + has_compare_x_on_boundary_2::value, // point, curve end + has_compare_x_on_boundary_2::value, // curve ends has_compare_x_near_boundary_2::value }; }; From f9213fafddb6454417e8634556e52efcf69e4773 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Tue, 12 Nov 2024 15:30:50 +0200 Subject: [PATCH 13/34] Basic fixes --- .../Arrangement_on_surface_2.txt | 17 ++++++++--------- .../CGAL/Arr_counting_traits_2.h | 2 +- .../CGAL/Arr_tracing_traits_2.h | 2 +- .../include/CGAL/Arr_counting_traits_2.h | 2 +- .../include/CGAL/Arr_tracing_traits_2.h | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index f178276edab..bbdfeb0b3f9 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -5665,18 +5665,17 @@ the latter is used to trace these invocations. Note that the constructors of each of these class templates applies perfect forwarding. The counting traits also exports the count of traits-class objects of specific types constructed during the execution of the -program. The tracing traits supports filtering of traced -functors. The calls `traits.enable_trace(id)` and -`traits.disable_trace(id)` enables and disables the tracing of a -functor identified by `id`, respectively. A functor is identified by -an enumeration. For example, the functor \link -ArrangementTraits_2::Make_x_monotone_2 `Make_x_monotone_2`\endlink is -identified by the enumeration +program. The tracing traits supports filtering of traced functors. The +calls `traits.enable_trace(id)` and `traits.disable_trace(id)` enables +and disables the tracing of a functor identified by `id`, +respectively. A functor is identified by an enumeration. For example, +the functor \link ArrangementTraits_2::Make_x_monotone_2 +`Make_x_monotone_2`\endlink is identified by the enumeration `Arr_tracing_traits_2::MAKE_X_MONOTONE_OP`. The calls `traits.enable_all_traces()` and `traits.disable_all_traces()` enables and disables the traces of all functors, respectively. The example -program listed below and coded in the file `count_and_trace.cpp` -demonstrates the use of both of these metadata decorators. +program listed below demonstrates the use of both of these metadata +decorators. \cgalExample{Arrangement_on_surface_2/count_and_trace.cpp} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h index ba643bb62de..75c65cd2834 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h @@ -82,7 +82,7 @@ public: template OutStream& print(OutStream& os, Operation_id id) const; - /// \name Types and functors inherited from the base + /// \name Types and functors inherited from `BaseTraits` /// @{ using Has_left_category = typename Base::Has_left_category; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h index 196003aa510..92acac4f5f3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h @@ -84,7 +84,7 @@ public: */ void disable_all_traces(); - /// \name Types and functors inherited from the base + /// \name Types and functors inherited from `BaseTraits` /// @{ using Has_left_category = typename Base::Has_left_category; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 3edcd6dadff..7630e8b43c3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -107,7 +107,7 @@ public: return os; } - /// \name Types and functors inherited from the base + /// \name Types and functors inherited from `BaseTraits` //@{ // Traits types: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index d9b8d2e790c..daf9b1892aa 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -191,7 +191,7 @@ public: */ void disable_all_traces() { m_flags = 0x0; } - /// \name Types and functors inherited from the base. + /// \name Types and functors inherited from `BaseTraits` //@{ // Traits types: From 85667b524d824cc59adaae2b7eb72fde0e0a6c8c Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 13 Nov 2024 03:25:54 +0200 Subject: [PATCH 14/34] Fixed typo --- .../Option_parser.cpp | 12 +- .../Option_parser.hpp | 22 +- .../CGAL/Arr_algebraic_segment_traits_2.h | 678 ++++----- .../Arr_bounded_planar_topology_traits_2.h | 12 +- .../CGAL/Arr_circle_segment_traits_2.h | 12 +- .../CGAL/Arr_conic_traits_2.h | 30 +- .../Arr_consolidated_curve_data_traits_2.h | 223 ++- .../CGAL/Arr_counting_traits_2.h | 12 +- .../CGAL/Arr_curve_data_traits_2.h | 69 +- .../Arr_geodesic_arc_on_sphere_traits_2.h | 73 +- .../CGAL/Arr_linear_traits_2.h | 4 +- .../CGAL/Arr_polycurve_traits_2.h | 76 +- .../CGAL/Arr_polyline_traits_2.h | 40 +- .../CGAL/Arr_rational_function_traits_2.h | 1351 ++++++++--------- .../CGAL/Arr_spherical_topology_traits_2.h | 24 +- .../CGAL/Arr_tracing_traits_2.h | 16 +- .../CGAL/Arr_unb_planar_topology_traits_2.h | 12 +- .../Concepts/ArrangementBasicTopologyTraits.h | 4 +- .../tracing_counting.cpp | 2 +- .../include/CGAL/Aos_observer.h | 20 +- .../include/CGAL/Arr_Bezier_curve_traits_2.h | 120 +- .../include/CGAL/Arr_accessor.h | 162 +- .../CGAL/Arr_algebraic_segment_traits_2.h | 24 +- .../Arr_bounded_planar_topology_traits_2.h | 78 +- .../CGAL/Arr_circle_segment_traits_2.h | 102 +- .../include/CGAL/Arr_circular_arc_traits_2.h | 2 +- .../CGAL/Arr_circular_line_arc_traits_2.h | 55 +- .../include/CGAL/Arr_conic_traits_2.h | 275 ++-- .../include/CGAL/Arr_counting_traits_2.h | 136 +- .../include/CGAL/Arr_curve_data_traits_2.h | 50 +- .../include/CGAL/Arr_dcel_base.h | 249 ++- ...ional_non_caching_segment_basic_traits_2.h | 10 +- .../include/CGAL/Arr_extended_dcel.h | 34 +- .../include/CGAL/Arr_face_index_map.h | 30 +- ...eodesic_arc_on_sphere_partition_traits_2.h | 29 +- .../CGAL/Arr_geometry_traits/Arr_plane_3.h | 32 +- .../CGAL/Arr_geometry_traits/Bezier_curve_2.h | 102 +- .../include/CGAL/Arr_line_arc_traits_2.h | 2 - .../Arr_lm_grid_generator.h | 16 +- .../Arr_lm_nearest_neighbor.h | 32 +- .../include/CGAL/Arr_polycurve_traits_2.h | 64 +- .../include/CGAL/Arr_polyline_traits_2.h | 56 +- .../CGAL/Arr_rational_function_traits_2.h | 144 +- .../Arr_polyhedral_sgm.h | 70 +- .../Arr_polyhedral_sgm_arr_dcel.h | 24 +- .../Arr_polyhedral_sgm_polyhedron_3.h | 40 +- .../CGAL/Arr_spherical_topology_traits_2.h | 113 +- .../Arr_bounded_planar_batched_pl_helper.h | 4 +- .../Arr_bounded_planar_construction_helper.h | 12 +- .../Arr_bounded_planar_overlay_helper.h | 6 +- .../Arr_bounded_planar_vert_decomp_helper.h | 6 +- .../Arr_planar_topology_traits_base_2.h | 30 +- .../Arr_spherical_batched_pl_helper.h | 4 +- .../Arr_spherical_construction_helper.h | 16 +- .../Arr_spherical_insertion_helper.h | 8 +- .../Arr_spherical_overlay_helper.h | 12 +- .../Arr_spherical_vert_decomp_helper.h | 6 +- .../Arr_unb_planar_batched_pl_helper.h | 5 +- .../Arr_unb_planar_construction_helper.h | 19 +- .../Arr_unb_planar_overlay_helper.h | 6 +- .../Arr_unb_planar_vert_decomp_helper.h | 6 +- .../include/CGAL/Arr_tracing_traits_2.h | 139 +- .../CGAL/Arr_trapezoid_ric_point_location.h | 25 +- .../CGAL/Arr_unb_planar_topology_traits_2.h | 96 +- .../include/CGAL/Arr_vertex_index_map.h | 32 +- .../include/CGAL/Arrangement_2.h | 18 +- .../CGAL/Arrangement_2/Arr_traits_adaptor_2.h | 205 ++- .../CGAL/Arrangement_2/graph_traits_dual.h | 56 +- .../include/CGAL/Arrangement_on_surface_2.h | 524 +++---- .../Arrangement_on_surface_with_history_2.h | 90 +- .../include/CGAL/Arrangement_with_history_2.h | 20 +- .../include/CGAL/Arrangement_zone_2.h | 40 +- .../include/CGAL/IO/Arr_text_formatter.h | 82 +- .../include/CGAL/IO/Arrangement_2_writer.h | 24 +- .../Arr_basic_insertion_traits_2.h | 76 +- .../Arr_construction_event_base.h | 30 +- .../Arr_construction_ss_visitor.h | 36 +- .../Arr_construction_subcurve.h | 31 +- .../Surface_sweep_2/Arr_insertion_traits_2.h | 10 +- .../Surface_sweep_2/Arr_overlay_subcurve.h | 26 +- .../Surface_sweep_2/Arr_overlay_traits_2.h | 134 +- .../include/CGAL/graph_traits_Arrangement_2.h | 56 +- 82 files changed, 3117 insertions(+), 3516 deletions(-) diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp index a1032551da2..02a1b3e92df 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.cpp @@ -54,7 +54,7 @@ void validate(std::any & v, const std::vector & values, Option_parser::my_validate(v, values); } -/*! Constructor */ +/*! constructs */ Option_parser::Option_parser() : m_generic_opts("Generic options"), m_config_opts("Configuration options"), @@ -136,7 +136,7 @@ Option_parser::Option_parser() : m_positional_opts.add("input-file", -1); } -/*! Parse the options */ +/*! parses the options */ void Option_parser::operator()(int argc, char * argv[]) { po::store(po::command_line_parser(argc, argv). @@ -225,20 +225,20 @@ void Option_parser::operator()(int argc, char * argv[]) } } -/*! Obtain the base file-name */ +/*! obtains the base file-name */ const std::string & Option_parser::get_file_name(unsigned int i) const { return m_variable_map["input-file"].as()[i]; } -/*! Obtain the full file-name */ +/*! obtains the full file-name */ const std::string & Option_parser::get_full_name(unsigned int i) const { return m_full_names[i]; } -/*! Obtain number of type options */ +/*! obtains number of type options */ unsigned int Option_parser::get_number_opts(Type_id &) { return sizeof(s_type_opts) / sizeof(char *); } -/*! Obtain number of strategy options */ +/*! obtains number of strategy options */ unsigned int Option_parser::get_number_opts(Strategy_id &) { return sizeof(s_strategy_opts) / sizeof(char *); } diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp index a20f3b804c2..edca2243def 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Option_parser.hpp @@ -62,17 +62,17 @@ public: typedef Vector_strategy_id::iterator Vector_strategy_id_iter; public: - /*! \brief obtains number of type options */ + /*! obtains number of type options */ static unsigned int get_number_opts(Type_id &); - /*! \brief obtains number of strategy options */ + /*! obtains number of strategy options */ static unsigned int get_number_opts(Strategy_id &); - /*! Compare the i-th type option to a given option */ + /*! compares the i-th type option to a given option */ static bool compare_opt(unsigned int i, const char * opt, Type_id &) { return strcmp(s_type_opts[i], opt) == 0; } - /*! Compare the i-th strategy option to a given option */ + /*! compares the i-th strategy option to a given option */ static bool compare_opt(unsigned int i, const char * opt, Strategy_id &) { return strcmp(s_strategy_opts[i], opt) == 0; } @@ -94,19 +94,19 @@ public: Input_file_missing_error(std::string & str) : error(str) {} }; - /*! Parse the options */ + /*! parses the options */ void operator()(int argc, char * argv[]); - /*! Obtain the verbosity level */ + /*! obtains the verbosity level */ unsigned int get_verbose_level() const { return m_verbose_level; } - /*! Obtain the number of input files */ + /*! obtains the number of input files */ unsigned int get_number_files() const { return m_number_files; } - /*! \brief obtains the base file-name */ + /*! obtains the base file-name */ const std::string & get_file_name(unsigned int i) const; - /*! \brief obtains the full file-name */ + /*! obtains the full file-name */ const std::string & get_full_name(unsigned int i) const; bool get_postscript() const { return m_postscript; } @@ -117,10 +117,10 @@ public: const char * get_strategy_name(Strategy_code id) const { return s_strategy_opts[id]; } - /*! Obtain the window width */ + /*! obtains the window width */ unsigned int get_width() const { return m_win_width; } - /*! Obtain the window height */ + /*! obtains the window height */ unsigned int get_height() const { return m_win_height; } template diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h index 5007dce85f5..27fcce4bb1e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_algebraic_segment_traits_2.h @@ -1,355 +1,343 @@ - namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_algebraic_segment_traits_2` is a model of the + * `ArrangementTraits_2` concept that handles planar algebraic curves of + * arbitrary degree, and \f$ x\f$-monotone of such curves. A planar (real) + * algebraic curve is the vanishing set of a polynomial in two variables, + * that is, the curve is defined by the defining equation \f[ + * f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f] where \f$ n\f$ is the degree of + * the curve. + * + * The traits class allows the construction of algebraic curves, by specifying + * their implicit equation. \f$ x\f$-monotone and vertical segments of a curve + * can also be defined; unbounded curves and segments are supported. The + * template parameter `Coefficient` defines the innermost coefficient type of + * the polynomials. Currently, the types `leda::integer` and `CORE::BigInt` are + * supported as well as any instance of `CGAL::Sqrt_extension` that is + * instantiated with one of the integral types above. + * + * \cgalModels{ArrangementTraits_2} + */ -The traits class `Arr_algebraic_segment_traits_2` is a model of the `ArrangementTraits_2` -concept that handles planar algebraic curves of arbitrary degree, -and \f$ x\f$-monotone of such curves. -A planar (real) algebraic curve -is the vanishing set of a polynomial in two variables, that is, the -curve is defined by the defining equation -\f[ f(x):=\sum_{i+j\leq n} a_{ij} x^i y^j =0, \f] -where \f$ n\f$ is the degree of the curve. - -The traits class allows the construction of algebraic curves, -by specifying their implicit equation. \f$ x\f$-monotone and vertical segments -of a curve can also be defined; unbounded curves and segments are supported. -The template parameter `Coefficient` defines -the innermost coefficient type of the polynomials. Currently, -the types `leda::integer` and `CORE::BigInt` are supported as well -as any instance of `CGAL::Sqrt_extension` that is instantiated with -one of the integral types above. - -\cgalModels{ArrangementTraits_2} - - -*/ template class Arr_algebraic_segment_traits_2 { public: -/// \name Types -/// @{ - -/*! Value to specify whether a point should be in the interior of a segment, or - * its minimal point, or its maximal point in lexicographic order. - */ -enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1 }; - -/*! the type for bivariate polynomials, with innermost coefficient type - * `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two - * variables. - * - * \sa `CGAL::Polynomial_d` - */ -typedef unspecified_type Polynomial_2; - -/*! model for the concept `AlgebraicKernel_1` - */ -typedef unspecified_type Algebraic_kernel_1; - -/*! represents coordinates of points. - * Typedef from `Algebraic_kernel_1::Algebraic_real_1` - */ -typedef unspecified_type Algebraic_real_1; - -/*! Typedef from `Algebraic_kernel_1::Bound` - */ -typedef unspecified_type Bound; - -/// @} - -/// \name Accessing functor objects -/// @{ - -/*! - - */ -Construct_curve_2 construct_curve_2_object() const; - -/*! - - */ -Construct_point_2 construct_point_2_object() const; - -/*! - - */ -Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const; - -/// @} - -/*! - - */ -class Construct_curve_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! Returns a `Curve_2` object that represents the curve defined by the - * polynomial `p` - */ -Curve_2 operator() (Polynomial_2 p); - -/*! Returns a `Curve_2` object specified by `s`. The passed string represents - * the defining polynomial of the curve and must be given in a MAPLE-readable - * format using "x" as first and "y" as second variable, e.g., - * \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and - * \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients. - */ -Curve_2 operator() (std::string s); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */ - -/*! - - */ -class Construct_point_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! Returns a `Point_2` object that represents the `arcno`-th - * point in the fiber of `cv` at \f$ x\f$-coordinate `x`, - * counted from the bottom, starting with zero. - * \pre (`cv` must not have a vertical line at `x`, - * and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points - * in the fiber of `cv` at `x`.) - */ -Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno); - -/*! Returns a `Point_2` object that represents the - * point on `xcv` at \f$ x\f$-coordinate `x` - * \pre (`x` is in the \f$ x\f$-range of `xcv`.) - */ -Point_2 operator() (Algebraic_real_1 x, X_monotone_curve_2 xcv); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Coefficient x, Coefficient y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (Bound x, Bound y); - -/*! Returns a `Point_2` object that represents (x,y) - */ -Point_2 operator() (int x, int y); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */ - -/*! - - */ -class Construct_x_monotone_segment_2 { -public: - -/// \name Object Creation Functors -/// @{ - -/*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) into - * an output container given through an output iterator. These terminal segments - * compose an \f$x\f$-monotone (or vertical) segment of a given curve that - * starts in `end_min`, and ends in `end_max`. - * - * \param cv The input curve. - * \param end_min The starting point. - * \param end_max The ending point. - * \param oi The output iterator that points at the output container. - * \return The past-the-end iterator of the output container. - * - * \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or - * `end_max` must have a unique \f$x\f$-monotone segment to its left. - * Furthermore, `end_min` and `end_max` must be connected by an - * \f$x\f$-monotone segment of `cv`) - */ -template -OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max, - OutputIterator oi); - -/*! inserts a sequence of `X_monotone_curve_2` objects into an output container - * given through an output iterator. These segments form an \f$x\f$-monotone - * (or vertical) segment of the curve `cv`. - * - * If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is - * returned that contains `p` in its interior. - * - * returned that contains `p` as its left endpoint. - * - * returned that contains `p` as its left endpoint. - * - * \pre (If `site_of_p==POINT_IN_INTERIOR`, `p` - * must be an interior point of an \f$x\f$-monotone or a vertical - * segment. - * must either have a unique \f$x\f$-monotone segment to the right, - * or a vertical segment from `p` upwards. - * must either have a unique \f$x\f$-monotone segment to the left, - * or a vertical segment from `p` downwards.) - */ -template -OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p, - OutputIterator out); - -/*! inserts a sequence of `X_monotone_curve_2` objects into an output container - * given through an output iterator. These segments form a straight-line - * segment connecting the points `p` and `q`. If `p` and `q` share the same - * \f$x\f$-coordinate, the constructed vertical segment consists of only one - * `X_monotone_curve_2` object and can be computed efficiently. In the - * non-vertical case, the construction is only possible if `p` and `q` have both - * rational x- and y-coordinates. - * - * \pre (`p` must not be equal to `q`.) - */ -template -OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out); - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */ - -/*! Models the `ArrangementTraits_2::Curve_2` concept. - * Represents algebraic curves. Internally, the type stores - * topological-geometric information about the particular curve. - * In order to use internal caching, instances should only be created - * using the `Construct_curve_2` functor of the traits class. - */ -class Curve_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the defining polynomial of the curve. -*/ -Polynomial_2 polynomial () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Curve_2 */ - -/*! Models the `ArrangementBasicTraits_2::Point_2` concept. - * Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic - * curves are in general non-rational, so we need a data structure that is - * capable of representing arbitrary points with algebraic coordinates. - * - * The traits class represents algebraic coordinates by the type - * `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept. - * A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$, - * where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance - * of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$), - * and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the - * \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from - * \f$-\infty\f$ (where counting starts with \f$ 0\f$). - * - * In addition to the methods listed below, the copy constructor and assignment - * operator for `Point_2` objects are also supported. - * - * The functor `Construct_point_2` constructs `Point_2` instances. - */ - -class Point_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the \f$ x\f$-coordinate of `p`. - */ -Algebraic_real_1 x () const; - -/*! returns the \f$ y\f$-coordinates of `p`. - * - * Attention: As described above, points are not stored - * by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact, - * this representation must be computed on demand, and might become quite - * costly for points defined by high-degree polynomials. Therefore, it is - * recommended to avoid to call this function as much as possible. - */ -Algebraic_real_1 y () const; - -/*! returns a `Curve_2` instance that `p`is part of. - */ -Curve_2 curve () const; - -/*! returns the arc number of `p`. - */ -int arcno () const; - -/*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates. - */ -std::pair to_double () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::Point_2 */ - -/*! Models the `ArrangementBasicTraits_2::X_monotone_curve_2` concept. - * Represents terminal segments of an algebraic curves, that means vertical - * segments or \f$ x\f$-monotone segments with no critical \f$ x\f$-coordinate - * in the interior of their \f$ x\f$-range. Terminal segments might either be - * bounded or unbounded. By definition, each interior point of a non-vertical - * segment has the same arc number (see the documentation of type `Point_2` - * above, which is called the arc number of the segment (note the arc - * number at the endpoints might differ). Such segments are represented - * internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$ - * are the endpoints, \f$ cv\f$ is the supporting curve that the segment - * belongs to, and arcno is the arc number of the segment. - * - * Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range - * of `X_monotone_curve_2` instances, whose union equals the segment. - * The functor `Construct_x_monotone_segment_2` allows their construction. - * To construct all (maximal) terminal segments of a curve, - * use the `Make_x_monotone_2` functor supplied by the traits class. - */ -class X_monotone_curve_2 { -public: - -/// \name Modifiers -/// @{ - -/*! returns the supporting algebraic curve of `s`. - */ -Curve_2 curve () const; - -/*! returns whether `s` is a vertical segment. - */ -bool is_vertical () const; - -/*! returns whether `s` has a finite endpoint on the left - */ -bool is_finite (CGAL::Arr_curve_end ce) const; - -/*! \pre (The corresponding curve end is finite) - */ -Point_2 curve_end (CGAL::Arr_curve_end ce) const; - -/*! returns the arc number of the segment. - * \pre (The segment is non-vertical) - */ -int arcno () const; - -/*! -returns the \f$ x\f$-coordinate of a vertical segment. -\pre (The segment is vertical) -*/ -Algebraic_real_1 x () const; - -/// @} - -}; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */ + /// \name Types + /// @{ + + /*! Value to specify whether a point should be in the interior of a segment, or + * its minimal point, or its maximal point in lexicographic order. + */ + enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, MAX_ENDPOINT = 1 }; + + /*! the type for bivariate polynomials, with innermost coefficient type + * `Coefficient`. Constitutes a model of the concept `Polynomial_d` with two + * variables. + * + * \sa `CGAL::Polynomial_d` + */ + typedef unspecified_type Polynomial_2; + + /*! model for the concept `AlgebraicKernel_1` + */ + typedef unspecified_type Algebraic_kernel_1; + + /*! represents coordinates of points. + * Typedef from `Algebraic_kernel_1::Algebraic_real_1` + */ + typedef unspecified_type Algebraic_real_1; + + /*! Typedef from `Algebraic_kernel_1::Bound` + */ + typedef unspecified_type Bound; + + /// @} + + /// \name Accessing functor objects + /// @{ + + /*! + */ + Construct_curve_2 construct_curve_2_object() const; + + /*! + */ + Construct_point_2 construct_point_2_object() const; + + /*! + */ + Construct_x_monotone_segment_2 construct_x_monotone_segment_2_object() const; + + /// @} + + /*! + */ + class Construct_curve_2 { + public: + + /// \name Object Creation Functors + /// @{ + + /*! returns a `Curve_2` object that represents the curve defined by the + * polynomial `p` + */ + Curve_2 operator() (Polynomial_2 p); + + /*! returns a `Curve_2` object specified by `s`. The passed string represents + * the defining polynomial of the curve and must be given in a MAPLE-readable + * format using "x" as first and "y" as second variable, e.g., + * \f$(x^3*y-2*x)*(-6*x-y^3*x^6)\f$ for integer coefficients, and + * \f$3/2*x*y^4-5/7*x^2+3/1\f$ for rational coefficients. + */ + Curve_2 operator() (std::string s); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_curve_2 */ + + /*! + */ + class Construct_point_2 { + public: + + /// \name Object Creation Functors + /// @{ + + /*! returns a `Point_2` object that represents the `arcno`-th + * point in the fiber of `cv` at \f$ x\f$-coordinate `x`, + * counted from the bottom, starting with zero. + * \pre (`cv` must not have a vertical line at `x`, + * and \f$ 0\leq arcno < c\f$, where \f$ c\f$ is the number of points + * in the fiber of `cv` at `x`.) + */ + Point_2 operator() (Algebraic_real_1 x, Curve_2 cv, int arcno); + + /*! returns a `Point_2` object that represents the + * point on `xcv` at \f$ x\f$-coordinate `x` + * \pre (`x` is in the \f$ x\f$-range of `xcv`.) + */ + Point_2 operator() (Algebraic_real_1 x, X_monotone_curve_2 xcv); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (Algebraic_real_1 x, Algebraic_real_1 y); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (Coefficient x, Coefficient y); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (Bound x, Bound y); + + /*! returns a `Point_2` object that represents (x,y) + */ + Point_2 operator() (int x, int y); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_point_2 */ + + /*! + */ + class Construct_x_monotone_segment_2 { + public: + + /// \name Object Creation Functors + /// @{ + + /*! inserts a sequence of `X_monotone_curve_2` objects (terminal segments) into + * an output container given through an output iterator. These terminal segments + * compose an \f$x\f$-monotone (or vertical) segment of a given curve that + * starts in `end_min`, and ends in `end_max`. + * + * \param cv The input curve. + * \param end_min The starting point. + * \param end_max The ending point. + * \param oi The output iterator that points at the output container. + * \return The past-the-end iterator of the output container. + * + * \pre `end_min` must have a unique \f$x\f$-monotone segment to its right, or + * `end_max` must have a unique \f$x\f$-monotone segment to its left. + * Furthermore, `end_min` and `end_max` must be connected by an + * \f$x\f$-monotone segment of `cv`) + */ + template + OutputIterator operator() (Curve_2 cv, Point_2 end_min, Point_2 end_max, + OutputIterator oi); + + /*! inserts a sequence of `X_monotone_curve_2` objects into an output container + * given through an output iterator. These segments form an \f$x\f$-monotone + * (or vertical) segment of the curve `cv`. + * + * If `site_of_p==POINT_IN_INTERIOR`, the maximal segment is + * returned that contains `p` in its interior. + * + * returned that contains `p` as its left endpoint. + * + * returned that contains `p` as its left endpoint. + * + * \pre (If `site_of_p==POINT_IN_INTERIOR`, `p` + * must be an interior point of an \f$x\f$-monotone or a vertical + * segment. + * must either have a unique \f$x\f$-monotone segment to the right, + * or a vertical segment from `p` upwards. + * must either have a unique \f$x\f$-monotone segment to the left, + * or a vertical segment from `p` downwards.) + */ + template + OutputIterator operator() (Curve_2 cv, Point_2 p, Site_of_point site_of_p, + OutputIterator out); + + /*! inserts a sequence of `X_monotone_curve_2` objects into an output container + * given through an output iterator. These segments form a straight-line + * segment connecting the points `p` and `q`. If `p` and `q` share the same + * \f$x\f$-coordinate, the constructed vertical segment consists of only one + * `X_monotone_curve_2` object and can be computed efficiently. In the + * non-vertical case, the construction is only possible if `p` and `q` have both + * rational x- and y-coordinates. + * + * \pre (`p` must not be equal to `q`.) + */ + template + OutputIterator operator() (Point_2 p, Point_2 q, OutputIterator out); + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Construct_x_monotone_segment_2 */ + + /*! A model of the the `ArrangementTraits_2::Curve_2` concept. + * Represents algebraic curves. Internally, the type stores + * topological-geometric information about the particular curve. + * In order to use internal caching, instances should only be created + * using the `Construct_curve_2` functor of the traits class. + */ + class Curve_2 { + public: + + /// \name Modifiers + /// @{ + + /*! returns the defining polynomial of the curve. + */ + Polynomial_2 polynomial () const; + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Curve_2 */ + + /*! A model of the `ArrangementBasicTraits_2::Point_2` concept. + * Represents points in \f$ \mathbb{R}^2\f$. Intersection points of algebraic + * curves are in general non-rational, so we need a data structure that is + * capable of representing arbitrary points with algebraic coordinates. + * + * The traits class represents algebraic coordinates by the type + * `Algebraic_real_1`, which is a model of the `AlgebraicReal_1` concept. + * A point \f$ p\f$ is stored by a triple \f$ (x,cv,arcno)\f$, + * where \f$ x\f$ is the \f$ x\f$-coordinate of a point, \f$ cv\f$ is an instance + * of `Curve_2` that contains the point, (and has no vertical line at \f$ x\f$), + * and \f$ arcno\f$ is an `int`, denoting that \f$ p\f$ is met as the + * \f$arcno\f$-th point when shooting a vertical ray at \f$ x\f$, starting from + * \f$-\infty\f$ (where counting starts with \f$ 0\f$). + * + * In addition to the methods listed below, the copy constructor and assignment + * operator for `Point_2` objects are also supported. + * + * The functor `Construct_point_2` constructs `Point_2` instances. + */ + + class Point_2 { + public: + + /// \name Modifiers + /// @{ + + /*! returns the \f$ x\f$-coordinate of `p`. + */ + Algebraic_real_1 x () const; + + /*! returns the \f$ y\f$-coordinates of `p`. + * + * Attention: As described above, points are not stored + * by their \f$ y\f$-coordinate in `Algebraic_real_1` representation. In fact, + * this representation must be computed on demand, and might become quite + * costly for points defined by high-degree polynomials. Therefore, it is + * recommended to avoid to call this function as much as possible. + */ + Algebraic_real_1 y () const; + + /*! returns a `Curve_2` instance that `p`is part of. + */ + Curve_2 curve () const; + + /*! returns the arc number of `p`. + */ + int arcno () const; + + /*! returns double-approximations of the \f$ x\f$- and \f$ y\f$-coordinates. + */ + std::pair to_double () const; + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::Point_2 */ + + /*! A model of the `ArrangementBasicTraits_2::X_monotone_curve_2` concept. + * Represents terminal segments of an algebraic curves, that means vertical + * segments or \f$ x\f$-monotone segments with no critical \f$ x\f$-coordinate + * in the interior of their \f$ x\f$-range. Terminal segments might either be + * bounded or unbounded. By definition, each interior point of a non-vertical + * segment has the same arc number (see the documentation of type `Point_2` + * above, which is called the arc number of the segment (note the arc + * number at the endpoints might differ). Such segments are represented + * internally by a 4-tuple \f$ (p,q,cv,arcno)\f$, where \f$ p\f$ and \f$ q\f$ + * are the endpoints, \f$ cv\f$ is the supporting curve that the segment + * belongs to, and arcno is the arc number of the segment. + * + * Arbitrary (weakly) \f$ x\f$-monotone segments are presented by a range + * of `X_monotone_curve_2` instances, whose union equals the segment. + * The functor `Construct_x_monotone_segment_2` allows their construction. + * To construct all (maximal) terminal segments of a curve, + * use the `Make_x_monotone_2` functor supplied by the traits class. + */ + class X_monotone_curve_2 { + public: + + /// \name Modifiers + /// @{ + + /*! returns the supporting algebraic curve of `s`. + */ + Curve_2 curve () const; + + /*! returns whether `s` is a vertical segment. + */ + bool is_vertical () const; + + /*! returns whether `s` has a finite endpoint on the left + */ + bool is_finite (CGAL::Arr_curve_end ce) const; + + /*! \pre (The corresponding curve end is finite) + */ + Point_2 curve_end (CGAL::Arr_curve_end ce) const; + + /*! returns the arc number of the segment. + * \pre (The segment is non-vertical) + */ + int arcno () const; + + /*! returns the \f$ x\f$-coordinate of a vertical segment. + * \pre (The segment is vertical) + */ + Algebraic_real_1 x () const; + + /// @} + + }; /* end Arr_algebraic_segment_traits_2::X_monotone_curve_2 */ }; /* end Arr_algebraic_segment_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h index 9bda6a296b9..862416a2fa3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -49,10 +49,10 @@ public: /// \name Creation /// @{ - /*! Default constructor. */ + /*! constructs default */ Arr_bounded_planar_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_bounded_planar_topology_traits_2(const GeometryTraits_2* traits); @@ -62,16 +62,16 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); - /*! Obtain the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ const Face* unbounded_face() const; - /*! Obtain the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face* unbounded_face(); /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h index 303a00ded01..b3a39fc3e07 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circle_segment_traits_2.h @@ -35,7 +35,7 @@ namespace CGAL { * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2} * */ -template< typename Kernel > +template class Arr_circle_segment_traits_2 { public: @@ -133,7 +133,7 @@ public: /*! returns the target point. * * \pre `cv` is not a full circle. - */ + */ const Point_2& target() const; /*! returns the orientation of the curve (`COLLINEAR` in case of line @@ -189,7 +189,7 @@ public: /// \name Creation /// @{ - /*! default constructor. + /*! constructs default */ Point_2(); @@ -323,15 +323,15 @@ public: /// \name Creation /// @{ - /*! Trims the given x-monotone curve to an from src to tgt. + /*! trims the given x-monotone curve to an from src to tgt. * \ pre `src` and `tgt` lies on the curve */ X_monotone_curve_2(const X_monotone_curve_2& xcv, const Point_2& src, - const Point_2& tgt)const + const Point_2& tgt) const /// @} - } /* end Arr_circle_segment_traits_2::Trim_2 */ + } /* end Arr_circle_segment_traits_2::Trim_2 */ }; /* end Arr_circle_segment_traits_2 */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h index 2db8001f4b1..8d8cc6785d4 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h @@ -260,11 +260,11 @@ public: /// \name Creation /// @{ - /*! construct a default point. + /*! constructs a default point. */ Point_2(); - /*! construct a point from an algebraic point. + /*! constructs a point from an algebraic point. */ Point_2(const typename Alg_kernel::Point_2& p); @@ -401,7 +401,7 @@ public: */ X_monotone_curve_2 operator()(const Curve_2& cv) const; - /*! Constructs an \f$x\f$-monotone curve connecting the two given endpoints. + /*! constructs an \f$x\f$-monotone curve connecting the two given endpoints. * \param source The first point. * \param target The second point. * \pre `source` and `target` must not be the same. @@ -409,7 +409,7 @@ public: */ X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target) const; - /*! Constructs a special segment of a given line connecting to given + /*! constructs a special segment of a given line connecting to given * endpoints. * \param a, b, c The coefficients of the supporting line (\f$ax + by + c = 0\f$). * \param source The source point. @@ -427,13 +427,13 @@ public: */ class Construct_bbox_2 { public: - /*! Obtain a bounding box for a conic arc. + /*! obtains a bounding box for a conic arc. * \param cv The conic arc. * \return The bounding box. */ Bbox_2 operator()(const Curve_2& cv) const { return bbox(cv); } - /*! Obtain a bounding box for an \f$x\f$-monotone conic arc. + /*! obtains a bounding box for an \f$x\f$-monotone conic arc. * \param xcv The \f$x\f$-monotone conic arc. * \return The bounding box. */ @@ -453,7 +453,7 @@ public: */ class Approximate_2 { public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -462,7 +462,7 @@ public: */ Approximate_number_type operator()(const Point_2& p, int i) const; - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. * \param p The exact point. */ Approximate_point_2 operator()(const Point_2& p) const; @@ -496,7 +496,7 @@ public: */ class Trim_2 { public: - /*! Trims the given \f$x\f$-monotone arc to new endpoints. + /*! trims the given \f$x\f$-monotone arc to new endpoints. * \param xcv The \f$x\f$-monotone arc * \param source The new source point. * \param target The new target point. @@ -505,28 +505,28 @@ public: X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, const Point_2& source, const Point_2& target) const; - }; /// \name Accessing Functor Objects /// @{ - /*! Obtain a `Construct_curve_2` functor. */ + /*! obtains a `Construct_curve_2` functor. */ Construct_curve_2 construct_curve_2_object() const; - /*! Obtain a `Construct_x_monotone_curve_2` functor. */ + /*! obtains a `Construct_x_monotone_curve_2` functor. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - /*! Obtain a `Bbox_2` functor. */ + /*! obtains a `Bbox_2` functor. */ Construct_bbox_2 construct_bbox_2_object() const; - /*! Obtain a `Trim_2` functor. */ + /*! obtains a `Trim_2` functor. */ Trim_2 trim_2_object() const; - /*! Obtain an `Approximate_2` functor. */ + /*! obtains an `Approximate_2` functor. */ Approximate_2 approximate_2_object() const; /// @} }; /* end Arr_conic_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h index 2ed18e6be6b..c554bc499c2 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_consolidated_curve_data_traits_2.h @@ -1,30 +1,28 @@ namespace CGAL { -/*! -\ingroup PkgArrangementOnSurface2TraitsClasses - -The class `Arr_consolidated_curve_data_traits_2` is a model of the concept `ArrangementTraits_2`, -and serves as a decorator class that enables the extension of the curve -type defined by the `Traits` parameter. The traits class inherits its -point type from `Traits::Point_2`, and defines the types -`Curve_2` and `X_monotone_curve_2` extended with extraneous data -fields of type `Data`. - -Each `Curve_2` object is associated with a single data field of type -`Data`, and each `X_monotone_curve_2` object is associated with -a set of unique data objects. When a curve is subdivided into \f$ x\f$-monotone -subcurves, all resulting subcurves are associated with a list containing -a single data object, copied from the inducing curve. When an \f$ x\f$-monotone -curve is split, its data set is duplicated, and inserted into the sets of -both resulting subcurves. In case two (or more) \f$ x\f$-monotone curves -overlap, their data sets are consolidated, and are inserted into the set -of the \f$ x\f$-monotone curve that represents the overlap. - -\cgalModels{ArrangementTraits_2} - -*/ -template< typename Traits, typename Data > +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The class `Arr_consolidated_curve_data_traits_2` is a model of the concept + * `ArrangementTraits_2`, and serves as a decorator class that enables the + * extension of the curve type defined by the `Traits` parameter. The traits + * class inherits its point type from `Traits::Point_2`, and defines the types + * `Curve_2` and `X_monotone_curve_2` extended with extraneous data fields of + * type `Data`. + * + * Each `Curve_2` object is associated with a single data field of type `Data`, + * and each `X_monotone_curve_2` object is associated with a set of unique data + * objects. When a curve is subdivided into \f$ x\f$-monotone subcurves, all + * resulting subcurves are associated with a list containing a single data + * object, copied from the inducing curve. When an \f$ x\f$-monotone curve is + * split, its data set is duplicated, and inserted into the sets of both + * resulting subcurves. In case two (or more) \f$ x\f$-monotone curves overlap, + * their data sets are consolidated, and are inserted into the set of the \f$ + * x\f$-monotone curve that represents the overlap. + * + * \cgalModels{ArrangementTraits_2} + */ +template class Arr_consolidated_curve_data_traits_2 : public Arr_curve_data_traits_2, _Consolidate_unique_lists, @@ -32,139 +30,106 @@ class Arr_consolidated_curve_data_traits_2 { public: -/// \name Types -/// @{ + /// \name Types + /// @{ -/*! -the base traits-class. -*/ -typedef Traits Base_traits_2; + //! the base traits-class. + typedef Traits Base_traits_2; -/*! -the base curve. -*/ -typedef typename Base_traits_2::Curve_2 Base_curve_2; + //! the base curve. + typedef typename Base_traits_2::Curve_2 Base_curve_2; -/*! -the base \f$ x\f$-monotone curve curve. -*/ -typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; + //! the base \f$ x\f$-monotone curve curve. + typedef typename Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2; -/*! -a set of data objects that is associated with an \f$ x\f$-monotone curve. -*/ -typedef unspecified_type typedef Data_container; + //! a set of data objects that is associated with an \f$ x\f$-monotone curve. + typedef unspecified_type typedef Data_container; -/*! -a non-mutable iterator for the data objects in the data container. -*/ -typedef unspecified_type typedef Data_iterator; + //! a non-mutable iterator for the data objects in the data container. + typedef unspecified_type typedef Data_iterator; -/// @} + /// @} + /*! The `Data_container` class nested within the consolidated + * curve-data traits and associated with the `Traits::X_monotone_curve_2` type + * is maintained as a list with unique data objects. This representation is + * simple and efficient in terms of memory consumption. It also requires that + * the `Data` class supports only the equality operator. Note however that + * most set operations require linear time. + */ + class Data_container { + public: -/*! + /// \name Creation + /// @{ + /*! constructs default */ + Data_container(); -The `Data_container` class nested within the consolidated -curve-data traits and associated with the `Traits::X_monotone_curve_2` -type is maintained as a list with unique data objects. This representation is -simple and efficient in terms of memory consumption. It also requires that -the `Data` class supports only the equality operator. Note however that -most set operations require linear time. + /*! constructs set containing a single `data` object. */ + Data_container(const Data& data); -*/ -class Data_container { -public: + /// @} -/// \name Creation -/// @{ + /// \name Access Functions + /// @{ -/*! -default constructor. -*/ -Data_container (); + /*! returns the number of data objects in the set. */ + std::size_t size() const; -/*! -constructs set containing a single `data` object. -*/ -Data_container (const Data& data); + /*! returns an iterator pointing to the first data object. */ + Data_iterator begin() const; -/// @} + /*! returns a past-the-end iterator for the data objects. */ + Data_iterator end() const; -/// \name Access Functions -/// @{ + /*! returns the first data object inserted into the set. + * \pre The number of data objects is not \f$ 0\f$. + */ + const Data& front() const; -/*! -returns the number of data objects in the set. -*/ -std::size_t size () const; + /*! returns the last data object inserted into the set. + * \pre The number of data objects is not \f$ 0\f$. + */ + const Data& back() const; -/*! -returns an iterator pointing to the first data object. -*/ -Data_iterator begin () const; + /// @} -/*! -returns a past-the-end iterator for the data objects. -*/ -Data_iterator end () const; + /// \name Predicates + /// @{ -/*! -returns the first data object inserted into the set. -\pre The number of data objects is not \f$ 0\f$. -*/ -const Data& front () const; + /*! checks whether the two sets contain the same data objects (regardless of + * order). + */ + bool operator==(const Data_container& other) const; -/*! -returns the last data object inserted into the set. -\pre The number of data objects is not \f$ 0\f$. -*/ -const Data& back () const; + /*! finds the given `data` object in the set and returns an iterator + * for this object, or `end()` if it is not found. + */ + Data_iterator find(const Data& data); -/// @} + /// @} -/// \name Predicates -/// @{ + /// \name Modifiers + /// @{ -/*! -check if the two sets contain the same data objects (regardless of order). -*/ -bool operator== (const Data_container& other) const; + /*! inserts the given `data` object into the set. Returns `true` on + * success, or `false` if the set already contains the object. + */ + bool insert(const Data& data); -/*! -find the given `data` object in the set and returns an iterator -for this object, or `end()` if it is not found. -*/ -Data_iterator find (const Data& data); + /*! erases the given `data` object from the set. Returns `true` on + * success, or `false` if the set does not contain the object. + */ + bool erase(const Data& data); -/// @} - -/// \name Modifiers -/// @{ - -/*! -inserts the given `data` object into the set. Returns `true` on -success, or `false` if the set already contains the object. -*/ -bool insert (const Data& data); - -/*! -erases the given `data` object from the set. Returns `true` on -success, or `false` if the set does not contain the object. -*/ -bool erase (const Data& data); - -/*! -clears the set. -*/ -void clear (); - -/// @} - -}; /* end Arr_consolidated_curve_data_traits_2::Data_container */ + /*! clears the set. */ + void clear(); + /// @} + }; /* end Arr_consolidated_curve_data_traits_2::Data_container */ }; /* end Arr_consolidated_curve_data_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h index 75c65cd2834..b4f5883c458 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h @@ -66,19 +66,19 @@ public: /// \name Creation /// @{ - /*! Construct default */ + /*! constructs default */ template Arr_counting_traits_2(Args ... args) : Base(std::forward(args)...) {} - /*! Disable copy constructor. */ + /*! disables copy constructor. */ Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; /// @} - /*! Obtain the counter of the given operation */ + /*! obtains the counter of the given operation */ std::size_t count(Operation_id id) const; - /*! Print the counter associated with an operation. */ + /*! prints the counter associated with an operation. */ template OutStream& print(OutStream& os, Operation_id id) const; @@ -135,11 +135,11 @@ public: /// @} - /*! Clean all operation counters */ + /*! cleans all operation counters */ void clear_counters(); }; template inline OutStream& operator<<(OutStream& os, const Arr_counting_traits_2& traits); -} //namespace CGAL +} // namespace CGAL diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h index e75623e8cd7..c185f3f12fd 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_curve_data_traits_2.h @@ -101,8 +101,7 @@ public: /// \name Creation /// @{ - /*! default constructor. - */ + /*! constructs default */ Curve_2(); /*! constructs curve from the given `base` curve with uninitialized @@ -131,49 +130,49 @@ public: /// @} -}; /* end Arr_curve_data_traits_2::Curve_2 */ + }; /* end Arr_curve_data_traits_2::Curve_2 */ -/*! The `X_monotone_curve_2` class nested within the curve-data traits extends - * the `Base_traits_2::X_monotone_curve_2` type with an extra data field. - */ -class X_monotone_curve_2 : public Base_x_monotone_curve_2 { -public: - - /// \name Creation - /// @{ - - /*! default constructor. + /*! The `X_monotone_curve_2` class nested within the curve-data traits extends + * the `Base_traits_2::X_monotone_curve_2` type with an extra data field. */ - X_monotone_curve_2(); + class X_monotone_curve_2 : public Base_x_monotone_curve_2 { + public: - /*! constructs an \f$ x\f$-monotone curve from the given `base` curve with - * uninitialized data field. - */ - X_monotone_curve_2(const Base_x_monotone_curve_2& base); + /// \name Creation + /// @{ - /*! constructs an \f$ x\f$-monotone curve from the given `base` \f$ - * x\f$-monotone curve with an attached `data` field. - */ - X_monotone_curve_2(const Base_x_monotone_curve_2& base, - const X_monotone_curve_data& data); + /*! constructs default */ + X_monotone_curve_2(); - /// @} + /*! constructs an \f$ x\f$-monotone curve from the given `base` curve with + * uninitialized data field. + */ + X_monotone_curve_2(const Base_x_monotone_curve_2& base); - /// \name Access Functions - /// @{ + /*! constructs an \f$ x\f$-monotone curve from the given `base` \f$ + * x\f$-monotone curve with an attached `data` field. + */ + X_monotone_curve_2(const Base_x_monotone_curve_2& base, + const X_monotone_curve_data& data); - /*! returns the field (a non-const version, which returns a reference - * to the data object, is also available). - */ - const X_monotone_curve_data& data() const; + /// @} - /*! sets the data field. - */ - void set_data(const X_monotone_curve_data& data); + /// \name Access Functions + /// @{ - /// @} + /*! returns the field (a non-const version, which returns a reference + * to the data object, is also available). + */ + const X_monotone_curve_data& data() const; -}; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */ + /*! sets the data field. + */ + void set_data(const X_monotone_curve_data& data); + + /// @} + + }; /* end Arr_curve_data_traits_2::X_monotone_curve_2 */ }; /* end Arr_curve_data_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index d34b40072a9..8c766b7783e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -82,7 +82,7 @@ namespace CGAL { /// \name Creation /// @{ - /*! Constructs a point from a direction and a location. + /*! constructs a point from a direction and a location. * \param[in] dir the direction. * \param[in] location indicates the location of the point pre-image * in the parameter space. @@ -94,13 +94,13 @@ namespace CGAL { /// \name Operations /// @{ - /*! Set the location of the point pre-image in the parameter space. + /*! sets the location of the point pre-image in the parameter space. * \param[in] location the updated location of the point pre-image in * the parameter space. */ void set_location(Location_type location); - /*! Obtain the location of the point. + /*! obtains the location of the point. * \return the location of the point pre-image in the parameter space. */ Location_type location() const; @@ -126,7 +126,7 @@ namespace CGAL { /// \name Creation /// @{ - /*! Constructs an \f$x\f$-monotone geodesic arc. + /*! constructs an \f$x\f$-monotone geodesic arc. * \param[in] source the source point of the arc. * \param[in] target the target point of the arc. * \param[in] normal the normal of the plane that contains the arc. @@ -146,7 +146,7 @@ namespace CGAL { bool is_degenerate = false, bool is_empty = false); - /*! Construct an \f$x\f$-monotone geodesic arc. + /*! construct an \f$x\f$-monotone geodesic arc. * \param[in] normal the normal of the plane containing the arc. * \param[in] source the source-point direction. * \param[in] target the target-point direction. @@ -156,7 +156,7 @@ namespace CGAL { const Point_2& target, const Direction_3& normal); - /*! Construct a full great-circle. + /*! construct a full great-circle. * \param[in] point the endpoint of the full great-circle. * \param[in] normal the normal of the plane containing the arc. * \pre the point lies on the given plane. @@ -171,90 +171,90 @@ namespace CGAL { /// \name Operations /// @{ - /*! Sets the source endpoint. + /*! sets the source endpoint. * \param[in] source the updated source endpoint. */ void set_source(const Point_2& source); - /*! Sets the target endpoint. + /*! sets the target endpoint. * \param[in] target the updated target endpoint. */ void set_target(const Point_2& target); - /*! Sets the normal of the underlying plane. + /*! sets the normal of the underlying plane. * \param[in] normal the updated normal of the underlying plane. */ void set_normal(const Direction_3& normal); - /*! Sets the flag that indicates whether the arc is vertical. + /*! sets the flag that indicates whether the arc is vertical. * \param[in] flag indicates whether the arc pre-image in the parameter * space is vertical. */ void set_is_vertical(bool flag); - /*! Sets the flag that indicates whether the direction of the arc + /*! sets the flag that indicates whether the direction of the arc * pre-image in the parameter space is from left to right. * \param flag indicates whether the arc pre-image in the parameter * space is from left to right. */ void set_is_directed_right(bool flag); - /*! Sets the flag that indicates whether the arc is a full great circle. + /*! sets the flag that indicates whether the arc is a full great circle. * \param[in] flag indicates whether the arc is a full great circle. */ void set_is_full(bool flag); - /*! Sets the flag that indicates whether the arc degenerates to a point. + /*! sets the flag that indicates whether the arc degenerates to a point. * \param[in] flag indicates whether the arc degenerates to a point. */ void set_is_degenerate(bool flag); - /*! Sets the flag that indicates whether the arc is empty. + /*! sets the flag that indicates whether the arc is empty. * \param[in] flag indicates whether the arc is empty. */ void set_is_empty(bool flag); - /*! Obtains the source point. + /*! obtains the source point. */ const Point_2& source() const; - /*! Obtains the target point. + /*! obtains the target point. */ const Point_2& target() const; - /*! Obtains the normal to the containing plane. + /*! obtains the normal to the containing plane. */ const Direction_3& normal() const; - /*! Obtains the (lexicographically) left endpoint direction. + /*! obtains the (lexicographically) left endpoint direction. */ const Point_2& left() const; - /*! Obtains the (lexicographically) right endpoint. + /*! obtains the (lexicographically) right endpoint. */ const Point_2& right() const; - /*! Determines whether the arc is vertical. + /*! determines whether the arc is vertical. */ bool is_vertical() const; - /*! Determines whether the arc is directed lexicographically from left to + /*! determines whether the arc is directed lexicographically from left to * right. */ bool is_directed_right() const; - /*! Determines whether the arc is a great circle. + /*! determines whether the arc is a great circle. */ bool is_full() const; - /*! Determines whether the arc is degenerate. + /*! determines whether the arc is degenerate. */ bool is_degenerate() const; - /*! Determines whether the arc is empty. */ + /*! determines whether the arc is empty. */ bool is_empty() const; - /*! Determines whether the arc is a meridian. + /*! determines whether the arc is a meridian. */ bool is_meridian() const; @@ -283,6 +283,7 @@ namespace CGAL { * * \cgalModels{Assignable,CopyConstructible,AdaptableUnaryFunction,AdaptableTernaryFunction} */ + /*! */ class Construct_point_2 { @@ -297,7 +298,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Construct a point on the sphere from three coordinates, which define + /*! constructs a point on the sphere from three coordinates, which define * a (not necessarily normalized) direction. * \param[in] x the x coordinate * \param[in] y the y coordinate @@ -305,7 +306,7 @@ namespace CGAL { */ Point_2 operator()(const FT& x, const FT& y, const FT& z); - /*! Construct a point on the sphere from a (not necessarily normalized) + /*! constructs a point on the sphere from a (not necessarily normalized) * direction. * \param other the other direction */ @@ -331,7 +332,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Construct the minor geodesic arc from two endpoints. The minor arc + /*! constructs the minor geodesic arc from two endpoints. The minor arc * is the one with the smaller angle among the two geodesic arcs with * the given endpoints. * 1. Find out whether the arc is x-monotone. @@ -351,7 +352,7 @@ namespace CGAL { */ X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q); - /*! Construct a full great circle from a normal to a plane. + /*! constructs a full great circle from a normal to a plane. * Observe that the constructed arc has one endpoint that lies on * the identification curve. This point is considered both the source and * target (and also the left and right) point of the arc. @@ -360,7 +361,7 @@ namespace CGAL { */ X_monotone_curve_2 operator()(const Direction_3& normal); - /*! Construct a geodesic arc from two endpoints and a normal to the plane + /*! constructs a geodesic arc from two endpoints and a normal to the plane * containing the arc. The two endpoints determine the plane. The normal * determines the orientation of the plane and the final arc (whether its * the minor arc or the major arc). The right-hand rule can be used @@ -395,12 +396,12 @@ namespace CGAL { /// \name Operations /// @{ - /*! Construct a full great circle from a normal to a plane. + /*! constructs a full great circle from a normal to a plane. * \param normal the normal to the plane containing the great circle. */ X_monotone_curve_2 operator()(const Direction_3& normal); - /*! Construct the minor geodesic arc from two endpoints. The minor arc + /*! constructs the minor geodesic arc from two endpoints. The minor arc * is the one with the smaller angle among the two geodesic arcs with * the given endpoints. * 1. Find out whether the arc is x-monotone. @@ -419,7 +420,7 @@ namespace CGAL { */ Curve_2 operator()(const Point_2& p, const Point_2& q); - /*! Construct a geodesic arc from two endpoints and a normal to the plane + /*! constructs a geodesic arc from two endpoints and a normal to the plane * containing the arc. The two endpoints determine the plane. The normal * determines the orientation of the plane and the final arc (whether its * the minor arc or the major arc). The right-hand rule can be used @@ -434,15 +435,15 @@ namespace CGAL { /// @} }; - /*! Returns an instance of `Construct_point_2`. + /*! returns an instance of `Construct_point_2`. */ Construct_point_2 construct_point_2_object() const; - /*! Returns an instance of `Construct_x_monotone_curve_2`. + /*! returns an instance of `Construct_x_monotone_curve_2`. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - /*! Returns an instance of `Construct_curve_2`. + /*! returns an instance of `Construct_curve_2`. */ Construct_curve_2 construct_curve_2_object() const; }; diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h index 7f1d5825c01..9a842135e7c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_linear_traits_2.h @@ -23,7 +23,7 @@ namespace CGAL { * * \cgalModels{ArrangementTraits_2,ArrangementLandmarkTraits_2,ArrangementOpenBoundaryTraits_2} */ -template< typename Kernel > +template class Arr_linear_traits_2 { public: @@ -147,7 +147,7 @@ public: /// \name Creation /// @{ - /*! Trims the given x-monotone curve to an from src to tgt. + /*! trims the given x-monotone curve to an from src to tgt. * \ pre `src` and `tgt` lies on the curve */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index 8c1db150c3b..cedf54756da 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -93,6 +93,7 @@ namespace CGAL { /// \name Types /// @{ + /*! */ // TODO: Have to turn these into links, so whenever I mention Point_2 it @@ -119,14 +120,14 @@ namespace CGAL { /// \name Operations /// @{ - /*! Obtain a polycurve that comprises of one given subcurve. + /*! obtains a polycurve that comprises of one given subcurve. * \param subcurve input subcurve. * \pre `subcurve` is not degenerated (not tested). * \return A polycurve with one subcurve, namely `subcurve`. */ Curve_2 operator()(const Subcurve_2& subcurve) const; - /*! Construct a well-oriented polycurve from a range of either + /*! constructs a well-oriented polycurve from a range of either * `SubcurveTraits_2::Point_2` or `SubcurveTraits_2::Curve_2`. * * \param begin iterator pointing to the first element in the @@ -169,17 +170,17 @@ namespace CGAL { /// \name Operations /// @{ - /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the back. - * If `cv` is empty, `subcurve` will be its first subcurve. + /*! appends a subcurve `subcurve` to an existing polycurve `cv` at the + * back. If `cv` is empty, `subcurve` will be its first subcurve. * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be * appended to `cv` */ void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; - /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve - * `xcv` at the back. If `xcv` is empty, `subcurve` will be its first - * subcurve. + /*! appends a subcurve `subcurve` to an existing \f$x\f$-monotone + * polycurve `xcv` at the back. If `xcv` is empty, `subcurve` will be its + * first subcurve. * \param xcv existing \f$x\f$-monotone polycurve * \param subcurve the subcurve to be added * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the right @@ -201,7 +202,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Append a subcurve `subcurve` to an existing polycurve `cv` at the + /*! appends a subcurve `subcurve` to an existing polycurve `cv` at the * front. If `cv` is empty, `subcurve` will be its first subcurve. * \param cv a polycurve. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param subcurve a subcurve (not necessarily \f$x\f$-monotone) to be @@ -209,9 +210,9 @@ namespace CGAL { */ void operator()(Curve_2& cv, const Subcurve_2& subcurve) const; - /*! Append a subcurve `subcurve` to an existing \f$x\f$-monotone polycurve - * `xcv` at the front. If `xcv` is empty, `subcurve` will be its first - * subcurve. + /*! appends a subcurve `subcurve` to an existing \f$x\f$-monotone + * polycurve `xcv` at the front. If `xcv` is empty, `subcurve` will be its + * first subcurve. * \param xcv existing \f$x\f$-monotone polycurve * \param subcurve the subcurve to be added * \pre If `xcv` is not empty then `subcurve` extends `xcv` to the left if @@ -228,7 +229,7 @@ namespace CGAL { class Trim_2 { public: - /*! Obtain a trimmed version of the polycurve with src and tgt as end + /*! obtains a trimmed version of the polycurve with src and tgt as end * vertices. * Src and tgt will be swapped if they do not conform to the direction of * the polycurve. @@ -238,7 +239,7 @@ namespace CGAL { const Point_2& tgt) const; }; - /*! Subdivide a given subcurve into \f$x\f$-monotone subcurves and + /*! subdivides a given subcurve into \f$x\f$-monotone subcurves and * isolated points, and insert them into an output container. An object in * the output container is represented by a discriminated union container * that holds either a point or an \f$x\f$-monotone curve. @@ -273,10 +274,10 @@ namespace CGAL { * * The copy and default constructor as well as the assignment operator are * provided for polycurve subcurves. In addition, an \link - * PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the subcurves is - * defined for standard output streams, and an \link - * PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the subcurves is - * defined for standard input streams. + * PkgArrangementOnSurface2op_left_shift `operator<<` \endlink for the + * subcurves is defined for standard output streams, and an \link + * PkgArrangementOnSurface2op_right_shift `operator>>` \endlink for the + * subcurves is defined for standard input streams. */ template class Curve_2 { @@ -323,15 +324,15 @@ namespace CGAL { /// \name Creation /// @{ - /*! Default constructor that constructs an empty polycurve. + /*! constructs Default; constructs an empty polycurve. */ Curve_2(); - /*! Construct a polycurve from one subcurve. + /*! constructs a polycurve from one subcurve. */ Curve_2(const Subcurve_2 subcurve); - /*! Construct a polycurve defined by the given range of subcurves + /*! constructs a polycurve defined by the given range of subcurves * `[first, last)` (the value-type of `InputIterator` must be * `SubcurveTraits_2::Curve_2`. In general, the subcurves might not * be \f$x\f$-monotone, furthermore, they might not form a @@ -357,7 +358,7 @@ namespace CGAL { /// @{ /*! \deprecated - * Obtain the number of subcurve end-points that comprise the polycurve. + * obtains the number of subcurve end-points that comprise the polycurve. * Note that for a bounded polycurve, if there are \f$ n\f$ points in the * polycurve, it comprises \f$ (n - 1)\f$ subcurves. * Currently, only bounded polycurves are supported. @@ -365,20 +366,21 @@ namespace CGAL { unsigned_int points() const; /*! \deprecated - * Obtain an iterator pointing at the source point of the polycurve. + * obtains an iterator pointing at the source point of the polycurve. */ const_iterator begin() const; - /*! Obtain an iterator pointing at the first subcurve of the polycurve. + /*! obtains an iterator pointing at the first subcurve of the polycurve. */ Subcurve_const_iterator begin_subcurves() const; /*! \deprecated - * Obtain an iterator pointing after the end of the polycurve. + * obtains an iterator pointing after the end of the polycurve. */ const_iterator end() const; - /*! Get an iterator pointing at the past-the-end subcurve of the polycurve. + /*! obtains an iterator pointing at the past-the-end subcurve of the + * polycurve. */ Subcurve_const_iterator end_subcurves() const; @@ -387,38 +389,38 @@ namespace CGAL { */ const_iterator rbegin() const; - /*! Obtain an iterator pointing at the last subcurve of the polycurve. + /*! obtains an iterator pointing at the last subcurve of the polycurve. */ Subcurve_const_reverse_iterator rbegin_subcurves() const; /*! \deprecated - * Obtain an iterator pointing before the beginning of the polycurve. + * obtains an iterator pointing before the beginning of the polycurve. */ const_iterator rend() const; - /*! Obtain an iterator pointing at the past-the-end subcurve of + /*! obtains an iterator pointing at the past-the-end subcurve of * the polycurve in reverse order. */ Subcurve_const_reverse_iterator rend_subcurves() const; /*! \deprecated - * Obtain the number of subcurves composing the polycurve + * obtains the number of subcurves composing the polycurve * (equivalent to `pi.points() - 1`). Was replaced by number_of_subcurves() */ size_type size() const; - /*! Obtain the number of subcurves that comprise the polycurve. + /*! obtains the number of subcurves that comprise the polycurve. */ size_type number_of_subcurves() const; - /*! Obtain the \f$ k\f$th subcurve of the polycurve. + /*! obtains the \f$ k\f$th subcurve of the polycurve. * \pre \f$k\f$ is not greater than or equal to \f$n-1\f$, where * \f$n\f$ is the number of subcurves. */ typename SubcurveTraits_2::X_monotone_curve_2 operator[](size_t k) const; - /*! Obtain the bounding box of the polycurve. + /*! obtains the bounding box of the polycurve. */ Bbox_2 bbox() const; @@ -427,7 +429,7 @@ namespace CGAL { /// \name Operations /// @{ - /*! Append a subcurve to the polycurve at the back. + /*! appends a subcurve to the polycurve at the back. * \a Warning: This function does not perform the precondition test * that the `Push_back_2` functor does. Thus, it is * recommended to use the latter. @@ -438,7 +440,7 @@ namespace CGAL { */ inline void push_back(const Subcurve_2& subcurve); - /*! Append a subcurve to the polycurve at the front. + /*! appends a subcurve to the polycurve at the front. * \a Warning: This is a risky function! Don't use it! Prefer the * corresponding functor which is provided in the traits * class. @@ -450,12 +452,12 @@ namespace CGAL { inline void push_front(const Subcurve_2& subcurve); /*! \deprecated - * Add a new point to the polycurvs, which becomes the new target point + * adds a new point to the polycurvs, which becomes the new target point * of `pi`. */ void push_back(const Point_2 & p); - /*! Reset the polycurve. + /*! resets the polycurve. */ void clear(); @@ -463,7 +465,6 @@ namespace CGAL { }; /* end Arr_polycurve_traits_2::Curve_2 */ - /*! The `X_monotone_curve_2` class nested within the polycurve * traits is used to represent \f$ x\f$-monotone piecewise linear subcurves. * @@ -518,4 +519,5 @@ namespace CGAL { /// @} /* End Accessing Functor Objects */ }; /* end Arr_polycurve_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h index c9cc6f5def6..5f6614a6ada 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h @@ -149,7 +149,7 @@ public: //! obtains the past-the-end reverse iterator for the polyline points. Segment_const_reverse_iterator rend_segments() const; - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const; @@ -169,13 +169,13 @@ public: typedef std::reverse_iterator Segment_const_reverse_iterator; - /*! Construct default. */ + /*! constructs default. */ X_monotone_curve_2(); - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ X_monotone_curve_2(X_monotone_segment_2 seg); - /*! Construct from a range. Similar to the constructor of a general + /*! constructs from a range. Similar to the constructor of a general * polycurve. Like in the case of general polycurve, for the sake of * backwards compatibility we have to keep an implementation of construction * from a range of points. DO NOT USE THIS CONSTRUCTION. @@ -183,23 +183,23 @@ public: template X_monotone_curve_2(InputIterator begin, InputIterator end); - /*! Obtain the first iterator of the polyline subcurves. + /*! obtains the first iterator of the polyline subcurves. */ Segment_const_iterator begin_segments() const; - /*! Obtain the past-the-end iterator of the polyline subcurves. + /*! obtains the past-the-end iterator of the polyline subcurves. */ Segment_const_iterator end_segments() const; - /*! Obtain the first reverse iterator of the polyline subcurves. + /*! obtains the first reverse iterator of the polyline subcurves. */ Segment_const_reverse_iterator rbegin_segments() const; - /*! Obtain the past-the-end reverse iterator for the polyline points. + /*! obtains the past-the-end reverse iterator for the polyline points. */ Segment_const_reverse_iterator rend_segments() const; - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const; @@ -219,7 +219,7 @@ public: /// \name Operations /// @{ - /*! Obtain a polyline connecting the two given endpoints. + /*! obtains a polyline connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre `p` and `q` are distinct. @@ -227,14 +227,14 @@ public: */ Curve_2 operator()(const Point_2& p, const Point_2& q) const; - /*! Obtain a polyline that comprises of one given segment. + /*! obtains a polyline that comprises of one given segment. * \param seg input segment * \pre `seg` is not degenerated (not tested) * \return A polyline with one segment, namely `seg`. */ Curve_2 operator()(const Segment_2& seg) const; - /*! Construct a well-oriented polyline from a range of either + /*! constructs a well-oriented polyline from a range of either * `SegmentTraits_2::Point_2` or `SegmentTraits_2::Segment_2`. * * \param begin iterator pointing to the first element in the range. @@ -270,7 +270,7 @@ public: /// \name Operations /// @{ - /*! Append a point `p` to an existing polyline `cv` at the back. + /*! appends a point `p` to an existing polyline `cv` at the back. * \param cv a polyline. Note, `cv` is not (necessarily) * \f$ x\f$-monotone. * \param p a point to be appended to `cv` at the back. @@ -278,7 +278,7 @@ public: */ void operator()(Curve_2& cv, const Point_2& p) const; - /*! Append a segment `seg` to an existing polyline `cv` at the back. + /*! appends a segment `seg` to an existing polyline `cv` at the back. * If `cv` is empty, `seg` will be its first segment. * \param cv a polyline. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param seg a segment (not necessarily \f$x\f$-monotone) to be appended @@ -286,7 +286,7 @@ public: */ void operator()(Curve_2& cv, const Segment_2& seg) const; - /*! Append a point `p` to an existing \f$x\f$-monotone polyline `xcv` at + /*! appends a point `p` to an existing \f$x\f$-monotone polyline `xcv` at * the back. * \param xcv the existing \f$x\f$-monotone polyline * \param p the point to be pushed back. @@ -297,7 +297,7 @@ public: */ void operator()(const X_monotone_curve_2& xcv, Point_2& p) const; - /*! Append a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` + /*! appends a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` * at the back. If `xcv` is empty, `seg` will be its first segment. * \param xcv existing \f$x\f$-monotone polyline * \param seg the segment to be added @@ -320,7 +320,7 @@ public: /// \name Operations /// @{ - /*! Append a point `p` to an existing polyline `cv` at the front. + /*! appends a point `p` to an existing polyline `cv` at the front. * \param cv a polyline. Note, `cv` is not (necessarily) * \f$ x\f$-monotone. * \param p a point to be appended to `cv` at the back. @@ -328,7 +328,7 @@ public: */ void operator()(Curve_2& cv, const Point_2& p) const; - /*! Append a segment `seg` to an existing polyline `cv` at the front. + /*! appends a segment `seg` to an existing polyline `cv` at the front. * If `cv` is empty, `seg` will be its first segment. * \param cv a polyline. Note, `cv` is (not necessarily) \f$x\f$-monotone. * \param seg a segment (not necessarily \f$x\f$-monotone) to be appended @@ -336,7 +336,7 @@ public: */ void operator()(Curve_2& cv, const Segment_2& seg) const; - /*! Append a point `p` to an existing \f$x\f$-monotone polyline `xcv` at + /*! appends a point `p` to an existing \f$x\f$-monotone polyline `xcv` at * the front. * \param xcv the existing \f$x\f$-monotone polyline * \param p the point to be pushed back. @@ -347,7 +347,7 @@ public: */ void operator()(const X_monotone_curve_2& xcv, Point_2& p) const; - /*! Append a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` + /*! appends a segment `seg` to an existing \f$x\f$-monotone polyline `xcv` * at the front. If `xcv` is empty, `seg` will be its first segment. * \param xcv existing \f$x\f$-monotone polyline * \param seg the segment to be added diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h index d722a3ae285..21f976db116 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_rational_function_traits_2.h @@ -1,88 +1,79 @@ namespace CGAL { -/*! - \ingroup PkgArrangementOnSurface2TraitsClasses - - The traits class `Arr_rational_function_traits_2` is a model of the `ArrangementTraits_2` - concept. It handles bounded and unbounded arcs of rational functions, - referred to as rational arcs (in particular, such an arc may correspond to the - entire graph of a rational function). It supports bounded and - unbounded arcs. Thus, it is also a model of the concept - `ArrangementOpenBoundaryTraits_2`. The traits class enables - the construction and maintenance of arrangements of such arcs. - - A rational function \f$ y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials - \f$ P\f$ and \f$ Q\f$ of arbitrary degrees. - If \f$ Q(x) = 1\f$ then the function is a simple polynomial function. - Usually the domain is \f$ \mathbb{R}\f$ but the function may also be - restricted to a bounded interval \f$ [x_{\rm min}, x_{\rm max}]\f$ - or defined over a ray \f$ (-\infty, x_{\rm max}]\f$ or over \f$ [x_{\rm min}, \infty)\f$. - Rational functions are represented by the nested type `Curve_2`. - Note that a rational function may be not continuous since roots of \f$ Q\f$ induce - vertical asymptotes, which would contradict the notion of an \f$ x\f$-monotone curve - as it is introduced by the `ArrangementTraits_2` concept. - Thus, continuous portions of rational functions are represented by the nested - type `X_monotone_curve_2`, which is different from `Curve_2`. - Constructors for both classes are provided by the traits. - A `Curve_2` may be split up into several `X_monotone_curve_2` - using `Make_x_monotone_2`. - - The template parameter of the traits must be a model of the - concept `AlgebraicKernel_d_1`. - A rational function is then represented by two polynomials \f$ P\f$ and \f$ Q\f$ of type - `AlgebraicKernel_d_1::Polynomial_1`. - A point is represented by a rational function and its \f$ x\f$-coordinate, which is - of type `AlgebraicKernel_d_1::Algebraic_real_1`. - Note that an explicit representation of the \f$ y\f$-coordinate is only computed upon - request, which can be a rather costly operation. - - The constructed rational functions are cached by the traits class. - The cache is local to each traits class object. - It is therefore necessary to construct the curves using the constructor - objects provided by member functions of the traits class. - Moreover, a curve must only be used with its own traits. - The cache is automatically cleaned up from time to time. - The amortized clean up costs are constant. However, there is also a - separate member function that cleans up the cache on demand. - - While `Arr_rational_function_traits_2` models the concept - `ArrangementDirectionalXMonotoneTraits_2`, the implementation of - the `Are_mergeable_2` operation does not enforce the input curves - to have the same direction as a precondition. Moreover, `Arr_rational_function_traits_2` - supports the merging of curves of opposite directions. - - \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2} -*/ -template< typename AlgebraicKernel_d_1 > +/*! \ingroup PkgArrangementOnSurface2TraitsClasses + * + * The traits class `Arr_rational_function_traits_2` is a model of the + * `ArrangementTraits_2` concept. It handles bounded and unbounded arcs of + * rational functions, referred to as rational arcs (in particular, such + * an arc may correspond to the entire graph of a rational function). It + * supports bounded and unbounded arcs. Thus, it is also a model of the concept + * `ArrangementOpenBoundaryTraits_2`. The traits class enables the construction + * and maintenance of arrangements of such arcs. + * + * A rational function \f$y = \frac{P(x)}{Q(x)}\f$ is defined by two polynomials + * \f$P\f$ and \f$Q\f$ of arbitrary degrees. If \f$Q(x) = 1\f$ then the + * function is a simple polynomial function. Usually the domain is + * \f$\mathbb{R}\f$ but the function may also be restricted to a bounded + * interval \f$[x_{\rm min}, x_{\rm max}]\f$ or defined over a ray \f$(-\infty, + * x_{\rm max}]\f$ or over \f$[x_{\rm min}, \infty)\f$. Rational functions are + * represented by the nested type `Curve_2`. Note that a rational function may + * be not continuous since roots of \f$Q\f$ induce vertical asymptotes, which + * would contradict the notion of an \f$x\f$-monotone curve as it is introduced + * by the `ArrangementTraits_2` concept. Thus, continuous portions of rational + * functions are represented by the nested type `X_monotone_curve_2`, which is + * different from `Curve_2`. Constructors for both classes are provided by the + * traits. A `Curve_2` may be split up into several `X_monotone_curve_2` using + * `Make_x_monotone_2`. + * + * The template parameter of the traits must be a model of the concept + * `AlgebraicKernel_d_1`. A rational function is then represented by two + * polynomials \f$P\f$ and \f$Q\f$ of type + * `AlgebraicKernel_d_1::Polynomial_1`. A point is represented by a rational + * function and its \f$x\f$-coordinate, which is of type + * `AlgebraicKernel_d_1::Algebraic_real_1`. Note that an explicit + * representation of the \f$y\f$-coordinate is only computed upon request, + * which can be a rather costly operation. + * + * The constructed rational functions are cached by the traits class. The cache + * is local to each traits class object. It is therefore necessary to construct + * the curves using the constructor objects provided by member functions of the + * traits class. Moreover, a curve must only be used with its own traits. The + * cache is automatically cleaned up from time to time. The amortized clean up + * costs are constant. However, there is also a separate member function that + * cleans up the cache on demand. + * + * While `Arr_rational_function_traits_2` models the concept + * `ArrangementDirectionalXMonotoneTraits_2`, the implementation of the + * `Are_mergeable_2` operation does not enforce the input curves to have the + * same direction as a precondition. Moreover, `Arr_rational_function_traits_2` + * supports the merging of curves of opposite directions. + * + * \cgalModels{ArrangementTraits_2,ArrangementDirectionalXMonotoneTraits_2,ArrangementOpenBoundaryTraits_2} + */ +template class Arr_rational_function_traits_2 { public: - /// \name Types /// @{ /*! - */ typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; /*! - */ typedef AlgebraicKernel_d_1::Coefficient Coefficient; /*! - */ typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; /*! - */ typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; /*! - */ typedef AlgebraicKernel_d_1::Bound Bound; @@ -91,10 +82,9 @@ public: /// \name Creation /// @{ - /*! - constructs an empty traits that uses the kernel pointed by `kernel` - for performing algebraic operations. - */ + /*! constructs an empty traits that uses the kernel pointed by `kernel` + * for performing algebraic operations. + */ Arr_rational_function_traits_2(const Algebraic_kernel_d_1* kernel); /// @} @@ -102,673 +92,592 @@ public: /// \name Operations /// @{ - /*! - Returns an instance of `Construct_curve_2`. - */ + /*! returns an instance of `Construct_curve_2`. + */ Construct_curve_2 construct_curve_2_object() const; - /*! - Returns an instance of `Construct_x_monotone_curve_2`. - */ + /*! returns an instance of `Construct_x_monotone_curve_2`. + */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const; - /*! - Deletes all curves from the cache that exist only there. - */ + /*! deletes all curves from the cache that exist only there. + */ void cleanup_cache() const; - /*! - Returns a pointer to the used algebraic kernel object. - */ + /*! returns a pointer to the used algebraic kernel object. + */ const Algebraic_kernel_d_1* algebraic_kernel_d_1() const; /// @} - -/*! - - -Functor to construct a `Curve_2`. To enable caching the class is not -default constructible and must be obtained via the function -`construct_curve_2_object()`, which is a member of the traits. - -\cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} - -*/ -class Construct_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::Curve_2 result_type; - -/*! - -*/ -typedef Polynomial_1 argument_type; - -/*! - -*/ -typedef Polynomial_1 first_argument_type; - -/*! - -*/ -typedef Polynomial_1 second_argument_type; - -/// @} - -/// \name Operations -/// @{ - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -*/ -Curve_2 operator()(Polynomial_1 P) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -The function is defined over the interval \f$ [x,+\infty)\f$ if \f$ right\f$ is true -and \f$ (-\infty,x]\f$ otherwise. -*/ -Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$. -The function is defined over the interval \f$ [lower,upper]\f$. -*/ -Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& lower, const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -The function is defined over the interval \f$ I=[x,+\infty)\f$ if \f$ right\f$ is -true and \f$ I=(-\infty,x]\f$ otherwise. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$. -The function is defined over the interval \f$ I=[lower,upper]\f$. -*/ -Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& lower, const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. The -function is defined over the interval \f$ [x,+\infty)\f$ if \f$ right\f$ is true -and \f$ (-\infty,x]\f$ otherwise. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the polynomial function \f$ y = P(x)\f$, where -the coefficients of \f$ P\f$ are given in the range `[begin,end)`. The -function is defined over the interval \f$ [lower,upper]\f$. -*/ -template -Curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs a curve representing the rational function \f$ y = P(x)/Q(x)\f$, -where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the ranges -`[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[lower,upper]\f$. -*/ -template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper) const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Construct_curve_2 */ - -/*! - - -Functor to construct a `X_monotone_curve_2`. To enable caching the class -is not default constructible and must be obtained via the function -`construct_x_monotone_curve_2_object()`, which is a member of the traits. - -\cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} - -*/ -class Construct_x_monotone_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::X_monotone_curve_2 result_type; - -/*! - -*/ -typedef Polynomial_1 argument_type; - -/*! - -*/ -typedef Polynomial_1 first_argument_type; - -/*! - -*/ -typedef Polynomial_1 second_argument_type; - -/// @} - -/// \name Operations -/// @{ - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. The function is defined over the interval \f$ [x,+\infty)\f$ if -\f$ right\f$ is true and \f$ (-\infty,x]\f$ otherwise. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, -const Algebraic_real_1& x, -bool right) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$. The function is defined over the interval \f$ [lower,upper]\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. -\pre \f$ Q\f$ has no real roots. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, -const Algebraic_real_1& x, -bool right); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$. The function is defined over the interval \f$ I=[lower,upper]\f$. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. The function is defined over the interval \f$ [x,+\infty)\f$ -if \f$ right\f$ is true and \f$ (-\infty,x]\f$ otherwise. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, -const Algebraic_real_1& x, bool right) const; - -/*! -Constructs an \f$ x\f$-monotone curve supported by the polynomial function -\f$ y = P(x)\f$, where the coefficients of \f$ P\f$ are given in the range -`[begin,end)`. The function is defined over the interval -\f$ [lower,upper]\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end -const Algebraic_real_1& lower, -const Algebraic_real_1& upper); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. -\pre \f$ Q\f$ has no real roots. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[x,+\infty)\f$ -if \f$ right\f$ is true and \f$ I=(-\infty,x]\f$ otherwise. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& x, bool right); const - -/*! -Constructs an \f$ x\f$-monotone curve supported by the rational function -\f$ y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$ Q\f$ are given in the -ranges `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, -respectively. The function is defined over the interval \f$ I=[lower,upper]\f$. -\pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. -*/ -template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, -InputIterator begin_denom, InputIterator end_denom, -const Algebraic_real_1& lower, const Algebraic_real_1& upper); const - -/// @} - -}; /* end Arr_rational_function_traits_2::Construct_x_monotone_curve_2 */ - -/*! - - -The `Curve_2` class nested within the traits is used -to represent rational functions which may be restricted to a certain x-range. - -\cgalModels{ArrTraits::Curve_2} - -*/ -class Curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -const Polynomial_1& numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -const Polynomial_1& denominator () const; - -/*! -returns whether çurve is continuous, namely whether it does not -contains any vertical asymptotes in its interior. -*/ -bool is_continuous() const; - -/*! -returns whether the \f$ x\f$-coordinate of çurve's left end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_x () const; - -/*! -returns whether the \f$ x\f$-coordinate of çurve's right end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_x () const; - -/*! -returns the \f$ x\f$-coordinate of the left end. -\pre left_boundary_in_x()==ARR_INTERIOR -*/ -Algebraic_real_1 left_x() const; - -/*! -returns the \f$ x\f$-coordinate of the right end. -\pre right_boundary_in_x()==ARR_INTERIOR -*/ -Algebraic_real_1 right_x() const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Curve_2 */ - -/*! - - -\cgalModels{ArrTraits::Point_2} - -*/ -class Point_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Bound Bound; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -Polynomial_1 numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -Polynomial_1 denominator () const; - -/*! -returns double-approximations of the x- and y-coordinates. -*/ -std::pair to_double() const; - -/*! -returns the \f$ x\f$-coordinate of the point. -*/ -Algebraic_real_1 x() const; - -/*! -obtains the y-coordinates of the point. Attention: As described above, -points are not stored by their y-coordinate in `Algebraic_real_1` -representation. In fact, this representation must be computed on demand, and -might become quite costly for points defined by high-degree polynomials. -Therefore, it is recommended to avoid calls to this function as much as -possible. -*/ -Algebraic_real_1 y() const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ x\f$-coordinate with -respect to the given absolute precision \f$ a\f$. -\post \f$ p.first \leq x \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-a} \f$ -*/ -std::pair approximate_absolute_x(int a) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ y\f$-coordinate with -respect to the given absolute precision \f$ a\f$. -\post \f$ p.first \leq y \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-a} \f$ -*/ -std::pair approximate_absolute_y(int a) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ x\f$-coordinate with -respect to the given relative precision \f$ r\f$. -\post \f$ p.first \leq x \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-r}|x| \f$ -*/ -std::pair approximate_relative_x(int r) const; - -/*! -Computes a pair \f$ p\f$ approximating the \f$ y\f$-coordinate with -respect to the given relative precision \f$ r\f$. -\post \f$ p.first \leq y \leq p.second \f$ -\post \f$ p.second - p.first \leq2^{-r}|y| \f$ -*/ -std::pair approximate_relative_y(int r) const; - -/// @} - -}; /* end Arr_rational_function_traits_2::Point_2 */ - -/*! - - -The `X_monotone_curve_2` class nested within the traits is used -to represent \f$ x\f$-monotone parts of rational functions. In particular, such an \f$ x\f$-monotone curve -may not contain a vertical asymptote in its interior \f$ x\f$-range. - -\cgalModels{ArrTraits::XMonotoneCurve_2} - -*/ -class X_monotone_curve_2 { -public: - -/// \name Types -/// @{ - -/*! - -*/ -typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; - -/*! - -*/ -typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; - -/*! - -*/ -typedef Arr_rational_function_traits_2::Point_2 Point_2; - -/// @} - -/// \name Operations -/// @{ - -/*! -returns the numerator of the supporting rational function. -*/ -const Polynomial_1& numerator () const; - -/*! -returns the denominator of the supporting rational function. -*/ -const Polynomial_1& denominator () const; - -/*! -returns whether the \f$ x\f$-coordinate of the source is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space source_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the source is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space source_parameter_space_in_y () const; - -/*! -returns the source point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the source point is finite. -*/ -const Point_2& source() const; - -/*! -returns the \f$ x\f$-coordinate of the source point. -\pre The \f$ x\f$-coordinate of the source point is finite. -*/ -Algebraic_real_1 source_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the target is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space target_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the target is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space target_parameter_space_in_y () const; - -/*! -returns the target point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the target point is finite. -*/ -const Point_2& target() const; - -/*! -returns the \f$ x\f$-coordinate of the target point. -\pre The \f$ x\f$-coordinate of the target point is finite. -*/ -Algebraic_real_1 target_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the left curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the left curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space left_parameter_space_in_y () const; - -/*! -returns the left point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of the left point is finite. -*/ -const Point_2& left() const; - -/*! -returns the \f$ x\f$-coordinate of the left point. -\pre The \f$ x\f$-coordinate of the left point is finite. -*/ -Algebraic_real_1 left_x() const; - -/*! -returns whether the \f$ x\f$-coordinate of the right curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_x () const; - -/*! -returns whether the \f$ y\f$-coordinate of the right curve end is finite or -whether it is \f$ \pm\infty\f$. -*/ -Arr_parameter_space right_parameter_space_in_y () const; - -/*! -returns the right point of the arc. -\pre Both the \f$ x\f$- and \f$ y\f$-coordinates of The right point is finite. -*/ -const Point_2& right() const; - -/*! -returns the \f$ x\f$-coordinate of the right point. -\pre The \f$ x\f$-coordinate of the right point is finite. -*/ -Algebraic_real_1 right_x() const; - -/*! -returns whether the curve is oriented from left to right. -*/ -bool is_left_to_right () const; - -/// @} - -}; /* end Arr_rational_function_traits_2::X_monotone_curve_2 */ - + /*! Functor to construct a `Curve_2`. To enable caching the class is not + * default constructible and must be obtained via the function + * `construct_curve_2_object()`, which is a member of the traits. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} + */ + + class Construct_curve_2 { + public: + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef Arr_rational_function_traits_2::Curve_2 result_type; + + /*! + */ + typedef Polynomial_1 argument_type; + + /*! + */ + typedef Polynomial_1 first_argument_type; + + /*! + */ + typedef Polynomial_1 second_argument_type; + + /// @} + + /// \name Operations + /// @{ + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$. + */ + Curve_2 operator()(Polynomial_1 P) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$. + * The function is defined over the interval \f$[x,+\infty)\f$ if \f$ right\f$ + * is true and \f$(-\infty,x]\f$ otherwise. + */ + Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, + bool right) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$. + * The function is defined over the interval \f$[lower,upper]\f$. + */ + Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$. + * The function is defined over the interval + * \f$ I=[x,+\infty)\f$ if \f$ right\f$ is true and + * \f$ I=(-\infty,x]\f$ otherwise. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& x, bool right) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$. + * The function is defined over the interval \f$I=[lower,upper]\f$. + */ + Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + * The function is defined over the interval + * \f$[x,+\infty)\f$ if \f$ right\f$ is true and \f$(-\infty,x]\f$ + * otherwise. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& x, bool right) const; + + /*! constructs a curve representing the polynomial function \f$y = P(x)\f$, + * where the coefficients of \f$P\f$ are given in the range `[begin,end)`. + * The function is defined over the interval \f$[lower,upper]\f$. + */ + template + Curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$, + * where the coefficients of \f$P\f$ and \f$Q\f$ are given in the ranges + * `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, respectively. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$, + * where the coefficients of \f$P\f$ and \f$ Q\f$ are given in the ranges + * `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, respectively. + * The function is defined over the interval \f$I=[x,+\infty)\f$ + * if \f$right\f$ is true and \f$I=(-\infty,x]\f$ otherwise. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom, + const Algebraic_real_1& x, bool right) const; + + /*! constructs a curve representing the rational function \f$y = P(x)/Q(x)\f$, + * where the coefficients of \f$P\f$ and \f$Q\f$ are given in the ranges + * `[begin_numer,end_numer)` and `[begin_denom,end_denom)`, respectively. + * The function is defined over the interval \f$I=[lower,upper]\f$. + */ + template + Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, + InputIterator begin_denom, InputIterator end_denom, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Construct_curve_2 */ + + /*! Functor to construct a `X_monotone_curve_2`. To enable caching the class is + * not default constructible and must be obtained via the function + * `construct_x_monotone_curve_2_object()`, which is a member of the traits. + * + * \cgalModels{Assignable,CopyConstructible,AdaptableBinaryFunction,AdaptableUnaryFunction} + */ + class Construct_x_monotone_curve_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef Arr_rational_function_traits_2::X_monotone_curve_2 result_type; + + /*! + */ + typedef Polynomial_1 argument_type; + + /*! + */ + typedef Polynomial_1 first_argument_type; + + /*! + */ + typedef Polynomial_1 second_argument_type; + + /// @} + + /// \name Operations + /// @{ + + /*! constructs an \f$ x\f$-monotone curve supported by the polynomial function + * \f$ y = P(x)\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$. The function is defined over the interval + * \f$[x,+\infty)\f$ if \f$ right\f$ is true and \f$(-\infty,x]\f$ + * otherwise. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, + const Algebraic_real_1& x, + bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$. The function is defined over the interval + * \f$[lower,upper]\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. + * \pre \f$Q\f$ has no real roots. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. The function is defined over the interval + * \f$I=[x,+\infty)\f$ if \f$ right\f$ is true and \f$I=(-\infty,x]\f$ + * otherwise. + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& x, + bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$. The function is defined over the interval + * \f$I=[lower,upper]\f$. + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs an \f$ x\f$-monotone curve supported by the polynomial function + * \f$ y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range + * `[begin,end)`. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range + * `[begin,end)`. The function is defined over the interval \f$[x,+\infty)\f$ + * if \f$right\f$ is true and \f$(-\infty,x]\f$ otherwise. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, + const Algebraic_real_1& x, bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the polynomial function + * \f$y = P(x)\f$, where the coefficients of \f$P\f$ are given in the range + * `[begin,end)`. The function is defined over the interval + * \f$[lower,upper]\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin, InputIterator end + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. + * \pre \f$Q\f$ has no real roots. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. The function is defined over the + * interval \f$ I=[x,+\infty)\f$ if \f$ right\f$ is true and + * \f$ I=(-\infty,x]\f$ otherwise. + * \pre \f$ Q\f$ has no real roots in the interior of \f$ I\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom, + const Algebraic_real_1& x, bool right) const; + + /*! constructs an \f$x\f$-monotone curve supported by the rational function + * \f$y = P(x)/Q(x)\f$, where the coefficients of \f$ P\f$ and \f$Q\f$ are + * given in the ranges `[begin_numer,end_numer)` and + * `[begin_denom,end_denom)`, respectively. The function is defined over the + * interval \f$I=[lower,upper]\f$. + * \pre \f$Q\f$ has no real roots in the interior of \f$I\f$. + */ + template + X_monotone_curve_2 operator()(InputIterator begin_numer, + InputIterator end_numer, + InputIterator begin_denom, + InputIterator end_denom, + const Algebraic_real_1& lower, + const Algebraic_real_1& upper) const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Construct_x_monotone_curve_2 */ + + /*! The `Curve_2` class nested within the traits is used to represent rational + * functions which may be restricted to a certain \f$x\f$-range. + * + * \cgalModels{ArrTraits::Curve_2} + */ + class Curve_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + const Polynomial_1& numerator () const; + + /*! returns the denominator of the supporting rational function. + */ + const Polynomial_1& denominator () const; + + /*! returns whether çurve is continuous, namely whether it does not + * contains any vertical asymptotes in its interior. + */ + bool is_continuous() const; + + /*! returns whether the \f$x\f$-coordinate of çurve's left end is + * finite or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_x () const; + + /*! returns whether the \f$x\f$-coordinate of çurve's right end is + * finite or whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_x () const; + + /*! returns the \f$x\f$-coordinate of the left end. + * \pre `left_boundary_in_x()` == `ARR_INTERIOR` + */ + Algebraic_real_1 left_x() const; + + /*! returns the \f$x\f$-coordinate of the right end. + * \pre `right_boundary_in_x()` == `ARR_INTERIOR` + */ + Algebraic_real_1 right_x() const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Curve_2 */ + + /*! \cgalModels{ArrTraits::Point_2} + */ + class Point_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Bound Bound; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + Polynomial_1 numerator () const; + + /*! returns the denominator of the supporting rational function. + */ + Polynomial_1 denominator () const; + + /*! returns double-approximations of the x- and y-coordinates. + */ + std::pair to_double() const; + + /*! returns the \f$ x\f$-coordinate of the point. + */ + Algebraic_real_1 x() const; + + /*! obtains the \f$y\f$-coordinates of the point. Attention: As + * described above, points are not stored by their y-coordinate in + * `Algebraic_real_1` representation. In fact, this representation must be + * computed on demand, and might become quite costly for points defined by + * high-degree polynomials. Therefore, it is recommended to avoid calls to + * this function as much as possible. + */ + Algebraic_real_1 y() const; + + /*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with + * respect to the given absolute precision \f$a\f$. + * \post \f$p.first \leq x \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-a}\f$ + */ + std::pair approximate_absolute_x(int a) const; + + /*! Computes a pair \f$p\f$ approximating the \f$y\f$-coordinate with + * respect to the given absolute precision \f$a\f$. + * \post \f$p.first \leq y \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-a}\f$ + */ + std::pair approximate_absolute_y(int a) const; + + /*! Computes a pair \f$p\f$ approximating the \f$x\f$-coordinate with + * respect to the given relative precision \f$r\f$. + * \post \f$p.first \leq x \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-r}|x|\f$ + */ + std::pair approximate_relative_x(int r) const; + + /*! Computes a pair \f$p\f$ approximating the \f$ y\f$-coordinate with + * respect to the given relative precision \f$r\f$. + * \post \f$p.first \leq y \leq p.second\f$ + * \post \f$p.second - p.first \leq2^{-r}|y|\f$ + */ + std::pair approximate_relative_y(int r) const; + + /// @} + + }; /* end Arr_rational_function_traits_2::Point_2 */ + + /*! The `X_monotone_curve_2` class nested within the traits is used to represent + * \f$ x\f$-monotone parts of rational functions. In particular, such an + * \f$x\f$-monotone curve may not contain a vertical asymptote in its interior + * \f$x\f$-range. + * + * \cgalModels{ArrTraits::XMonotoneCurve_2} + */ + class X_monotone_curve_2 { + public: + + /// \name Types + /// @{ + + /*! + */ + typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1; + + /*! + */ + typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1; + + /*! + */ + typedef Arr_rational_function_traits_2::Point_2 Point_2; + + /// @} + + /// \name Operations + /// @{ + + /*! returns the numerator of the supporting rational function. + */ + const Polynomial_1& numerator () const; + + /*! returns the denominator of the supporting rational function. + */ + const Polynomial_1& denominator () const; + + /*! returns whether the \f$x\f$-coordinate of the source is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space source_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the source is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space source_parameter_space_in_y () const; + + /*! returns the source point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the source point is + * finite. + */ + const Point_2& source() const; + + /*! returns the \f$x\f$-coordinate of the source point. + * \pre The \f$x\f$-coordinate of the source point is finite. + */ + Algebraic_real_1 source_x() const; + + /*! returns whether the \f$x\f$-coordinate of the target is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space target_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the target is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space target_parameter_space_in_y () const; + + /*! returns the target point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the target point is + * finite. + */ + const Point_2& target() const; + + /*! returns the \f$x\f$-coordinate of the target point. + * \pre The \f$x\f$-coordinate of the target point is finite. + */ + Algebraic_real_1 target_x() const; + + /*! returns whether the \f$x\f$-coordinate of the left curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the left curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space left_parameter_space_in_y () const; + + /*! returns the left point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of the left point is finite. + */ + const Point_2& left() const; + + /*! returns the \f$x\f$-coordinate of the left point. + * \pre The \f$x\f$-coordinate of the left point is finite. + */ + Algebraic_real_1 left_x() const; + + /*! returns whether the \f$x\f$-coordinate of the right curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_x () const; + + /*! returns whether the \f$y\f$-coordinate of the right curve end is finite or + * whether it is \f$\pm\infty\f$. + */ + Arr_parameter_space right_parameter_space_in_y () const; + + /*! returns the right point of the arc. + * \pre Both the \f$x\f$- and \f$y\f$-coordinates of The right point is + * finite. + */ + const Point_2& right() const; + + /*! returns the \f$x\f$-coordinate of the right point. + * \pre The \f$x\f$-coordinate of the right point is finite. + */ + Algebraic_real_1 right_x() const; + + /*! returns whether the curve is oriented from left to right. + */ + bool is_left_to_right () const; + + /// @} + + }; /* end Arr_rational_function_traits_2::X_monotone_curve_2 */ }; /* end Arr_rational_function_traits_2 */ + } /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h index aa95832414a..a1badbde914 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_spherical_topology_traits_2.h @@ -49,10 +49,10 @@ public: /// \name Creation /// @{ - /*! Default constructor. */ + /*! constructs default */ Arr_spherical_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_spherical_topology_traits_2(const GeometryTraits_2* traits); @@ -62,36 +62,36 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); - /*! Obtain the spherical face (const version). */ + /*! obtains the spherical face (const version). */ const Face* spherical_face() const; - /*! Obtain the spherical face (non-const version). */ + /*! obtains the spherical face (non-const version). */ Face* spherical_face(); - /*! Obtain the south pole (const version). */ + /*! obtains the south pole (const version). */ const Vertex* south_pole() const; - /*! Obtain the south pole (non-const version). */ + /*! obtains the south pole (non-const version). */ Vertex* south_pole(); - /*! Obtain the north pole (const version). */ + /*! obtains the north pole (const version). */ const Vertex* north_pole() const; - /*! Obtain the north pole (non-const version). */ + /*! obtains the north pole (non-const version). */ Vertex* north_pole(); - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ const Vertex* discontinuity_vertex(const Point_2& pt) const; - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ Vertex* discontinuity_vertex(const Point_2& pt); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h index 92acac4f5f3..19c12f90716 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +/// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). @@ -57,30 +57,30 @@ public: /// \name Creation /// @{ - /*! Construct default */ + /*! constructs default */ template Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) {} - /*! Disable copy constructor. */ + /*! disables copy constructor. */ Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; /// @} - /*! Enable the trace of a traits operation + /*! enables the trace of a traits operation * \param id the operation identifier */ void enable_trace(Operation_id id); - /*! Enable the trace of all traits operations + /*! enables the trace of all traits operations */ void enable_all_traces(); - /*! Disable the trace of a traits operation + /*! disables the trace of a traits operation * \param id the operation identifier */ void disable_trace(Operation_id id); - /*! Disable the trace of all traits operations + /*! disables the trace of all traits operations */ void disable_all_traces(); @@ -142,4 +142,4 @@ public: template OutputStream& operator<<(OutputStream& os, Comparison_result cr); -} //namespace CGAL +} // namespace CGAL diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h index 9a3aaf14789..46eb2fbfc96 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_unb_planar_topology_traits_2.h @@ -49,10 +49,10 @@ public: /// \name Creation /// @{ - /*! Default constructor. */ + /*! constructs default. */ Arr_unb_planar_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_unb_planar_topology_traits_2(const GeometryTraits_2* traits); @@ -62,16 +62,16 @@ public: /// \name Accessors /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); - /*! Obtain the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ const Face* unbounded_face() const; - /*! Obtain the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face* unbounded_face(); /// @} diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h index e30fada356a..76c42cc2114 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementBasicTopologyTraits.h @@ -38,10 +38,10 @@ public: /// \name Access Functions /// @{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const; - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel(); /// @} diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp index 100c8828e39..df5715628f7 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp @@ -22,7 +22,7 @@ int main() { Geom_traits traits; traits.disable_all_traces(); - traits.enable_trace(Tracing_traits::INTERSECT_OP); + traits.enable_trace(Tracing_traits::INTERSECT_2_OP); // Construct an arrangement using aggregated insertion: My_arrangement arr1(&traits); diff --git a/Arrangement_on_surface_2/include/CGAL/Aos_observer.h b/Arrangement_on_surface_2/include/CGAL/Aos_observer.h index 0881fd44c8c..4c7749a25e2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Aos_observer.h +++ b/Arrangement_on_surface_2/include/CGAL/Aos_observer.h @@ -48,27 +48,27 @@ public: private: Arrangement_2* p_arr; // The associated arrangement. - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Aos_observer(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self&); public: /// \name Construction and destruction functions. //@{ - /*! Default constructor. */ + /*! constructs defaults. */ Aos_observer() : p_arr(nullptr) {} - /*! Constructor with an associated arrangement. */ + /*! constructs with an associated arrangement. */ Aos_observer(Arrangement_2& arr) : p_arr(&arr) { // Register the observer object in the arrangement. p_arr->_register_observer(this); } - /*! Destructor. */ + /*! destructs. */ virtual ~Aos_observer() { // Unregister the observer object from the arrangement. @@ -80,13 +80,13 @@ public: /// \name Modifying the associated arrangement. //@{ - /*! Get the associated arrangement (const version). */ + /*! obtains the associated arrangement (const version). */ const Arrangement_2* arrangement() const { return (p_arr); } - /*! Get the associated arrangement (non-const version). */ + /*! obtains the associated arrangement (non-const version). */ Arrangement_2* arrangement() { return (p_arr); } - /*! Attach the observer to an arrangement. + /*! attaches the observer to an arrangement. * \pre The observer is not already attached to an arrangement. */ void attach(Arrangement_2& arr) @@ -110,7 +110,7 @@ public: after_attach(); } - /*! Detach the observer from the arrangement. */ + /*! detaches the observer from the arrangement. */ void detach() { if (p_arr == nullptr) return; @@ -564,7 +564,7 @@ public: //@} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h index 461cadf34a1..330686350a7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h @@ -123,7 +123,7 @@ public: /// \name Construction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_Bezier_curve_traits_2 () { p_cache = new Bezier_cache; @@ -131,14 +131,14 @@ public: m_owner = true; } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_Bezier_curve_traits_2 (const Self& tr) : p_cache (tr.p_cache), p_inter_map (tr.p_inter_map), m_owner (false) {} - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& tr) { if (this == &tr) @@ -150,7 +150,7 @@ public: return (*this); } - /*! Destructor. */ + /*! destructs. */ ~Arr_Bezier_curve_traits_2 () { if (m_owner) @@ -176,13 +176,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_x_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compare the x-coordinates of two points. + /*! compares the x-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -196,7 +195,7 @@ public: } }; - /*! Get a Compare_x_2 functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object () const { return (Compare_x_2 (p_cache)); @@ -212,13 +211,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_xy_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -232,7 +230,7 @@ public: } }; - /*! Get a Compare_xy_2 functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object () const { return (Compare_xy_2 (p_cache)); @@ -244,8 +242,7 @@ public: class Construct_min_vertex_2 { public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The left endpoint. */ @@ -255,7 +252,7 @@ public: } }; - /*! Get a Construct_min_vertex_2 functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object () const { return Construct_min_vertex_2(); @@ -267,8 +264,7 @@ public: class Construct_max_vertex_2 { public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -278,7 +274,7 @@ public: } }; - /*! Get a Construct_max_vertex_2 functor object. */ + /*! obtains a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object () const { return Construct_max_vertex_2(); @@ -290,8 +286,7 @@ public: class Is_vertical_2 { public: - /*! - * Check whether the given x-monotone curve is a vertical segment. + /*! checks whether the given x-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -301,7 +296,7 @@ public: } }; - /*! Get an Is_vertical_2 functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); @@ -317,13 +312,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. * \pre p is in the x-range of cv. @@ -339,7 +333,7 @@ public: } }; - /*! Get a Compare_y_at_x_2 functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object () const { return (Compare_y_at_x_2 (p_cache)); @@ -355,13 +349,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_left_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the left + /*! compares the y value of two x-monotone curves immediately to the left * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -380,7 +373,7 @@ public: } }; - /*! Get a Compare_y_at_x_left_2 functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const { return (Compare_y_at_x_left_2 (p_cache)); @@ -396,13 +389,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_right_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the right + /*! compares the y value of two x-monotone curves immediately to the right * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -421,7 +413,7 @@ public: } }; - /*! Get a Compare_y_at_x_right_2 functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const { return (Compare_y_at_x_right_2 (p_cache)); @@ -437,13 +429,12 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Equal_2 (const Bezier_cache *cache) : p_cache (cache) {} - /*! - * Check if the two x-monotone curves are the same (have the same graph). + /*! checks if the two x-monotone curves are the same (have the same graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -455,8 +446,7 @@ public: const_cast (*p_cache))); } - /*! - * Check if the two points are the same. + /*! checks if the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -468,7 +458,7 @@ public: } }; - /*! Get an Equal_2 functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object () const { return (Equal_2 (p_cache)); @@ -486,10 +476,10 @@ public: Bezier_cache* p_cache; public: - /*! Constructor. */ + /*! constructs. */ Make_x_monotone_2(Bezier_cache* cache) : p_cache(cache) {} - /*! Subdivide a given Bezier curve into x-monotone subcurves and insert them + /*! subdivides a given Bezier curve into x-monotone subcurves and insert them * into a given output iterator. * \param cv the curve. * \param oi an output iterator for the result. Its value type is a variant @@ -600,7 +590,7 @@ public: } }; - /*! Get a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return (Make_x_monotone_2 (p_cache)); } @@ -610,8 +600,7 @@ public: class Split_2 { public: - /*! - * Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). @@ -626,7 +615,7 @@ public: } }; - /*! Get a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object () const { return Split_2(); @@ -643,14 +632,13 @@ public: public: - /*! Constructor. */ + /*! constructs. */ Intersect_2 (Bezier_cache *cache, Intersection_map *imap) : p_cache (cache), p_imap (imap) {} - /*! - * Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. * \param cv1 The first curve. * \param cv2 The second curve. @@ -666,7 +654,7 @@ public: } }; - /*! Get an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object () const { return (Intersect_2 (p_cache, p_inter_map)); @@ -678,8 +666,7 @@ public: class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -692,7 +679,7 @@ public: } }; - /*! Get an Are_mergeable_2 functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); @@ -709,7 +696,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -718,8 +705,7 @@ public: Nt_traits, Bounding_traits>; public: - /*! - * Merge two given x-monotone curves into a single curve (segment). + /*! merges two given x-monotone curves into a single curve (segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -736,7 +722,7 @@ public: } }; - /*! Get a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object () const { return Merge_2(this); @@ -752,8 +738,7 @@ public: class Compare_endpoints_xy_2 { public: - /*! - * Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -768,7 +753,7 @@ public: } }; - /*! Get a Compare_endpoints_xy_2 functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); @@ -781,16 +766,14 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} friend class Arr_Bezier_curve_traits_2; - /*!\brief - * Returns a trimmed version of an arc - * + /*! returns a trimmed version of an arc * \param xcv The arc * \param src the new first endpoint * \param tgt the new second endpoint @@ -824,7 +807,7 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } /*! \class Construct_opposite_2 @@ -833,9 +816,7 @@ public: class Construct_opposite_2 { public: - - /*! - * Construct an opposite x-monotone curve (with swapped source and target). + /*! constructs an opposite x-monotone curve (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -845,7 +826,7 @@ public: } }; - /*! Get a Construct_opposite_2 functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); @@ -854,7 +835,8 @@ public: //@} }; -} //namespace CGAL +} // namespace CGAL #include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h index bb60e54d224..9627f680137 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h @@ -69,30 +69,29 @@ private: public: - /*! Constructor with an associated arrangement. */ + /*! constructs from an associated arrangement. */ Arr_accessor(Arrangement_2& arr) : p_arr(&arr) {} - /* Get the arrangement. */ + /*! obtains the arrangement. */ Arrangement_2& arrangement() { return (*p_arr); } - /* Get the arrangement (const version). */ + /*! obtains the arrangement (const version). */ const Arrangement_2& arrangement() const { return (*p_arr); } /// \name Accessing the notification functions (for the global functions). //@{ - /*! Notify that a global operation is about to take place. */ + /*! notifies that a global operation is about to take place. */ void notify_before_global_change() { p_arr->_notify_before_global_change(); } - /*! Notify that a global operation was completed. */ + /*! notifies that a global operation was completed. */ void notify_after_global_change() { p_arr->_notify_after_global_change(); } //@} /// \name Local operations and predicates for the arrangement. //@{ - /*! - * Locate the arrangement feature that contains the given curve-end. + /*! locates the arrangement feature that contains the given curve-end. * \param cv The curve. * \param ind ARR_MIN_END if we refer to cv's minimal end; * ARR_MAX_END if we refer to its maximal end. @@ -128,8 +127,7 @@ public: return Pl_result::make_result(Vertex_const_handle()); } - /*! - * Locate the place for the given curve around the given vertex. + /*! locates the place for the given curve around the given vertex. * \param vh A handle for the arrangement vertex. * \param cv The given x-monotone curve. * \pre v is one of cv's endpoints. @@ -162,8 +160,7 @@ public: return (p_arr->_handle_for (he)); } - /*! - * Locate the place for the given curve-end around the given vertex, + /*! locates the place for the given curve-end around the given vertex, * which lies on the boundary. * \param vh A handle for the arrangement vertex. * \param cv The curve. @@ -177,11 +174,11 @@ public: * vertex (in a clockwise order). */ Halfedge_handle - locate_around_boundary_vertex(Vertex_handle vh, - const X_monotone_curve_2& cv, - Arr_curve_end ind, - Arr_parameter_space ps_x, - Arr_parameter_space ps_y) const + locate_around_boundary_vertex(Vertex_handle vh, + const X_monotone_curve_2& cv, + Arr_curve_end ind, + Arr_parameter_space ps_x, + Arr_parameter_space ps_y) const { CGAL_precondition((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR)); @@ -193,8 +190,7 @@ public: return (p_arr->_handle_for (he)); } - /*! - * Compute the distance (in halfedges) between two halfedges. + /*! computes the distance (in halfedges) between two halfedges. * \param e1 A handle for the source halfedge. * \param e2 A handle for the destination halfedge. * \return In case e1 and e2 belong to the same connected component, the @@ -222,8 +218,7 @@ public: return (static_cast(dist)); } - /*! - * Determine whether a given query halfedge lies in the interior of a new + /*! determines whether a given query halfedge lies in the interior of a new * face we are about to create, by connecting it with another halfedge * using a given x-monotone curve. * \param prev1 A handle for the query halfedge. @@ -244,8 +239,7 @@ public: cv)); } - /*! - * Check if the given vertex represents one of the ends of a given curve. + /*! checks if the given vertex represents one of the ends of a given curve. * \param v The vertex. * \param cv The curve. * \param ind ARR_MIN_END if we refer to cv's minimal end; @@ -262,8 +256,7 @@ public: cv, ind, ps_x, ps_y)); } - /*! - * Check whether the given halfedge lies on the outer boundary of its + /*! checks whether the given halfedge lies on the outer boundary of its * incident face. * \param he The given halfedge. * \return (true) in case he lies on the outer boundary of its incident face; @@ -275,8 +268,7 @@ public: return (! p_he->is_on_inner_ccb()); } - /*! - * Check whether the given halfedge lies on the inner boundary of its + /*! checks whether the given halfedge lies on the inner boundary of its * incident face. * \param he The given halfedge. * \return (true) in case he lies on a hole inside its incident face; @@ -288,8 +280,7 @@ public: return (p_he->is_on_inner_ccb()); } - /*! - * Create a new vertex and associate it with the given point. + /*! creates a new vertex and associate it with the given point. * \param p The point. * \return A handle for the newly created vertex. */ @@ -300,8 +291,7 @@ public: return (p_arr->_handle_for (v)); } - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param pt the point * \param ps_x The parameter space in x. * \param ps_y The parameter space in y. @@ -328,8 +318,7 @@ public: return (p_arr->_handle_for(v)); } - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param cv The curve incident to the boundary. * \param ind The relevant curve-end. * \param ps_x The parameter space in x. @@ -358,8 +347,7 @@ public: return (p_arr->_handle_for(v)); } - /*! - * Locate the arrangement features that will be used for inserting the + /*! locates the arrangement features that will be used for inserting the * given curve end, which has a boundary condition, and set a proper vertex * there. * \param f The face that contains the curve end. @@ -388,8 +376,7 @@ public: return (std::make_pair(p_arr->_handle_for(v), p_arr->_handle_for(pred))); } - /*! - * Insert an x-monotone curve into the arrangement, where the end vertices + /*! inserts an x-monotone curve into the arrangement, where the end vertices * are given by the target points of two given halfedges. * The two halfedges should be given such that in case a new face is formed, * it will be the incident face of the halfedge directed from the first @@ -426,8 +413,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Insert an x-monotone curve into the arrangement, such that one of its + /*! inserts an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other * endpoint corresponds to a free vertex (a newly created vertex or an @@ -463,8 +449,7 @@ public: return (p_arr->_handle_for (he)); } - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to free arrangement vertices (newly created vertices * or existing isolated vertices), so a new hole is formed in the face * that contains the two vertices. @@ -511,16 +496,14 @@ public: } - /*! - * Insert the given vertex as an isolated vertex inside the given face. + /*! inserts the given vertex as an isolated vertex inside the given face. * \param f The face that should contain the isolated vertex. * \param v The isolated vertex. */ void insert_isolated_vertex(Face_handle f, Vertex_handle v) { p_arr->_insert_isolated_vertex(p_arr->_face (f), p_arr->_vertex(v)); } - /*! - * Relocate all holes and isolated vertices to their proper position, + /*! relocates all holes and isolated vertices to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * In case insert_at_vertices_ex() was invoked and indicated that a new face * has been created, this function should be called with the halfedge @@ -539,8 +522,7 @@ public: void relocate_holes_in_new_face(Halfedge_handle new_he) { p_arr->_relocate_holes_in_new_face(p_arr->_halfedge(new_he)); } - /*! - * Move an outer CCB from one face to another. + /*! moves an outer CCB from one face to another. * \param from_face The source face. * \param to_face The destination face. * \param ccb A CCB circulator that corresponds to component to move. @@ -552,8 +534,7 @@ public: p_arr->_halfedge (ccb)); } - /*! - * Move an inner CCB from one face to another. + /*! moves an inner CCB from one face to another. * \param from_face The source face. * \param to_face The destination face. * \param ccb A CCB circulator that corresponds to component to move. @@ -565,8 +546,7 @@ public: p_arr->_halfedge(ccb)); } - /*! - * Move an isolated vertex from one face to another. + /*! moves an isolated vertex from one face to another. * \param from_face The source face. * \param to_face The destination face. * \param v The isolated vertex to move. @@ -578,8 +558,7 @@ public: p_arr->_face(to_face), p_arr->_vertex(v)); } - /*! - * Remove an isolated vertex from its face. + /*! removes an isolated vertex from its face. * \param v The isolated vertex to remove. */ void remove_isolated_vertex_ex (Vertex_handle v) @@ -589,8 +568,7 @@ public: p_arr->_remove_isolated_vertex(iso_v); } - /*! - * Modify the point associated with a given vertex. The point may be + /*! modifies the point associated with a given vertex. The point may be * geometrically different than the one currently associated with the vertex. * \param v The vertex to modify. * \param p The new point to associate with v. @@ -602,9 +580,8 @@ public: return v; } - /*! - * Modify the x-monotone curve associated with a given edge. The curve may be - * geometrically different than the one currently associated with the edge. + /*! modifies the x-monotone curve associated with a given edge. The curve may + * be geometrically different than the one currently associated with the edge. * \param e The edge to modify. * \param cv The new x-monotone curve to associate with e. * \return A handle for the modified edge (same as e). @@ -616,8 +593,7 @@ public: return e; } - /*! - * Split a given edge into two at a given point, and associate the given + /*! splits a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. @@ -638,8 +614,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Split a given edge into two at the given vertex, and associate the given + /*! splits a given edge into two at the given vertex, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. @@ -661,8 +636,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Split a fictitious edge at the given vertex. + /*! splits a fictitious edge at the given vertex. * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \return A handle for the first split halfedge, whose source equals the @@ -677,8 +651,7 @@ public: return (p_arr->_handle_for(he)); } - /*! - * Remove a pair of twin halfedges from the arrangement. + /*! removes a pair of twin halfedges from the arrangement. * \param e A handle for one of the halfedges to be removed. * \param remove_source Should the source vertex of e be removed if it * becomes isolated (true by default). @@ -698,8 +671,7 @@ public: return (p_arr->_handle_for(f)); } - /*! - * Check if the two given halfedges lie on the same inner component. + /*! checks if the two given halfedges lie on the same inner component. * \param e1 A handle for the first halfedge. * \param e2 A handle for the second halfedge. * \return Whether e1 and e2 lie on the same inner component. @@ -714,8 +686,7 @@ public: return (ic1 == ic2); } - /*! - * Check if the two given halfedges lie on the same outer component. + /*! checks if the two given halfedges lie on the same outer component. * \param e1 A handle for the first halfedge. * \param e2 A handle for the second halfedge. * \return Whether e1 and e2 lie on the same outer component. @@ -741,7 +712,7 @@ public: typedef typename Arrangement_2::_Is_valid_vertex Is_valid_vertex; typedef typename Arrangement_2::_Valid_vertex_iterator Valid_vertex_iterator; - /*! Get an iterator for the first valid arrangement vertex. */ + /*! obtains an iterator for the first valid arrangement vertex. */ Valid_vertex_iterator valid_vertices_begin() { return (Valid_vertex_iterator @@ -750,7 +721,7 @@ public: Is_valid_vertex (p_arr->topology_traits()))); } - /*! Get a past-the-end iterator for the valid arrangement vertices. */ + /*! obtains a past-the-end iterator for the valid arrangement vertices. */ Valid_vertex_iterator valid_vertices_end() { return (Valid_vertex_iterator @@ -759,7 +730,7 @@ public: Is_valid_vertex (p_arr->topology_traits()))); } - /*! Get the number of valid arrangement vertices. */ + /*! obtains the number of valid arrangement vertices. */ Size number_of_valid_vertices() const { return (p_arr->topology_traits()->number_of_valid_vertices()); @@ -786,13 +757,11 @@ public: typedef DInner_ccb Dcel_inner_ccb; typedef DIso_vertex Dcel_isolated_vertex; - /*! - * Get the arrangement DCEL. + /*! obtains the arrangement DCEL. */ const Dcel& dcel() const { return (p_arr->_dcel()); } - /*! - * Clear the entire arrangement. + /*! clears the entire arrangement. */ void clear_all() { @@ -800,8 +769,7 @@ public: p_arr->_dcel().delete_all(); } - /*! - * Set the boundary of a vertex + /*! sets the boundary of a vertex * \param p A vertex * \param ps_x The boundary condition at x. * \param ps_y The boundary condition at y. @@ -816,8 +784,7 @@ public: return (v_to_set); } - /*! - * Create a new vertex. + /*! creates a new vertex. * \param p A pointer to the point (may be nullptr in case of a vertex at * infinity). * \param ps_x The boundary condition at x. @@ -842,8 +809,7 @@ public: return (new_v); } - /*! - * Create a new edge (halfedge pair), associated with the given curve. + /*! creates a new edge (halfedge pair), associated with the given curve. * \param cv A pointer to the x-monotone curve (may be nullptr in case of * a fictitious edge). * \return A pointer to one of the created DCEL halfedge. @@ -860,34 +826,29 @@ public: return new_he; } - /*! - * Create a new face. + /*! creates a new face. * \return A pointer to the created DCEL face. */ Dcel_face* new_face() { return (p_arr->_dcel().new_face()); } - /*! - * Create a new outer CCB. + /*! creates a new outer CCB. * \return A pointer to the created DCEL outer CCB. */ Dcel_outer_ccb* new_outer_ccb() { return (p_arr->_dcel().new_outer_ccb()); } - /*! - * Create a new inner CCB. + /*! creates a new inner CCB. * \return A pointer to the created DCEL inner CCB. */ Dcel_inner_ccb* new_inner_ccb() { return (p_arr->_dcel().new_inner_ccb()); } - /*! - * Create a new isolated vertex. + /*! creates a new isolated vertex. * \return A pointer to the created DCEL isolated vertex. */ Dcel_isolated_vertex* new_isolated_vertex() { return (p_arr->_dcel().new_isolated_vertex()); } - /*! - * Remove a range of vertices + /*! removes a range of vertices */ template void delete_vertices(const VertexRange& range) @@ -902,8 +863,7 @@ public: } } - /*! - * Remove a range of edges + /*! removes a range of edges */ template void delete_edges(const EdgeRange& range) @@ -918,8 +878,7 @@ public: } } - /*! - * Remove a range of faces + /*! removes a range of faces */ template void delete_faces(const FaceRange& range) @@ -932,8 +891,7 @@ public: } } - /*! - * Remove a range of outer ccbs + /*! removes a range of outer ccbs */ template void delete_outer_ccbs(const CcbRange& range) @@ -946,8 +904,7 @@ public: } } - /*! - * Remove a range of inner ccbs + /*! removes a range of inner ccbs */ template void delete_inner_ccbs(const CcbRange& range) @@ -960,14 +917,13 @@ public: } } - /*! - * Update the topology traits after the DCEL has been updated. + /*! updates the topology traits after the DCEL has been updated. */ void dcel_updated() { p_arr->topology_traits()->dcel_updated(); } //@} }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h index 03566eaa919..06ec80facc7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h @@ -33,11 +33,10 @@ namespace CGAL { -template< class Coefficient_ > +template class Arr_algebraic_segment_traits_2 { public: - enum Site_of_point { POINT_IN_INTERIOR = 0, MIN_ENDPOINT = -1, @@ -57,16 +56,15 @@ public: typedef CGAL::Arr_algebraic_segment_traits_2 Self; - // Default constructor + // constructs default Arr_algebraic_segment_traits_2 () {} - // Copy constructor + // constructs copy Arr_algebraic_segment_traits_2 (const Self& /* s */) { /* No state...*/} - // Assignment operator - const Self& operator= (const Self& s) - {return s;} + // assigns + const Self& operator= (const Self& s) { return s; } // public types @@ -613,11 +611,7 @@ public: return Construct_curve_2(&CKvA_2::instance()); } - - - - -/* + /* // additional functionality (for not introducing a "general" arc) @@ -650,12 +644,12 @@ public: }; -*/ + */ }; -} //namespace CGAL +} // namespace CGAL #include -#endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index 105d379297d..ba7f8772864 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -118,26 +118,26 @@ public: ///! \name Construction methods. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_bounded_planar_topology_traits_2() : Base(), unb_face(nullptr) {} - /*! Constructor from a geometry-traits object. */ + /*! constructs from a geometry-traits object. */ Arr_bounded_planar_topology_traits_2(const Gt2* traits) : Base(traits), unb_face(nullptr) {} - /*! Assign the contents of another topology-traits class. */ + /*! assigns the contents of another topology-traits class. */ void assign(const Self& other); //@} ///! \name Accessing the DCEL and constructing iterators. //@{ - /*! Determine whether the DCEL reprsenets an empty structure. */ + /*! determines whether the DCEL reprsenets an empty structure. */ bool is_empty_dcel() const { // An empty bounded arrangement has no edges or vertices. @@ -145,40 +145,40 @@ public: this->m_dcel.size_of_halfedges() == 0); } - /*! Check if the given vertex is concrete (associated with a point). */ + /*! checks if the given vertex is concrete (associated with a point). */ inline bool is_concrete_vertex(const Vertex*) const { return true; } - /*! Get the number of concrete vertices. */ + /*! obtains the number of concrete vertices. */ Size number_of_concrete_vertices() const { // All vertices are concrete. return (this->m_dcel.size_of_vertices()); } - /*! Check if the given vertex is valid (not a fictitious one). */ + /*! checks if the given vertex is valid (not a fictitious one). */ inline bool is_valid_vertex(const Vertex*) const { return true; } - /*! Get the number of valid vertices. */ + /*! obtains the number of valid vertices. */ Size number_of_valid_vertices() const { // All vertices are valid. return (this->m_dcel.size_of_vertices()); } - /*! Check if the given halfedge is valid (not a fictitious one). */ + /*! checks if the given halfedge is valid (not a fictitious one). */ inline bool is_valid_halfedge(const Halfedge*) const { return true; } - /*! Get the number of valid halfedges. */ + /*! obtains the number of valid halfedges. */ Size number_of_valid_halfedges() const { // All halfedges are valid. return (this->m_dcel.size_of_halfedges()); } - /*! Check if the given face is valid (not a fictitious one). */ + /*! checks if the given face is valid (not a fictitious one). */ inline bool is_valid_face (const Face*) const { return true; } - /*! Get the number of valid faces. */ + /*! obtains the number of valid faces. */ Size number_of_valid_faces() const { // All faces are valid. @@ -255,15 +255,15 @@ public: ///! \name Topology-traits methods. //@{ - /*! Initialize an empty DCEL structure. + /*! initializes an empty DCEL structure. */ void init_dcel(); - /*! Make the necessary updates after the DCEL structure have been updated. + /*! makes the necessary updates after the DCEL structure have been updated. */ void dcel_updated(); - /*! Check if the given vertex is associated with the given curve end. + /*! checks if the given vertex is associated with the given curve end. * \param v The vertex. * \param cv The x-monotone curve. * \param ind The curve end. @@ -295,8 +295,8 @@ public: } } - /*! Given a curve end with boundary conditions and a face that contains the - * interior of the curve, find a place for a boundary vertex that will + /*! given a curve end with boundary conditions and a face that contains the + * interior of the curve, finds a place for a boundary vertex that will * represent the curve end along the face boundary. * \param f The face. * \param cv The x-monotone curve. @@ -318,7 +318,7 @@ public: return std::nullopt; } - /*! Locate the predecessor halfedge for the given curve around a given + /*! locates the predecessor halfedge for the given curve around a given * vertex with boundary conditions. * \param v The vertex. * \param cv The x-monotone curve. @@ -340,7 +340,7 @@ public: return nullptr; } - /*! Locate a DCEL feature that contains the given curve end. + /*! locates a DCEL feature that contains the given curve end. * \param cv The x-monotone curve. * \param ind The curve end. * \param ps_x The boundary condition of the curve end in x. @@ -361,7 +361,7 @@ public: return Result(v); } - /*! Split a fictitious edge using the given vertex. + /*! splits a fictitious edge using the given vertex. * \param e The edge to split (one of the pair of halfedges). * \param v The split vertex. * \pre e is a fictitious halfedge. @@ -375,21 +375,21 @@ public: return nullptr; } - /*! Determine whether the given face is unbounded. + /*! determines whether the given face is unbounded. * \param f The face. * \return Whether f is unbounded. * There is only one unbounded face in the arrangement: */ bool is_unbounded(const Face* f) const { return (f == unb_face); } - /*! Determine whether the given boundary vertex is redundant. + /*! determines whether the given boundary vertex is redundant. * \param v The vertex. * \return Whether v is redundant, and should be erased. * There are no redundant vertices. */ bool is_redundant(const Vertex*) const { return false; } - /*! Erase the given redundant vertex by merging a fictitious edge. + /*! erases the given redundant vertex by merging a fictitious edge. * The function does not free the vertex v itself. * \param v The vertex. * \pre v is a redundant vertex. @@ -402,20 +402,20 @@ public: return nullptr; } - //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + //! reference_face (const version). + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ const Face* reference_face() const { return unbounded_face(); } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ Face* reference_face() { return unbounded_face(); } //@} @@ -426,17 +426,17 @@ public: /*! This function is used by the "walk" point-location strategy. */ const Face* initial_face() const { return (unb_face); } - /*! Get the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ const Face* unbounded_face() const { return (unb_face); } - /*! Get the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face* unbounded_face() { return (unb_face); } //@} /// \name Additional predicates, specialized for this topology-traits class. //@{ - /*! Compare the given vertex and the given point. + /*! compares the given vertex and the given point. * \param p The point. * \param v The vertex. * \return The result of the comparison of the x-coordinates of p and v. @@ -444,7 +444,7 @@ public: virtual Comparison_result compare_x(const Point_2& p, const Vertex* v) const { return (this->m_geom_traits->compare_x_2_object()(p, v->point())); } - /*! Compare the given vertex and the given point. + /*! compares the given vertex and the given point. * \param p The point. * \param v The vertex. * \return The result of the xy-lexicographic comparison of p and v. @@ -452,7 +452,7 @@ public: virtual Comparison_result compare_xy(const Point_2& p, const Vertex* v) const { return (this->m_geom_traits->compare_xy_2_object()(p, v->point())); } - /*! Compare the relative y-position of the given point and the given edge + /*! compares the relative y-position of the given point and the given edge * (which may be fictitious). * \param p The point. * \param he The edge (one of the pair of halfedges). diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index cc37c9d3534..f2963584278 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -72,12 +72,12 @@ protected: bool m_use_cache; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_circle_segment_traits_2 (bool use_intersection_caching = false) : m_use_cache(use_intersection_caching) {} - /*! Get the next curve index. */ + /*! obtains the next curve index. */ static unsigned int get_index () { #ifdef CGAL_NO_ATOMIC @@ -94,7 +94,7 @@ public: class Compare_x_2 { public: - /*! Compare the \f$x\f$-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -110,7 +110,7 @@ public: } }; - /*! Obtain a `Compare_x_2` functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object () const { return Compare_x_2(); @@ -119,8 +119,7 @@ public: class Compare_xy_2 { public: - /*! - * Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -141,7 +140,7 @@ public: } }; - /*! Get a Compare_xy_2 functor object. */ + /*! ontains a Compare_xy_2 functor object. */ Compare_xy_2 compare_xy_2_object () const { return Compare_xy_2(); @@ -150,7 +149,7 @@ public: class Construct_min_vertex_2 { public: - /*! Get the left endpoint of the \f$x\f$-monotone curve (segment). + /*! obtains the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \return The left endpoint. */ @@ -160,7 +159,7 @@ public: } }; - /*! Obtain a `Construct_min_vertex_2` functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object () const { return Construct_min_vertex_2(); @@ -169,7 +168,7 @@ public: class Construct_max_vertex_2 { public: - /*! Get the right endpoint of the \f$x\f$-monotone curve (segment). + /*! obtains the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -179,7 +178,7 @@ public: } }; - /*! Get a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object () const { return Construct_max_vertex_2(); @@ -188,7 +187,7 @@ public: class Is_vertical_2 { public: - /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -198,7 +197,7 @@ public: } }; - /*! Obtain an `Is_vertical_2` functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); @@ -207,7 +206,7 @@ public: class Compare_y_at_x_2 { public: - /*! Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. * \pre p is in the \f$x\f$-range of `cv`. @@ -224,7 +223,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_2` functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object () const { return Compare_y_at_x_2(); @@ -233,7 +232,7 @@ public: class Compare_y_at_x_right_2 { public: - /*! Compares the y value of two \f$x\f$-monotone curves immediately to the + /*! compares the y value of two \f$x\f$-monotone curves immediately to the * right of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -277,7 +276,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_right_2` functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const { return Compare_y_at_x_right_2(); @@ -286,7 +285,7 @@ public: class Compare_y_at_x_left_2 { public: - /*! Compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the left of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -331,7 +330,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_left_2` functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object () const { return Compare_y_at_x_left_2(); @@ -340,7 +339,7 @@ public: class Equal_2 { public: - /*! Check if the two \f$x\f$-monotone curves are the same (have the same + /*! checks if the two \f$x\f$-monotone curves are the same (have the same * graph). * \param cv1 The first curve. * \param cv2 The second curve. @@ -355,8 +354,7 @@ public: return (cv1.equals (cv2)); } - /*! - * Check if the two points are the same. + /*! checks if the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -367,7 +365,7 @@ public: } }; - /*! Obtain an `Equal_2` functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object () const { return Equal_2(); @@ -388,7 +386,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -396,7 +394,7 @@ public: friend class Arr_circle_segment_traits_2; public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -408,12 +406,12 @@ public: return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double error, @@ -423,7 +421,7 @@ public: } private: - /*! Handle segments. + /*! handles segments. */ template OutputIterator approximate_segment(const X_monotone_curve_2& xcv, @@ -470,7 +468,7 @@ public: return oi; } - /*! Compute the circular point given the parameter t and the transform + /*! computes the circular point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -479,7 +477,7 @@ public: y = r * std::sin(t); } - /*! Transform a point. In particular, rotate the canonical point + /*! transforms a point. In particular, rotate the canonical point * (`xc`,`yc`) by an angle, the sine and cosine of which are `sint` and * `cost`, respectively, and translate by (`cx`,`cy`). */ @@ -489,7 +487,7 @@ public: y = yc + cy; } - /*! Handle circular arcs. + /*! handles circular arcs. */ template OutputIterator approximate_arc(const X_monotone_curve_2& xcv, @@ -547,7 +545,7 @@ public: } }; - /*! Obtain an `Approximate_2` functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //@} @@ -566,7 +564,7 @@ public: public: Make_x_monotone_2(bool use_cache = false) : m_use_cache(use_cache) {} - /*! Subdivide a given circular arc or line segment into \f$x\f$-monotone + /*! subdivides a given circular arc or line segment into \f$x\f$-monotone * subcurves and insert them to a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its dereference type is a @@ -672,7 +670,7 @@ public: } }; - /*! Obtain a `Make_x_monotone_2` functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(m_use_cache); } @@ -680,7 +678,7 @@ public: { public: - /*! Split a given \f$x\f$-monotone curve at a given point into two + /*! splits a given \f$x\f$-monotone curve at a given point into two * sub-curves. * \param cv The curve to split * \param p The split point. @@ -700,7 +698,7 @@ public: } }; - /*! Obtain a `Split_2` functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object () const { return Split_2(); @@ -711,10 +709,10 @@ public: Intersection_map& _inter_map; // The map of intersection points. public: - /*! Constructor. */ + /*! constructs. */ Intersect_2(Intersection_map& map) : _inter_map(map) {} - /*! Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first curve. @@ -729,13 +727,13 @@ public: { return (cv1.intersect(cv2, oi, &_inter_map)); } }; - /*! Obtain an `Intersect_2` functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return (Intersect_2(inter_map)); } class Are_mergeable_2 { public: - /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if `cv1` and `cv2` are mergeable, that is, if they are @@ -749,7 +747,7 @@ public: } }; - /*! Obtain an `Are_mergeable_2` functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); @@ -766,7 +764,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! Constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -774,7 +772,7 @@ public: friend class Arr_circle_segment_traits_2; public: - /*! Merge two given \f$x\f$-monotone curves into a single curve. + /*! merges two given \f$x\f$-monotone curves into a single curve. * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -791,7 +789,7 @@ public: } }; - /*! Obtain a `Merge_2` functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object () const { return Merge_2(this); @@ -800,7 +798,7 @@ public: class Compare_endpoints_xy_2 { public: - /*! compare lexicogrphic the endpoints of a \f$x\f$-monotone curve. + /*! compares lexicogrphic the endpoints of a \f$x\f$-monotone curve. * \param cv the curve * \return `SMALLER` if the curve is directed right, else return `LARGER`. */ @@ -812,7 +810,7 @@ public: } }; - /*! Obtain a `Compare_endpoints_xy_2` functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); @@ -821,7 +819,7 @@ public: class Construct_opposite_2 { public: - /*! construct an opposite \f$x\f$-monotone curve. + /*! constructs an opposite \f$x\f$-monotone curve. * \param cv the curve * \return an opposite \f$x\f$-monotone curve. */ @@ -831,7 +829,7 @@ public: } }; - /*! Obtain a `Construct_opposite_2` functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); @@ -844,7 +842,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} @@ -852,7 +850,7 @@ public: friend class Arr_circle_segment_traits_2; public: - /*! Obtain a trimmed version of an arc + /*! obtains a trimmed version of an arc * \param xcv The arc * \param src the new first endpoint * \param tgt the new second endpoint @@ -883,14 +881,14 @@ public: } }; - /*! Obtain a `Trim_2` functor object. */ + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } // @} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h index 151bcf5644a..367e4708a36 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h @@ -206,4 +206,4 @@ public: #include -#endif // CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_TRAITS_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h index b1783f8c3ec..449e085fa87 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h @@ -380,8 +380,7 @@ namespace CGAL { typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; - public : - + public: typedef Circular_arc_point_2 result_type; //typedef const result_type& qualified_result_type; @@ -395,14 +394,13 @@ namespace CGAL { } }; - template class Construct_max_vertex_2//: public Has_qrt { typedef typename CircularKernel::Circular_arc_point_2 Point_2; + public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -418,10 +416,10 @@ namespace CGAL { } }; - template + template class Variant_Is_vertical_2 { - public : + public: template < typename T > bool @@ -449,7 +447,7 @@ namespace CGAL { // an empty class used to have different types between Curve_2 and X_monotone_curve_2 // in Arr_circular_line_arc_traits_2. - namespace internal_Argt_traits{ + namespace internal_Argt_traits { struct Not_X_Monotone{}; inline std::ostream& operator << (std::ostream& os, const Not_X_Monotone&) {return os;} @@ -520,45 +518,42 @@ namespace CGAL { typedef VariantFunctors::Intersect_2 Intersect_2; + Compare_x_2 compare_x_2_object() const + { return ck.compare_x_2_object(); } - Compare_x_2 compare_x_2_object() const - { return ck.compare_x_2_object(); } + Compare_xy_2 compare_xy_2_object() const + { return ck.compare_xy_2_object(); } - Compare_xy_2 compare_xy_2_object() const - { return ck.compare_xy_2_object(); } + Compare_y_at_x_2 compare_y_at_x_2_object() const + { return Compare_y_at_x_2(); } - Compare_y_at_x_2 compare_y_at_x_2_object() const - { return Compare_y_at_x_2(); } + Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const + { return Compare_y_at_x_right_2(); } - Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { return Compare_y_at_x_right_2(); } + Equal_2 equal_2_object() const + { return Equal_2(); } - Equal_2 equal_2_object() const - { return Equal_2(); } + Make_x_monotone_2 make_x_monotone_2_object() const + { return Make_x_monotone_2(); } - Make_x_monotone_2 make_x_monotone_2_object() const - { return Make_x_monotone_2(); } + Split_2 split_2_object() const + { return Split_2(); } - Split_2 split_2_object() const - { return Split_2(); } - - Intersect_2 intersect_2_object() const + Intersect_2 intersect_2_object() const { return Intersect_2(); } - Construct_min_vertex_2 construct_min_vertex_2_object() const + Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } - Construct_max_vertex_2 construct_max_vertex_2_object() const + Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } - Is_vertical_2 is_vertical_2_object() const + Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2();} - - }; } // namespace CGAL #include -#endif // CGAL_CIRCULAR_KERNEL_VARIANT_TRAITS_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index 290e9e1e22e..cff7c59d379 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -125,11 +125,11 @@ private: // intersection points. public: - /*! Default constructor. + /*! constructs default. */ Arr_conic_traits_2() {} - /*! Construct from resources. + /*! constructs from resources. */ Arr_conic_traits_2(Shared_rat_kernel rat_kernel, Shared_alg_kernel alg_kernel, @@ -139,19 +139,19 @@ public: m_nt_traits(nt_traits) {} - /*! Obtain the rational kernel. + /*! obtains the rational kernel. */ Shared_rat_kernel rat_kernel() const { return m_rat_kernel; } - /*! Obtain the algebraic kernel. + /*! obtains the algebraic kernel. */ Shared_alg_kernel alg_kernel() const { return m_alg_kernel; } - /*! Obtain the nt traits. + /*! obtains the nt traits. */ Shared_nt_traits nt_traits() const { return m_nt_traits; } - /*! Obtain the next conic index. */ + /*! obtains the next conic index. */ static size_t get_index() { #ifdef CGAL_NO_ATOMIC static size_t index; @@ -171,7 +171,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_x_2(const Traits& traits) : m_traits(traits) {} @@ -179,7 +179,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compare the \f$x\f$-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -190,7 +190,7 @@ public: { return m_traits.m_alg_kernel->compare_x_2_object()(p1, p2); } }; - /*! Obtain a `Compare_x_2` functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } class Compare_xy_2 { @@ -200,7 +200,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_xy_2(const Traits& traits) : m_traits(traits) {} @@ -208,7 +208,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return `LARGER` if `x(p1) > x(p2)`, or if `x(p1) = x(p2)` and `y(p1) > y(p2)`; @@ -219,12 +219,12 @@ public: { return m_traits.m_alg_kernel->compare_xy_2_object()(p1, p2); } }; - /*! Obtain a `Compare_xy_2` functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of an \f$x\f$-monotone arc. + /*! obtains the left endpoint of an \f$x\f$-monotone arc. * \param cv The arc. * \return The left endpoint. */ @@ -232,13 +232,13 @@ public: { return xcv.left(); } }; - /*! Obtain a `Construct_min_vertex_2` functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the \f$x\f$-monotone arc. + /*! obtains the right endpoint of the \f$x\f$-monotone arc. * \param cv The arc. * \return The right endpoint. */ @@ -246,13 +246,13 @@ public: { return xcv.right(); } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } class Is_vertical_2 { public: - /*! Check whether a given \f$x\f$-monotone arc is a vertical segment. + /*! checks whether a given \f$x\f$-monotone arc is a vertical segment. * \param cv The vertical segment. * \return `true` if the arc is a vertical segment; `false` otherwise. */ @@ -260,7 +260,7 @@ public: { return cv.is_vertical(); } }; - /*! Obtain an `Is_vertical_2` functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } class Compare_y_at_x_2 { @@ -270,7 +270,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {} @@ -278,7 +278,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Return the location of a given point with respect to an input arc. + /*! returns the location of a given point with respect to an input arc. * \param xcv The arc. * \param p The point. * \pre `p` is in the \f$x\f$-range of `xcv`. @@ -325,7 +325,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_2` functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -336,7 +336,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {} @@ -344,7 +344,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compares the \f$y\f$ value of two \f$x\f$-monotone arcs immediately + /*! compares the \f$y\f$ value of two \f$x\f$-monotone arcs immediately * to the left of their intersection point. * \param xcv1 The first arc. * \param xcv2 The second arc. @@ -376,7 +376,7 @@ public: } private: - /*! Compare two arcs immediately to the leftt of their intersection point. + /*! compares two arcs immediately to the leftt of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -503,7 +503,7 @@ public: }; - /*! Obtain a `Compare_y_at_x_left_2` functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -514,7 +514,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {} @@ -522,7 +522,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Compares the `y` value of two \f$x\f$-monotone arcs immediately + /*! compares the `y` value of two \f$x\f$-monotone arcs immediately * to the right of their intersection point. * \param xcv1 The first arc. * \param xcv2 The second arc. @@ -554,7 +554,7 @@ public: } private: - /*! Compare two arcs immediately to the right of their intersection point. + /*! compares two arcs immediately to the right of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -673,7 +673,7 @@ public: }; - /*! Obtain a `Compare_y_at_x_right_2` functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -684,7 +684,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Equal_2(const Traits& traits) : m_traits(traits) {} @@ -692,7 +692,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Check whether two \f$x\f$-monotone curves are the same (have the same + /*! checks whether two \f$x\f$-monotone curves are the same (have the same * graph). * \param xcv1 The first curve. * \param xcv2 The second curve. @@ -705,7 +705,7 @@ public: return equals(xcv1, xcv2); } - /*! Check whether two points are the same. + /*! checks whether two points are the same. * \param p1 The first point. * \param p2 The second point. * \return `true` if the two point are the same; `false` otherwise. @@ -716,7 +716,7 @@ public: } private: - /*! Check whether two arcs are equal (have the same graph). + /*! checks whether two arcs are equal (have the same graph). * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \return `true` if the two arcs have the same graph; `false` otherwise. @@ -749,7 +749,7 @@ public: } }; - /*! Obtain an `Equal_2` functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -761,7 +761,7 @@ public: */ class Parameter_space_in_x_2 { public: - /*! Obtains the parameter space at the end of an arc along the \f$x\f$-axis. + /*! obtains the parameter space at the end of an arc along the \f$x\f$-axis. * \param xcv The arc. * \param ce The arc end indicator: * `ARR_MIN_END`—the minimal end of `xcv` or @@ -779,7 +779,7 @@ public: return ARR_INTERIOR; } - /*! Obtains the parameter space at a point along the \f$x\f$-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * \param p The point. * \return the parameter space at `p`. */ @@ -787,7 +787,7 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a `Parameter_space_in_x_2` function object */ + /*! obtains a `Parameter_space_in_x_2` function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } @@ -796,7 +796,7 @@ public: */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of an arc along the \f$y\f$-axis . + /*! obtains the parameter space at the end of an arc along the \f$y\f$-axis . * Note that if the arc end coincides with a pole, then unless the arc * coincides with the identification curve, the arc end is considered to * be approaching the boundary, but not on the boundary. @@ -819,7 +819,7 @@ public: return ARR_INTERIOR; } - /*! Obtains the parameter space at a point along the \f$y\f$-axis. + /*! obtains the parameter space at a point along the \f$y\f$-axis. * \param p The point. * \return The parameter space at `p`. */ @@ -827,7 +827,7 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a `Parameter_space_in_y_2` function object */ + /*! obtains a `Parameter_space_in_y_2` function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } @@ -846,7 +846,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Make_x_monotone_2(const Traits& traits) : m_traits(traits) {} @@ -854,7 +854,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Subdivide a given conic arc into \f$x\f$-monotone sub arcs + /*! subdivides a given conic arc into \f$x\f$-monotone sub arcs * and insert them to a given output iterator. * \param cv The arc. * \param oi the output iterator for the result. Its dereference type is a @@ -944,7 +944,7 @@ public: } }; - /*! Obtain a `Make_x_monotone_2` functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -955,7 +955,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Split_2(const Traits& traits) : m_traits(traits) {} @@ -963,7 +963,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Split a given \f$x\f$-monotone arc at a given point into two sub-arcs. + /*! splits a given \f$x\f$-monotone arc at a given point into two sub-arcs. * \param xcv The arc to split * \param p The split point. * \param xcv1 Output: The left resulting sub-arc (`p` is its right endpoint). @@ -975,7 +975,7 @@ public: { split(xcv, p, xcv1, xcv2); } private: - /*! Split the arc into two at a given split point. + /*! splits the arc into two at a given split point. * \param p The split point. * \param xcv1 Output: The first resulting arc, lying to the left of `p`. * \param xcv2 Output: The first resulting arc, lying to the right of `p`. @@ -1019,7 +1019,7 @@ public: }; - /*! Obtain a `Split_2` functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -1029,7 +1029,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor. + /*! constructs. * \param traits The traits. */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -1037,7 +1037,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first arc. @@ -1052,7 +1052,7 @@ public: { return intersect(xcv1, xcv2, m_traits.m_inter_map, oi); } private: - /*! Compute the overlap with a given arc, which is supposed to have the same + /*! computes the overlap with a given arc, which is supposed to have the same * supporting conic curve as this arc. * \param xcv1 The first arc. * \param xcv2 The second arc. @@ -1109,7 +1109,7 @@ public: return false; } - /*! Intersect the supporting conic curves of this arc and the given arc. + /*! intersects the supporting conic curves of this arc and the given arc. * \param arc The arc to intersect with. * \param inter_list The list of intersection points. */ @@ -1300,7 +1300,7 @@ public: } } - /*! Compute the intersections with the given arc. + /*! computes the intersections with the given arc. * \param arc The given intersecting arc. * \param inter_map Maps conic pairs to lists of their intersection points. * \param oi The output iterator. @@ -1398,7 +1398,7 @@ public: } }; - /*! Obtain an `Intersect_2` functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -1408,7 +1408,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits (in case it has state) */ Are_mergeable_2(const Traits& traits) : m_traits(traits) {} @@ -1416,7 +1416,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param xcv1 The first arc. * \param xcv2 The second arc. * \return `true` if the two curves are mergeable; that is, they are @@ -1428,7 +1428,7 @@ public: { return can_merge_with(xcv1, xcv2); } private: - /*! Check whether it is possible to merge the arc with the given arc. + /*! checks whether it is possible to merge the arc with the given arc. * \param xcv1 The first arc. * \param xcv2 The second arc. * \return `true` if it is possible to merge the two arcs; @@ -1447,7 +1447,7 @@ public: } }; - /*! Obtain an `Are_mergeable_2` functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } @@ -1461,7 +1461,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -1469,7 +1469,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Merge two given \f$x\f$-monotone curves into a single curve (segment). + /*! merges two given \f$x\f$-monotone curves into a single curve (segment). * \param xcv1 The first arc. * \param xcv2 The second arc. * \param xcv The merged arc. @@ -1485,7 +1485,7 @@ public: } private: - /*! Merge the current arc with the given arc. + /*! merges the current arc with the given arc. * \param xcv1 The first arc to merge with. * \param xcv2 The second arc to merge with. * \pre The two arcs are mergeable. @@ -1510,7 +1510,7 @@ public: } }; - /*! Obtain a `Merge_2` functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -1530,7 +1530,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_curve_length_2(const Traits& traits) : m_traits(traits) {} @@ -1538,7 +1538,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Obtain an approximation of the length of a curve. + /*! obtains an approximation of the length of a curve. * \param xcv The curve. * \return An approximation of the length of `xcv`. */ @@ -1551,7 +1551,7 @@ public: } private: - /*! Obtain the segment length. + /*! obtains the segment length. */ double segment_length(const X_monotone_curve_2& xcv) { auto min_vertex = m_traits.construct_min_vertex_2_object(); @@ -1591,7 +1591,7 @@ public: return tmp/2.0 + b_sqr*std::log((4.0*a + tmp)/b)/(8.0*a); } - /*! Obtain the parabolic arc length. + /*! obtains the parabolic arc length. */ double parabola_length(const X_monotone_curve_2& xcv) { double r_m, t_m, s_m, u_m, v_m, w_m; @@ -1648,7 +1648,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -1656,7 +1656,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -1670,12 +1670,12 @@ public: else return CGAL::to_double(p.y()); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double error, @@ -1691,7 +1691,7 @@ public: } private: - /*! Handle segments. + /*! handles segments. */ template OutputIterator approximate_segment(const X_monotone_curve_2& xcv, @@ -1710,7 +1710,7 @@ public: return oi; } - /*! Transform a point. In particular, rotate the canonical point + /*! transforms a point. In particular, rotate the canonical point * (`xc`,`yc`) by an angle, the sine and cosine of which are `sint` and * `cost`, respectively, and translate by (`cx`,`cy`). */ @@ -1722,7 +1722,7 @@ public: y = xc*sint + yc*cost + cy; } - /*! Handle ellipses. + /*! handles ellipses. * The general equation of an ellipse is: * r·𝑥^2 + s·𝑦^2 + t·𝑥·𝑦 + u·𝑥 + v·𝑦 + w = 0 * where 4·r·s−t^2 > 0 @@ -1830,7 +1830,7 @@ public: return oi; } - /*! Add either an elliptic or a hyperbilc point. + /*! adds either an elliptic or a hyperbilc point. * The arc endpoints are (`x1`, `y1`) and (`x2`, `y2`). * In our parametric representations for ellipses and hyperbolas the * following holds: @@ -1880,7 +1880,7 @@ public: return oi; } - /*! Compute the elliptic point given the parameter t and the transform + /*! computes the elliptic point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -1890,7 +1890,7 @@ public: y = b * std::sin(t); } - /*! Handle parabolas. + /*! handles parabolas. * The arc-length closed form can be found here: * https://www.vcalc.com/wiki/vCalc/Parabola+-+arc+length */ @@ -1940,7 +1940,7 @@ public: return oi; } - /*! Add either an elliptic or a hyperbilc point. + /*! adds either an elliptic or a hyperbilc point. * The arc endpoints are (`x1`, `y1`) and (`x2`, `y2`). * In our parametric representations for ellipses and hyperbolas the * following holds: @@ -1990,7 +1990,7 @@ public: return oi; } - /*! Compute the parabolic point given the parameter t and the transform + /*! computes the parabolic point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -1999,7 +1999,7 @@ public: y = 2.0*a*t; } - /*! Handle hyperbolas. + /*! handles hyperbolas. */ template OutputIterator approximate_hyperbola(const X_monotone_curve_2& xcv, @@ -2041,7 +2041,7 @@ public: return oi; } - /*! Compute the hyperbolic point given the parameter t and the transform + /*! computes the hyperbolic point given the parameter t and the transform * data, that is, the center (translation) and the sin and cos of the * rotation angle. */ @@ -2052,7 +2052,7 @@ public: } }; - /*! Obtain an `Approximate_2` functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //! Functor @@ -2062,7 +2062,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} @@ -2070,7 +2070,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Construct an \f$x\f$-monotone arc from a conic arc. + /*! constructs an \f$x\f$-monotone arc from a conic arc. * \param cv The given curve. * \pre cv is \f$x\f$-monotone. */ @@ -2081,7 +2081,7 @@ public: return xcv; } - /*! Construct an \f$x\f$-monotone arc from a conic arc. + /*! constructs an \f$x\f$-monotone arc from a conic arc. * \param xcv The given curve. * \param id The ID of the base curve. */ @@ -2092,7 +2092,7 @@ public: return xcv; } - /*! Construct an \f$x\f$-monotone sub-arc from a conic arc. + /*! constructs an \f$x\f$-monotone sub-arc from a conic arc. * \param cv The given (base) arc. * \param source The source point. * \param target The target point. @@ -2111,7 +2111,7 @@ public: return xcv; } - /*! Return an \f$x\f$-monotone curve connecting the two given endpoints. + /*! returns an \f$x\f$-monotone curve connecting the two given endpoints. * \param source The first point. * \param target The second point. * \pre `source` and `target` must not be the same. @@ -2144,7 +2144,7 @@ public: return xcv; } - /*! Construct a special segment of a given line connecting to given + /*! constructs a special segment of a given line connecting to given * endpoints. * \param a, b, c The coefficients of the supporting line (`ax + by + c = 0`). * \param source The source point. @@ -2184,7 +2184,7 @@ public: } private: - /*! Determine whether the arc is \f$x\f$-monotone. + /*! determines whether the arc is \f$x\f$-monotone. */ bool is_x_monotone(const Curve_2& cv) const { // Collect vertical tangency points. @@ -2193,7 +2193,7 @@ public: return (res == 0); } - /*! Determine whether the arc is \f$y\f$-monotone. + /*! determines whether the arc is \f$y\f$-monotone. */ bool is_y_monotone(const Curve_2& cv) const { // Collect horizontal tangency points. @@ -2204,7 +2204,7 @@ public: }; - /*! Obtain a `Construct_x_monotone_curve_2` functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const { return Construct_x_monotone_curve_2(*this); } @@ -2216,7 +2216,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Construct_curve_2(const Traits& traits) : m_traits(traits) {} @@ -2224,11 +2224,11 @@ public: friend class Arr_conic_traits_2; public: - /*! Construct an empty curve. + /*! constructs an empty curve. */ Curve_2 operator()() const { return Curve_2(); } - /*! Construct a conic arc which is the full conic: + /*! constructs a conic arc which is the full conic: * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` * \pre The conic C must be an ellipse (so `4rs - t^2 > 0`). */ @@ -2252,7 +2252,7 @@ public: return arc; } - /*! Construct a conic arc that lies on the conic: + /*! constructs a conic arc that lies on the conic: * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` * \param orient The orientation of the arc (clockwise or counterclockwise). * \param source The source point. @@ -2277,7 +2277,7 @@ public: return arc; } - /*! Construct a conic arc that is a circular arc from given three points. + /*! constructs a conic arc that is a circular arc from given three points. * \param p1 The arc source. * \param p2 A point in the interior of the arc. * \param p3 The arc target. @@ -2358,7 +2358,7 @@ public: return arc; } - /*! Construct a conic arc from given five points, specified by the + /*! constructs a conic arc from given five points, specified by the * points p1, p2, p3, p4 and p5. * \param p1 The source point of the given arc. * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5. @@ -2449,7 +2449,7 @@ public: return arc; } - /*! Construct a conic arc that lies on a conic given by its coefficients: + /*! constructs a conic arc that lies on a conic given by its coefficients: * `C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0` * The source and the target are specified by the intersection of the * conic with: @@ -2610,7 +2610,7 @@ public: return arc; } - /*! Return a segment connecting the two given endpoints. + /*! returns a segment connecting the two given endpoints. * \param source The source point. * \param target The target point. * \pre `source` and `target` must not be the same. @@ -2630,7 +2630,7 @@ public: return cv; } - /*! Construct a conic arc from a given line segment. + /*! constructs a conic arc from a given line segment. * \param seg The line segment with rational endpoints. */ Curve_2 operator()(const Rat_segment_2& seg) const { @@ -2685,7 +2685,7 @@ public: return cv; } - /*! Construct a conic arc that is a full circle. + /*! constructs a conic arc that is a full circle. * \param circ The circle with rational center and rational squared radius. */ Curve_2 operator()(const Rat_circle_2& circ) const { @@ -2720,7 +2720,7 @@ public: return cv; } - /*! Construct a conic arc that lies on a given circle: + /*! constructs a conic arc that lies on a given circle: * `C: (x - x0)^2 + (y - y0)^2 = R^2` * \param orient The orientation of the circle. * \param source The source point. @@ -2785,7 +2785,7 @@ public: } }; - /*! Obtain a `Construct_curve_2` functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } //@} @@ -2795,7 +2795,7 @@ public: class Compare_endpoints_xy_2 { public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -2805,13 +2805,13 @@ public: { return (cv.is_directed_right()) ? SMALLER : LARGER; } }; - /*! Obtain a `Compare_endpoints_xy_2` functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite \f$x\f$-monotone (with swapped source and target). + /*! constructs an opposite \f$x\f$-monotone (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -2819,7 +2819,7 @@ public: { return cv.flip(); } }; - /*! Obtain a `Construct_opposite_2` functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } @@ -2830,7 +2830,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} @@ -2838,8 +2838,7 @@ public: friend class Arr_conic_traits_2; public: - /*!\brief - * Returns a trimmed version of an cv + /*! returns a trimmed version of an cv * * \param xcv The arc * \param src the new first endpoint @@ -2870,7 +2869,7 @@ public: } private: - /*! Trim the arc given its new endpoints. + /*! trims the arc given its new endpoints. * \param ps The new source point. * \param pt The new target point. * \return The new trimmed arc. @@ -2921,7 +2920,7 @@ public: } }; - /*! Obtain a `Trim_2` functor object. */ + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } //@} @@ -2935,7 +2934,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits The traits. */ Construct_bbox_2(const Traits& traits) : m_traits(traits) {} @@ -2943,7 +2942,7 @@ public: friend class Arr_conic_traits_2; public: - /*! Obtain a bounding box for the conic arc. + /*! obtains a bounding box for the conic arc. * \return The bounding box. */ Bbox_2 operator()(const X_monotone_curve_2& xcv) const { return bbox(xcv); } @@ -3033,12 +3032,12 @@ public: } }; - /*! Obtain a `Bbox_2` functor object. */ + /*! obtains a `Bbox_2` functor object. */ Construct_bbox_2 construct_bbox_2_object() const { return Construct_bbox_2(*this); } //@} - /*! Set the properties of a conic arc (for the usage of the constructors). + /*! sets the properties of a conic arc (for the usage of the constructors). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of \f$x^2\f$, \f$y^2\f$, \f$x \cdot y\f$, \f$x\f$, \f$y\f$ * and the free coefficient resp. @@ -3144,7 +3143,7 @@ public: cv.reset_flag(Curve_2::IS_FULL_CONIC); // not a full conic } - /*! Set the properties of a conic arc that is really a full curve + /*! sets the properties of a conic arc that is really a full curve * (that is, an ellipse). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of \f$x^2\f$, \f$y^2\f$, \f$x \cdot y\f$, \f$x\f$, \f$y\f$ @@ -3201,7 +3200,7 @@ public: else cv.reset_flags(); // invalid arc } - /*! Check whether the given point lies on the supporting conic of the arc. + /*! checks whether the given point lies on the supporting conic of the arc. * \param p The query point. * \return true if p lies on the supporting conic; (false) otherwise. */ @@ -3220,7 +3219,7 @@ public: return (CGAL::sign(val) == ZERO); } - /*! Check whether the given point is between the source and the target. + /*! checks whether the given point is between the source and the target. * The point is assumed to be on the conic's boundary. * \param p The query point. * \return `true` if the point is between the two endpoints; @@ -3235,7 +3234,7 @@ public: else return is_strictly_between_endpoints(cv, p); } - /*! Check whether the given point is strictly between the source and the + /*! checks whether the given point is strictly between the source and the * target (but not any of them). * The point is assumed to be on the conic's boundary. * \param p The query point. @@ -3307,7 +3306,7 @@ public: return (orient_f(source, p, target) == RIGHT_TURN); } - /*! Build the data for hyperbolic arc, containing the characterization of the + /*! builds the data for hyperbolic arc, containing the characterization of the * hyperbolic branch the arc is placed on. */ void build_hyperbolic_arc_data(Curve_2& cv) const { @@ -3400,7 +3399,7 @@ public: CGAL_assertion(side == cv.sign_of_extra_data(target.x(), target.y())); } - /*! Find the \f$x\f$-coordinates of the underlying conic at a given + /*! finds the \f$x\f$-coordinates of the underlying conic at a given * \f$y\f$-coordinate. * \param y The \f$y\f$-coordinate. * \param xs The output \f$x\f$-coordinates. @@ -3421,7 +3420,7 @@ public: return solve_quadratic_equation(A, B, C, xs[0], xs[1]); } - /*! Find the \f$y\f$-coordinates of the underlying conic at a given + /*! finds the \f$y\f$-coordinates of the underlying conic at a given * \f$x\f$-coordinate. * \param x The \f$x\f$-coordinate. * \param ys The output \f$y\f$-coordinates. @@ -3442,7 +3441,7 @@ public: return solve_quadratic_equation(A, B, C, ys[0], ys[1]); } - /*! Solve the given quadratic equation: Ax^2 + B*x + C = 0. + /*! solves the given quadratic equation: Ax^2 + B*x + C = 0. * \param x_minus The root obtained from taking -sqrt(discriminant). * \param x_plus The root obtained from taking -sqrt(discriminant). * \return The number of disticnt solutions to the equation. @@ -3479,7 +3478,7 @@ public: return 2; } - /*! Compute a point on an arc with the same \f$x\f$-coordiante as the given + /*! computes a point on an arc with the same \f$x\f$-coordiante as the given * point. * \param p The given point. * \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc. @@ -3556,7 +3555,7 @@ public: return Point_2(p.x(), y); } - /*! Find all points on the arc with a given \f$x\f$-coordinate. + /*! finds all points on the arc with a given \f$x\f$-coordinate. * \param p A placeholder for the \f$x\f$-coordinate. * \param ps The point on the arc at `x(p)`. * \pre The vector `ps` should be allocated at the size of 2. @@ -3580,7 +3579,7 @@ public: return m; } - /*! Find all points on the arc with a given \f$y\f$-coordinate. + /*! finds all points on the arc with a given \f$y\f$-coordinate. * \param p A placeholder for the \f$y\f$-coordinate. * \param ps The point on the arc at `x(p)`. * \pre The vector `ps` should be allocated at the size of 2. @@ -3604,7 +3603,7 @@ public: return m; } - /*! Set the properties of the \f$x\f$-monotone conic arc (for the usage of the + /*! sets the properties of the \f$x\f$-monotone conic arc (for the usage of the * constructors). */ void set_x_monotone(X_monotone_curve_2& xcv) const { @@ -3704,7 +3703,7 @@ public: else if (res == SMALLER) xcv.set_flag(X_monotone_curve_2::FACING_DOWN); } - /*! Check whether the two arcs have the same supporting conic. + /*! checks whether the two arcs have the same supporting conic. * \param xcv1 The first comparedb arc. * \param xcv2 The secind compared arc. * \return `true` if the two supporting conics are the same. @@ -3764,7 +3763,7 @@ public: CGAL::compare(xcv1.w() * factor2, xcv2.w() * factor1) == EQUAL); } - /*! Check whether the given point lies on the arc. + /*! checks whether the given point lies on the arc. * \param p The query point. * \param (true) if p lies on the arc; (false) otherwise. */ @@ -3790,7 +3789,7 @@ public: return is_between_endpoints(xcv, p); } - /*! Find the vertical tangency points of the underlying conic. + /*! finds the vertical tangency points of the underlying conic. * \param ps The output points of vertical tangency. * This area must be allocated at the size of 2. * \return The number of vertical tangency points. @@ -3866,7 +3865,7 @@ public: return n; } - /*! Calculate the vertical tangency points of the arc. + /*! calculates the vertical tangency points of the arc. * \param vpts The vertical tangency points. * \pre The vpts vector should be allocated at the size of 2. * \return The number of vertical tangency points. @@ -3890,7 +3889,7 @@ public: return m; } - /*! Find the horizontal tangency points of the underlying conic. + /*! finds the horizontal tangency points of the underlying conic. * \param ps The output points of horizontal tangency. * This area must be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -3940,7 +3939,7 @@ public: return n; } - /*! Calculate the horizontal tangency points of the arc. + /*! calculates the horizontal tangency points of the arc. * \param hpts The horizontal tangency points. * \pre The hpts vector should be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -3966,7 +3965,7 @@ public: return m; } - /*! Apply the inverse of the rotation given by the sin and cosine of the + /*! applies the inverse of the rotation given by the sin and cosine of the * rotation angle to the given conic arc. */ void inverse_conic(const X_monotone_curve_2& xcv, @@ -3988,7 +3987,7 @@ public: w_m = w; } - /*! Obtain (i) the rotation that yields the given conic arc when applied + /*! obtains (i) the rotation that yields the given conic arc when applied * to the canonical arc, and (ii) the canonical arc. * \param[in] arc the given arc * \param[out] r_m the coefficients of the canonical conic. @@ -4033,7 +4032,7 @@ public: inverse_conic(xcv, cost, sint, r_m, s_m, t_m, u_m, v_m, w_m); } - /*! Inverse transform a point. In particular, inversly rotate the point + /*! inverses transform a point. In particular, inversly rotate the point * (`x`,`y`) by an angle, the sine and cosine of which are `sint` and * `cost`, respectively, and translate by (`-cx`,`-cy`). */ @@ -4045,7 +4044,7 @@ public: yc = -x*sint + y*cost - cy; } - /*! Handle parabolas. + /*! handles parabolas. * The arc-length closed form can be found here: * https://www.vcalc.com/wiki/vCalc/Parabola+-+arc+length */ @@ -4116,7 +4115,7 @@ public: // std::cout << "center: " << cx << "," << cy << std::endl; } - /*! Handle ellipses. + /*! handles ellipses. */ void approximate_ellipse(const X_monotone_curve_2& xcv, double& r_m, double& t_m, double& s_m, @@ -4194,7 +4193,7 @@ public: // std::cout << "ts,tt: " << ts << "," << tt << std::endl; } - /*! Handle hyperbolas. + /*! handles hyperbolas. */ void approximate_hyperbola(const X_monotone_curve_2& xcv, double& r_m, double& t_m, double& s_m, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index b576709ac2e..51949d4546e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -86,20 +86,20 @@ public: using Base = BaseTraits; - /*! Construct default */ + /*! constructs default */ template Arr_counting_traits_2(Args ... args) : Base(std::forward(args)...) { clear_counters(); increment(); } - /*! Disable copy constructor. */ + /*! disables copy constructor. */ Arr_counting_traits_2(const Arr_counting_traits_2&) = delete; - /*! Obtain the counter of the given operation */ + /*! obtains the counter of the given operation */ std::size_t count(Operation_id id) const { return m_counters[id]; } - /*! Print the counter associated with an operation. */ + /*! prints the counter associated with an operation. */ template OutStream& print(OutStream& os, Operation_id id) const { if (! m_exist[id]) return os; @@ -135,11 +135,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_x_2(const Base& base, std::size_t& counter) : m_object(base.compare_x_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter; return m_object(p1, p2); } }; @@ -152,11 +152,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_xy_2(const Base& base, std::size_t& counter) : m_object(base.compare_xy_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter; return m_object(p1, p2); } }; @@ -168,11 +168,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Construct_min_vertex_2(const Base& base, std::size_t& counter) : m_object(base.construct_min_vertex_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ using Subcurve_ctr_minv = typename Base::Construct_min_vertex_2; decltype(std::declval(). operator()(std::declval())) @@ -187,11 +187,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Construct_max_vertex_2(const Base& base, std::size_t& counter) : m_object(base.construct_max_vertex_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ using Subcurve_ctr_maxv = typename Base::Construct_max_vertex_2; decltype(std::declval(). operator()(std::declval())) @@ -199,18 +199,19 @@ public: { ++m_counter; return m_object(xcv); } }; - /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. */ + /*! A functor that checks whether a given \f$x\f$-monotone curve is vertical. + */ class Is_vertical_2 { private: typename Base::Is_vertical_2 m_object; std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Is_vertical_2(const Base& base, std::size_t& counter) : m_object(base.is_vertical_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc) const { ++m_counter; return m_object(xc); } }; @@ -224,11 +225,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_y_at_x_2(const Base& base, std::size_t& counter) : m_object(base.compare_y_at_x_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xc) const { ++m_counter; return m_object(p, xc); } @@ -244,17 +245,17 @@ public: std::size_t& m_counter2; public: - /*! Construct */ + /*! constructs */ Equal_2(const Base& base, std::size_t& counter1, std::size_t& counter2) : m_object(base.equal_2_object()), m_counter1(counter1), m_counter2(counter2) {} - /*! Operate */ + /*! operates */ bool operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter1; return m_object(p1, p2); } - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2) const { ++m_counter2; return m_object(xc1, xc2); } @@ -270,11 +271,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_y_at_x_left_2(const Base& base, std::size_t& counter) : m_object(base.compare_y_at_x_left_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, const Point_2& p) const @@ -291,11 +292,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_y_at_x_right_2(const Base& base, std::size_t& counter) : m_object(base.compare_y_at_x_right_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, const Point_2& p) const @@ -311,7 +312,7 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Make_x_monotone_2(const Base& base, std::size_t& counter) : m_object(base.make_x_monotone_2_object()), m_counter(counter) {} @@ -334,11 +335,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Split_2(const Base& base, std::size_t& counter) : m_object(base.split_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ void operator()(const X_monotone_curve_2& xc, const Point_2& p, X_monotone_curve_2& xc1, X_monotone_curve_2& xc2) const { ++m_counter; m_object(xc, p, xc1, xc2); } @@ -351,11 +352,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Intersect_2(const Base& base, std::size_t& counter) : m_object(base.intersect_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ template OutputIterator operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, @@ -370,11 +371,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Are_mergeable_2(const Base& base, std::size_t& counter) : m_object(base.are_mergeable_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2) const { ++m_counter; return m_object(xc1, xc2); } @@ -387,11 +388,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Merge_2(const Base& base, std::size_t& counter) : m_object(base.merge_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ void operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, X_monotone_curve_2& xc) const @@ -405,11 +406,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Construct_opposite_2(const Base& base, std::size_t& counter) : m_object(base.construct_opposite_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xc) { ++m_counter; return m_object(xc); } }; @@ -423,11 +424,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_endpoints_xy_2(const Base& base, std::size_t& counter) : m_object(base.compare_endpoints_xy_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc) { ++m_counter; return m_object(xc); } }; @@ -446,7 +447,7 @@ public: std::size_t& m_counter3; public: - /*! Construct */ + /*! constructs */ Approximate_2(const Base& base, std::size_t& counter1, std::size_t& counter2, std::size_t& counter3) : m_object(base.approximate_2_object()), @@ -455,8 +456,7 @@ public: m_counter3(counter3) {} - /*! Operate */ - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -466,12 +466,12 @@ public: Approximate_number_type operator()(const Point_2& p, std::size_t i) const { ++m_counter1; return m_object(p, i); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { ++m_counter2; return m_object(p); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double error, @@ -491,7 +491,7 @@ public: std::size_t& m_counter2; public: - /*! Construct */ + /*! constructs */ Parameter_space_in_x_2(const Base& base, std::size_t& counter1, std::size_t& counter2) : m_object(base.parameter_space_in_x_2_object()), @@ -499,13 +499,13 @@ public: m_counter2(counter2) {} - /*! Operate */ + /*! operates */ Arr_parameter_space operator()(const X_monotone_curve_2& xc, Arr_curve_end ce) const { ++m_counter1; return m_object(xc, ce); } - /*! Operate */ + /*! operates */ Arr_parameter_space operator()(const Point_2& p) const { ++m_counter2; return m_object(p); } }; @@ -520,7 +520,7 @@ public: std::size_t& m_counter2; public: - /*! Construct */ + /*! constructs */ Is_on_x_identification_2(const Base& base, std::size_t& counter1, std::size_t& counter2) : m_object(base.is_on_x_identification_2_object()), @@ -528,11 +528,11 @@ public: m_counter2(counter2) {} - /*! Operate */ + /*! operates */ bool operator()(const Point_2& p) const { ++m_counter1; return m_object(p); } - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc) const { ++m_counter2; return m_object(xc); } }; @@ -546,11 +546,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_y_on_boundary_2(const Base& base, std::size_t& counter) : m_object(base.compare_y_on_boundary_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter; return m_object(p1, p2); } }; @@ -564,11 +564,11 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_y_near_boundary_2(const Base& base, std::size_t& counter) : m_object(base.compare_y_near_boundary_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, Arr_curve_end ce) const @@ -587,7 +587,7 @@ public: std::size_t& m_counter2; public: - /*! Construct */ + /*! constructs */ Parameter_space_in_y_2(const Base& base, std::size_t& counter1, std::size_t& counter2) : m_object(base.parameter_space_in_y_2_object()), @@ -595,12 +595,12 @@ public: m_counter2(counter2) {} - /*! Operate */ + /*! operates */ Arr_parameter_space operator()(const X_monotone_curve_2& xc, Arr_curve_end ce) const { ++m_counter1; return m_object(xc, ce); } - /*! Operate */ + /*! operates */ Arr_parameter_space operator()(const Point_2& p) const { ++m_counter2; return m_object(p); } }; @@ -615,7 +615,7 @@ public: std::size_t& m_counter2; public: - /*! Construct */ + /*! constructs */ Is_on_y_identification_2(const Base& base, std::size_t& counter1, std::size_t& counter2) : m_object(base.is_on_y_identification_2_object()), @@ -623,12 +623,12 @@ public: m_counter2(counter2) {} - /*! Operate */ + /*! operates */ bool operator()(const Point_2& p) const { ++m_counter1; return m_object(p); } - /*! Operate */ + /*! operates */ bool operator()(const X_monotone_curve_2& xc) const { ++m_counter2; return m_object(xc); } }; @@ -644,7 +644,7 @@ public: std::size_t& m_counter3; public: - /*! Construct */ + /*! constructs */ Compare_x_on_boundary_2(const Base& base, std::size_t& counter1, std::size_t& counter2, std::size_t& counter3 ) : m_object(base.compare_x_on_boundary_2_object()), @@ -653,17 +653,17 @@ public: m_counter3(counter3) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { ++m_counter1; return m_object(p1, p2); } - /*! Operate */ + /*! operates */ Comparison_result operator()(const Point_2& pt, const X_monotone_curve_2& xcv, Arr_curve_end ce) const { ++m_counter2; return m_object(pt, xcv, ce); } - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1, const X_monotone_curve_2& xcv2, @@ -680,13 +680,13 @@ public: std::size_t& m_counter; public: - /*! Construct */ + /*! constructs */ Compare_x_near_boundary_2(const Base& base, std::size_t& counter) : m_object(base.compare_x_near_boundary_2_object()), m_counter(counter) {} - /*! Operate */ + /*! operates */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, Arr_curve_end ce) const @@ -805,7 +805,7 @@ public: //@} - /*! Increment the construction counter. + /*! increments the construction counter. * \param doit indicates whethet to actually inceremnt the counter or not. * \return the counter at the end of the operation. */ @@ -819,11 +819,11 @@ public: return counter; } - /*! Clean all operation counters */ + /*! cleans all operation counters */ void clear_counters() { m_counters = {}; } private: - /*! The operation counters */ + //! The operation counters mutable std::array m_counters; const std::array m_names = { "COMPARE_X_2_OP", @@ -916,7 +916,7 @@ inline OutStream& operator<<(OutStream& os, return os; } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h index 1a62b9227c5..6fd985e1e94 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h @@ -92,10 +92,10 @@ public: /// \name Construction. //@{ - /*! Construct default. */ + /*! constructs default. */ Arr_curve_data_traits_2() {} - /*! Construct from a base-traits class. */ + /*! constructs from a base-traits class. */ Arr_curve_data_traits_2(const Base_traits_2& traits) : Base_traits_2(traits) {} //@} @@ -113,10 +113,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Make_x_monotone_2(const Base_traits_2& base) : m_base(base) {} - /*! Subdivide a given curve into x-monotone subcurves and insert them into + /*! subdivides a given curve into x-monotone subcurves and insert them into * a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its value type is a variant @@ -152,7 +152,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a Make_x_monotone_2 functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -161,10 +161,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Split_2(const Base_traits_2& base) : m_base(base) {} - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv[in] The curve to split * \param p[in] The split point. * \param c1[out] The left resulting subcurve (p is its right endpoint). @@ -183,7 +183,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -191,10 +191,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Intersect_2(const Base_traits_2& base) : m_base(base) {} - /*! Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first curve. @@ -240,7 +240,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -288,10 +288,10 @@ public: } public: - /*! Constructor. */ + /*! constructs. */ Are_mergeable_2(const Base_traits_2& base) : m_base(base) {} - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1[in] The first curve. * \param cv2[in] The second curve. * \return (true) if the two curves are mergeable; (false) otherwise. @@ -301,7 +301,7 @@ public: { return are_mergeable(cv1, cv2, m_base, 0); } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an Are_mergeable_2 functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } @@ -312,7 +312,7 @@ public: private: const Base_traits_2& m_base; - /*! Generate a helper class template to find out whether the base geometry + /*! generates a helper class template to find out whether the base geometry * traits has a nested type named Merge_2. */ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_merge_2, Are_mergeable_2, false) @@ -348,10 +348,10 @@ public: { CGAL_error_msg("Merging curves is not supported."); } public: - /*! Constructor. */ + /*! constructs. */ Merge_2(const Base_traits_2& base) : m_base(base) {} - /*! Merge two given x-monotone curves into a single curve (segment). + /*! merges two given x-monotone curves into a single curve (segment). * \param[in] cv1 The first curve. * \param[in] cv2 The second curve. * \param[out] c The merged curve. @@ -363,7 +363,7 @@ public: { merge(cv1, cv2, c); } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -373,10 +373,10 @@ public: const Base_traits_2& m_base; public: - /*! Constructor. */ + /*! constructs. */ Construct_x_monotone_curve_2(const Base_traits_2& base) : m_base(base) {} - /*! Obtain an x-monotone curve connecting the two given endpoints. + /*! obtains an x-monotone curve connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. @@ -390,7 +390,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -398,7 +398,7 @@ public: private: const Base_traits_2& m_base; - /*! Generate a helper class template to find out whether the base geometry + /*! generates a helper class template to find out whether the base geometry * traits has a nested type named Construct_opposite_2. */ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_construct_opposite_2, @@ -431,10 +431,10 @@ public: } public: - /*! Constructor. */ + /*! constructs. */ Construct_opposite_2(const Base_traits_2& base) : m_base(base) {} - /*! Construct an opposite x-monotone (with swapped source and target). + /*! constructs an opposite x-monotone (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -442,7 +442,7 @@ public: { return construct_opposite(cv); } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(*this); } //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index b0627f38eae..f38156da2af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -82,13 +82,13 @@ protected: char pss[2]; // The x and y parameter spaces (condensed in two bytes). public: - /*! Default constructor. */ + /*! constructs default. */ Arr_vertex_base() : p_inc(nullptr), p_pt(nullptr) { pss[0] = pss[1] = static_cast(CGAL::ARR_INTERIOR); } - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_vertex_base() {} // Access/modification for pointer squatting @@ -96,35 +96,35 @@ public: void set_inc(void * inc) const { const_cast(*this).p_inc = inc; } - /*! Check if the point pointer is nullptr. */ + /*! checks if the point pointer is nullptr. */ bool has_null_point() const { return (p_pt == nullptr); } - /*! Obtain the point (const version). */ + /*! obtains the point (const version). */ const Point& point() const { CGAL_assertion(p_pt != nullptr); return (*p_pt); } - /*! Obtain the point (non-const version). */ + /*! obtains the point (non-const version). */ Point& point() { CGAL_assertion(p_pt != nullptr); return (*p_pt); } - /*! Set the point (may be a nullptr point). */ + /*! sets the point (may be a nullptr point). */ void set_point(Point* p) { p_pt = p; } - /*! Obtain the boundary type in x. */ + /*! obtains the boundary type in x. */ Arr_parameter_space parameter_space_in_x() const { return (Arr_parameter_space(pss[0])); } - /*! Obtain the boundary type in y. */ + /*! obtains the boundary type in y. */ Arr_parameter_space parameter_space_in_y() const { return (Arr_parameter_space(pss[1])); } - /*! Set the boundary conditions of the vertex. */ + /*! sets the boundary conditions of the vertex. */ void set_boundary(Arr_parameter_space ps_x, Arr_parameter_space ps_y) { pss[0] = static_cast(ps_x); @@ -132,7 +132,7 @@ public: return; } - /*! Assign from another vertex. */ + /*! assigns from another vertex. */ virtual void assign(const Arr_vertex_base& v) { p_pt = v.p_pt; @@ -170,7 +170,7 @@ protected: X_monotone_curve* p_cv; // The associated x-monotone curve. public: - /*! Default constructor */ + /*! constructs default */ Arr_halfedge_base() : p_opp(nullptr), p_prev(nullptr), @@ -180,27 +180,27 @@ public: p_cv(nullptr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_halfedge_base() {} - /*! Check if the curve pointer is nullptr. */ + /*! checks if the curve pointer is nullptr. */ bool has_null_curve() const { return (p_cv == nullptr); } - /*! Obtain the x-monotone curve (const version). */ + /*! obtains the x-monotone curve (const version). */ const X_monotone_curve& curve() const { CGAL_precondition(p_cv != nullptr); return (*p_cv); } - /*! Obtain the x-monotone curve (non-const version). */ + /*! obtains the x-monotone curve (non-const version). */ X_monotone_curve& curve() { CGAL_precondition(p_cv != nullptr); return (*p_cv); } - /*! Set the x-monotone curve. */ + /*! sets the x-monotone curve. */ void set_curve(X_monotone_curve* c) { p_cv = c; @@ -212,13 +212,12 @@ public: opp->p_cv = c; } - /*! Assign from another halfedge. */ + /*! assigns from another halfedge. */ virtual void assign(const Arr_halfedge_base& he) { p_cv = he.p_cv; } }; -/*! - * Base face class. +/*! Base face class. */ class Arr_face_base { @@ -248,27 +247,27 @@ protected: Isolated_vertices_container iso_verts; // The isolated vertices inside // the face. public: - /*! Default constructor. */ + /*! constructs default. */ Arr_face_base() : flags(0) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_face_base() {} - /*! Check if the face is unbounded. */ + /*! checks if the face is unbounded. */ bool is_unbounded() const { return ((flags & IS_UNBOUNDED) != 0); } - /*! Set the face as bounded or unbounded. */ + /*! sets the face as bounded or unbounded. */ void set_unbounded(bool unbounded) { flags = (unbounded) ? (flags | IS_UNBOUNDED) : (flags & ~IS_UNBOUNDED); } - /*! Check if the face is fictitious. */ + /*! checks if the face is fictitious. */ bool is_fictitious() const { return ((flags & IS_FICTITIOUS) != 0); } - /*! Set the face as fictitious or valid. */ + /*! sets the face as fictitious or valid. */ void set_fictitious(bool fictitious) { flags = (fictitious) ? (flags | IS_FICTITIOUS) : (flags & ~IS_FICTITIOUS); } - /*! Assign from another face. */ + /*! assigns from another face. */ virtual void assign(const Arr_face_base& f) { flags = f.flags; } }; @@ -293,38 +292,38 @@ public: typedef Arr_halfedge Halfedge; typedef Arr_isolated_vertex Isolated_vertex; - /*! Default constructor. */ + /*! constructs default. */ Arr_vertex() {} - /*! Check if the vertex is isolated. */ + /*! checks if the vertex is isolated. */ bool is_isolated() const { // Note that we use the LSB of the p_inc pointer as a Boolean flag. return (_is_lsb_set(this->p_inc)); } - /*! Obtain an incident halfedge (const version). */ + /*! obtains an incident halfedge (const version). */ const Halfedge* halfedge() const { CGAL_precondition(! is_isolated()); return (reinterpret_cast(this->p_inc)); } - /*! Obtain an incident halfedge (non-const version). */ + /*! obtains an incident halfedge (non-const version). */ Halfedge* halfedge() { CGAL_precondition(! is_isolated()); return (reinterpret_cast(this->p_inc)); } - /*! Set an incident halfedge (for non-isolated vertices). */ + /*! sets an incident halfedge (for non-isolated vertices). */ void set_halfedge(Halfedge* he) { // Set the halfedge pointer and reset the LSB. this->p_inc = he; } - /*! Obtain the isolated vertex information (const version). */ + /*! obtains the isolated vertex information (const version). */ const Isolated_vertex* isolated_vertex() const { CGAL_precondition(is_isolated()); @@ -332,14 +331,14 @@ public: (this->p_inc))); } - /*! Obtain the isolated vertex information (non-const version). */ + /*! obtains the isolated vertex information (non-const version). */ Isolated_vertex* isolated_vertex() { CGAL_precondition(is_isolated()); return (reinterpret_cast(_clean_pointer(this->p_inc))); } - /*! Set the isolated vertex information. */ + /*! sets the isolated vertex information. */ void set_isolated_vertex(Isolated_vertex* iv) { // Set the isolated vertex-information pointer and set its LSB. @@ -362,20 +361,20 @@ public: typedef Arr_outer_ccb Outer_ccb; typedef Arr_inner_ccb Inner_ccb; - /*! Default constructor. */ + /*! constructs default. */ Arr_halfedge() {} - /*! Obtain the opposite halfedge (const version). */ + /*! obtains the opposite halfedge (const version). */ const Halfedge* opposite () const { return (reinterpret_cast(this->p_opp)); } - /*! Obtain the opposite halfedge (non-const version). */ + /*! obtains the opposite halfedge (non-const version). */ Halfedge* opposite() { return (reinterpret_cast(this->p_opp)); } /*! Sets the opposite halfedge. */ void set_opposite(Halfedge* he) { this->p_opp = he; } - /*! Obtain the direction of the halfedge. */ + /*! obtains the direction of the halfedge. */ Arr_halfedge_direction direction() const { // Note that we use the LSB of the p_v pointer as a Boolean flag. @@ -383,7 +382,7 @@ public: else return (ARR_RIGHT_TO_LEFT); } - /*! Set the direction of the edge (and of its opposite halfedge). */ + /*! sets the direction of the edge (and of its opposite halfedge). */ void set_direction(Arr_halfedge_direction dir) { Halfedge* opp = reinterpret_cast(this->p_opp); @@ -398,43 +397,43 @@ public: } } - /*! Obtain the previous halfedge along the chain (const version). */ + /*! obtains the previous halfedge along the chain (const version). */ const Halfedge* prev() const { return (reinterpret_cast(this->p_prev)); } - /*! Obtain the previous halfedge along the chain (const version). */ + /*! obtains the previous halfedge along the chain (const version). */ Halfedge* prev() { return (reinterpret_cast(this->p_prev)); } - /*! Set the previous halfedge along the chain. */ + /*! sets the previous halfedge along the chain. */ void set_prev(Halfedge* he) { this->p_prev = he; he->p_next = this; } - /*! Obtain the next halfedge along the chain (const version). */ + /*! obtains the next halfedge along the chain (const version). */ const Halfedge* next() const { return (reinterpret_cast(this->p_next)); } - /*! Obtain the next halfedge along the chain (const version). */ + /*! obtains the next halfedge along the chain (const version). */ Halfedge* next() { return (reinterpret_cast(this->p_next)); } - /*! Set the next halfedge along the chain. */ + /*! sets the next halfedge along the chain. */ void set_next(Halfedge* he) { this->p_next = he; he->p_prev = this; } - /*! Obtain the target vertex (const version). */ + /*! obtains the target vertex (const version). */ const Vertex* vertex() const { return (reinterpret_cast(_clean_pointer(this->p_v))); } - /*! Obtain the target vertex (non-const version). */ + /*! obtains the target vertex (non-const version). */ Vertex* vertex() { return (reinterpret_cast(_clean_pointer(this->p_v))); } - /*! Set the target vertex. */ + /*! sets the target vertex. */ void set_vertex(Vertex* v) { // Set the vertex pointer, preserving the content of the LSB. @@ -442,10 +441,10 @@ public: else this->p_v = v; } - /*! Check whether the halfedge lies on the boundary of an outer CCB. */ + /*! checks whether the halfedge lies on the boundary of an outer CCB. */ bool is_on_outer_ccb() const { return (!_is_lsb_set(this->p_comp)); } - /*! Obtain an incident outer CCB (const version). + /*! obtains an incident outer CCB (const version). * \pre The edge does not lie on an inner CCB. */ const Outer_ccb* outer_ccb() const @@ -454,7 +453,7 @@ public: return (reinterpret_cast(this->p_comp)); } - /*! Obtain an incident outer CCB (non-const version). + /*! obtains an incident outer CCB (non-const version). * \pre The edge does not lie on an inner CCB. */ Outer_ccb* outer_ccb() @@ -463,17 +462,17 @@ public: return (reinterpret_cast(this->p_comp)); } - /*! Set the incident outer CCB. */ + /*! sets the incident outer CCB. */ void set_outer_ccb(Outer_ccb *oc) { // Set the component pointer and reset its LSB. this->p_comp = oc; } - /*! Check whether the halfedge lies on the boundary of an inner CCB. */ + /*! checks whether the halfedge lies on the boundary of an inner CCB. */ bool is_on_inner_ccb() const { return (_is_lsb_set(this->p_comp)); } - /*! Obtain an incident inner CCB (const version). + /*! obtains an incident inner CCB (const version). * \pre The edge lies on an inner CCB. */ const Inner_ccb* inner_ccb() const @@ -493,7 +492,7 @@ public: return valid; } - /*! Obtain an incident inner CCB (non-const version). + /*! obtains an incident inner CCB (non-const version). * \pre The edge lies on an inner CCB. */ Inner_ccb* inner_ccb() @@ -519,7 +518,7 @@ public: return reinterpret_cast(_clean_pointer(this->p_comp)); } - /*! Set the incident inner CCB. */ + /*! sets the incident inner CCB. */ void set_inner_ccb(const Inner_ccb *ic) { // Set the component pointer and set its LSB. @@ -553,7 +552,7 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ Arr_face() {} @@ -565,20 +564,20 @@ public: _Const_ccb_to_halfedge_cast> Outer_ccb_const_iterator; - /*! Obtain the number of outer CCBs the face has. */ + /*! obtains the number of outer CCBs the face has. */ size_t number_of_outer_ccbs() const { return (this->outer_ccbs.size()); } - /*! Obtain an iterator for the first outer CCB of the face. */ + /*! obtains an iterator for the first outer CCB of the face. */ Outer_ccb_iterator outer_ccbs_begin() { return (this->outer_ccbs.begin()); } - /*! Obtain a past-the-end iterator for the outer CCBs inside the face. */ + /*! obtains a past-the-end iterator for the outer CCBs inside the face. */ Outer_ccb_iterator outer_ccbs_end() { return (this->outer_ccbs.end()); } - /*! Obtain an const iterator for the first outer CCB inside the face. */ + /*! obtains an const iterator for the first outer CCB inside the face. */ Outer_ccb_const_iterator outer_ccbs_begin() const { return (this->outer_ccbs.begin()); } - /*! Obtain a const past-the-end iterator for the outer CCBs inside the face. */ + /*! obtains a const past-the-end iterator for the outer CCBs inside the face. */ Outer_ccb_const_iterator outer_ccbs_end() const { return (this->outer_ccbs.end()); } @@ -601,20 +600,20 @@ public: typedef Inner_ccb_iterator Hole_iterator; typedef Inner_ccb_const_iterator Hole_const_iterator; - /*! Obtain the number of inner CCBs the face has. */ + /*! obtains the number of inner CCBs the face has. */ size_t number_of_inner_ccbs() const { return (this->inner_ccbs.size()); } - /*! Obtain an iterator for the first inner CCB of the face. */ + /*! obtains an iterator for the first inner CCB of the face. */ Inner_ccb_iterator inner_ccbs_begin() { return (this->inner_ccbs.begin()); } - /*! Obtain a past-the-end iterator for the inner CCBs inside the face. */ + /*! obtains a past-the-end iterator for the inner CCBs inside the face. */ Inner_ccb_iterator inner_ccbs_end() { return (this->inner_ccbs.end()); } - /*! Obtain an const iterator for the first inner CCB inside the face. */ + /*! obtains an const iterator for the first inner CCB inside the face. */ Inner_ccb_const_iterator inner_ccbs_begin() const { return (this->inner_ccbs.begin()); } - /*! Obtain a const past-the-end iterator for the inner CCBs inside the face. */ + /*! obtains a const past-the-end iterator for the inner CCBs inside the face. */ Inner_ccb_const_iterator inner_ccbs_end() const { return (this->inner_ccbs.end()); } @@ -669,23 +668,23 @@ public: typename F::Isolated_vertex_iterator::iterator_category> Isolated_vertex_const_iterator; - /*! Obtain the number of isloated vertices inside the face. */ + /*! obtains the number of isloated vertices inside the face. */ size_t number_of_isolated_vertices() const { return (this->iso_verts.size()); } - /*! Obtain an iterator for the first isloated vertex inside the face. */ + /*! obtains an iterator for the first isloated vertex inside the face. */ Isolated_vertex_iterator isolated_vertices_begin() { return (this->iso_verts.begin()); } - /*! Obtain a past-the-end iterator for the isloated vertices inside the face. */ + /*! obtains a past-the-end iterator for the isloated vertices inside the face. */ Isolated_vertex_iterator isolated_vertices_end() { return (this->iso_verts.end()); } - /*! Obtain an const iterator for the first isloated vertex inside the face. */ + /*! obtains an const iterator for the first isloated vertex inside the face. */ Isolated_vertex_const_iterator isolated_vertices_begin() const { return (this->iso_verts.begin()); } - /*! Obtain a const past-the-end iterator for the isloated vertices inside the + /*! obtains a const past-the-end iterator for the isloated vertices inside the * face. */ Isolated_vertex_const_iterator isolated_vertices_end() const { return (this->iso_verts.end()); } @@ -736,47 +735,47 @@ private: bool iter_is_not_singular; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_outer_ccb() : p_f(nullptr), iter_is_not_singular(false) {} - /*! Copy constructor. */ + /*! constructs copy. */ Arr_outer_ccb(const Arr_outer_ccb& other) : p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular) { if (other.iter_is_not_singular) iter = other.iter; } - /*! Obtain a halfedge along the component (const version). */ + /*! obtains a halfedge along the component (const version). */ const Halfedge* halfedge() const { return (*iter); } - /*! Obtain a halfedge along the component (non-const version). */ + /*! obtains a halfedge along the component (non-const version). */ Halfedge* halfedge() { return (*iter); } - /*! Set a representative halfedge for the component. */ + /*! sets a representative halfedge for the component. */ void set_halfedge(Halfedge* he) { *iter = he; } - /*! Obtain the incident face (const version). */ + /*! obtains the incident face (const version). */ const Face* face() const { return (p_f); } - /*! Obtain the incident face (non-const version). */ + /*! obtains the incident face (non-const version). */ Face* face() { return (p_f); } - /*! Set the incident face. */ + /*! sets the incident face. */ void set_face(Face* f) { p_f = f; } - /*! Obtain the iterator (const version). */ + /*! obtains the iterator (const version). */ Outer_ccb_iterator iterator() const { CGAL_assertion(iter_is_not_singular); return (iter); } - /*! Obtain the iterator (non-const version). */ + /*! obtains the iterator (non-const version). */ Outer_ccb_iterator iterator() { CGAL_assertion(iter_is_not_singular); return (iter); } - /*! Set the outer CCB iterator. */ + /*! sets the outer CCB iterator. */ void set_iterator(Outer_ccb_iterator it) { iter = it; @@ -813,71 +812,71 @@ private: } status; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_inner_ccb() : status(ITER_IS_SINGULAR) { f_or_icc.f = nullptr; } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_inner_ccb(const Arr_inner_ccb& other) : f_or_icc(other.f_or_icc), status(other.status) { if (other.status == ITER_IS_NOT_SINGULAR) iter = other.iter; } - /*! Obtain a halfedge along the component (const version). */ + /*! obtains a halfedge along the component (const version). */ const Halfedge* halfedge() const { CGAL_assertion(is_valid()); return (*iter); } - /*! Obtain a halfedge along the component (non-const version). */ + /*! obtains a halfedge along the component (non-const version). */ Halfedge* halfedge() { CGAL_assertion(is_valid()); return (*iter); } - /*! Set a representative halfedge for the component. */ + /*! sets a representative halfedge for the component. */ void set_halfedge(Halfedge *he) { CGAL_assertion(is_valid()); *iter = he; } - /*! Obtain the incident face (const version). */ + /*! obtains the incident face (const version). */ const Face* face() const { CGAL_assertion(status != INVALID); return f_or_icc.f; } - /*! Obtain the incident face (non-const version). */ + /*! obtains the incident face (non-const version). */ Face* face() { CGAL_assertion(status != INVALID); return f_or_icc.f; } - /*! Set the incident face. */ + /*! sets the incident face. */ void set_face(Face* f) { CGAL_assertion(status != INVALID); f_or_icc.f = f; } - /*! Obtain the iterator (const version). */ + /*! obtains the iterator (const version). */ Inner_ccb_iterator iterator() const { CGAL_assertion(status == ITER_IS_NOT_SINGULAR); return (iter); } - /*! Obtain the iterator (non-const version). */ + /*! obtains the iterator (non-const version). */ Inner_ccb_iterator iterator() { CGAL_assertion(status == ITER_IS_NOT_SINGULAR); return (iter); } - /*! Set the inner CCB iterator. */ + /*! sets the inner CCB iterator. */ void set_iterator(Inner_ccb_iterator it) { CGAL_assertion(is_valid()); @@ -885,17 +884,17 @@ public: status = ITER_IS_NOT_SINGULAR; } - /*! Check validity */ + /*! checks validity */ bool is_valid() const { return (status != INVALID); } - /*! Obtain the next CCB to primary chain. */ + /*! obtains the next CCB to primary chain. */ Arr_inner_ccb* next() const { CGAL_assertion(status == INVALID); return f_or_icc.icc; } - /*! Set the next CCB to primary chain. */ + /*! sets the next CCB to primary chain. */ void set_next(Arr_inner_ccb* next) { status = INVALID; @@ -921,38 +920,38 @@ private: bool iter_is_not_singular; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_isolated_vertex() : p_f(nullptr), iter_is_not_singular(false) {} - /*! Copy constructor. */ + /*! constructs copy. */ Arr_isolated_vertex(const Arr_isolated_vertex& other) : p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular) { if (other.iter_is_not_singular) iv_it = other.iv_it; } - /*! Obtain the containing face (const version). */ + /*! obtains the containing face (const version). */ const Face* face() const { return (p_f); } - /*! Obtain the containing face (non-const version). */ + /*! obtains the containing face (non-const version). */ Face* face() { return (p_f); } - /*! Set the incident face, the one that contains the isolated vertex. */ + /*! sets the incident face, the one that contains the isolated vertex. */ void set_face(Face* f) { p_f = f; } - /*! Obtain the isolated vertex iterator (const version). */ + /*! obtains the isolated vertex iterator (const version). */ Isolated_vertex_iterator iterator() const { CGAL_assertion(iter_is_not_singular); return (iv_it); } - /*! Obtain the isolated vertex iterator (non-const version). */ + /*! obtains the isolated vertex iterator (non-const version). */ Isolated_vertex_iterator iterator() { CGAL_assertion(iter_is_not_singular); return (iv_it); } - /*! Set the isolated vertex iterator. */ + /*! sets the isolated vertex iterator. */ void set_iterator(Isolated_vertex_iterator iv) { iv_it = iv; @@ -1035,40 +1034,40 @@ public: Edge_const_iterator; private: - // Copy constructor - not supported. + // Copy constructor not supported. Arr_dcel_base(const Self&); - // Assignment operator - not supported. + // Assignment operator not supported. Self& operator=(const Self&); public: /// \name Construction and destruction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_dcel_base() {} - /*! Destructor. */ + /*! destructs. */ ~Arr_dcel_base() { delete_all(); } //@} /// \name The DCEL size. //@{ - /*! Obtain the number of DCEL vertices. */ + /*! obtains the number of DCEL vertices. */ Size size_of_vertices() const { return (vertices.size()); } - /*! Obtain the number of DCEL halfedges (twice the number of edges). */ + /*! obtains the number of DCEL halfedges (twice the number of edges). */ Size size_of_halfedges() const { return (halfedges.size()); } - /*! Obtain the number of DCEL faces. */ + /*! obtains the number of DCEL faces. */ Size size_of_faces() const { return (faces.size()); } - /*! Obtain the number of outer CCBs. */ + /*! obtains the number of outer CCBs. */ Size size_of_outer_ccbs() const { return (out_ccbs.size()); } - /*! Obtain the number of inner CCBs. */ + /*! obtains the number of inner CCBs. */ Size size_of_inner_ccbs() const { return (in_ccbs.size()); } - /*! Obtain the number of isolated vertices. */ + /*! obtains the number of isolated vertices. */ Size size_of_isolated_vertices() const { return (iso_verts.size()); } //@} @@ -1141,7 +1140,7 @@ public: // \name Creation of new DCEL features. //@{ - /*! Create a new vertex. */ + /*! creates a new vertex. */ Vertex* new_vertex() { Vertex* v = vertex_alloc.allocate(1); @@ -1150,7 +1149,7 @@ public: return v; } - /*! Create a new pair of opposite halfedges. */ + /*! creates a new pair of opposite halfedges. */ Halfedge* new_edge() { // Create two new halfedges. @@ -1164,7 +1163,7 @@ public: return (h1); } - /*! Create a new face. */ + /*! creates a new face. */ Face* new_face() { Face* f = face_alloc.allocate(1); @@ -1173,7 +1172,7 @@ public: return(f); } - /*! Create a new outer CCB. */ + /*! creates a new outer CCB. */ Outer_ccb* new_outer_ccb() { Outer_ccb* oc = out_ccb_alloc.allocate(1); @@ -1182,7 +1181,7 @@ public: return (oc); } - /*! Create a new inner CCB. */ + /*! creates a new inner CCB. */ Inner_ccb* new_inner_ccb() { Inner_ccb* ic = in_ccb_alloc.allocate(1); @@ -1191,7 +1190,7 @@ public: return (ic); } - /*! Create a new isolated vertex. */ + /*! creates a new isolated vertex. */ Isolated_vertex* new_isolated_vertex() { Isolated_vertex* iv = iso_vert_alloc.allocate(1); @@ -1304,7 +1303,7 @@ public: } //@} - /*! Assign our DCEL the contents of another DCEL. + /*! assigns our DCEL the contents of another DCEL. */ void assign(const Self& dcel) { @@ -1504,7 +1503,7 @@ public: } protected: - /*! Create a new halfedge. */ + /*! creates a new halfedge. */ Halfedge* _new_halfedge() { Halfedge* h = halfedge_alloc.allocate(1); @@ -1513,7 +1512,7 @@ protected: return (h); } - /*! Delete an existing halfedge. */ + /*! deletes an existing halfedge. */ void _delete_halfedge(Halfedge* h) { halfedges.erase(h); @@ -1522,7 +1521,7 @@ protected: } }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h index 86895503ff4..48de8ad5792 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h @@ -39,7 +39,7 @@ public: typedef typename Base::Segment_assertions Segment_assertions; typedef typename Base::Has_exact_division Has_exact_division; - /*! Default constructor. */ + /*! constructs default. */ Arr_directional_non_caching_segment_basic_traits_2() : Base() {} /// \name Types and functors inherited from the base, required by the @@ -103,7 +103,7 @@ public: //@{ typedef typename Kernel::Construct_opposite_segment_2 Construct_opposite_2; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } @@ -114,7 +114,7 @@ public: /*! The traits (in case it has state). */ const Traits& m_traits; - /*! Constructor + /*! Constructs * \param traits the traits (in case it has state). */ Compare_endpoints_xy_2(const Traits& traits) : m_traits(traits) {} @@ -122,7 +122,7 @@ public: friend class Arr_directional_non_caching_segment_basic_traits_2; public: - /*! Compare the two endpoints of a given curve lexigoraphically. + /*! compares the two endpoints of a given curve lexigoraphically. * \param cv The curve. * \return SMALLER if cv is directed from left to right and LARGER * otherwise. @@ -138,7 +138,7 @@ public: } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! obtains a Compare_endpoints_xy_2 functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(*this); } //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h index fd958718c69..da68eb331be 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h @@ -43,16 +43,16 @@ private: Data m_data; // The auxiliary data field. public: - /*! Get the auxiliary data (const version). */ + /*! obtains the auxiliary data (const version). */ const Data& data() const { return m_data; } - /*! Get the auxiliary data (non-const version). */ + /*! obtains the auxiliary data (non-const version). */ Data& data() { return m_data; } - /*! Set the auxiliary data. */ + /*! sets the auxiliary data. */ void set_data(const Data& data) { m_data = data; } - /*! Assign from another vertex. */ + /*! assigns from another vertex. */ virtual void assign(const Vertex_base& v) { Vertex_base::assign(v); const Self& ex_v = static_cast(v); @@ -83,16 +83,16 @@ private: Data m_data; // The auxiliary data field. public: - /*! Get the auxiliary data (const version). */ + /*! obtains the auxiliary data (const version). */ const Data& data() const { return m_data; } - /*! Get the auxiliary data (non-const version). */ + /*! obtains the auxiliary data (non-const version). */ Data& data() { return m_data; } - /*! Set the auxiliary data. */ + /*! sets the auxiliary data. */ void set_data(const Data& data) { m_data = data; } - /*! Assign from another halfedge. */ + /*! assigns from another halfedge. */ virtual void assign(const Halfedge_base& he) { Halfedge_base::assign(he); const Self& ex_he = static_cast(he); @@ -123,16 +123,16 @@ private: Data m_data; // The auxiliary data field. public: - /*! Get the auxiliary data (const version). */ + /*! obtains the auxiliary data (const version). */ const Data& data() const { return m_data; } - /*! Get the auxiliary data (non-const version). */ + /*! obtains the auxiliary data (non-const version). */ Data& data() { return m_data; } - /*! Set the auxiliary data. */ + /*! sets the auxiliary data. */ void set_data(const Data& data) { m_data = data; } - /*! Assign from another face. */ + /*! assigns from another face. */ virtual void assign(const Face_base& f) { Face_base::assign(f); const Self& ex_f = static_cast(f); @@ -176,10 +176,10 @@ public: Halfedge_other, Face_base>; }; - /*! Default constructor. */ + /*! constructs default. */ Arr_face_extended_dcel() {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_face_extended_dcel() {} }; @@ -227,14 +227,14 @@ public: Vertex_other, Halfedge_other, Face_base>; }; - /*! Default constructor. */ + /*! constructs default. */ Arr_extended_dcel() {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_extended_dcel() {} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h index ee804c574c5..c3d408ccab2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h @@ -62,24 +62,24 @@ private: enum {MIN_REV_MAP_SIZE = 32}; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_face_index_map() : Base(), n_faces(0), rev_map(MIN_REV_MAP_SIZE) {} - /*! Constructor with an associated arrangement. */ + /*! constructs from an associated arrangement. */ Arr_face_index_map(const Base_aos& arr) : Base(const_cast(arr)) { _init(); } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_face_index_map(const Self& other) : Base(const_cast(*(other.arrangement()))) { _init(); } - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& other) { if (this == &other) return (*this); @@ -89,13 +89,13 @@ public: return (*this); } - /*! Get the index of a given face. + /*! obtains the index of a given face. * \param f A handle to the face. * \pre f is a valid face in the arrangement. */ unsigned int operator[](Face_handle f) const { return (index_map[f]); } - /*! Get the face given its index. + /*! obtains the face given its index. * \param i The index of the face. * \pre i is less than the number of faces in the arrangement. */ @@ -107,27 +107,27 @@ public: /// \name Notification functions, to keep the mapping up-to-date. //@{ - /*! Update the mapping after the arrangement has been assigned with another + /*! updates the mapping after the arrangement has been assigned with another * arrangement. */ virtual void after_assign() override { _init(); } - /*! Update the mapping after the arrangement is cleared. + /*! updates the mapping after the arrangement is cleared. */ virtual void after_clear() override { _init(); } - /*! Update the mapping after attaching to a new arrangement. + /*! updates the mapping after attaching to a new arrangement. */ virtual void after_attach() override { _init(); } - /*! Update the mapping after detaching the arrangement. + /*! updates the mapping after detaching the arrangement. */ virtual void after_detach() override { n_faces = 0; index_map.clear(); } - /*! Update the mapping after the creation of a new face is split from another + /*! updates the mapping after the creation of a new face is split from another * face. * \param f A handle to the existing face. * \param new_f A handle to the newly created face. @@ -147,7 +147,7 @@ public: rev_map[n_faces - 1] = new_f; } - /*! Update the mapping before the merge of two faces. + /*! updates the mapping before the merge of two faces. * \param f1 A handle to the face that is going to remain. * \param f2 A handle to the face that is about to be removed. */ @@ -181,7 +181,7 @@ public: //@} private: - /*! Initialize the map for the given arrangement. */ + /*! initializes the map for the given arrangement. */ void _init() { // Get the number of faces and allocate the reverse map accordingly. n_faces = static_cast(this->arrangement()->number_of_faces()); @@ -206,7 +206,7 @@ private: } }; -/*! Get the index property-map function. Provided so that boost is able to +/*! obtains the index property-map function. Provided so that boost is able to * access the Arr_face_index_map above. * \param index_map The index map. * \param f A face handle. @@ -217,7 +217,7 @@ unsigned int get(const CGAL::Arr_face_index_map& index_map, typename Arrangement::Face_handle f) { return (index_map[f]); } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h index 5e6f01f1f25..17b1178ac75 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h @@ -80,12 +80,12 @@ public: const Self * m_traits; public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_xy_2(const Self * traits) : m_traits(traits) {} - /*! Compare two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * We actually reversing the order, so x <--> y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -120,14 +120,12 @@ public: const Self * m_traits; public: - - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_yx_2(const Self * traits) : m_traits(traits) {} - - /*! Compare two points lexigoraphically: by y, then by x. + /*! compares two points lexigoraphically: by y, then by x. * We actually reversing the order, so x <--> y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -160,12 +158,12 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Orientation_2 (const Self * traits) : m_traits(traits) {} - /*! Checks the orientation between three points. + /*! checks the orientation between three points. * We actually reversing the order, so x <--> y. * \param p * \param q @@ -231,7 +229,6 @@ public: Compare_y_2 compare_y_2_object() const {return Base::compare_x_2_object(); } - /*! A functor that compares two points by x coordinate. */ class Compare_x_2 @@ -241,14 +238,12 @@ public: const Self * m_traits; public: - - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Self * traits) : m_traits(traits) {} - - /*! Compare two points by y coordinate. + /*! compares two points by y coordinate. * We actually reversing the order, so x <--> y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -388,7 +383,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_xy_2(const Self * traits) : m_traits(traits) {} @@ -429,7 +424,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Less_yx_2(const Self * traits) : m_traits(traits) {} @@ -467,7 +462,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Orientation_2 (const Self * traits) : m_traits(traits) {} @@ -549,7 +544,7 @@ public: public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Self * traits) : m_traits(traits) {} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h index d966a52b41a..8c99f5c9750 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h @@ -55,13 +55,13 @@ private: FT m_c; public: - /*! Default Constructor */ + /*! constructs default */ Arr_plane_3() : m_a(0), m_b(0), m_c(0) {} - /*! Constructor */ + /*! constructs */ Arr_plane_3(int a, int b, int c) : m_a(a), m_b(b), m_c(c) {} - /*! Constructor */ + /*! constructs */ Arr_plane_3(typename Kernel::Plane_3 p) { CGAL_precondition_code(Kernel kernel;); @@ -71,7 +71,7 @@ public: m_a = p.a(); m_b = p.b(); m_c = p.c() ; } - /*! Constructor */ + /*! constructs */ Arr_plane_3(const Point_3 & p, const Point_3 & r) { FT prx = r.x() - p.x(); @@ -82,16 +82,16 @@ public: m_c = r.x() * pry - prx * r.y(); } - /*! Obtain the x coefficient */ + /*! obtains the x coefficient */ const FT & a() const { return m_a; } - /*! Obtain the y coefficient */ + /*! obtains the y coefficient */ const FT & b() const { return m_b; } - /*! Obtain the z coefficient */ + /*! obtains the z coefficient */ const FT & c() const { return m_c; } - /*! Obtain the i-th coefficient of the plane + /*! obtains the i-th coefficient of the plane * \param i the index of the coefficient * \return the i-th coefficient */ @@ -108,14 +108,14 @@ public: (c() == plane.c())); } - /*! Convert to kernel's plane */ + /*! converts to kernel's plane */ operator typename Kernel::Plane_3 () const { Kernel kernel; return kernel.construct_plane_3_object() (m_a, m_b, m_c, 0); } - /*! Compute the image point of the projection of p under an affine + /*! computes the image point of the projection of p under an affine * transformation, which maps the plane onto the xy-plane, with the * z-coordinate removed. * \param p the point @@ -139,7 +139,7 @@ public: return Point_2(x, y); } - /*! Compute a 3d point p_3 coincident to the plane, such that the image point + /*! computes a 3d point p_3 coincident to the plane, such that the image point * of the projection of p_3 under an affine transformation, which maps the * plane onto the a given axis-parallel plane is a given 2d point. * \param p_2 the image point @@ -183,7 +183,7 @@ public: return p_3; } - /*! Determine the relative position of a point and the plane + /*! determines the relative position of a point and the plane * \param p the point * \return ON_ORIENTED_BOUNDARY, ON_POSITIVE_SIDE, or ON_NEGATIVE_SIDE, * determined by the position of p relative to the oriented plane. @@ -194,7 +194,7 @@ public: } }; -/*! Intersect 2 planes +/*! intersects 2 planes * \param plane1 the first plane * \param plane2 the second plane * \return a variant that represents the intersection. It wraps a line of @@ -244,7 +244,7 @@ intersect(const Arr_plane_3 & plane1, return Intersection_result(plane1); } -/*! Compute the image point of the projection of p under an affine +/*! computes the image point of the projection of p under an affine * transformation, which maps the plane onto the xy-plane, with the * z-coordinate removed. * \param plane the plane @@ -259,7 +259,7 @@ construct_projected_xy_point(const Arr_plane_3 & plane, return plane.to_2d(p); } -/*! Export a plane to an output stream +/*! exports a plane to an output stream * \param os the output stream * \param plane the plane * \return the output stream @@ -272,6 +272,6 @@ inline std::ostream & operator<<(std::ostream & os, return os; } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h index b2af7346033..e63e7eea930 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h @@ -105,7 +105,7 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ _Bezier_curve_2_rep () : _no_self_inter (true), p_polyX(nullptr), @@ -114,7 +114,7 @@ public: p_normY(nullptr) {} - /*! Copy constructor (isn't really used). */ + /*! constructs copy (isn't really used). */ _Bezier_curve_2_rep (const _Bezier_curve_2_rep& other) : _ctrl_pts(other._ctrl_pts), _bbox(other._bbox), @@ -134,8 +134,7 @@ public: p_normY = new Integer(*(other.p_normY)); } - /*! - * Constructor from a given range of control points. + /*! constructs from a given range of control points. * \param pts_begin An iterator pointing to the first point in the range. * \param pts_end A past-the-end iterator for the range. * \pre The value-type of the input iterator must be Rat_kernel::Point_2. @@ -206,7 +205,7 @@ public: _no_self_inter = ! bound_tr.may_have_self_intersections (_ctrl_pts); } - /*! Destructor. */ + /*! destructs. */ ~_Bezier_curve_2_rep () { if (p_polyX != nullptr) @@ -222,14 +221,14 @@ public: /// \name Access the polynomials (lazily evaluated). //@{ - /*! Check if the polynomials are already constructed. */ + /*! checks if the polynomials are already constructed. */ bool has_polynomials () const { return (p_polyX != nullptr && p_normX != nullptr && p_polyY != nullptr && p_normY != nullptr); } - /*! Get the polynomial X(t). */ + /*! obtains the polynomial X(t). */ const Polynomial& x_polynomial () const { if (p_polyX == nullptr) @@ -238,7 +237,7 @@ public: return (*p_polyX); } - /*! Get the normalizing factor for X(t). */ + /*! obtains the normalizing factor for X(t). */ const Integer& x_norm () const { if (p_normX == nullptr) @@ -247,7 +246,7 @@ public: return (*p_normX); } - /*! Get the polynomial Y(t). */ + /*! obtains the polynomial Y(t). */ const Polynomial& y_polynomial () const { if (p_polyY == nullptr) @@ -256,7 +255,7 @@ public: return (*p_polyY); } - /*! Get the normalizing factor for Y(t). */ + /*! obtains the normalizing factor for Y(t). */ const Integer& y_norm () const { if (p_normY == nullptr) @@ -268,14 +267,12 @@ public: private: - /*! - * Construct the representation of X(t) and Y(t). + /*! construct the representation of X(t) and Y(t). * The function is declared as "const" as it changes only mutable members. */ void _construct_polynomials () const; - /*! - * Compute the value of n! / (j! k! (n-k-j)!). + /*! computes the value of n! / (j! k! (n-k-j)!). */ Integer _choose (int n, int j, int k) const; @@ -324,22 +321,19 @@ public: public: - /*! - * Default constructor. + /*!constructs default. */ _Bezier_curve_2 () : Bcv_handle (Bcv_rep()) {} - /*! - * Copy constructor. + /*! constructs copy. */ _Bezier_curve_2 (const Self& bc) : Bcv_handle (bc) {} - /*! - * Constructor from a given range of control points. + /*! constructs from a given range of control points. * \param pts_begin An iterator pointing to the first point in the range. * \param pts_end A past-the-end iterator for the range. * \pre The value-type of the input iterator must be Rat_kernel::Point_2. @@ -350,8 +344,7 @@ public: Bcv_handle (Bcv_rep (pts_begin, pts_end)) {} - /*! - * Assignment operator. + /*! assigns. */ Self& operator= (const Self& bc) { @@ -362,56 +355,49 @@ public: return (*this); } - /*! - * Get a unique curve ID (based on the actual representation pointer). + /*! obtains a unique curve ID (based on the actual representation pointer). */ size_t id () const { return (reinterpret_cast (this->ptr())); } - /*! - * Get the polynomial for the x-coordinates of the curve. + /*! obtains the polynomial for the x-coordinates of the curve. */ const Polynomial& x_polynomial () const { return (this->_rep().x_polynomial()); } - /*! - * Get the normalizing factor for the x-coordinates. + /*! obtains the normalizing factor for the x-coordinates. */ const Integer& x_norm () const { return (this->_rep().x_norm()); } - /*! - * Get the polynomial for the y-coordinates of the curve. + /*! obtains the polynomial for the y-coordinates of the curve. */ const Polynomial& y_polynomial () const { return (this->_rep().y_polynomial()); } - /*! - * Get the normalizing factor for the y-coordinates. + /*! obtains the normalizing factor for the y-coordinates. */ const Integer& y_norm () const { return (this->_rep().y_norm()); } - /*! - * Get the number of control points inducing the Bezier curve. + /*! obtains the number of control points inducing the Bezier curve. */ unsigned int number_of_control_points () const { return static_cast((this->_rep()._ctrl_pts.size())); } - /*! - * Get the i'th control point. + /*! obtains the i'th control point. * \pre i must be between 0 and n - 1, where n is the number of control * points. */ @@ -422,46 +408,40 @@ public: return ((this->_rep()._ctrl_pts)[i]); } - /*! - * Get an iterator for the first control point. + /*! obtains an iterator for the first control point. */ Control_point_iterator control_points_begin () const { return (this->_rep()._ctrl_pts.begin()); } - /*! - * Get a past-the-end iterator for control points. + /*! obtains a past-the-end iterator for control points. */ Control_point_iterator control_points_end () const { return (this->_rep()._ctrl_pts.end()); } - /*! - * Check if both curve handles refer to the same object. + /*! checks if both curve handles refer to the same object. */ bool is_same (const Self& bc) const { return (this->identical (bc)); } - /*! - * Compute a point of the Bezier curve given a rational t-value. + /*! computes a point of the Bezier curve given a rational t-value. * \param t The given t-value. * \return The point B(t). */ Rat_point_2 operator() (const Rational& t) const; - /*! - * Compute a point of the Bezier curve given an algebraic t-value. + /*! computes a point of the Bezier curve given an algebraic t-value. * \param t The given t-value. * \return The point B(t). */ Alg_point_2 operator() (const Algebraic& t) const; - /*! - * Sample a portion of the curve (for drawing purposes, etc.). + /*! samples a portion of the curve (for drawing purposes, etc.). * \param t_start The t-value to start with. * \param t_end The t-value to end at. * \param n_samples The required number of samples. @@ -507,8 +487,7 @@ public: return (oi); } - /*! - * Compute all parameter values t such that the x-coordinate of B(t) is x0. + /*! computes all parameter values t such that the x-coordinate of B(t) is x0. * Note that the function does not return only values between 0 and 1, so * the output t-values may belong to the imaginary continuation of the curve. * \param x0 The given x-coordinate. @@ -525,8 +504,7 @@ public: oi)); } - /*! - * Compute all parameter values t such that the y-coordinate of B(t) is y0. + /*! computes all parameter values t such that the y-coordinate of B(t) is y0. * Note that the function does not return only values between 0 and 1, so * the output t-values may belong to the imaginary continuation of the curve. * \param y0 The given y-coordinate. @@ -542,21 +520,18 @@ public: oi)); } - /*! - * Check if the two curves have the same support. + /*! checks if the two curves have the same support. */ bool has_same_support (const Self& bc) const; - /*! - * Get the bounding box of the curve. + /*! obtains the bounding box of the curve. */ const Bbox_2& bbox () const { return (this->_rep()._bbox); } - /*! - * Check if the curve contains not self intersections. + /*! checks if the curve contains not self intersections. * Note that there may not be any self intersections even if the * function returns true (but not vice versa). */ @@ -578,8 +553,7 @@ private: return (*(this->ptr())); } - /*! - * Compute all parameter values t, such that P(t) = val. + /*! computes all parameter values t, such that P(t) = val. * \param poly The polynomial. * \param norm Its normalizing factor. * \param val The required value. @@ -618,8 +592,7 @@ private: } }; -/*! - * Exporter for Bezier curves. +/*! exports a Bezier curves. */ template @@ -638,8 +611,7 @@ operator<< (std::ostream& os, return (os); } -/*! - * Importer for Bezier curves. +/*! imports a Bezier curves. */ template @@ -947,6 +919,6 @@ bool _Bezier_curve_2::has_same_support return (true); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h index 9c0cda934db..83d7adcfe54 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h @@ -38,8 +38,6 @@ #include #include - - namespace CGAL { // Traits class for CGAL::Arrangement_2 (and similar) based on a diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h index c242d29e2d2..e64affe3012 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_grid_generator.h @@ -82,14 +82,14 @@ protected: // number of landmarks as parameter private: - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Arr_grid_landmarks_generator(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self&); public: - /*! Constructor from an arrangement. + /*! constructs from an arrangement. * \param arr (in) The arrangement. */ Arr_grid_landmarks_generator(const Arrangement_2& arr) : @@ -111,7 +111,7 @@ public: build_landmark_set();//this-> } - /*! Create the landmarks set (choosing the landmarks), + /*! creates the landmarks set (choosing the landmarks), * and store them in the nearest neighbor search structure. */ virtual void build_landmark_set() @@ -128,7 +128,7 @@ public: this->updated = true; } - /*! Clear the set of landmarks. + /*! clears the set of landmarks. */ virtual void clear_landmark_set() { @@ -136,7 +136,7 @@ public: this->updated = false; } - /*! Obtain the nearest neighbor (landmark) to the given point. + /*! obtains the nearest neighbor (landmark) to the given point. * \param q The query point. * \param obj (out) The location of the nearest landmark point in the * arrangement (a vertex, halfedge, or face handle). @@ -165,7 +165,7 @@ public: } protected: - /*! Create a set of landmark points on a grid. + /*! creates a set of landmark points on a grid. */ virtual void _create_points_set(Points_set& points) { @@ -261,6 +261,6 @@ protected: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h index 61fe87106b5..217815c5e04 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h @@ -64,10 +64,10 @@ public: Approximate_number_type m_vec[2]; // Approximate point x and y-coordinates. public: - /*! Default constructor. */ + /*! constructs default. */ NN_Point_2() { m_vec[0] = m_vec[1] = 0; } - /*! Constructor from a point. */ + /*! constructs from a point. */ NN_Point_2(const Point_2& p) : m_point(p) { @@ -77,7 +77,7 @@ public: m_vec[1] = m_traits.approximate_2_object()(p, 1); } - /*! Constructor from a point and an its location in the arrangement. */ + /*! constructs from a point and an its location in the arrangement. */ NN_Point_2(const Point_2& p, const PL_result_type obj) : m_point(p), m_object(obj) @@ -94,10 +94,10 @@ public: /* Get the object representing the location in the arrangement. */ const PL_result_type& object() const { return (m_object); } - /*! Get an iterator for the approximate coordinates. */ + /*! obtains an iterator for the approximate coordinates. */ const Approximate_number_type* begin() const { return (m_vec); } - /*! Get a past-the-end iterator for the approximate coordinates. */ + /*! obtains a past-the-end iterator for the approximate coordinates. */ const Approximate_number_type* end() const { return (m_vec + 2); } /*! Equality operators. */ @@ -116,11 +116,11 @@ public: { typedef const Approximate_number_type* result_type; - /*! Get an iterator for the approximate coordinates. */ + /*! obtains an iterator for the approximate coordinates. */ const Approximate_number_type* operator()(const NN_Point_2& nnp) const { return (nnp.begin()); } - /*! Get a past-the-end iterator for the approximate coordinates. */ + /*! obtains a past-the-end iterator for the approximate coordinates. */ const Approximate_number_type* operator()(const NN_Point_2& nnp, int) const { return (nnp.end()); } }; @@ -143,24 +143,23 @@ public: private: typedef Arr_landmarks_nearest_neighbor Self; - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Arr_landmarks_nearest_neighbor(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self&); public: - /*! Default constructor. */ + /*! constructs default. */ Arr_landmarks_nearest_neighbor () : m_tree(nullptr), m_is_empty(true) {} - /*! Destructor. */ + /*! destructs. */ ~Arr_landmarks_nearest_neighbor() { clear(); } - /*! - * Allocate the search tree and initialize it with landmark points. + /*! allocates the search tree and initialize it with landmark points. * \param begin An iterator for the first landmark point. * \param end A past-the-end iterator for the landmark points. * \pre The search tree is not initialized. @@ -181,7 +180,7 @@ public: } } - /*! Clear the search tree. */ + /*! clears the search tree. */ void clear() { if (m_tree != nullptr) @@ -190,8 +189,7 @@ public: m_is_empty = true; } - /*! - * Find the nearest landmark point to the query point. + /*! finds the nearest landmark point to the query point. * \param q The query point. * \param obj Output: The location of the nearest landmark point in the * arrangement (a vertex, halfedge, or face handle). @@ -215,6 +213,6 @@ public: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index 8096e6b59b4..8c78432ad12 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -111,10 +111,10 @@ private: using Self = Arr_polycurve_traits_2; public: - /*! Default constructor */ + /*! constructs default */ Arr_polycurve_traits_2() : Base() {} - /*! Constructor with given subcurve traits + /*! constructs with given subcurve traits * \param seg_traits an already existing subcurve tarits which is passed will * be used by the class. */ @@ -141,7 +141,7 @@ public: } }; - /*! Obtain a number_of_points_2 functor object. */ + /*! obtains a `Number_of_points_2` functor object. */ Number_of_points_2 number_of_points_2_object() const { return Number_of_points_2(); } @@ -163,12 +163,12 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Make_x_monotone_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Subdivide a given curve into x-monotone sub-curves and insert them into + /*! subdivides a given curve into x-monotone sub-curves and insert them into * a given output iterator. * * \pre if `cv` is not empty then it must be continuous and well-oriented. @@ -470,7 +470,7 @@ public: { return operator_impl(cv, oi, All_sides_oblivious_category()); } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -483,7 +483,7 @@ public: using Polycurve_traits_2 = Arr_polycurve_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_back_2(const Polycurve_traits_2& traits) : Base::Push_back_2(traits) {} // Normally, the moment the compiler finds a name, it stops looking. In @@ -493,21 +493,21 @@ public: // code below. using Base::Push_back_2::operator(); - // /*! Append a subcurve to an existing x-monotone polycurve at the back. + // /*! appends a subcurve to an existing x-monotone polycurve at the back. // */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) // const // { Base::Push_back_2::operator()(xcv, seg); } - /* Append a subcurve to an existing polycurve at the back. + /* appends a subcurve to an existing polycurve at the back. * If the polycurve is empty, the subcurve will be its only subcurve. */ void operator()(Curve_2& cv, const Subcurve_2& seg) const { cv.push_back(seg); } }; - /*! Obtain a Push_back_2 functor object. */ + /*! obtains a `Push_back_2` functor object. */ Push_back_2 push_back_2_object() const { return Push_back_2(*this); } /* Functor to augment a polycurve by either adding a vertex or a subcurve @@ -519,7 +519,7 @@ public: using Polycurve_traits_2 = Arr_polycurve_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_front_2(const Polycurve_traits_2& traits) : Base::Push_front_2(traits) {} @@ -531,19 +531,19 @@ public: // code below. using Base::Push_front_2::operator(); - // /*! Append a subcurve to an existing x-monotone polycurve at the front. + // /*! appends a subcurve to an existing x-monotone polycurve at the front. // */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) // const // { Base::Push_front_2::operator()(xcv, seg); } - /* Append a subcurve to an existing polycurve at the front. */ + /* appends a subcurve to an existing polycurve at the front. */ void operator()(Curve_2& cv, const Subcurve_2& seg) const { cv.push_front(seg); } }; - /*! Obtain a Push_front_2 functor object. */ + /*! obtains a `Push_front_2` functor object. */ Push_front_2 push_front_2_object() const { return Push_front_2(*this); } class Split_2 { @@ -554,11 +554,11 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Split_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve(p is its right endpoint). @@ -659,7 +659,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -670,10 +670,10 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Intersect_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two subcurves may itersect only once, only a * single intersection will be contained in the iterator. * Note: If the intersection yields an overlap then it will be oriented @@ -996,7 +996,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -1007,10 +1007,10 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Are_mergeable_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return(true) if the two curves are mergeable, that is, they share a @@ -1047,7 +1047,7 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } @@ -1065,12 +1065,12 @@ public: const Geometry_traits& m_poly_traits; public: - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Geometry_traits& traits) : m_poly_traits(traits) {} - /*! Merge two given x-monotone curves into a single curve(segment). + /*! merges two given x-monotone curves into a single curve(segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -1122,7 +1122,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } ///@} @@ -1137,15 +1137,15 @@ public: const Polycurve_traits_2& m_poly_traits; public: - /*! Constructor. */ + /*! constructs. */ Construct_curve_2(const Polycurve_traits_2& traits) : m_poly_traits(traits) {} - /*! Obtain a polycurve that consists of one given subcurve. */ + /*! obtains a polycurve that consists of one given subcurve. */ Curve_2 operator()(const Subcurve_2& seg) const { return Curve_2(seg); } - /* Construct a well-oriented polycurve from a range of either + /* constructs a well-oriented polycurve from a range of either * `SubcurveTraits::Point_2` or `SubcurveTraits::Subcurve_2`. */ template @@ -1156,7 +1156,7 @@ public: return constructor_impl(begin, end, Is_point()); } - /*! Construction of a polycurve from a range of points. + /*! constructs a polycurve from a range of points. * \pre The range contains at least two points * \pre Consecutive points are disjoint. * \return Well-oriented polycurve connecting the given @@ -1186,12 +1186,12 @@ public: } }; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h index be6fb987894..90864a7f64e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h @@ -118,10 +118,10 @@ public: //@} public: - /*! Construct default. */ + /*! constructs default. */ Arr_polyline_traits_2() : Base() {} - /*! Construct from a segment traits + /*! constructs from a segment traits * \param geom_traits an already existing segment tarits which is passed will * be used by the class. */ @@ -139,7 +139,7 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_back_2(const Polyline_traits_2& traits) : Base::Push_back_2(traits) {} @@ -151,16 +151,16 @@ public: // code below. using Base::Push_back_2::operator(); - // /*! Append a segment `seg` to an existing polyline `cv` at the back. */ + // /*! appends a segment `seg` to an existing polyline `cv` at the back. */ // void operator()(Curve_2& cv, const Segment_2& seg) const // { Base::Push_back_2::operator() (cv, seg); } - // /* Append a segment `seg` to an existing polyline `xcv` at the back. */ + // /* appends a segment `seg` to an existing polyline `xcv` at the back. */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) const // { Base::Push_back_2::operator()(xcv, seg); } - /* Append a point `p` to an existing polyline `cv` at the back. */ + /* appends a point `p` to an existing polyline `cv` at the back. */ void operator()(Curve_2& cv, const Point_2& p) const { typedef typename Curve_2::size_type size_type; size_type num_seg = cv.number_of_subcurves(); @@ -187,7 +187,7 @@ public: } } - /* Append a point `p` to an existing polyline `xcv` at the back. */ + /* appends a point `p` to an existing polyline `xcv` at the back. */ void operator()(X_monotone_curve_2& xcv, const Point_2& p) const { typedef typename X_monotone_curve_2::size_type size_type; @@ -237,7 +237,7 @@ public: } }; - /*! Obtain a Push_back_2 functor object. */ + /*! obtains a Push_back_2 functor object. */ Push_back_2 push_back_2_object() const { return Push_back_2(*this); } /* Functor to augment a polyline by either adding a vertex or a segment @@ -249,7 +249,7 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. */ + /*! constructs. */ Push_front_2(const Polyline_traits_2& traits) : Base::Push_front_2(traits) {} @@ -261,11 +261,11 @@ public: // code below. using Base::Push_front_2::operator(); - // /*! Append a segment `seg` to an existing polyline `cv` at the front. */ + // /*! appends a segment `seg` to an existing polyline `cv` at the front. */ // void operator()(Curve_2& cv, const Subcurve_2& seg) const // { Base::Push_front_2::operator()(cv, seg); } - // /*! Append a segment `seg` to an existing polyline `xcv` at the front. */ + // /*! appends a segment `seg` to an existing polyline `xcv` at the front. */ // void operator()(X_monotone_curve_2& xcv, // const X_monotone_subcurve_2& seg) const // { Base::Push_front_2::operator()(xcv, seg); } @@ -294,7 +294,7 @@ public: } } - /*! Append a point `p` to an existing polyline `xcv` at the front. */ + /*! appends a point `p` to an existing polyline `xcv` at the front. */ void operator()(const X_monotone_curve_2& xcv, Point_2& p) const { const auto* geom_traits = this->m_poly_traits.subcurve_traits_2(); @@ -339,10 +339,10 @@ public: } }; - /*! Obtain a Push_front_2 functor object. */ + /*! obtains a Push_front_2 functor object. */ Push_front_2 push_front_2_object() const { return Push_front_2(*this); } - /*! Construct a general curve from : + /*! constructs a general curve from : * 1. two points, * 2. a sub curve, * 3. a range of points, or @@ -353,7 +353,7 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. + /*! constructs. */ Construct_curve_2(const Polyline_traits_2& traits) : Base::Construct_curve_2(traits) @@ -402,7 +402,7 @@ public: std::false_type) const { return Base::Construct_curve_2::operator()(begin, end); } - /*! Construction of a polyline from a range of points. + /*! constructs a polyline from a range of points. * \pre The range contains at least two points * \pre Consecutive points are disjoint. * \return Well-oriented polyline connecting the given points. The order @@ -443,11 +443,11 @@ public: } }; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a Construct_curve_2 functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } - /*! Construct an x-monotone curve. */ + /*! constructs an x-monotone curve. */ class Construct_x_monotone_curve_2 : public Base::Construct_x_monotone_curve_2 { @@ -455,13 +455,13 @@ public: typedef Arr_polyline_traits_2 Polyline_traits_2; public: - /*! Constructor. + /*! constructs. */ Construct_x_monotone_curve_2(const Polyline_traits_2& traits) : Base::Construct_x_monotone_curve_2(traits) {} - /*! Obtain an x-monotone polyline connecting two given endpoints. + /*! obtains an x-monotone polyline connecting two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. @@ -485,7 +485,7 @@ public: return X_monotone_curve_2(seg); } - /*! Obtain an x-monotone polyline that consists of one given segment. + /*! obtains an x-monotone polyline that consists of one given segment. * \param seg input segment. * \pre seg is not degenerated. * \return An x-monotone polyline with one segment. @@ -493,7 +493,7 @@ public: X_monotone_curve_2 operator()(const X_monotone_subcurve_2& seg) const { return Base::Construct_x_monotone_curve_2::operator()(seg); } - /*! Construct an x-monotone polyline from a range of elements. + /*! constructs an x-monotone polyline from a range of elements. * \pre Range should from a continuous well-oriented x-monotone polyline. */ template @@ -590,7 +590,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -605,7 +605,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : @@ -622,8 +622,7 @@ public: Approximate_point_2 operator()(const Point_2& p) const { return Base::Approximate_2::operator()(p); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. - */ + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, OutputIterator oi, bool l2r = true) const { @@ -647,11 +646,10 @@ public: } }; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an Approximate_2 functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } - /*! Deprecated! - * Obtain the segment traits. + /*! obtains the segment traits. * \return the segment traits. */ CGAL_DEPRECATED const Segment_traits_2* segment_traits_2() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h index f908224fe26..4101d509f37 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h @@ -26,8 +26,6 @@ #include #include - - namespace CGAL { /*! \class @@ -161,7 +159,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Construct_x_monotone_curve_2(const Traits* traits) : _traits(traits) {} @@ -299,7 +297,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Construct_curve_2(const Traits* traits) : _traits(traits) {} @@ -424,7 +422,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Construct_point_2(const Traits* traits) : _traits(traits) {} @@ -502,8 +500,7 @@ public: class Compare_x_2 { public: - /*! - * Compare the x-coordinates of two points. + /*! compares the x-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -517,7 +514,7 @@ public: } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! obtains a Compare_x_2 functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(); @@ -533,7 +530,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Compare_xy_2(const Traits* traits) : _traits(traits) {} @@ -541,8 +538,7 @@ public: friend class Arr_rational_function_traits_2; public: - /*! - * Compares two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -555,7 +551,7 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! obtains a Compare_xy_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(this); @@ -565,8 +561,7 @@ public: class Construct_min_vertex_2 { public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The left endpoint. */ @@ -576,7 +571,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); @@ -586,8 +581,7 @@ public: class Construct_max_vertex_2 { public: - /*! - * Get the right endpoint of the x-monotone curve (segment). + /*! obtains the right endpoint of the x-monotone curve (segment). * \param cv The curve. * \return The right endpoint. */ @@ -597,7 +591,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); @@ -607,8 +601,7 @@ public: class Is_vertical_2 { public: - /*! - * Check whether the given x-monotone curve is a vertical segment. + /*! checks whether the given x-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -619,7 +612,7 @@ public: } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! obtains an Is_vertical_2 functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); @@ -632,10 +625,11 @@ public: { private: Cache& _cache; + public: Compare_y_at_x_2(Cache& cache) : _cache(cache) {} - /*! - * Return the location of the given point with respect to the input curve. + + /*! returns the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. * \pre p is in the x-range of cv. @@ -650,7 +644,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a Compare_y_at_x_2 functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object () const { return Compare_y_at_x_2(_cache); @@ -665,9 +659,9 @@ public: Cache& _cache; public: - Compare_y_at_x_left_2(Cache& cache) :_cache(cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the left + Compare_y_at_x_left_2(Cache& cache) : _cache(cache) {} + + /*! compares the y value of two x-monotone curves immediately to the left * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -697,7 +691,7 @@ public: return cv1.compare_at_intersection (cv2,p,true,_cache);} }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a Compare_y_at_x_left_2 functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(_cache); @@ -713,8 +707,8 @@ public: public: Compare_y_at_x_right_2(Cache& cache) :_cache(cache) {} - /*! - * Compares the y value of two x-monotone curves immediately to the right + + /*! compares the y value of two x-monotone curves immediately to the right * of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -747,7 +741,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. */ + /*! obtains a Compare_y_at_x_right_2 functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const { return Compare_y_at_x_right_2(_cache); @@ -762,7 +756,7 @@ public: /*! The traits */ const Traits* _traits; - /*! Constructor + /*! constructs * \param traits the traits */ Equal_2(const Traits* traits) : _traits(traits) {} @@ -770,8 +764,7 @@ public: friend class Arr_rational_function_traits_2; public: - /*! - * Check if the two x-monotone curves are the same (have the same graph). + /*! checks if the two x-monotone curves are the same (have the same graph). * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are the same; (false) otherwise. @@ -785,8 +778,7 @@ public: return (cv1.equals(cv2)); } - /*! - * Check if the two points are the same. + /*! checks if the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -802,7 +794,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! obtains an Equal_2 functor object. */ Equal_2 equal_2_object() const { return Equal_2(this); @@ -816,7 +808,7 @@ public: */ class Make_x_monotone_2 { public: - /*! Subdivide a given rational-function curve into x-monotone subcurves + /*! subdivides a given rational-function curve into x-monotone subcurves * and insert them to a given output iterator. * \param cv the curve. * \param oi the output iterator for the result. Its dereference type is a @@ -840,7 +832,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a Make_x_monotone_2 functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } @@ -852,8 +844,7 @@ public: public: Split_2(Cache& cache) : _cache(cache) {} - /*! - * Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). @@ -867,7 +858,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(_cache); @@ -880,8 +871,7 @@ public: Cache& _cache; public: Intersect_2(Cache& cache) : _cache(cache) {} - /*! - * Find the intersections of the two given curves and insert them to the + /*! finds the intersections of the two given curves and insert them to the * given output iterator. As two segments may itersect only once, only a * single will be contained in the iterator. * \param cv1 The first curve. @@ -898,7 +888,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(_cache); @@ -908,8 +898,7 @@ public: class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -922,7 +911,7 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an Are_mergeable_2 functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(); @@ -939,7 +928,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -947,8 +936,7 @@ public: friend class Arr_rational_function_traits_2; public: - /*! - * Merge two given x-monotone curves into a single curve (segment). + /*! merges two given x-monotone curves into a single curve (segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -965,7 +953,7 @@ public: } }; - /*! Obtain a Merge_2 functor object. */ + /*! obtains a Merge_2 functor object. */ Merge_2 merge_2_object() const { return Merge_2(this); @@ -981,7 +969,7 @@ public: */ class Parameter_space_in_x_2 { public: - /*! Obtains the parameter space at the end of a line along the x-axis. + /*! obtains the parameter space at the end of a line along the x-axis. * \param xcv the line * \param ce the line end indicator: * ARR_MIN_END - the minimal end of xc or @@ -1000,7 +988,7 @@ public: xcv.left_parameter_space_in_x() : xcv.right_parameter_space_in_x(); } - /*! Obtains the parameter space at a point along the x-axis. + /*! obtains the parameter space at a point along the x-axis. * \param p the point. * \return the parameter space at p. */ @@ -1010,7 +998,7 @@ public: } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } @@ -1019,7 +1007,7 @@ public: */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of a line along the y-axis . + /*! obtains the parameter space at the end of a line along the y-axis . * Note that if the line end coincides with a pole, then unless the line * coincides with the identification arc, the line end is considered to * be approaching the boundary, but not on the boundary. @@ -1043,7 +1031,7 @@ public: xcv.left_parameter_space_in_y() : xcv.right_parameter_space_in_y(); } - /*! Obtains the parameter space at a point along the y-axis. + /*! obtains the parameter space at a point along the y-axis. * \param p the point. * \return the parameter space at p. */ @@ -1053,7 +1041,7 @@ public: } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } @@ -1063,7 +1051,7 @@ public: */ class Compare_x_near_boundary_2 { public: - /*! Compare the x-coordinate of a point with the x-coordinate of + /*! compares the x-coordinate of a point with the x-coordinate of * a line end near the boundary at y = +/- oo. * \param p the point direction. * \param xcv the line, the endpoint of which is compared. @@ -1087,7 +1075,7 @@ public: return (r == NEGATIVE) ? POSITIVE : NEGATIVE ; } - /*! Compare the x-coordinates of 2 arcs ends near the boundary of the + /*! compares the x-coordinates of 2 arcs ends near the boundary of the * parameter space at y = +/- oo. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - @@ -1113,7 +1101,7 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! obtains a Compare_x_near_boundary_2 function object */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(); } #endif @@ -1127,7 +1115,7 @@ public: Cache& _cache; public: - /*! Compare the y-coordinates of 2 lines at their ends near the boundary + /*! compares the y-coordinates of 2 lines at their ends near the boundary * of the parameter space at x = +/- oo. * \param xcv1 the first arc. * \param xcv2 the second arc. @@ -1147,7 +1135,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 function object */ + /*! obtains a Compare_y_near_boundary_2 function object */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(_cache); } @@ -1158,7 +1146,7 @@ public: class Compare_x_on_boundary_2 { public: - /*! Compares the x coordinate of p with the curve end + /*! compares the x coordinate of p with the curve end * of xcv that is defined by ce at its limit. * Returns SMALLER, EQUAL, or LARGER accordingly. */ @@ -1171,7 +1159,8 @@ public: return CGAL::compare(p.x(), (ce == ARR_MIN_END) ? xcv.left_x() : xcv.right_x()); } - /*! Compares the curve end of xcv1 that is defined by ce1 + + /*! compares the curve end of xcv1 that is defined by ce1 * with the curve end of xcv2 that is defined by ce2 * at their limits in x. * Returns SMALLER, EQUAL, or LARGER accordingly. @@ -1192,7 +1181,7 @@ public: }; //Compare_x_on_boundary_2 - /*! Obtain a Compare_x_on_boundary_2 function object */ + /*! obtains a Compare_x_on_boundary_2 function object */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(); } //@} @@ -1208,7 +1197,8 @@ public: public: Compare_x_near_boundary_2(Cache& cache) : _cache(cache) {} - /*! Compares the curve end of xcv1 that is defined by ce1 + + /*! compares the curve end of xcv1 that is defined by ce1 * with the curve end of xcv2 that is defined by ce2 * at their limits in x. * Returns SMALLER, EQUAL, or LARGER accordingly. @@ -1221,16 +1211,14 @@ public: } }; //Compare_x_near_boundary_2 - /*! Obtain a Compare_x_near_boundary_2 function object */ + /*! obtains a Compare_x_near_boundary_2 function object */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(_cache); } class Compare_endpoints_xy_2 { public: - - /*! - * Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -1245,7 +1233,7 @@ public: } }; - /*! Obtain a Compare_endpoints_xy_2 functor object. */ + /*! obtains a Compare_endpoints_xy_2 functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); @@ -1254,9 +1242,7 @@ public: class Construct_opposite_2 { public: - - /*! - * Construct an opposite x-monotone (with swapped source and target). + /*! constructs an opposite x-monotone (with swapped source and target). * \param cv The curve. * \return The opposite curve. */ @@ -1266,7 +1252,7 @@ public: } }; - /*! Obtain a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); @@ -1300,10 +1286,10 @@ public: { _cache.cleanup(); } -}; //Arr_rational_function_traits_2 +}; // Arr_rational_function_traits_2 -} //namespace CGAL { +} // namespace CGAL { #include -#endif //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h index 718679797d1..1474086e5b5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h @@ -137,7 +137,7 @@ private: typedef typename Polyhedron::Vertex_handle Polyhedron_vertex_handle; - /*! Constructor */ + /*! constructs */ Point_adder(Builder& B) : m_B(B) {} Polyhedron_vertex_handle operator()(PointIterator pi) @@ -158,7 +158,7 @@ private: typedef typename Polyhedron::Vertex_handle Polyhedron_vertex_handle; - /*! Constructor */ + /*! constructs */ Point_adder(Builder& B) : m_B(B) {} Polyhedron_vertex_handle operator()(Point_3* pi) @@ -206,7 +206,7 @@ private: size_type m_marked_facet_index; public: - /*! Constructor */ + /*! constructs */ Build_surface(const PointIterator& points_begin, const PointIterator& points_end, size_type num_points, @@ -222,19 +222,19 @@ private: m_marked_facet_index(0) {} - /*! Destructor */ + /*! destructs */ virtual ~Build_surface() {} - /*! Set the marked-vertex index */ + /*! sets the marked-vertex index */ void set_marked_vertex_index(size_type id) {m_marked_vertex_index = id;} - /*! Set the marked-edge index */ + /*! sets the marked-edge index */ void set_marked_edge_index(size_type id) {m_marked_edge_index = id;} - /*! Set the marked-face index */ + /*! sets the marked-face index */ void set_marked_facet_index(size_type id) {m_marked_facet_index = id;} - /*! Add vertices to the current facet. */ + /*! adds vertices to the current facet. */ template void add_vertices_to_facet(Iterator begin, Iterator end, Builder& B) { for (Iterator it = begin; it != end; ++it) B.add_vertex_to_facet(*it); } @@ -315,7 +315,7 @@ private: } } - /*! Update the polyhedron */ + /*! updates the polyhedron */ template void update_polyhedron(Polyhedron& polyhedron, const PointIterator& points_begin, @@ -348,17 +348,17 @@ private: } } - /*! Obtain the normal of a facet of a polyhedron that supports normals */ + /*! obtains the normal of a facet of a polyhedron that supports normals */ template const Vector_3& get_normal(const Facet& facet, std::true_type) const { return facet->plane(); } - /*! Obtain the normal of a facet of a polyhedron that supports planes */ + /*! obtains the normal of a facet of a polyhedron that supports planes */ template Vector_3 get_normal(const Facet& facet, std::false_type) const { return facet->plane().orthogonal_vector(); } - /*! Process a polyhedron vertex recursively constructing the Gaussian map + /*! processes a polyhedron vertex recursively constructing the Gaussian map * of the polyhedron * \param src the polyhedron vertex currently processed * \param first_time true if the invocation to this function is the first @@ -486,7 +486,7 @@ private: } while (hec != begin_hec); } - /*! Compute the spherical gaussian map of a convex polyhedron + /*! computes the spherical gaussian map of a convex polyhedron * \param polyhedron the input polyhedron */ void compute_sgm(Polyhedron& polyhedron) @@ -513,7 +513,7 @@ private: } public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_initializer(PolyhedralSgm& sgm) : Base(sgm), m_visitor(nullptr), @@ -522,10 +522,10 @@ public: m_marked_facet_index(0) {} - /*! Destructor */ + /*! destructs */ virtual ~Arr_polyhedral_sgm_initializer() {} - /*! Initialize the Gaussian map + /*! initializes the Gaussian map * \param polyhedron * \param visitor * \pre The polyhedron polyhedron does not have coplanar facets. @@ -552,7 +552,7 @@ public: compute_sgm(polyhedron); } - /*! Initialize the Spherical Gaussian map */ + /*! initializes the Spherical Gaussian map */ template void operator()(const PointIterator& points_begin, const PointIterator& points_end, @@ -587,13 +587,13 @@ public: polyhedron.clear(); } - /*! Set the marked-vertex index */ + /*! sets the marked-vertex index */ void set_marked_vertex_index(size_type id) {m_marked_vertex_index = id;} - /*! Set the marked-edge index */ + /*! sets the marked-edge index */ void set_marked_edge_index(size_type id) {m_marked_edge_index = id;} - /*! Set the marked-face index */ + /*! sets the marked-face index */ void set_marked_facet_index(size_type id) {m_marked_facet_index = id;} }; @@ -637,7 +637,7 @@ private: /*! Indicated whether the center has been calculated */ bool m_dirty_center; - /*! Calculate the center of the polyhedron */ + /*! calculates the center of the polyhedron */ void calculate_center() { // Count them: @@ -656,13 +656,13 @@ private: } public: - /*! Parameter-less Constructor */ + /*! constructs default */ Arr_polyhedral_sgm() : m_dirty_center(true) {} - /*! Copy Constructor */ + /*! constructs copy */ Arr_polyhedral_sgm(const Self& sgm) { assign(sgm); } - /*! Assign a spherical Gaussian map to this */ + /*! assigns a spherical Gaussian map to this */ void assign(const Self& sgm) { // Call the assign of the base class. @@ -692,10 +692,10 @@ public: } } - /*! Destructor */ + /*! destructs */ virtual ~Arr_polyhedral_sgm() { clear(); } - /*! Clear the internal representation and auxiliary data structures + /*! clears the internal representation and auxiliary data structures */ void clear() { @@ -703,7 +703,7 @@ public: Base::clear(); } - // /*! Compute the minkowski sum of a range of objects of type + // /*! computes the minkowski sum of a range of objects of type // * Arr_polyhedral_sgm // */ // template @@ -714,7 +714,7 @@ public: // minkowski_sum(sgm1, sgm2); // } - // /*! Compute the minkowski sum of a range of objects of type + // /*! computes the minkowski sum of a range of objects of type // * Arr_polyhedral_sgm // */ // template @@ -726,7 +726,7 @@ public: // minkowski_sum(sgm1, sgm2, overlay_traits); // } - /*! Compute the Minkowski sum of 2 objects of type Arr_polyhedral_sgm + /*! computes the Minkowski sum of 2 objects of type Arr_polyhedral_sgm * \param sgm1 the first Arr_polyhedral_sgm object * \param sgm2 the second Arr_polyhedral_sgm object */ @@ -740,7 +740,7 @@ public: // print_stat(); } - /*! Compute the Minkowski sum of 2 objects of type Arr_polyhedral_sgm + /*! computes the Minkowski sum of 2 objects of type Arr_polyhedral_sgm * \param sgm1 the first Arr_polyhedral_sgm object * \param sgm2 the second Arr_polyhedral_sgm object */ @@ -750,11 +750,11 @@ public: OverlayTraits& overlay_traits) { CGAL::overlay(sgm1, sgm2, *this, overlay_traits); } - /*! Obtain the number of (primal) vertices */ + /*! obtains the number of (primal) vertices */ size_type number_of_vertices() const { return (static_cast(this))->number_of_faces(); } - /*! Obtain the number of (primal) edges + /*! obtains the number of (primal) edges * \return the number of (primal) edges. * Edges that connect vertices of degree 2 are not counted, as they have * been introduced only to make non-x-monotone curves x-monotone. @@ -769,7 +769,7 @@ public: return (static_cast(this))->number_of_edges() - size; } - /*! Obtain the number of (primal) facets + /*! obtains the number of (primal) facets * \return the number of (primal) facets. * Vertices of degree 2 are not counted, as they have been introduced only * to make non-x-monotone curves x-monotone. @@ -791,7 +791,7 @@ public: std::cout << "vertex of polyhedron = " << vit->point() << std::endl; } - /*! Print statistics */ + /*! prints statistics */ void print_stat() { Base::print_stat(); @@ -804,6 +804,6 @@ public: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h index e491479ff03..98b523efc15 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h @@ -25,7 +25,7 @@ namespace CGAL { template class Arr_polyhedral_sgm_arr_vertex : public CGAL::Arr_vertex_base { public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_vertex() {} }; @@ -44,10 +44,10 @@ private: unsigned int m_arr_mask; public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_halfedge() : m_arr_mask(0x0) {} - /*! Add a arrangement to the mask of the original arrangements in the + /*! adds a arrangement to the mask of the original arrangements in the * minkowski sum. * \param arr_id the id of the added arrangement */ @@ -58,12 +58,12 @@ public: */ bool is_arr(unsigned int id) const { return m_arr_mask & (0x1 << id); } - /*! Obtain the mask of the ids of the original arrangements that contributed + /*! obtains the mask of the ids of the original arrangements that contributed * the halfedge while performing the minkowski sum */ unsigned int arr_mask() const { return m_arr_mask; } - /*! Set the arr of an edge with a value. + /*! sets the arr of an edge with a value. * \param arr_id the id to set to. */ void set_arr(unsigned int id) { m_arr_mask = id; } @@ -80,23 +80,23 @@ private: bool m_is_set; public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_face() : m_is_set(false) { } - /*! Set the 3D point of the original polyhedron */ + /*! sets the 3D point of the original polyhedron */ void set_point(const Point_3 & point) { m_point = point; m_is_set = true; } - /*! Obtain the 3D point of the original polyhedron */ + /*! obtains the 3D point of the original polyhedron */ const Point_3 & point() const { return m_point; } - /*! \brief returns true iff the point has been set already */ + /*! returns true iff the point has been set already */ bool is_set() const { return m_is_set; } - /*! \brief resets the flag */ + /*! resets the flag */ void set_is_set(bool flag) { m_is_set = flag; } }; @@ -108,10 +108,10 @@ class Arr_polyhedral_sgm_arr_dcel : Arr_polyhedral_sgm_arr_face > { public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_arr_dcel() {} }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h index 0da90ca6a01..f445a8200e8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h @@ -62,30 +62,30 @@ private: public: using Point = typename Base::Point; - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_vertex() : Base(), m_processed(false), m_marked(false) {} - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_vertex(const Point & p) : Base(p), m_processed(false), m_marked(false) {} - /*! Obtain the mutable (geometrical) point. Delegate */ + /*! obtains the mutable (geometrical) point. Delegate */ Point& point() { return Base::point(); } - /*! Obtain the constant (geometrical) point. Delegate */ + /*! obtains the constant (geometrical) point. Delegate */ const Point& point () const { return Base::point(); } /*! Set the flag */ void set_processed(bool processed) { m_processed = processed; } - /*! Obtain the flag */ + /*! obtains the flag */ bool processed() const { return m_processed; } /*! Set the "marked" flag */ void set_marked(bool marked) { m_marked = marked; } - /*! Obtain the "marked" flag */ + /*! obtains the "marked" flag */ bool marked() const { return m_marked; } }; @@ -101,20 +101,20 @@ private: bool m_marked; public: - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_halfedge() : m_processed(false), m_marked(false) {} - /*! Set the flag */ + /*! sets the flag */ void set_processed(bool processed) { m_processed = processed; } - /*! Obtain the flag */ + /*! obtains the flag */ bool processed() const { return m_processed; } - /*! Set the "marked" flag */ + /*! sets the "marked" flag */ void set_marked(bool marked) { m_marked = marked; } - /*! Obtain the "marked" flag */ + /*! obtains the "marked" flag */ bool marked() const { return m_marked; } }; @@ -136,25 +136,25 @@ private: public: using Plane = typename Base::Plane; - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3_face() : m_vertex(nullptr), m_marked(false) {} - /*! Obtain the mutable plane. Delegate */ + /*! obtains the mutable plane. Delegate */ Plane& plane() { return Base::plane(); } - /*! Obtain the constant plane. Delegate */ + /*! obtains the constant plane. Delegate */ const Plane& plane() const { return Base::plane(); } - /*! Obtain the vertex */ + /*! obtains the vertex */ Arr_vertex_handle vertex() { return m_vertex; } - /*! Set the vertex */ + /*! sets the vertex */ void set_vertex(Arr_vertex_handle vertex) { m_vertex = vertex; } - /*! Set the "marked" flag */ + /*! sets the "marked" flag */ void set_marked(bool marked) { m_marked = marked; } - /*! Obtain the "marked" flag */ + /*! obtains the "marked" flag */ bool marked() const { return m_marked; } }; @@ -200,11 +200,11 @@ struct Arr_polyhedral_sgm_polyhedron_items : public Polyhedron_items_3 { template struct Arr_polyhedral_sgm_polyhedron_3 : public Polyhedron_3> { - /*! Constructor */ + /*! constructs */ Arr_polyhedral_sgm_polyhedron_3() {} }; -} //namespace CGAL +} // namespace CGAL //! Make the polyhedron a model of FaceGraph #define CGAL_GRAPH_TRAITS_INHERITANCE_TEMPLATE_PARAMS \ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index a04cd735e9a..19d39ee8483 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -113,10 +113,10 @@ public: private: //! A container of boundary vertices. struct Vertex_key_comparer { - /*! Construct default */ + /*! constructs default */ Vertex_key_comparer() : m_geom_traits(nullptr) {} - /*! Construct */ + /*! constructs */ Vertex_key_comparer(const Gt_adaptor_2* geom_traits) : m_geom_traits(geom_traits) {} @@ -165,18 +165,18 @@ public: ///! \name Construction methods. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_spherical_topology_traits_2(); - /*! Constructor from a geometry-traits object. + /*! constructs from a geometry-traits object. * \param traits the traits. */ Arr_spherical_topology_traits_2(const Gt2* traits); - /*! Destructor */ + /*! destructs */ ~Arr_spherical_topology_traits_2(); - /*! Assign the contents of another topology-traits class. + /*! assigns the contents of another topology-traits class. * \param other the other spherical topology-traits. */ void assign(const Self& other); @@ -185,65 +185,65 @@ public: ///! \name Topology-traits methods. //@{ - /*! Obtain the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const { return (m_dcel); } - /*! Obtain the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel() { return m_dcel; } - /*! Determine whether the DCEL reprsenets an empty structure. + /*! determines whether the DCEL reprsenets an empty structure. * \return true if the dcel reprsenets an empty structure; false otherwise. */ bool is_empty_dcel() const { return (m_dcel.size_of_vertices() == 0); } - /*! Initialize an empty DCEL structure. */ + /*! initializes an empty DCEL structure. */ void init_dcel(); - /*! Make the necessary updates after the DCEL structure have been updated. */ + /*! makes the necessary updates after the DCEL structure have been updated. */ void dcel_updated(); - /*! Determine whether the given vertex is concrete. + /*! determines whether the given vertex is concrete. * \param v the vertex. * \return true if v is mapped to a point on the discontinuity arc; false * otherwise. */ bool is_concrete_vertex(const Vertex* /* v */) const { return true; } - /*! Obtain the number of concrete vertices. + /*! obtains the number of concrete vertices. * \return the number of concrete vertices. */ Size number_of_concrete_vertices() const { return (m_dcel.size_of_vertices()); } - /*! Determine whether the given vertex is valid. + /*! determines whether the given vertex is valid. * \param v the vertex. * \todo why is this needed, and where used? */ bool is_valid_vertex(const Vertex* /* v */) const { return true; } - /*! Obtain the number of valid vertices. */ + /*! obtains the number of valid vertices. */ Size number_of_valid_vertices() const { return (m_dcel.size_of_vertices()); } - /*! Determine whether the given halfedge is valid. */ + /*! determines whether the given halfedge is valid. */ bool is_valid_halfedge(const Halfedge* /* he */) const { return true; } - /*! Obtain the number of valid halfedges. */ + /*! obtains the number of valid halfedges. */ Size number_of_valid_halfedges() const { return (m_dcel.size_of_halfedges()); } - /*! Determine whether the given face is valid. */ + /*! determine whether the given face is valid. */ bool is_valid_face(const Face* /* f */) const { return true; } - /*! Obtain the number of valid faces. */ + /*! obtains the number of valid faces. */ Size number_of_valid_faces() const { return m_dcel.size_of_faces(); } - /*! Obtain the spherical face (const version). */ + /*! obtains the spherical face (const version). */ const Face* spherical_face() const { return m_spherical_face; } - /*! Obtain the spherical face (non-const version). */ + /*! obtains the spherical face (non-const version). */ Face* spherical_face() { return m_spherical_face; } - /*! Obtain the face containing the south pole (const version). */ + /*! obtains the face containing the south pole (const version). */ const Face* south_face() const { if (m_boundary_vertices.empty()) return m_spherical_face; @@ -251,7 +251,7 @@ public: return _face_below_vertex_on_discontinuity(it->second); } - /*! Obtain the face containing the south pole (non-const version). */ + /*! obtains the face containing the south pole (non-const version). */ Face* south_face() { if (m_boundary_vertices.empty()) return m_spherical_face; @@ -259,19 +259,19 @@ public: return _face_below_vertex_on_discontinuity(it->second); } - /*! Obtain the south pole (const version). */ + /*! obtains the south pole (const version). */ const Vertex* south_pole() const { return m_south_pole; } - /*! Obtain the south pole (non-const version). */ + /*! obtains the south pole (non-const version). */ Vertex* south_pole() { return m_south_pole; } - /*! Obtain the north pole (const version). */ + /*! obtains the north pole (const version). */ const Vertex* north_pole() const { return m_north_pole; } - /*! Obtain the north pole (non-const version). */ + /*! obtains the north pole (non-const version). */ Vertex* north_pole() { return m_north_pole; } - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ Vertex* discontinuity_vertex(const Point_2& pt) @@ -280,7 +280,7 @@ public: return (it != m_boundary_vertices.end()) ? it->second : nullptr; } - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given point (or return NULL if no such vertex exists). */ const Vertex* discontinuity_vertex(const Point_2& pt) const @@ -290,7 +290,7 @@ public: } // TODO remove if all occurrences have been replaced with the new signature that queries for a point - /*! Obtain a vertex on the line of discontinuity that corresponds to + /*! obtains a vertex on the line of discontinuity that corresponds to * the given curve-end (or return NULL if no such vertex exists). */ Vertex* discontinuity_vertex(const X_monotone_curve_2& xc, Arr_curve_end ind) @@ -404,7 +404,7 @@ public: ///! \name Topology-traits methods. //@{ - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to a point. * \param v The new boundary vertex. * \param p The point. @@ -416,7 +416,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to a given curve end. * \param v The new boundary vertex. * \param xc The x-monotone curve. @@ -430,7 +430,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Determines whether the function should decide on swapping the predecssor + /*! determines whether the function should decide on swapping the predecssor * halfedges that imply two ccb (and whose signs are given here). * If true, swap_predecessors will be correctly set. If false, * generic way of searching for lexicographically minimal point and checking @@ -445,8 +445,8 @@ public: bool& swap_predecessors) const; - /*! Given signs of two ccbs that show up when splitting upon insertion of - * curve into two, determine what happens to the face(s). + /*! given signs of two ccbs that show up when splitting upon insertion of + * curve into two, determines what happens to the face(s). * \param signs1 signs in x and y of the first implied ccb * \param signs2 signs in x and y of the secondd implied ccb * \return A pair indicating whether the insertion will cause the face @@ -464,7 +464,7 @@ public: return (std::make_pair(true, true)); } - /*! Determine whether a given point lies in the interior of a given face. + /*! determines whether a given point lies in the interior of a given face. * \param f The face. * \param p The query point. * \param v The vertex associated with p (if exists). @@ -473,7 +473,7 @@ public: */ bool is_in_face(const Face* f, const Point_2& p, const Vertex* v) const; - /*! Compare the relative y-position of a given point and a given edge. + /*! compares the relative y-position of a given point and a given edge. * \param p The point. * \param he The edge (one of the pair of halfedges). * \pre p should lie in the x-range of the given edge. @@ -482,7 +482,7 @@ public: Comparison_result compare_y_at_x(const Point_2& p, const Halfedge* he) const; - /*! Determine whether a given vertex is associated with a given curve end. + /*! determines whether a given vertex is associated with a given curve end. * \param v The vertex. * \param xc The x-monotone curve. * \param ind The curve end. @@ -495,8 +495,8 @@ public: const X_monotone_curve_2& xc, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) const; - /*! Given a curve end with boundary conditions and a face that contains the - * interior of the curve, find a place for a boundary vertex that will + /*! given a curve end with boundary conditions and a face that contains the + * interior of the curve, finds a place for a boundary vertex that will * represent the curve end along the face boundary. * \param f The face. * \param xc The x-monotone curve. @@ -513,7 +513,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Locate the predecessor halfedge for the given curve around a given + /*! locates the predecessor halfedge for the given curve around a given * vertex with boundary conditions. * \param v The vertex. * \param cv The x-monotone curve. @@ -530,7 +530,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y) const; - /*! Locate a DCEL feature that contains the given curve end. + /*! locates a DCEL feature that contains the given curve end. * \param xc The x-monotone curve. * \param ind The curve end. * \param ps_x The boundary condition of the curve end in x. @@ -543,7 +543,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Split a fictitious edge using the given vertex. + /*! splits a fictitious edge using the given vertex. * \param e The edge to split (one of the pair of halfedges). * \param v The split vertex. * \pre e is a fictitious halfedge. @@ -557,20 +557,20 @@ public: return nullptr; } - /*! Determine whether the given face is unbounded. + /*! determines whether the given face is unbounded. * \param f The face. * \return true if f is unbounded; false otherwise. * All faces on a sphere are bounded: */ bool is_unbounded(const Face* /* f */) const { return false; } - /*! Determine whether the given boundary vertex is redundant. + /*! determines whether the given boundary vertex is redundant. * \param v The vertex. * \return Whether v is redundant, and should be erased. */ bool is_redundant(const Vertex* v) const; - /*! Erase the given redundant vertex by merging a fictitious edge. + /*! erases the given redundant vertex by merging a fictitious edge. * The function does not free the vertex v itself. * \param v The vertex. * \pre v is a redundant vertex. @@ -579,16 +579,17 @@ public: Halfedge* erase_redundant_vertex(Vertex* v); //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ const Face* reference_face() const { return spherical_face(); } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. + /*! returns a reference face of the arrangement. * All reference faces of arrangements of the same type have a common point. + * * \return A pointer to the reference face. */ Face* reference_face() { return spherical_face(); } @@ -598,7 +599,7 @@ protected: /// \name Auxiliary functions. //@{ - /*! Obtain the curve associated with a boundary vertex. + /*! obtains the curve associated with a boundary vertex. * \param v The boundary vertex. * \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end; * ARR_MAX_END if it is induced by the curve's maximal end. @@ -607,7 +608,7 @@ protected: */ const X_monotone_curve_2& _curve(const Vertex* v, Arr_curve_end& ind) const; - /*! Return the halfedge, the target vertex of which is given, that is + /*! returns the halfedge, the target vertex of which is given, that is * the predecessor of a halfedge, the curve of which is given, that is about * to be inserted into the dcel. */ @@ -615,7 +616,7 @@ protected: const X_monotone_curve_2& xc, Arr_curve_end ind) const; - /*! Return the halfedge, the target vertex of which is a given pole, + /*! returns the halfedge, the target vertex of which is a given pole, * that is the predecessor of a halfedge, the curve of which is given, that * is about to be inserted into the dcel. */ @@ -623,7 +624,7 @@ protected: Arr_curve_end ind) const; - /*! Return the face that lies below the given vertex, which lies + /*! returns the face that lies below the given vertex, which lies * on the line of discontinuity. */ Face* _face_below_vertex_on_discontinuity(Vertex* v) const; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h index 16dc60a93fd..18543867132 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_batched_pl_helper.h @@ -53,7 +53,7 @@ protected: Face_const_handle m_unb_face; // The unbounded arrangement face. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_bounded_planar_batched_pl_helper(const Arrangement_2* arr) : @@ -76,7 +76,7 @@ public: void after_handle_event(Event* /* event */) { return; } //@} - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_const_handle top_face() const { return (m_unb_face); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h index e68f2798020..cb108ec55ab 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h @@ -85,12 +85,12 @@ protected: Indices_list m_emptylist; public: - /*! Constructor. */ + /*! constructs. */ Arr_bounded_planar_construction_helper(Arrangement_2* arr) : m_top_traits(arr->topology_traits()) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_bounded_planar_construction_helper() {} @@ -115,20 +115,20 @@ public: Indices_list& halfedge_indices_list() { return m_emptylist; } - /*! Collect a subcurve index that does not see any status-line from below. */ + /*! collects a subcurve index that does not see any status-line from below. */ void add_subcurve_in_top_face(unsigned int /* index */) { return; } /*! A notification invoked before the given event it deallocated. */ void before_deallocate_event(Event* /* event */) { return; } //@} - /*! Set the map that maps each halfedge to the list of subcurve indices + /*! sets the map that maps each halfedge to the list of subcurve indices * that "see" the halfedge from below. */ void set_halfedge_indices_map(Halfedge_indices_map& /* table */) { return; } - /*! Determine if we should swap the order of predecessor halfedges when + /*! determines if we should swap the order of predecessor halfedges when * calling insert_at_vertices_ex() . */ bool swap_predecessors(Event* /* event */) const @@ -138,7 +138,7 @@ public: return false; } - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_handle top_face() const { return m_unb_face; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h index a1ec7663df9..fc015fd9ec1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_overlay_helper.h @@ -75,7 +75,7 @@ protected: Face_handle_blue m_blue_ubf; // Blue unbounded face. public: - /*! Constructor, given the input red and blue arrangements. */ + /*! constructs, given the input red and blue arrangements. */ Arr_bounded_planar_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) : m_red_top_traits (red_arr->topology_traits()), m_blue_top_traits (blue_arr->topology_traits()) @@ -98,10 +98,10 @@ public: void before_handle_event(Event* /* e */) {} //@} - /*! Obtain the current red top face. */ + /*! obtains the current red top face. */ Face_handle_red red_top_face() const { return m_red_ubf; } - /*! Obtain the current blue top face. */ + /*! obtains the current blue top face. */ Face_handle_blue blue_top_face() const { return m_blue_ubf; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h index ba76651f9d7..67025ec9621 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_vert_decomp_helper.h @@ -57,7 +57,7 @@ protected: Face_const_handle m_unb_face; // The unbounded arrangement face. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_bounded_planar_vert_decomp_helper(const Arrangement_2* arr) : @@ -80,10 +80,10 @@ public: void after_handle_event(Event* /* event */) { return; } //@} - /*! Get the current top object. */ + /*! obtains the current top object. */ Vert_type top_object() const { return Vert_type(m_unb_face); } - /*! Get the current bottom object. */ + /*! obtains the current bottom object. */ Vert_type bottom_object() const { return Vert_type(m_unb_face); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h index 0ceba209b57..aa58d4d20c5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h @@ -82,20 +82,20 @@ public: ///! \name Construction methods. //@{ - /*! Default constructor. */ + /*! constructs defaults. */ Arr_planar_topology_traits_base_2() : m_own_geom_traits(true) { m_geom_traits = new Traits_adaptor_2; } - /*! Constructor with a geometry-traits class. */ + /*! constructs with a geometry-traits class. */ Arr_planar_topology_traits_base_2 (const Geometry_traits_2* geom_traits) : m_own_geom_traits(false) { m_geom_traits = static_cast(geom_traits); } - /*! Assign the contents of another topology-traits class. */ + /*! assigns the contents of another topology-traits class. */ void assign(const Self& other); - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_planar_topology_traits_base_2() { // Clear the DCEL. @@ -112,13 +112,13 @@ public: ///! \name Common topology-traits methods. //@{ - /*! Get the DCEL (const version). */ + /*! obtains the DCEL (const version). */ const Dcel& dcel() const { return m_dcel; } - /*! Get the DCEL (non-const version). */ + /*! obtains the DCEL (non-const version). */ Dcel& dcel() { return (m_dcel); } - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to a given point. * \param v The new boundary vertex. * \param p The point. @@ -134,7 +134,7 @@ public: return; } - /*! Receive a notification on the creation of a new boundary vertex that + /*! receives a notification on the creation of a new boundary vertex that * corresponds to the given curve end. * \param v The new boundary vertex. * \param cv The x-monotone curve. @@ -152,7 +152,7 @@ public: return; } - /*! Determines whether the function should decide on swapping the predecssor + /*! determines whether the function should decide on swapping the predecssor * halfedges that imply two ccb (and whose signs are given here). * If true, swap_predecessors will be correctly set. If false, * generic way of searching for lexicographically minimal point and checking @@ -171,8 +171,8 @@ public: return false; } - /*! Given signs of two ccbs that show up when splitting upon insertion of - * curve into two, determine what happens to the face(s). + /*! given signs of two ccbs that show up when splitting upon insertion of + * curve into two, determines what happens to the face(s). * \param signs1 signs in x and y of the first implied ccb * \param signs2 signs in x and y of the secondd implied ccb * \return A pair indicating whether the insertion will cause the face @@ -190,7 +190,7 @@ public: return std::make_pair(true, true); } - /*! Determine whether the given point lies in the interior of the given face. + /*! determines whether the given point lies in the interior of the given face. * \param f The face. * \param p The query point. * \param v The vertex associated with p (if exists). @@ -211,7 +211,7 @@ public: /// \name Additional predicates, specialized for this topology-traits class. //@{ - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the comparison of the x-coordinates of p and v. @@ -219,7 +219,7 @@ public: virtual Comparison_result compare_x(const Point_2& p, const Vertex* v) const = 0; - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the xy-lexicographic comparison of p and v. @@ -227,7 +227,7 @@ public: virtual Comparison_result compare_xy(const Point_2& p, const Vertex* v) const = 0; - /*! Compare the relative y-position of the given point and the given edge + /*! compares the relative y-position of the given point and the given edge * (which may be fictitious). * \param p The point. * \param he The edge (one of the pair of halfedges). diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h index 53bf38c7fb0..f4b7b5b635d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_batched_pl_helper.h @@ -57,7 +57,7 @@ protected: Face_const_handle m_spherical_face; public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_spherical_batched_pl_helper(const Arrangement_2* arr) : @@ -124,7 +124,7 @@ public: } //@} - /*! Obtain the current top face. */ + /*! obtains the current top face. */ Face_const_handle top_face() const { return m_spherical_face; } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h index 51bcab049d6..6fb0f56ce17 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h @@ -102,14 +102,14 @@ protected: Halfedge_indices_map* m_he_ind_map_p; public: - /*! Constructor. */ + /*! constructs. */ Arr_spherical_construction_helper(Arrangement_2* arr) : m_top_traits(arr->topology_traits()), m_arr_access(*arr), m_he_ind_map_p(nullptr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_spherical_construction_helper() {} /// \name Notification functions. @@ -127,25 +127,25 @@ public: /*! A notification invoked when a new subcurve is created. */ virtual void add_subcurve(Halfedge_handle , Subcurve* ) { return; } - /*! Collect a subcurve index that does not see any status-line from below. + /*! collects a subcurve index that does not see any status-line from below. */ void add_subcurve_in_top_face(unsigned int index) { m_subcurves_at_nf.push_back(index); } - /*! Obtain the indices of the halfedges that "see" the north. */ + /*! obtains the indices of the halfedges that "see" the north. */ Indices_list& halfedge_indices_list() { return m_subcurves_at_nf; } /*! A notification invoked before the given event it deallocated. */ void before_deallocate_event(Event* /* event */) {} //@} - /*! Set the map that maps each halfedge to the list of subcurve indices + /*! sets the map that maps each halfedge to the list of subcurve indices * that "see" the halfedge from below. */ void set_halfedge_indices_map(Halfedge_indices_map& table) { m_he_ind_map_p = &table; } - /*! Determine if we should swap the order of predecessor halfedges when + /*! determines if we should swap the order of predecessor halfedges when * calling insert_at_vertices_ex() . */ bool swap_predecessors(Event* event) const @@ -157,10 +157,10 @@ public: event->parameter_space_in_y() == ARR_TOP_BOUNDARY); } - /*! Get the current top face. */ + /*! obtains the current top face. */ virtual Face_handle top_face() const { return m_spherical_face; } - /*! Splice the indices list of the given halfedge, inserting the + /*! splices the indices list of the given halfedge, inserting the * indices of the halfedges that "see" the north pole. */ void splice_indices_list(Halfedge_handle he) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h index 28a89150af8..b45c3a50408 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h @@ -78,10 +78,10 @@ protected: Halfedge_handle m_spherical_halfedge; public: - /*! Constructor */ + /*! constructs */ Arr_spherical_insertion_helper(Arrangement_2 *arr) : Base(arr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_spherical_insertion_helper() {} /// \name Notification functions. @@ -104,7 +104,7 @@ public: /*! A notification invoked when a new subcurve is created. */ virtual void add_subcurve(Halfedge_handle he, Subcurve* sc); - /*! Get the current top face. */ + /*! obtains the current top face. */ virtual Face_handle top_face() const; private: @@ -256,7 +256,7 @@ add_subcurve(Halfedge_handle he, Subcurve* /* sc */) } } -/*! Get the current top face. */ +/*! obtains the current top face. */ template typename Arr_spherical_insertion_helper::Face_handle Arr_spherical_insertion_helper::top_face() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h index 50dff010180..69e5775a426 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_overlay_helper.h @@ -83,7 +83,7 @@ protected: Face_handle_blue m_blue_nf; public: - /*! Constructor, given the input red and blue arrangements. */ + /*! constructs, given the input red and blue arrangements. */ Arr_spherical_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) : m_red_top_traits(red_arr->topology_traits()), m_blue_top_traits(blue_arr->topology_traits()) @@ -270,21 +270,21 @@ public: } //@} - /*! Get the current red top face. */ + /*! obtains the current red top face. */ Face_handle_red red_top_face() const { return m_red_nf; } - /*! Get the current blue top face. */ + /*! obtains the current blue top face. */ Face_handle_blue blue_top_face() const { return m_blue_nf; } - /*! Obtain the red topology traits. */ + /*! obtains the red topology traits. */ const Topology_traits_red* red_topology_traits() const { return m_red_top_traits; } - /*! Obtain the blue topology traits. */ + /*! obtains the blue topology traits. */ const Topology_traits_blue* blue_topology_traits() const { return m_blue_top_traits; } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h index 931359c3f11..b05b1c6ce37 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h @@ -64,7 +64,7 @@ protected: Face_const_handle m_south_face; // Current south face. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_spherical_vert_decomp_helper(const Arrangement_2* arr) : @@ -84,14 +84,14 @@ public: void after_handle_event(Event * event); //@} - /*! Get the current top object. */ + /*! obtains the current top object. */ Vert_type top_object () const { return (m_valid_north_pole) ? Vert_type(m_north_pole) : Vert_type(m_north_face); } - /*! Get the current bottom object. */ + /*! obtains the current bottom object. */ Vert_type bottom_object () const { return (m_valid_south_pole) ? diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h index c83b3b6f324..8224e3df73b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_batched_pl_helper.h @@ -56,8 +56,7 @@ protected: Halfedge_const_handle m_top_fict; // The current top fictitious halfedge. public: - /*! - * Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_unb_planar_batched_pl_helper(const Arrangement_2* arr) : @@ -76,7 +75,7 @@ public: void after_handle_event(Event* event); //@} - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_const_handle top_face() const { return (m_top_fict->face()); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h index 4c408625e0c..8f2d123c7ff 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h @@ -103,7 +103,7 @@ protected: // (stored in the visitor class). public: - /*! Constructor. */ + /*! constructs. */ Arr_unb_planar_construction_helper(Arrangement_2* arr) : m_top_traits(arr->topology_traits()), m_arr_access(*arr), @@ -112,7 +112,7 @@ public: m_he_ind_map_p(nullptr) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_unb_planar_construction_helper(){} /// \name Notification functions. @@ -121,8 +121,7 @@ public: /* A notification issued before the sweep process starts. */ virtual void before_sweep(); - /*! - * A notification invoked before the sweep-line starts handling the given + /*! A notification invoked before the sweep-line starts handling the given * event. */ virtual void before_handle_event(Event* event); @@ -132,11 +131,11 @@ public: Subcurve* /* sc */) {} - /*! Collect a subcurve index that does not see any status-line from below. */ + /*! collects a subcurve index that does not see any status-line from below. */ void add_subcurve_in_top_face(unsigned int index) { m_subcurves_at_ubf.push_back(index); } - /*! Get the indices of the halfedges below the subcurve. */ + /*! obtains the indices of the halfedges below the subcurve. */ Indices_list& halfedge_indices_list() { return (m_subcurves_at_ubf); } @@ -150,15 +149,13 @@ public: } //@} - /*! - * Set the map that maps each halfedge to the list of subcurve indices + /*! sets the map that maps each halfedge to the list of subcurve indices * that "see" the halfedge from below. */ void set_halfedge_indices_map(Halfedge_indices_map& table) { m_he_ind_map_p = &table; } - /*! - * Determine if we should swap the order of predecessor halfedges when + /*! determines if we should swap the order of predecessor halfedges when * calling insert_at_vertices_ex() . */ bool swap_predecessors(Event* event) const @@ -170,7 +167,7 @@ public: (event->parameter_space_in_y() == ARR_TOP_BOUNDARY)); } - /*! Get the current top face. */ + /*! obtains the current top face. */ Face_handle top_face() const { return (m_th->face()); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h index 5b244411e8a..b4204b695a4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_overlay_helper.h @@ -81,7 +81,7 @@ protected: Vertex_handle_blue v_blue_tl; // Blue top-left fictitious vertex. public: - /*! Constructor, given the input red and blue arrangements. */ + /*! constructs, given the input red and blue arrangements. */ Arr_unb_planar_overlay_helper(const Ar2* red_arr, const Ab2* blue_arr) : m_red_top_traits(red_arr->topology_traits()), m_blue_top_traits(blue_arr->topology_traits()) @@ -99,10 +99,10 @@ public: void before_handle_event(Event* e); //@} - /*! Get the current red top face. */ + /*! obtains the current red top face. */ Face_handle_red red_top_face() const { return (m_red_th->face()); } - /*! Get the current blue top face. */ + /*! obtains the current blue top face. */ Face_handle_blue blue_top_face() const { return (m_blue_th->face()); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h index 2b0abaceb4b..9700dd8f5af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_vert_decomp_helper.h @@ -60,7 +60,7 @@ protected: // halfedge. public: - /*! Constructor. + /*! constructs. * \param arr The arrangement. */ Arr_unb_planar_vert_decomp_helper(const Arrangement_2* arr) : @@ -79,10 +79,10 @@ public: void after_handle_event(Event* event); //@} - /*! Get the current top object. */ + /*! obtains the current top object. */ Vert_type top_object() const { return Vert_type(m_top_fict); } - /*! Get the current bottom object. */ + /*! obtains the current bottom object. */ Vert_type bottom_object() const { return Vert_type(m_bottom_fict); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index daf9b1892aa..746c0c35438 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -165,29 +165,29 @@ private: { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_2_OP); } public: - /*! Construct default. */ + /*! constructs default. */ template Arr_tracing_traits_2(Args ... args) : Base(std::forward(args)...) { enable_all_traces(); } - /*! Disable copy constructor. */ + /*! disables copy constructor. */ Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete; - /*! Enable the trace of a traits operation. + /*! enables the trace of a traits operation. * \param id the operation identifier. */ void enable_trace(Operation_id id) { m_flags |= 0x1 << id; } - /*! Enable the trace of all traits operations. + /*! enables the trace of all traits operations. */ void enable_all_traces() { m_flags = 0xffffffff; } - /*! Disable the trace of a traits operation. + /*! disables the trace of a traits operation. * \param id the operation identifier. */ void disable_trace(Operation_id id) { m_flags &= ~(0x1 << id); } - /*! Disable the trace of all traits operations. + /*! disables the trace of all traits operations. */ void disable_all_traces() { m_flags = 0x0; } @@ -220,11 +220,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_x_2(const Base& base, bool enabled = true) : m_object(base.compare_x_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param p1 first point. * \param p2 second point. * \return the comparison result. @@ -249,11 +249,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_xy_2(const Base& base, bool enabled = true) : m_object(base.compare_xy_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param p1 the first point. * \param p2 the second point. * \return the comparison result. @@ -276,11 +276,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Construct_min_vertex_2(const Base& base, bool enabled = true) : m_object(base.construct_min_vertex_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve the left endpoint of which is obtained. * \return the left endpoint. */ @@ -305,11 +305,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Construct_max_vertex_2(const Base& base, bool enabled = true) : m_object(base.construct_max_vertex_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve the right endpoint of which is obtained. * \return the right endpoint. */ @@ -335,11 +335,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Is_vertical_2(const Base& base, bool enabled = true) : m_object(base.is_vertical_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve. * \return a Boolean that indicates whether the curve is vertical or not. */ @@ -362,11 +362,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_y_at_x_2(const Base& base, bool enabled = true) : m_object(base.compare_y_at_x_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param p the point. * \param xcv the curve. * \return the comparison result. @@ -393,7 +393,7 @@ public: bool m_enabled_curve; public: - /*! Construct */ + /*! constructs */ Equal_2(const Base& base, bool enabled_point = true, bool enabled_curve = true) : m_object(base.equal_2_object()), @@ -401,7 +401,7 @@ public: m_enabled_curve(enabled_curve) {} - /*! Operate + /*! operates * \param xcv1 the first curve. * \param xcv2 the second curve. * \return true if the \f$x\f$-monotone curves are equal and false @@ -418,7 +418,7 @@ public: return equal; } - /*! Operate + /*! operates * \param p1 the first point. * \param p2 the second point. * \return true if the points are equal and false otherwise. @@ -444,11 +444,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_y_at_x_left_2(const Base& base, bool enabled = true) : m_object(base.compare_y_at_x_left_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv1 the first curve. * \param xcv2 the second curve. * \param p the reference point. @@ -478,11 +478,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_y_at_x_right_2(const Base& base, bool enabled = true) : m_object(base.compare_y_at_x_right_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv1 the first curve. * \param xcv2 the second curve. * \param p the reference point. @@ -514,11 +514,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Make_x_monotone_2(const Base& base, bool enabled = true) : m_object(base.make_x_monotone_2_object()), m_enabled(enabled) {} - /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + /*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them * into a given output iterator. * \param cv the curve. * \param oi an output iterator for the result. Its value type is a variant @@ -565,11 +565,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Split_2(const Base& base, bool enabled = true) : m_object(base.split_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve to split. * \param p the split point. * \param xcv1 the left resulting subcurve (`p` is its right endpoint).. @@ -591,18 +591,19 @@ public: } }; - /*! A functor that computes intersections between two \f$x\f$-monotone curves. */ + /*! A functor that computes intersections between two \f$x\f$-monotone curves. + */ class Intersect_2 { private: typename Base::Intersect_2 m_object; bool m_enabled; public: - /*! Construct */ + /*! constructs */ Intersect_2(const Base& base, bool enabled = true) : m_object(base.intersect_2_object()), m_enabled(enabled) {} - /*! Compute the intersections of the two given curves and insert them into + /*! computes the intersections of the two given curves and insert them into * a given output iterator. * \param xcv1 the first curve. * \param xcv2 the ssecond curve. @@ -657,11 +658,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Are_mergeable_2(const Base& base, bool enabled = true) : m_base_traits(base), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv1 the first curve. * \param xcv2 the second curve. * \return true if the two curve are mergeable and false otherwise. @@ -706,11 +707,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Merge_2(const Base& base, bool enabled = true) : m_object(base.merge_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv1 the first curve. * \param xcv2 the second curve. * \param xcv the merged curve. @@ -733,11 +734,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Construct_opposite_2(const Base& base, bool enabled = true) : m_object(base.construct_opposite_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve. * \return the opposite curve. */ @@ -760,11 +761,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_endpoints_xy_2(const Base& base, bool enabled = true) : m_object(base.compare_endpoints_xy_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve. * \return the comparison result. */ @@ -790,12 +791,12 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Approximate_2(const Base& base, bool enabled = true) : m_object(base.approximate_2_object()), m_enabled(enabled) {} - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -811,7 +812,7 @@ public: return res; } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { if (! m_enabled) return m_object(p); @@ -822,14 +823,15 @@ public: return res; } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double error, OutputIterator oi, bool l2r = true) const { if (! m_enabled) return m_object(xcv, error, oi, l2r); std::cout << "approximate_2" << std::endl - << " xcv: " << xcv << ", error: " << error << ", l2r: " << l2r << std::endl; + << " xcv: " << xcv << ", error: " << error + << ", l2r: " << l2r << std::endl; auto res = m_object(xcv, error, oi, l2r); std::cout << " result: " << res << std::endl; return res; @@ -847,12 +849,12 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Parameter_space_in_x_2(const Base& base, bool enabled = true) : m_object(base.parameter_space_in_x_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve the end of which is tested. * \param ce the curve-end identifier. * \return the boundary type. @@ -893,10 +895,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Is_on_x_identification_2(const Base& base, bool enabled = true) : m_object(base.is_on_x_identification_2_object()), m_enabled(enabled) {} - /*! Operate + + /*! operates * \param p1 the point. */ bool operator()(const Point_2& p) const { @@ -908,7 +911,7 @@ public: return cr; } - /*! Operate + /*! operates * \param xcv1 the curve. */ bool operator()(const X_monotone_curve_2& xcv) const { @@ -930,13 +933,13 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_y_on_boundary_2(const Base& base, bool enabled = true) : m_object(base.compare_y_on_boundary_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param p1 the first point. * \param p2 the second point. */ @@ -960,11 +963,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_y_near_boundary_2(const Base& base, bool enabled = true) : m_object(base.compare_y_near_boundary_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv1 the first curve the end point of which is tested. * \param xcv2 the second curve the end point of which is tested. * \param ce the curve-end identifier. @@ -995,11 +998,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Parameter_space_in_y_2(const Base& base, bool enabled = true) : m_object(base.parameter_space_in_y_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv the curve the end of which is tested. * \param ce the curve-end identifier. * \return the boundary type. @@ -1014,7 +1017,7 @@ public: return bt; } - /*! Operate + /*! operates * \param p the point. * \return the boundary type. */ @@ -1037,10 +1040,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Is_on_y_identification_2(const Base& base, bool enabled = true) : m_object(base.is_on_y_identification_2_object()), m_enabled(enabled) {} - /*! Operate + + /*! operates * \param p1 the point. */ bool operator()(const Point_2& p) const { @@ -1052,7 +1056,7 @@ public: return cr; } - /*! Operate + /*! operates * \param xcv1 the curve. */ bool operator()(const X_monotone_curve_2& xcv) const { @@ -1074,10 +1078,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_x_on_boundary_2(const Base& base, bool enabled = true) : m_object(base.compare_x_on_boundary_2_object()), m_enabled(enabled) {} - /*! Operate + + /*! operates * \param p1 the first point. * \param p2 the second point. */ @@ -1091,7 +1096,7 @@ public: return cr; } - /*! Operate + /*! operates * \param pt the point. * \param xcv the curve. * \param ce the curve-end. @@ -1109,7 +1114,7 @@ public: return cr; } - /*! Operate + /*! operates * \param xcv1 the first curve. * \param ce1 the first curve-end. * \param xcv2 the second curve. @@ -1140,11 +1145,11 @@ public: bool m_enabled; public: - /*! Construct */ + /*! constructs */ Compare_x_near_boundary_2(const Base& base, bool enabled = true) : m_object(base.compare_x_near_boundary_2_object()), m_enabled(enabled) {} - /*! Operate + /*! operates * \param xcv1 the first curve the end of which is to be compared. * \param ce1 the identifier of the end of the first curve. * \param xcv2 the second curve the end of which is to be compared. @@ -1258,7 +1263,7 @@ OutputStream& operator<<(OutputStream& os, Comparison_result cr) { return os; } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h index 5776d9cf3ab..7a85d050790 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h @@ -130,7 +130,7 @@ protected: inline Result_type default_result() const { return Result::default_result(); } public: - /*! Default constructor. */ + /*! constructs default. */ Arr_trapezoid_ric_point_location (bool with_guarantees = true, double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD, @@ -141,7 +141,7 @@ public: td.size_threshold(size_thrs); } - /*! Constructor given an arrangement. */ + /*! constructs given an arrangement. */ Arr_trapezoid_ric_point_location (const Base_aos& arr, bool with_guarantees = true, @@ -157,7 +157,7 @@ public: _construct_td(); } - /*! Destructor. */ + /*! destructs. */ ~Arr_trapezoid_ric_point_location() { } /*! defines whether the underlying search structure guarantees logarithmic @@ -190,7 +190,7 @@ public: void print_dag(std::ostream& out) const { td.print_dag(out); } #endif - /*! Locate the arrangement feature containing the given point. + /*! locates the arrangement feature containing the given point. * \param p The query point. * \return An object representing the arrangement feature containing the * query point. This object is either a Face_const_handle or a @@ -198,7 +198,7 @@ public: */ result_type locate(const Point_2& p) const; - /*! Locate the arrangement feature which a upward vertical ray emanating from + /*! locates the arrangement feature which a upward vertical ray emanating from * the given point hits. * \param p The query point. * \return An object representing the arrangement feature the ray hits. @@ -208,7 +208,7 @@ public: result_type ray_shoot_up(const Point_2& p) const { return (_vertical_ray_shoot(p, true)); } - /*! Locate the arrangement feature which a downward vertical ray emanating + /*! locates the arrangement feature which a downward vertical ray emanating * from the given point hits. * \param p The query point. * \return An object representing the arrangement feature the ray hits. @@ -307,7 +307,7 @@ public: //#endif protected: - /*! Construct the trapezoidal decomposition. */ + /*! constructs the trapezoidal decomposition. */ void _construct_td() { td.clear(); @@ -322,7 +322,7 @@ protected: td.insert(he_container.begin(), he_container.end()); } - /*! Obtain the unbounded face that contains the point when the trapezoid is + /*! obtains the unbounded face that contains the point when the trapezoid is * unbounded * \param tr The unbounded trapezoid whose face we should get * \param p The query point. @@ -334,7 +334,7 @@ protected: const Point_2& p, Arr_all_sides_oblivious_tag) const; - /*! Obtain the unbounded face that contains the point when the trapezoid is + /*! obtains the unbounded face that contains the point when the trapezoid is * unbounded * \param tr The unbounded trapezoid whose face we should get * \param p The query point. @@ -346,7 +346,7 @@ protected: const Point_2& p, Arr_not_all_sides_oblivious_tag) const; - /*! Locate the arrangement feature which a vertical ray emanating from the + /*! locates the arrangement feature which a vertical ray emanating from the * given point hits, considering isolated vertices. * \param p The query point. * \param shoot_up Indicates whether the ray is directed upward or downward. @@ -356,9 +356,8 @@ protected: */ result_type _vertical_ray_shoot(const Point_2& p, bool shoot_up) const; - /*! In vertical ray shoot, when the closest halfedge is found - * (or unbounded face) - * we check the isolated vertices inside the face to check whether there + /*! in vertical ray shoot, when the closest halfedge is found (or unbounded + * face) checks the isolated vertices inside the face to check whether there * is an isolated vertex right above/below the query point. */ result_type _check_isolated_for_vertical_ray_shoot diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index 664aa1a4864..aedd32ed0a0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -124,20 +124,20 @@ public: ///! \name Construction methods. //@{ - /*! Construct Default. */ + /*! constructs Default. */ Arr_unb_planar_topology_traits_2(); - /*! Constructor with a geometry-traits class. */ + /*! constructs with a geometry-traits class. */ Arr_unb_planar_topology_traits_2(const Gt2* tr); - /*! Assign the contents of another topology-traits class. */ + /*! assigns the contents of another topology-traits class. */ void assign(const Self& other); //@} ///! \name Accessing the DCEL and constructing iterators. //@{ - /*! Determine whether the DCEL reprsenets an empty structure. */ + /*! determines whether the DCEL reprsenets an empty structure. */ bool is_empty_dcel() const { // An empty arrangement contains just two four vertices at infinity @@ -146,44 +146,44 @@ public: this->m_dcel.size_of_halfedges() == 8); } - /*! Check whether the given vertex is concrete (associated with a point). */ + /*! checks whether the given vertex is concrete (associated with a point). */ bool is_concrete_vertex(const Vertex* v) const { return (! v->has_null_point()); } - /*! Obtain the number of concrete vertices. + /*! obtains the number of concrete vertices. * \return All vertices not lying at infinity are concrete. */ Size number_of_concrete_vertices() const { return (this->m_dcel.size_of_vertices() - n_inf_verts); } - /*! Check if the given vertex is valid (not a fictitious one). */ + /*! checks if the given vertex is valid (not a fictitious one). */ bool is_valid_vertex(const Vertex* v) const { return (! v->has_null_point() || ((v != v_bl) && (v != v_tl) && (v != v_br) && (v != v_tr))); } - /*! Obtain the number of valid vertices. + /*! obtains the number of valid vertices. * \return All vertices, except the four fictitious one, are valid. */ Size number_of_valid_vertices() const { return (this->m_dcel.size_of_vertices() - 4); } - /*! Check whether the given halfedge is valid (not a fictitious one). */ + /*! checks whether the given halfedge is valid (not a fictitious one). */ bool is_valid_halfedge(const Halfedge* he) const { return (! he->has_null_curve()); } - /*! Obtain the number of valid halfedges. + /*! obtains the number of valid halfedges. * \return the number of valid halfedges, not including fictitious halfedges. * Note that each vertex at infinity induces two fictitious halfedges */ Size number_of_valid_halfedges() const { return (this->m_dcel.size_of_halfedges() - 2*n_inf_verts); } - /*! Check whether the given face is valid (not a fictitious one). */ + /*! checks whether the given face is valid (not a fictitious one). */ bool is_valid_face (const Face* f) const { return (! f->is_fictitious()); } - /*! Obtain the number of valid faces. + /*! obtains the number of valid faces. * \return the number of valid faces, not including ficitious DCEL faces. */ Size number_of_valid_faces() const @@ -259,15 +259,15 @@ public: ///! \name Topology-traits methods. //@{ - /*! Initialize an empty DCEL structure. + /*! initializes an empty DCEL structure. */ void init_dcel(); - /*! Make the necessary updates after the DCEL structure have been updated. + /*! makes the necessary updates after the DCEL structure have been updated. */ void dcel_updated(); - /*! Check if the given vertex is associated with the given curve end. + /*! checks if the given vertex is associated with the given curve end. * \param v The vertex. * \param cv The x-monotone curve. * \param ind The curve end. @@ -280,8 +280,8 @@ public: const X_monotone_curve_2& cv, Arr_curve_end ind, Arr_parameter_space ps_x, Arr_parameter_space ps_y) const; - /*! Given a curve end with boundary conditions and a face that contains the - * interior of the curve, find a place for a boundary vertex that will + /*! givens a curve end with boundary conditions and a face that contains the + * interior of the curve, finds a place for a boundary vertex that will * represent the curve end along the face boundary. * \param f The face. * \param cv The x-monotone curve. @@ -299,7 +299,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Locate the predecessor halfedge for the given curve around a given + /*! locates the predecessor halfedge for the given curve around a given * vertex with boundary conditions. * \param v The vertex. * \param cv The x-monotone curve. @@ -321,7 +321,7 @@ public: return (nullptr); } - /*! Locate a DCEL feature that contains the given unbounded curve end. + /*! locates a DCEL feature that contains the given unbounded curve end. * \param cv The x-monotone curve. * \param ind The curve end. * \param ps_x The boundary condition of the curve end in x. @@ -337,7 +337,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y); - /*! Split a fictitious edge using the given vertex. + /*! splits a fictitious edge using the given vertex. * \param e The edge to split (one of the pair of halfedges). * \param v The split vertex. * \pre e is a fictitious halfedge. @@ -346,19 +346,19 @@ public: */ Halfedge* split_fictitious_edge(Halfedge* e, Vertex* v); - /*! Determine whether the given face is unbounded. + /*! determines whether the given face is unbounded. * \param f The face. * \return Whether f is unbounded. */ bool is_unbounded(const Face* f) const; - /*! Determine whether the given boundary vertex is redundant. + /*! determines whether the given boundary vertex is redundant. * \param v The vertex. * \return Whether v is redundant, and should be erased. */ bool is_redundant(const Vertex* v) const; - /*! Erase the given redundant vertex by merging a fictitious edge. + /*! erases the given redundant vertex by merging a fictitious edge. * The function does not free the vertex v itself. * \param v The vertex. * \pre v is a redundant vertex. @@ -366,12 +366,12 @@ public: */ Halfedge* erase_redundant_vertex(Vertex* v); - //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. - */ + //! reference_face (const version). + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. + */ const Face* reference_face() const { CGAL_assertion(v_tr->halfedge()->direction() == ARR_LEFT_TO_RIGHT); @@ -379,10 +379,10 @@ public: } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A pointer to the reference face. + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A pointer to the reference face. */ Face* reference_face() { @@ -398,41 +398,41 @@ public: /*! This function is used by the "walk" point-location strategy. */ const Face* initial_face() const { return fict_face; } - /*! Obtain the fictitious face (const version). */ + /*! obtains the fictitious face (const version). */ const Face* fictitious_face() const { return fict_face; } - /*! Obtain the fictitious face (non-const version). */ + /*! obtains the fictitious face (non-const version). */ Face* fictitious_face() { return fict_face; } - /*! Obtain the bottom-left fictitious vertex (const version). */ + /*! obtains the bottom-left fictitious vertex (const version). */ const Vertex* bottom_left_vertex() const { return (v_bl); } - /*! Obtain the bottom-left fictitious vertex (non-const version). */ + /*! obtains the bottom-left fictitious vertex (non-const version). */ Vertex* bottom_left_vertex() { return (v_bl); } - /*! Obtain the top-left fictitious vertex (const version). */ + /*! obtains the top-left fictitious vertex (const version). */ const Vertex* top_left_vertex() const { return (v_tl); } - /*! Obtain the top-left fictitious vertex (non-const version). */ + /*! obtains the top-left fictitious vertex (non-const version). */ Vertex* top_left_vertex() { return (v_tl); } - /*! Obtain the bottom-right fictitious vertex (const version). */ + /*! obtains the bottom-right fictitious vertex (const version). */ const Vertex* bottom_right_vertex() const { return (v_br); } - /*! Obtain the bottom-right fictitious vertex (non-const version). */ + /*! obtains the bottom-right fictitious vertex (non-const version). */ Vertex* bottom_right_vertex() { return (v_br); } - /*! Obtain the top-right fictitious vertex (const version). */ + /*! obtains the top-right fictitious vertex (const version). */ const Vertex* top_right_vertex() const { return (v_tr); } - /*! Obtain the top-right fictitious vertex (non-const version). */ + /*! obtains the top-right fictitious vertex (non-const version). */ Vertex* top_right_vertex() { return (v_tr); } //@} /// \name Additional predicates, specialized for this topology-traits class. //@{ - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the comparison of the x-coordinates of p and v. @@ -440,7 +440,7 @@ public: virtual Comparison_result compare_x(const Point_2& p, const Vertex* v) const; - /*! Compare the given vertex (which may lie at infinity) and the given point. + /*! compares the given vertex (which may lie at infinity) and the given point. * \param p The point. * \param v The vertex. * \return The result of the xy-lexicographic comparison of p and v. @@ -448,7 +448,7 @@ public: virtual Comparison_result compare_xy(const Point_2& p, const Vertex* v) const; - /*! Compare the relative y-position of the given point and the given edge + /*! compares the relative y-position of the given point and the given edge * (which may be fictitious). * \param p The point. * \param he The edge (one of the pair of halfedges). @@ -464,7 +464,7 @@ protected: /// \name Auxiliary functions. //@{ - /*! Obtain the curve associated with a boundary vertex. + /*! obtains the curve associated with a boundary vertex. * \param v The vertex as infinity. * \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end; * ARR_MAX_END if it is induced by the curve's maximal end. @@ -473,7 +473,7 @@ protected: */ const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const; - /*! Check whether the given infinite curve end lies on the given fictitious + /*! checks whether the given infinite curve end lies on the given fictitious * halfedge. * \param cv The curve. * \param ind Whether we refer to the minimal or maximal end of cv. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h index a9682dc5bad..054c0b67275 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h @@ -62,24 +62,24 @@ private: enum {MIN_REV_MAP_SIZE = 32}; public: - /*! Default constructor. */ + /*! constructs default. */ Arr_vertex_index_map() : Base(), n_vertices(0), rev_map(MIN_REV_MAP_SIZE) {} - /*! Constructor with an associated arrangement. */ + /*! constructs with an associated arrangement. */ Arr_vertex_index_map(const Base_aos& arr) : Base(const_cast(arr)) { _init(); } - /*! Copy constructor. */ + /*! constructs copy. */ Arr_vertex_index_map(const Self& other) : Base(const_cast(*(other.arrangement()))) { _init(); } - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& other) { if (this == &other) return (*this); @@ -89,13 +89,13 @@ public: return (*this); } - /*! Get the index of a given vertex. + /*! obtains the index of a given vertex. * \param v A handle to the vertex. * \pre v is a valid vertex in the arrangement. */ unsigned int operator[](Vertex_handle v) const { return index_map[v]; } - /*! Get the vertex given its index. + /*! obtains the vertex given its index. * \param i The index of the vertex. * \pre i is less than the number of vertices in the graph. */ @@ -107,27 +107,27 @@ public: /// \name Notification functions, to keep the mapping up-to-date. //@{ - /*! Update the mapping after the arrangement has been assigned with another + /*! updates the mapping after the arrangement has been assigned with another * arrangement. */ virtual void after_assign() override { _init(); } - /*! Update the mapping after the arrangement is cleared. + /*! updates the mapping after the arrangement is cleared. */ virtual void after_clear() override { _init(); } - /*! Update the mapping after attaching to a new arrangement. + /*! updates the mapping after attaching to a new arrangement. */ virtual void after_attach() override { _init(); } - /*! Update the mapping after detaching the arrangement. + /*! updates the mapping after detaching the arrangement. */ virtual void after_detach() override { n_vertices = 0; index_map.clear(); } - /*! Update the mapping after the creation of a new vertex. + /*! updates the mapping after the creation of a new vertex. * \param v A handle to the created vertex. */ virtual void after_create_vertex(Vertex_handle v) override { @@ -142,7 +142,7 @@ public: rev_map[n_vertices - 1] = v; } - /*! Update the mapping after the creation of a new boundary vertex. + /*! updates the mapping after the creation of a new boundary vertex. * \param v A handle to the created vertex. */ virtual void after_create_boundary_vertex(Vertex_handle v) override { @@ -158,7 +158,7 @@ public: rev_map[n_vertices - 1] = v; } - /*! Update the mapping before the removal of a vertex. + /*! updates the mapping before the removal of a vertex. * \param v A handle to the vertex to be removed. */ virtual void before_remove_vertex(Vertex_handle v) override { @@ -189,7 +189,7 @@ public: //@} private: - /*! Initialize the map for the given arrangement. */ + /*! initializes the map for the given arrangement. */ void _init() { // Get the number of vertices and allocate the reverse map accordingly. n_vertices = @@ -215,7 +215,7 @@ private: } }; -/*! Get the index property-map function. Provided so that boost is able to +/*! obtains the index property-map function. Provided so that boost is able to * access the Arr_vertex_index_map above. * \param index_map The index map. * \param v A vertex handle. @@ -226,7 +226,7 @@ unsigned int get(const CGAL::Arr_vertex_index_map& index_map, typename Arrangement::Vertex_handle v) { return index_map[v]; } -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h index dbeab324b12..0534f232388 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h @@ -122,17 +122,17 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_2 () : Base () {} - /*! Copy constructor (from a base arrangement). */ + /*! constructs copy (from a base arrangement). */ Arrangement_2 (const Base& base) : Base (base) {} - /*! Constructor given a traits object. */ + /*! constructs given a traits object. */ Arrangement_2 (const Traits_2 *tr) : Base (tr) {} @@ -141,14 +141,14 @@ public: /// \name Assignment functions. //@{ - /*! Assignment operator (from a base arrangement). */ + /*! assigns (from a base arrangement). */ Self& operator= (const Base& base) { Base::assign (base); return (*this); } - /*! Assign an arrangement. */ + /*! assign an arrangement. */ void assign (const Base& base) { Base::assign (base); @@ -159,13 +159,13 @@ public: ///! \name Specialized access methods. //@{ - /*! Obtain the geometry-traits class. */ + /*! obtains the geometry-traits class. */ const Traits_2* traits() const { return (this->geometry_traits()); } - /*! Obtain the number of vertices at infinity. */ + /*! obtains the number of vertices at infinity. */ Size number_of_vertices_at_infinity() const { // The vertices at infinity are valid, but not concrete: @@ -173,7 +173,7 @@ public: this->topology_traits()->number_of_concrete_vertices()); } - /*! Obtain the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face_handle unbounded_face () { // The fictitious un_face contains all other valid faces in a single @@ -193,7 +193,7 @@ public: return (Face_handle (p_oc->face())); } - /*! Get the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ Face_const_handle unbounded_face () const { // The fictitious un_face contains all other valid faces in a single diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index d044c21edf0..5ac5c4d6bd9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -108,10 +108,10 @@ protected: public: /// \name Construction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_traits_basic_adaptor_2() : Base() {} - /*! Constructor from a base-traits class. */ + /*! Constructs from a base-traits class. */ Arr_traits_basic_adaptor_2(const Base& traits) : Base(traits) {} //@} @@ -132,7 +132,7 @@ public: */ class Compare_y_at_x_2 { public: - /*! Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv the curve. * \param p the point. * \pre p is in the x-range of cv. @@ -151,7 +151,7 @@ public: //! The base traits. const Self& m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -456,7 +456,7 @@ public: } }; - /*! Obtain an Compare_y_at_x_2 function object. */ + /*! obtains an Compare_y_at_x_2 function object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -465,8 +465,7 @@ public: */ class Compare_y_at_x_left_2 { public: - /*! - * Compare two curves immediately to the left of their intersection point. + /*! compares two curves immediately to the left of their intersection point. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param p The query point. @@ -490,7 +489,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -502,8 +501,7 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the HasLeft tag is true. + /*! Implementation of the operator() in case the HasLeft tag is true. */ Comparison_result _compare_y_at_x_left_imp(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -514,8 +512,7 @@ public: return (base->compare_y_at_x_left_2_object()(xcv1, xcv2, p)); } - /*! - * Implementation of the operator() in case the HasLeft tag is false. + /*! Implementation of the operator() in case the HasLeft tag is false. */ Comparison_result _compare_y_at_x_left_imp(const X_monotone_curve_2& xcv1, @@ -584,7 +581,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 function object. */ + /*! obtains a Compare_y_at_x_left_2 function object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(this); } @@ -592,8 +589,7 @@ public: */ class Do_intersect_2 { public: - /*! - * Determine whether two x-monotone curves intersect. + /*! determines whether two x-monotone curves intersect. * \param xcv1 the first curve. * \param xcv2 the second curve. * \return true if xcv1 and xcv2 intersect false otherwise. @@ -612,7 +608,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param self The traits adaptor class. It must be passed, to handle * non stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -624,8 +620,7 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the HasDoIntersect tag is true. + /*! Implementation of the operator() in case the HasDoIntersect tag is true. */ bool _do_intersect_imp(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -635,8 +630,7 @@ public: return (base->do_intersect_2_object()(xcv1, xcv2)); } - /*! - * Implementation of the operator() in case the HasDoIntersect tag is false. + /*! Implementation of the operator() in case the HasDoIntersect tag is false. */ bool _do_intersect_imp(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -651,7 +645,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 function object. */ + /*! obtains a Compare_y_at_x_left_2 function object. */ Do_intersect_2 do_intersect_2_object() const { return Do_intersect_2(this); } //@} @@ -666,7 +660,7 @@ public: */ class Parameter_space_in_x_2 { public: - /*! Obtain the location of the given curve end in x. + /*! obtains the location of the given curve end in x. * \param xcv The curve. * \param ind ARR_MIN_END if we refer to xcv's minimal end, * ARR_MAX_END if we refer to its maximal end. @@ -681,7 +675,7 @@ public: return parameter_space_in_x(xcv, ind, Left_or_right_sides_category()); } - /*! Obtain the location of the given point end in x. + /*! obtains the location of the given point end in x. * \param p The point. * \return The location of the point end in x direction. */ @@ -697,7 +691,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -767,7 +761,7 @@ public: } }; - /*! Obtain an Parameter_space_in_x_2 function object. */ + /*! obtains an Parameter_space_in_x_2 function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(this); } @@ -779,7 +773,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -792,7 +786,7 @@ public: friend class Arr_traits_basic_adaptor_2; public: - /*! Determines whether a point lies on the vertical identification curve + /*! determines whether a point lies on the vertical identification curve * \param p the point. * \return true if p lies on the vertical identification curve, and * false otherwise. @@ -800,7 +794,7 @@ public: bool operator()(const Point_2& p) const { return is_on_y_idn(p, Ioyi_2_point_tag()); } - /*! Determines whether an x-monotone curve coicide with the vertical + /*! determines whether an x-monotone curve coicide with the vertical * identification curve * \param xcv the point. * \return true if xcv coincides with an identification curve, @@ -823,7 +817,7 @@ public: { CGAL_error(); return false; } }; - /*! Obtain a Is_on_y_identification_2 function object. */ + /*! obtains a Is_on_y_identification_2 function object. */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(this); @@ -837,7 +831,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -849,8 +843,7 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the base should used. + /*! Implementation of the operator() in case the base should used. */ Comparison_result comp_y_near_bnd(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, @@ -858,8 +851,7 @@ public: Arr_use_traits_tag) const { return m_base->compare_y_near_boundary_2_object()(xcv1, xcv2, ce); } - /*! - * Implementation of the operator() in case the dummy should be used. + /*! Implementation of the operator() in case the dummy should be used. */ Comparison_result comp_y_near_bnd(const X_monotone_curve_2&, const X_monotone_curve_2&, @@ -867,8 +859,7 @@ public: { CGAL_error(); return EQUAL; } public: - /*! - * Compare the relative y-positions of two curve ends. + /*! compares the relative y-positions of two curve ends. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param ce The relevant end of xcv1 and xcv2. @@ -888,7 +879,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 functor. */ + /*! obtains a Compare_y_near_boundary_2 functor. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(this); } @@ -900,7 +891,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -912,22 +903,20 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - /*! - * Implementation of the operator() in case the base should be used. + /*! Implementation of the operator() in case the base should be used. */ Comparison_result comp_y_on_bnd(const Point_2& p1, const Point_2& p2, Arr_use_traits_tag) const { return m_base->compare_y_on_boundary_2_object()(p1, p2); } - /*! - * Implementation of the operator() in case the dummy should be used. + /*! Implementation of the operator() in case the dummy should be used. */ Comparison_result comp_y_on_bnd(const Point_2&, const Point_2&, Arr_use_dummy_tag) const { CGAL_error(); return SMALLER; } public: - /*! Compare the relative y-positions of two points. + /*! compares the relative y-positions of two points. * \param p1 The first point. * \param p2 The second point. * \pre Both points lie on vertical boundaries. @@ -944,7 +933,7 @@ public: } }; - /*! Obtain a Compare_y_on_boundary_2 function object. */ + /*! obtains a Compare_y_on_boundary_2 function object. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(this); } @@ -955,7 +944,7 @@ public: */ class Parameter_space_in_y_2 { public: - /*! Obtain the location of the given curve end in y. + /*! obtains the location of the given curve end in y. * \param xcv The curve. * \param ind ARR_MIN_END if we refer to xcv's minimal end, * ARR_MAX_END if we refer to its maximal end. @@ -970,7 +959,7 @@ public: return parameter_space_in_y(xcv, ind, Bottom_or_top_sides_category()); } - /*! Obtain the location of the given point end in y. + /*! obtains the location of the given point end in y. * \param p The point. * \return The location of the point end in y direction. */ @@ -981,7 +970,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1054,7 +1043,7 @@ public: } }; - /*! Obtain an Parameter_space_in_y_2 function object. */ + /*! obtains an Parameter_space_in_y_2 function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(this); } @@ -1066,7 +1055,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1079,7 +1068,7 @@ public: friend class Arr_traits_basic_adaptor_2; public: - /*! Determines whether a point lies on the horizontal identification curve + /*! determines whether a point lies on the horizontal identification curve * \param p the point. * \return true if p lies on the vertical identification curve, and * false otherwise. @@ -1087,7 +1076,7 @@ public: bool operator()(const Point_2& p) const { return is_on_idn(p, Ioxi_2_point_tag()); } - /*! Determines whether an x-monotone curve coicide with the horizontal + /*! determines whether an x-monotone curve coicide with the horizontal * identification curve * \param xcv the point. * \return true if xcv coincides with an identification curve, @@ -1110,7 +1099,7 @@ public: { CGAL_error(); return false; } }; - /*! Obtain a Is_on_x_identification_2 function object. */ + /*! obtains a Is_on_x_identification_2 function object. */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(this); } @@ -1122,7 +1111,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1135,7 +1124,7 @@ public: friend class Arr_traits_basic_adaptor_2; public: - /*! Compare the x-coordinate of two given points projected onto the + /*! compares the x-coordinate of two given points projected onto the * horizontal boundaries * \param p1 the first point. * \param p2 the second point. @@ -1145,7 +1134,7 @@ public: return comp_x_on_bnd(p1, p2, Bottom_side_category(), Top_side_category()); } - /*! Compare the x-coordinate of a point and a curve-end projected onto the + /*! compares the x-coordinate of a point and a curve-end projected onto the * horizontal boundaries * \param pt the point. * \param xcv the curve @@ -1156,7 +1145,7 @@ public: Arr_curve_end ce) const { return comp_x_on_bnd(pt, xcv, ce, Bottom_or_top_sides_category()); } - /*! Compare the x-coordinates of two curve-ends projected onto the horizontal + /*! compares the x-coordinates of two curve-ends projected onto the horizontal * boundaries * \param xcv1 the curve * \param ce1 the curve-end @@ -1234,7 +1223,7 @@ public: { CGAL_error(); return SMALLER; } }; - /*! Obtain a Compare_x_on_boundary_2 function object. */ + /*! obtains a Compare_x_on_boundary_2 function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(this); } @@ -1246,7 +1235,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1273,7 +1262,7 @@ public: { CGAL_error(); return EQUAL; } public: - /*! Compare the relative x-positions of two curve ends. + /*! compares the relative x-positions of two curve ends. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param ce ARR_MIN_END if we refer to the curves' minimal end; @@ -1289,7 +1278,7 @@ public: { return _compare_curves(xcv1, xcv2, ce, Cmp_x_nb_2_curve_ends_tag()); } }; - /*! Obtain a Compare_x_near_boundary_2 function object. */ + /*! obtains a Compare_x_near_boundary_2 function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(this); } @@ -1305,7 +1294,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1351,7 +1340,7 @@ public: { CGAL_error(); return EQUAL; } public: - /*! Compare the relative y-positions of two curve ends. + /*! compares the relative y-positions of two curve ends. * \param xcv1 The first curve. * \param ind1 ARR_MIN_END if we refer to xcv1's minimal end; * ARR_MAX_END if we refer to its maximal end. @@ -1394,7 +1383,7 @@ public: } }; - /*! Obtain a Compare_y_curve_ends_2 function object. */ + /*! obtains a Compare_y_curve_ends_2 function object. */ Compare_y_curve_ends_2 compare_y_curve_ends_2_object() const { return Compare_y_curve_ends_2(this); } @@ -1406,7 +1395,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1473,7 +1462,7 @@ public: } public: - /*! Compare the relative x-positions of a point and a curve end. + /*! compares the relative x-positions of a point and a curve end. * \param pt The point * \param xcv The curve. * \param ce ARR_MIN_END if we refer to xcv's minimal end; @@ -1508,7 +1497,7 @@ public: } }; - /*! Obtain a Compare_x_point_curve_end_2 function object. */ + /*! obtains a Compare_x_point_curve_end_2 function object. */ Compare_x_point_curve_end_2 compare_x_point_curve_end_2_object() const { return Compare_x_point_curve_end_2(this); } @@ -1520,7 +1509,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1671,7 +1660,7 @@ public: { CGAL_error(); return CGAL::EQUAL; } public: - /*! Compare the relative x-positions of two curve ends. + /*! compares the relative x-positions of two curve ends. * \param xcv1 The first curve. * \param ind1 ARR_MIN_END if we refer to xcv1's minimal end; * ARR_MAX_END if we refer to its maximal end. @@ -1714,7 +1703,7 @@ public: } }; - /*! Obtain a Compare_x_curve_ends_2 function object. */ + /*! obtains a Compare_x_curve_ends_2 function object. */ Compare_x_curve_ends_2 compare_x_curve_ends_2_object() const { return Compare_x_curve_ends_2(this); } @@ -1723,7 +1712,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1744,7 +1733,7 @@ public: } }; - /*! Obtain a Construct_vertex_at_curve_end_2 function object. */ + /*! obtains a Construct_vertex_at_curve_end_2 function object. */ Construct_vertex_at_curve_end_2 construct_vertex_at_curve_end_2_object() const { return Construct_vertex_at_curve_end_2(this); } @@ -1754,7 +1743,7 @@ public: //! The self traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param self The traits class itself. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -1797,7 +1786,7 @@ public: { return _is_closed(xcv, ce); } }; - /*! Obtain a Is_closed_2 function object. */ + /*! obtains a Is_closed_2 function object. */ Is_closed_2 is_closed_2_object() const { return Is_closed_2(this); } @@ -1807,7 +1796,7 @@ public: //@{ class Is_in_x_range_2 { public: - /*! Check whether a given point is in the x-range of the given x-monotone + /*! checks whether a given point is in the x-range of the given x-monotone * curve. * \param xcv The x-monotone curve. * \param p The point. @@ -1820,7 +1809,7 @@ public: Bottom_or_top_sides_category()); } - /*! Check whether the x-ranges of the given x-monotone curves overlap. + /*! checks whether the x-ranges of the given x-monotone curves overlap. * \param xcv1 The first x-monotone curve. * \param xcv2 The second x-monotone curve. * \return (true) if there is an overlap in the x-ranges of the given @@ -1838,7 +1827,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -2153,14 +2142,13 @@ public: //@} }; - /*! Obtain an Is_in_x_range_2 function object. */ + /*! obtains an Is_in_x_range_2 function object. */ Is_in_x_range_2 is_in_x_range_2_object() const { return Is_in_x_range_2(this); } class Compare_y_position_2 { public: - /*! - * Obtain the relative of two x-monotone curves with overlapping x-ranges + /*! obtains the relative of two x-monotone curves with overlapping x-ranges * that are disjoint in their interiors. * \param xcv1 The first x-monotone curve. * \param xcv2 The second x-monotone curve. @@ -2331,7 +2319,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -2344,13 +2332,13 @@ public: friend class Arr_traits_basic_adaptor_2; }; - /*! Obtain a Compare_y_position_2 function object. */ + /*! obtains a Compare_y_position_2 function object. */ Compare_y_position_2 compare_y_position_2_object() const { return Compare_y_position_2(this); } class Is_between_cw_2 { public: - /*! Check whether the given query curve is encountered when rotating the + /*! checks whether the given query curve is encountered when rotating the * first curve in a clockwise direction around a given point until reaching * the second curve. * \param xcv The query curve. @@ -2436,7 +2424,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3229,14 +3217,13 @@ public: } }; - /*! Obtain an Is_between_cw_2 function object. */ + /*! obtains an Is_between_cw_2 function object. */ Is_between_cw_2 is_between_cw_2_object() const { return Is_between_cw_2(this); } class Compare_cw_around_point_2 { public: - /*! - * Compare the two interior disjoint x-monotone curves in a clockwise + /*! compares the two interior disjoint x-monotone curves in a clockwise * order around their common endpoint. * \param xcv1 The first curve. * \param xcv1_to_right Is xcv1 directed from left to right. @@ -3285,7 +3272,7 @@ public: //! The base traits. const Self* m_self; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3298,7 +3285,7 @@ public: friend class Arr_traits_basic_adaptor_2; }; - /*! Obtain a Compare_cw_around_point_2 function object. */ + /*! obtains a Compare_cw_around_point_2 function object. */ Compare_cw_around_point_2 compare_cw_around_point_2_object() const { return Compare_cw_around_point_2(this); } //@} @@ -3337,10 +3324,10 @@ public: /// \name Construction. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arr_traits_adaptor_2() : Base() {} - /*! Constructor from a base-traits class. */ + /*! constructs from a base-traits class. */ Arr_traits_adaptor_2(const Base_traits_2& traits) : Base(traits) {} //@} @@ -3374,7 +3361,7 @@ public: Intersection_result; public: - /*! Compare two points lexigoraphically: by x, then by y. + /*! compares two points lexigoraphically: by x, then by y. * \param p1 the first point. * \param p2 the second point. * \return SMALLER - x(p1) < x(p2); @@ -3391,7 +3378,7 @@ public: return base.compare_xy_2_object()(p1, p2); } - /*! Compare two x-monotone curves lexigoraphically. + /*! compares two x-monotone curves lexigoraphically. * Input: C1, C2, intersections = empty * compare(C1, C2, intersections) * Compare the left-most points of C1 and C2. @@ -3418,7 +3405,7 @@ public: //! The base traits. const Self& m_self; - /*! Constructor. + /*! constructs. * \param trait The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3432,7 +3419,7 @@ public: /// Point-curve //@{ - /*! Compare a point and a curve end. + /*! compares a point and a curve end. * Dispatch calls to traits that handle open and close boundaries, resp. * The only reason for this dispatcher is the poor choice of different * names for the Traits functors that handle close and open boundaries: @@ -3447,7 +3434,7 @@ public: /// curve-curve //@{ - /*! Compare a curve end and a curve end. + /*! compares a curve end and a curve end. * Dispatch calls to traits that handle open and close boundaries, resp. * The only reason for this dispatcher is the poor choice of different * names for the Traits functors that handle close and open boundaries: @@ -3461,7 +3448,7 @@ public: { return m_self.compare_x_on_boundary_2_object()(c1, ce1, c2, ce2); } //@} - /*! Compare the max end of two x-monotone curves lexigoraphically. + /*! compares the max end of two x-monotone curves lexigoraphically. */ Comparison_result compare_max_end(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2, @@ -3475,7 +3462,7 @@ public: return operator()(p1, p2); } - /*! Compare the max (right) end of two x-monotone curves lexigoraphically. + /*! compares the max (right) end of two x-monotone curves lexigoraphically. * \pre the curve overlap */ Comparison_result compare_max_end(const X_monotone_curve_2& c1, @@ -3562,7 +3549,7 @@ public: return res; } - /*! Split 2 given curves that overlap and have a common sub-curve on their + /*! splits 2 given curves that overlap and have a common sub-curve on their * right. Then compare the remaining portions of the curves, respectively. */ Comparison_result @@ -3602,7 +3589,7 @@ public: Are_all_sides_oblivious_category()); } - /*! Compare two x-monotone curves lexigoraphically. + /*! compares two x-monotone curves lexigoraphically. */ Comparison_result operator()(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2, @@ -3623,7 +3610,7 @@ public: return compare_remainder(c1, c2, intersections); } - /*! Compare two x-monotone curves lexigoraphically. + /*! compares two x-monotone curves lexigoraphically. */ Comparison_result operator()(const X_monotone_curve_2& c1, const X_monotone_curve_2& c2, @@ -3765,14 +3752,13 @@ public: } }; - /*! Obtain a Compare_xy_2 function object */ + /*! obtains a Compare_xy_2 function object */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } /*! A functor that tests whether two x-monotone curves can be merged. */ class Are_mergeable_2 { public: - /*! - * Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param xcv1 The first curve. * \param xcv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -3789,7 +3775,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3815,15 +3801,14 @@ public: } }; - /*! Obtain an Are_mergeable_2 function object. */ + /*! obtains an Are_mergeable_2 function object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(this); } /*! A functor that merges two x-monotone curves into one. */ class Merge_2 { public: - /*! - * Merge two given x-monotone curves into a single curve. + /*! merges two given x-monotone curves into a single curve. * \param xcv1 The first curve. * \param xcv2 The second curve. * \param c Output: The merged curve. @@ -3842,7 +3827,7 @@ public: //! The base traits. const Base* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -3870,11 +3855,11 @@ public: } }; - /*! Obtain a Merge_2 function object. */ + /*! obtains a Merge_2 function object. */ Merge_2 merge_2_object() const { return Merge_2(this); } //@} }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h index 190f550479c..fc919193021 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h @@ -88,10 +88,10 @@ protected: bool _end; public: - /*! Default constructor. */ + /*! constructs default. */ Face_neighbor_iterator() : _end (true) {} - /*! Constructor. + /*! constructs. * \param face The face (dual vertex). * \param out_edges Do we need the outgoing or the ingoing halfedges. * \param start Should we start traversing the edges. @@ -167,7 +167,7 @@ protected: } private: - /*! Check two iterators for equality. */ + /*! checks two iterators for equality. */ bool _equal(const Self& it) const { return (_out == it._out && _face == it._face && ((_end && it._end) || @@ -176,7 +176,7 @@ protected: _ccb_curr == it._ccb_curr))); } - /*! Dereference the current circulator. */ + /*! dereferences the current circulator. */ Edge_handle _dereference() const { if (_out) return (_ccb_curr); @@ -237,43 +237,43 @@ protected: public: typedef Face_neighbor_iterator Incident_edge_iterator; - /*! Default constructor. */ + /*! constructs default. */ Dual_arrangement_on_surface() : p_arr(nullptr) {} - /*! Constructor from an arrangement. */ + /*! Constructs from an arrangement. */ Dual_arrangement_on_surface(const Arrangement& arr) : p_arr(const_cast(&arr)) {} - /*! Obtain the primal arrangement (const version). */ + /*! obtains the primal arrangement (const version). */ const Arrangement* arrangement() const { return (p_arr); } - /*! Obtain the primal arrangement (non-const version). */ + /*! obtains the primal arrangement (non-const version). */ Arrangement* arrangement() { return (p_arr); } - /*! Obtain the number of vertices (face of the primal arrangement). */ + /*! obtains the number of vertices (face of the primal arrangement). */ Size number_of_vertices() const { return (p_arr->number_of_faces()); } - /*! Obtain the begin iterator of the vertices of the dual arrangement + /*! obtains the begin iterator of the vertices of the dual arrangement * (faces of the primal arrangement). */ Vertex_iterator vertices_begin() const { return (p_arr->faces_begin()); } - /*! Obtain the pass-the-end iterator of the vertices of the dual arrangement + /*! obtains the pass-the-end iterator of the vertices of the dual arrangement * (faces of the primal arrangement). */ Vertex_iterator vertices_end() const { return (p_arr->faces_end()); } - /*! Obtain the number of edges. */ + /*! obtains the number of edges. */ Size number_of_edges () const { return (p_arr->number_of_halfedges()); } - /*! Obtain the begin iterator of the edges of the dual arrangement. */ + /*! obtains the begin iterator of the edges of the dual arrangement. */ Edge_iterator edges_begin() const { return (p_arr->halfedges_begin()); } - /*! Obtain the pass-the-end iterator of the edges of the dual arrangement. */ + /*! obtains the pass-the-end iterator of the edges of the dual arrangement. */ Edge_iterator edges_end() const { return (p_arr->halfedges_end()); } - /*! Obtain the dual vertex-degree (number of edges forming the face boundary). + /*! obtains the dual vertex-degree (number of edges forming the face boundary). */ Size degree(Vertex_handle v) const { @@ -289,14 +289,14 @@ public: return (deg); } - /*! Traverse the outgoing edges of a given vertex. */ + /*! traverses the outgoing edges of a given vertex. */ Incident_edge_iterator out_edges_begin(Vertex_handle v) const { return (Incident_edge_iterator (v, true, true)); } Incident_edge_iterator out_edges_end(Vertex_handle v) const { return (Incident_edge_iterator (v, true, false)); } - /*! Traverse the ingoing edges of a given vertex. */ + /*! traverses the ingoing edges of a given vertex. */ Incident_edge_iterator in_edges_begin(Vertex_handle v) const { return (Incident_edge_iterator (v, false, true)); } @@ -388,7 +388,7 @@ public: // Functions required by the IncidenceGraph concept: // ------------------------------------------------- -/*! Obtain the out-degree of a vertex in a given dual arrangement. +/*! obtains the out-degree of a vertex in a given dual arrangement. * \param v The vertex. * \param darr The dual arrangement. * \param Number of halfedges around the boundary of the primal face. @@ -400,7 +400,7 @@ out_degree(typename boost::graph_traits > >::vertex_descriptor v, const Dual >& darr) \ { return darr.degree(v); } -/*! Return a range of the out-edges of a vertex given by its descriptor and the +/*! returns a range of the out-edges of a vertex given by its descriptor and the * dual arrangement it belongs to. * \param v The vertex. * \param darr The dual arrangement. @@ -414,7 +414,7 @@ out_edges(typename boost::graph_traits > >::vertex_descriptor v,\ const Dual >& darr) \ { return std::make_pair(darr.out_edges_begin(v), darr.out_edges_end(v)); } \ -/*! Obtain the source vertex of a dual arrangement edge. +/*! obtains the source vertex of a dual arrangement edge. * \param e The edge. * \param darr The dual arrangement. * \return The incident face of e in the primal arrangement. @@ -426,7 +426,7 @@ source(typename boost::graph_traits > >::edge_descriptor e, \ const Dual >& /* darr */) \ { return e->face(); } -/*! Obtain the target vertex of a dual arrangement edge. +/*! obtains the target vertex of a dual arrangement edge. * \param e The edge. * \param darr The dual arrangement. * \return The incident face of the twin of e in the primal arrangement. @@ -441,7 +441,7 @@ target(typename boost::graph_traits > >::edge_descriptor e, \ // Functions required by the BidirectionalGraph concept: // ----------------------------------------------------- -/*! Obtain the in-degree of a vertex in a given dual arrangement. +/*! obtains the in-degree of a vertex in a given dual arrangement. * \param v The vertex. * \param darr The dual arrangement. * \param Number of halfedges around the boundary of the primal face. @@ -453,7 +453,7 @@ in_degree(typename boost::graph_traits > >::vertex_descriptor v,\ const Dual >& darr) \ { return darr.degree(v); } -/*! Return a range of the in-edges of a vertex given by its descriptor and the +/*! returns a range of the in-edges of a vertex given by its descriptor and the * dual arrangement it belongs to. * \param v The vertex. * \param darr The dual arrangement. @@ -467,7 +467,7 @@ in_edges(typename boost::graph_traits > >::vertex_descriptor v,\ const Dual >& darr) \ { return std::make_pair(darr.in_edges_begin(v), darr.in_edges_end(v)); } -/*! Obtain the degree of a vertex in a given dual arrangement. +/*! obtains the degree of a vertex in a given dual arrangement. * \param v The vertex. * \param darr The dual arrangement. * \param Number of ingoing and outgoing halfedges incident to v. @@ -482,7 +482,7 @@ degree(typename boost::graph_traits > >::vertex_descriptor v, \ // Functions required by the VertexListGraph concept: // -------------------------------------------------- -/*! Obtain the number of vertices in the given dual arrangement. +/*! obtains the number of vertices in the given dual arrangement. * \param darr The dual arrangement. * \return Number of faces in the primal arrangement. */ @@ -492,7 +492,7 @@ typename boost::graph_traits > >::vertices_size_type \ num_vertices(const Dual >& darr) \ { return darr.number_of_vertices(); } -/*! Obtain the range of vertices of the given dual arrangement. +/*! obtains the range of vertices of the given dual arrangement. * \param darr The dual arrangement. * \return A pair of vertex iterators. */ @@ -506,7 +506,7 @@ vertices(const Dual >& darr) \ // Functions required by the EdgeListGraph concept: // ------------------------------------------------ -/*! Obtain the number of edges in the given dual arrangement. +/*! obtains the number of edges in the given dual arrangement. * \param darr The dual arrangement. * \return Number of halfedges in the primal arrangement. */ @@ -516,7 +516,7 @@ typename boost::graph_traits > >::edges_size_type \ num_edges(const Dual >& darr) \ { return darr.number_of_edges(); } -/*! Obtain the range of edges of the given dual arrangement. +/*! obtains the range of edges of the given dual arrangement. * \param darr The dual arrangement. * \return A pair of edge iterators. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index ddf9039744a..4a8d9dff6fd 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -575,13 +575,13 @@ public: typedef DVertex Base; public: - /*! Default constructor. */ + /*! constructs default. */ Vertex() {} /*! Check whether the vertex lies on an open boundary. */ bool is_at_open_boundary() const { return (Base::has_null_point()); } - /*! Get the vertex degree (number of incident edges). */ + /*! obtains the vertex degree (number of incident edges). */ Size degree() const { if (this->is_isolated()) @@ -601,8 +601,7 @@ public: return (n); } - /*! - * Get the incident halfedges (non-const version). + /*! obtains the incident halfedges (non-const version). * \pre The vertex is not isolated. */ Halfedge_around_vertex_circulator incident_halfedges() @@ -612,8 +611,7 @@ public: (DHalfedge_iter(Base::halfedge())); } - /*! - * Get the incident halfedges (const version). + /*! obtains the incident halfedges (const version). * \pre The vertex is not isolated. */ Halfedge_around_vertex_const_circulator incident_halfedges() const @@ -623,8 +621,7 @@ public: (DHalfedge_const_iter(Base::halfedge())); } - /*! - * Get the face that contains the vertex (non-const version). + /*! obtains the face that contains the vertex (non-const version). * \pre The vertex is isolated. */ Face_handle face() @@ -633,8 +630,7 @@ public: return (DFace_iter(Base::isolated_vertex()->face())); } - /*! - * Get the face that contains the vertex (const version). + /*! obtains the face that contains the vertex (const version). * \pre The vertex is isolated. */ Face_const_handle face() const @@ -664,30 +660,30 @@ public: typedef DHalfedge Base; public: - /*! Default constructor. */ + /*! constructs default. */ Halfedge() {} - /*! Check whether the halfedge is fictitious. */ + /*! checks whether the halfedge is fictitious. */ bool is_fictitious() const { return (Base::has_null_curve()); } - /*! Get the source vertex (non-const version). */ + /*! obtains the source vertex (non-const version). */ Vertex_handle source() { return (DVertex_iter(Base::opposite()->vertex())); } - /*! Get the source vertex (const version). */ + /*! obtains the source vertex (const version). */ Vertex_const_handle source() const { return (DVertex_const_iter(Base::opposite()->vertex())); } - /*! Get the target vertex (non-const version). */ + /*! obtains the target vertex (non-const version). */ Vertex_handle target() { return (DVertex_iter(Base::vertex())); } - /*! Get the target vertex (const version). */ + /*! obtains the target vertex (const version). */ Vertex_const_handle target() const { return (DVertex_const_iter(Base::vertex())); } - /*! Get the incident face (non-const version). */ + /*! obtains the incident face (non-const version). */ Face_handle face() { return (! Base::is_on_inner_ccb()) ? @@ -695,7 +691,7 @@ public: DFace_iter(Base::inner_ccb()->face()); } - /*! Get the incident face (const version). */ + /*! obtains the incident face (const version). */ Face_const_handle face() const { return (! Base::is_on_inner_ccb()) ? @@ -703,35 +699,35 @@ public: DFace_const_iter(Base::inner_ccb()->face()); } - /*! Get the twin halfedge (non-const version). */ + /*! obtains the twin halfedge (non-const version). */ Halfedge_handle twin() { return (DHalfedge_iter(Base::opposite())); } - /*! Get the twin halfedge (const version). */ + /*! obtains the twin halfedge (const version). */ Halfedge_const_handle twin() const { return (DHalfedge_const_iter(Base::opposite())); } - /*! Get the previous halfedge in the chain (non-const version). */ + /*! obtains the previous halfedge in the chain (non-const version). */ Halfedge_handle prev() { return (DHalfedge_iter(Base::prev())); } - /*! Get the previous halfedge in the chain (const version). */ + /*! obtains the previous halfedge in the chain (const version). */ Halfedge_const_handle prev() const { return (DHalfedge_const_iter(Base::prev())); } - /*! Get the next halfedge in the chain (non-const version). */ + /*! obtains the next halfedge in the chain (non-const version). */ Halfedge_handle next() { return (DHalfedge_iter(Base::next())); } - /*! Get the next halfedge in the chain (const version). */ + /*! obtains the next halfedge in the chain (const version). */ Halfedge_const_handle next() const { return (DHalfedge_const_iter(Base::next())); } - /*! Get the connected component of the halfedge (non-const version). */ + /*! obtains the connected component of the halfedge (non-const version). */ Ccb_halfedge_circulator ccb() { return Ccb_halfedge_circulator(DHalfedge_iter(this)); } - /*! Get the connected component of the halfedge (const version). */ + /*! obtains the connected component of the halfedge (const version). */ Ccb_halfedge_const_circulator ccb() const { return Ccb_halfedge_const_circulator(DHalfedge_const_iter(this)); } @@ -757,8 +753,7 @@ public: void set_inner_ccb(DInner_ccb* ); }; - /*! - * \class The arrangement face class. + /*! \class The arrangement face class. */ class Face : public DFace { typedef DFace Base; @@ -767,57 +762,57 @@ public: /*! Default constructor. */ Face() {} - /*! Obtain an iterator for the outer CCBs of the face (non-const version). */ + /*! obtains an iterator for the outer CCBs of the face (non-const version). */ Outer_ccb_iterator outer_ccbs_begin() { return (DOuter_ccb_iter(Base::outer_ccbs_begin())); } - /*! Obtain an iterator for the outer CCBs the face (const version). */ + /*! obtains an iterator for the outer CCBs the face (const version). */ Outer_ccb_const_iterator outer_ccbs_begin() const { return (DOuter_ccb_const_iter(Base::outer_ccbs_begin())); } - /*! Obtain a past-the-end iterator for the outer CCBs (non-const version). */ + /*! obtains a past-the-end iterator for the outer CCBs (non-const version). */ Outer_ccb_iterator outer_ccbs_end() { return (DOuter_ccb_iter(Base::outer_ccbs_end())); } - /*! Obtain a past-the-end iterator for the outer CCBs (const version). */ + /*! obtains a past-the-end iterator for the outer CCBs (const version). */ Outer_ccb_const_iterator outer_ccbs_end() const { return (DOuter_ccb_const_iter(Base::outer_ccbs_end())); } - /*! Obtain an iterator for the inner CCBs of the face (non-const version). */ + /*! obtains an iterator for the inner CCBs of the face (non-const version). */ Inner_ccb_iterator inner_ccbs_begin() { return (DInner_ccb_iter(Base::inner_ccbs_begin())); } - /*! Obtain an iterator for the inner CCBs the face (const version). */ + /*! obtains an iterator for the inner CCBs the face (const version). */ Inner_ccb_const_iterator inner_ccbs_begin() const { return (DInner_ccb_const_iter(Base::inner_ccbs_begin())); } - /*! Obtain a past-the-end iterator for the inner CCBs (non-const version). */ + /*! obtains a past-the-end iterator for the inner CCBs (non-const version). */ Inner_ccb_iterator inner_ccbs_end() { return (DInner_ccb_iter(Base::inner_ccbs_end())); } - /*! Obtain a past-the-end iterator for the inner CCBs (const version). */ + /*! obtains a past-the-end iterator for the inner CCBs (const version). */ Inner_ccb_const_iterator inner_ccbs_end() const { return (DInner_ccb_const_iter(Base::inner_ccbs_end())); } - /*! Obtain an iterator for the isolated_vertices inside the face + /*! obtains an iterator for the isolated_vertices inside the face * (non-const version). */ Isolated_vertex_iterator isolated_vertices_begin() { return (DIso_vertex_iter(Base::isolated_vertices_begin())); } - /*! Obtain an iterator for the isolated_vertices inside the face + /*! obtains an iterator for the isolated_vertices inside the face * (const version). */ Isolated_vertex_const_iterator isolated_vertices_begin() const { return (DIso_vertex_const_iter(Base::isolated_vertices_begin())); } - /*! Obtain a past-the-end iterator for the isolated_vertices + /*! obtains a past-the-end iterator for the isolated_vertices * (non-const version). */ Isolated_vertex_iterator isolated_vertices_end() { return (DIso_vertex_iter(Base::isolated_vertices_end())); } - /*! Obtain a past-the-end iterator for the isolated_vertices + /*! obtains a past-the-end iterator for the isolated_vertices * (const version). */ Isolated_vertex_const_iterator isolated_vertices_end() const @@ -826,14 +821,12 @@ public: /// \name These functions are kept for Arrangement_2 compatibility: //@{ - /*! - * Check whether the face has an outer CCB. + /*! checks whether the face has an outer CCB. */ bool has_outer_ccb() const { return (Base::number_of_outer_ccbs() > 0); } - /*! - * Obtain a circulator for the outer boundary (non-const version). + /*! obtains a circulator for the outer boundary (non-const version). * \pre The face has a single outer CCB. */ Ccb_halfedge_circulator outer_ccb() @@ -845,8 +838,7 @@ public: return Ccb_halfedge_circulator(DHalfedge_iter(he)); } - /*! - * Obtain a circulator for the outer boundary (const version). + /*! obtain a circulator for the outer boundary (const version). * \pre The face has a single outer CCB. */ Ccb_halfedge_const_circulator outer_ccb() const @@ -858,23 +850,23 @@ public: return Ccb_halfedge_const_circulator(DHalfedge_const_iter(he)); } - /*! Obtain the number of holes (inner CCBs) inside the face. */ + /*! obtains the number of holes (inner CCBs) inside the face. */ Size number_of_holes() const { return (Base::number_of_inner_ccbs()); } - /*! Obtain an iterator for the holes inside the face (non-const version). */ + /*! obtains an iterator for the holes inside the face (non-const version). */ Inner_ccb_iterator holes_begin() { return (this->inner_ccbs_begin()); } - /*! Obtain an iterator for the holes inside the face (const version). */ + /*! obtains an iterator for the holes inside the face (const version). */ Inner_ccb_const_iterator holes_begin() const { return (this->inner_ccbs_begin()); } - /*! Obtain a past-the-end iterator for the holes (non-const version). */ + /*! obtains a past-the-end iterator for the holes (non-const version). */ Inner_ccb_iterator holes_end() { return (this->inner_ccbs_end()); } - /*! Obtain a past-the-end iterator for the holes (const version). */ + /*! obtains a past-the-end iterator for the holes (const version). */ Inner_ccb_const_iterator holes_end() const { return (this->inner_ccbs_end()); } //@} @@ -922,55 +914,55 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_on_surface_2(); - /*! Copy constructor. */ + /*! constructs copy. */ Arrangement_on_surface_2(const Self & arr); - /*! Constructor given a traits object. */ + /*! constructs given a traits object. */ Arrangement_on_surface_2(const Geometry_traits_2* geom_traits); //@} /// \name Assignment functions. //@{ - /*! Assignment operator. */ + /*! assigns. */ Self& operator=(const Self& arr); - /*! Assign an arrangement. */ + /*! assigns an arrangement. */ void assign(const Self& arr); //@} /// \name Destruction functions. //@{ - /*! Destructor. */ + /*! destructs. */ virtual ~Arrangement_on_surface_2(); - /*! Change mode. */ + /*! changes mode. */ void set_sweep_mode (bool mode) { m_sweep_mode = mode; } - /*! Clear the arrangement. */ + /*! clears the arrangement. */ virtual void clear(); //@} /// \name Access the traits-class objects. //@{ - /*! Access the geometry-traits object (const version). */ + /*! accesses the geometry-traits object (const version). */ inline const Traits_adaptor_2* traits_adaptor() const { return (m_geom_traits); } - /*! Access the geometry-traits object (const version). */ + /*! accesses the geometry-traits object (const version). */ inline const Geometry_traits_2* geometry_traits() const { return (m_geom_traits); } - /*! Access the topology-traits object (non-const version). */ + /*! accesses the topology-traits object (non-const version). */ inline Topology_traits* topology_traits() { return (&m_topol_traits); } - /*! Access the topology-traits object (const version). */ + /*! accesses the topology-traits object (const version). */ inline const Topology_traits* topology_traits() const { return (&m_topol_traits); } //@} @@ -978,38 +970,37 @@ public: /// \name Access the arrangement dimensions. //@{ - /*! Check whether the arrangement is empty. */ + /*! checks whether the arrangement is empty. */ bool is_empty() const { return (m_topol_traits.is_empty_dcel()); } - /*! - * Check whether the arrangement is valid. In particular, check the + /*! checks whether the arrangement is valid. In particular, check the * validity of each vertex, halfedge and face, their incidence relations * and the geometric properties of the arrangement. */ bool is_valid() const; - /*! Obtain the number of arrangement vertices. */ + /*! obtains the number of arrangement vertices. */ Size number_of_vertices() const { return (m_topol_traits.number_of_concrete_vertices()); } - /*! Obtain the number of isolated arrangement vertices. */ + /*! obtains the number of isolated arrangement vertices. */ Size number_of_isolated_vertices() const { return (_dcel().size_of_isolated_vertices()); } - /*! Obtain the number of arrangement halfedges (the result is always even). */ + /*! obtains the number of arrangement halfedges (the result is always even). */ Size number_of_halfedges() const { return (m_topol_traits.number_of_valid_halfedges()); } - /*! Obtain the number of arrangement edges. */ + /*! obtains the number of arrangement edges. */ Size number_of_edges() const { return (m_topol_traits.number_of_valid_halfedges() / 2); } - /*! Obtain the number of arrangement faces. */ + /*! obtains the number of arrangement faces. */ Size number_of_faces() const { return (m_topol_traits.number_of_valid_faces()); } - /*! Obtain the number of unbounded faces in the arrangement. */ + /*! obtains the number of unbounded faces in the arrangement. */ Size number_of_unbounded_faces() const { Unbounded_face_const_iterator iter = unbounded_faces_begin(); @@ -1028,30 +1019,29 @@ public: /// \name Traversal functions for the arrangement vertices. //@{ - /*! Obtain an iterator for the first vertex in the arrangement. */ + /*! obtains an iterator for the first vertex in the arrangement. */ Vertex_iterator vertices_begin() { return (Vertex_iterator(_dcel().vertices_begin(), _dcel().vertices_end(), _Is_concrete_vertex(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement vertices. */ + /*! obtains a past-the-end iterator for the arrangement vertices. */ Vertex_iterator vertices_end() { return (Vertex_iterator(_dcel().vertices_end(), _dcel().vertices_end(), _Is_concrete_vertex(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement vertices. - */ + /*! returns a range over handles of the arrangement vertices. + */ Iterator_range > vertex_handles() { return make_prevent_deref_range(vertices_begin(), vertices_end()); } - /*! Obtain a const iterator for the first vertex in the arrangement. */ + /*! obtains a const iterator for the first vertex in the arrangement. */ Vertex_const_iterator vertices_begin() const { return (Vertex_const_iterator(_dcel().vertices_begin(), @@ -1059,7 +1049,7 @@ public: _Is_concrete_vertex(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement vertices. */ + /*! obtains a past-the-end const iterator for the arrangement vertices. */ Vertex_const_iterator vertices_end() const { return (Vertex_const_iterator(_dcel().vertices_end(), @@ -1067,9 +1057,8 @@ public: _Is_concrete_vertex(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement vertices. - */ + /*! returns a const range (model of `ConstRange`) over handles of the arrangement vertices. + */ Iterator_range > vertex_handles() const { @@ -1081,7 +1070,7 @@ public: /// \name Traversal functions for the arrangement halfedges. //@{ - /*! Obtain an iterator for the first halfedge in the arrangement. */ + /*! obtains an iterator for the first halfedge in the arrangement. */ Halfedge_iterator halfedges_begin() { return (Halfedge_iterator(_dcel().halfedges_begin(), @@ -1089,7 +1078,7 @@ public: _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement halfedges. */ + /*! obtains a past-the-end iterator for the arrangement halfedges. */ Halfedge_iterator halfedges_end() { return (Halfedge_iterator(_dcel().halfedges_end(), @@ -1097,16 +1086,15 @@ public: _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement halfedges. - */ + /*! returns a range over handles of the arrangement halfedges. + */ Iterator_range > halfedge_handles() { return make_prevent_deref_range(halfedges_begin(), halfedges_end()); } - /*! Obtain a const iterator for the first halfedge in the arrangement. */ + /*! obtains a const iterator for the first halfedge in the arrangement. */ Halfedge_const_iterator halfedges_begin() const { return (Halfedge_const_iterator(_dcel().halfedges_begin(), @@ -1114,15 +1102,14 @@ public: _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement halfedges. */ + /*! obtains a past-the-end const iterator for the arrangement halfedges. */ Halfedge_const_iterator halfedges_end() const { return (Halfedge_const_iterator(_dcel().halfedges_end(), _dcel().halfedges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement halfedges. + /*! returns a const range (model of `ConstRange`) over handles of the arrangement halfedges. */ Iterator_range > halfedge_handles() const @@ -1134,22 +1121,21 @@ public: /// \name Traversal functions for the arrangement edges. //@{ - /*! Obtain an iterator for the first edge in the arrangement. */ + /*! obtains an iterator for the first edge in the arrangement. */ Edge_iterator edges_begin() { return (Edge_iterator(_dcel().edges_begin(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement edges. */ + /*! obtains a past-the-end iterator for the arrangement edges. */ Edge_iterator edges_end() { return (Edge_iterator(_dcel().edges_end(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement edges. + /*! returns a range over handles of the arrangement edges. */ Iterator_range > edge_handles() @@ -1157,23 +1143,22 @@ public: return make_prevent_deref_range(edges_begin(), edges_end()); } - /*! Obtain a const iterator for the first edge in the arrangement. */ + /*! obtains a const iterator for the first edge in the arrangement. */ Edge_const_iterator edges_begin() const { return (Edge_const_iterator(_dcel().edges_begin(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement edges. */ + /*! obtains a past-the-end const iterator for the arrangement edges. */ Edge_const_iterator edges_end() const { return (Edge_const_iterator(_dcel().edges_end(), _dcel().edges_end(), _Is_valid_halfedge(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement edges. - */ + /*! returns a const range (model of `ConstRange`) over handles of the arrangement edges. + */ Iterator_range > edge_handles() const { @@ -1184,45 +1169,44 @@ public: /// \name Traversal functions for the arrangement faces. //@{ - /*! Obtain an iterator for the first face in the arrangement. */ + /*! obtains an iterator for the first face in the arrangement. */ Face_iterator faces_begin() { return (Face_iterator(_dcel().faces_begin(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! Obtain a past-the-end iterator for the arrangement faces. */ + /*! obtains a past-the-end iterator for the arrangement faces. */ Face_iterator faces_end() { return (Face_iterator(_dcel().faces_end(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! - returns a range over handles of the arrangement faces. - */ + /*! returns a range over handles of the arrangement faces. + */ Iterator_range > face_handles() { return make_prevent_deref_range(faces_begin(), faces_end()); } - /*! Obtain a const iterator for the first face in the arrangement. */ + + /*! obtains a const iterator for the first face in the arrangement. */ Face_const_iterator faces_begin() const { return (Face_const_iterator(_dcel().faces_begin(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! Obtain a past-the-end const iterator for the arrangement faces. */ + /*! obtains a past-the-end const iterator for the arrangement faces. */ Face_const_iterator faces_end() const { return (Face_const_iterator(_dcel().faces_end(), _dcel().faces_end(), _Is_valid_face(&m_topol_traits))); } - /*! - returns a const range (model of `ConstRange`) over handles of the arrangement faces. - */ + /*! returns a const range (model of `ConstRange`) over handles of the arrangement faces. + */ Iterator_range > face_handles() const { @@ -1230,9 +1214,9 @@ public: } //! reference_face (const version). - /*! The function returns a reference face of the arrangement. - * All reference faces of arrangements of the same type have a common - * point. + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * * \return A const handle to the reference face. */ Face_const_handle reference_face() const @@ -1241,10 +1225,10 @@ public: } //! reference_face (non-const version). - /*! The function returns a reference face of the arrangement. - All reference faces of arrangements of the same type have a common - point. - \return A handle to the reference face. + /*! returns a reference face of the arrangement. All reference faces of + * arrangements of the same type have a common point. + * + * \return A handle to the reference face. */ Face_handle reference_face() { return _handle_for(this->topology_traits()->reference_face()); } @@ -1254,21 +1238,21 @@ public: /// \name Traversal functions for the unbounded faces of the arrangement. //@{ - /*! Obtain an iterator for the first unbounded face in the arrangement. */ + /*! obtains an iterator for the first unbounded face in the arrangement. */ Unbounded_face_iterator unbounded_faces_begin() { return Unbounded_face_iterator(_dcel().faces_begin(), _dcel().faces_end(), _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain a past-the-end iterator for the unbounded arrangement faces. */ + /*! obtains a past-the-end iterator for the unbounded arrangement faces. */ Unbounded_face_iterator unbounded_faces_end() { return Unbounded_face_iterator(_dcel().faces_end(), _dcel().faces_end(), _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain a const iterator for the first unbounded face in the arrangement. */ + /*! obtains a const iterator for the first unbounded face in the arrangement. */ Unbounded_face_const_iterator unbounded_faces_begin() const { return Unbounded_face_const_iterator(_dcel().faces_begin(), @@ -1276,7 +1260,7 @@ public: _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain a past-the-end const iterator for the unbounded arrangement faces. */ + /*! obtains a past-the-end const iterator for the unbounded arrangement faces. */ Unbounded_face_const_iterator unbounded_faces_end() const { return Unbounded_face_const_iterator(_dcel().faces_end(), @@ -1284,7 +1268,7 @@ public: _Is_unbounded_face(&m_topol_traits)); } - /*! Obtain the fictitious face (non-const version). */ + /*! obtains the fictitious face (non-const version). */ Face_handle fictitious_face() { // The fictitious contains all other faces in a single hole inside it. @@ -1292,8 +1276,7 @@ public: Face_handle(const_cast(this->topology_traits()->initial_face())); } - /*! - * Obtain the unbounded face (const version). + /*! obtains the unbounded face (const version). * The fictitious contains all other faces in a single hole inside it. */ Face_const_handle fictitious_face() const @@ -1324,8 +1307,7 @@ public: /// \name Specilaized insertion functions. //@{ - /*! - * Insert a point that forms an isolated vertex in the interior of a given + /*! inserts a point that forms an isolated vertex in the interior of a given * face. * \param p The given point. * \param f The face into which we insert the new isolated vertex. @@ -1333,8 +1315,7 @@ public: */ Vertex_handle insert_in_face_interior(const Point_2& p, Face_handle f); - /*! - * Insert an x-monotone curve into the arrangement as a new hole (inner + /*! inserts an x-monotone curve into the arrangement as a new hole (inner * component) inside the given face. * \param cv The given x-monotone curve. * \param f The face into which we insert the new hole. @@ -1344,8 +1325,7 @@ public: Halfedge_handle insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f); - /*! - * Insert an x-monotone curve into the arrangement, such that its left + /*! inserts an x-monotone curve into the arrangement, such that its left * endpoint corresponds to a given arrangement vertex. * \param cv The given x-monotone curve. * \param v The given vertex. @@ -1358,8 +1338,7 @@ public: Vertex_handle v, Face_handle f = Face_handle()); - /*! - * Insert an x-monotone curve into the arrangement, such that its left + /*! inserts an x-monotone curve into the arrangement, such that its left * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. * \param cv The given x-monotone curve. @@ -1372,8 +1351,7 @@ public: Halfedge_handle insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev); - /*! - * Insert an x-monotone curve into the arrangement, such that its right + /*! inserts an x-monotone curve into the arrangement, such that its right * endpoint corresponds to a given arrangement vertex. * \param cv The given x-monotone curve. * \param v The given vertex. @@ -1386,8 +1364,7 @@ public: Vertex_handle v, Face_handle f = Face_handle()); - /*! - * Insert an x-monotone curve into the arrangement, such that its right + /*! inserts an x-monotone curve into the arrangement, such that its right * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. @@ -1401,8 +1378,7 @@ public: Halfedge_handle insert_from_right_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to given arrangement vertices. * \param cv The given x-monotone curve. * \param v1 The first vertex. @@ -1418,8 +1394,7 @@ public: Vertex_handle v2, Face_handle f = Face_handle()); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to given arrangement vertices, given the exact * place for the curve in one of the circular lists around a vertex. * \param cv The given x-monotone curve. @@ -1433,8 +1408,7 @@ public: Halfedge_handle prev1, Vertex_handle v2); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to given arrangement vertices, given the exact * place for the curve in both circular lists around these two vertices. * \param cv the given curve. @@ -1453,8 +1427,7 @@ public: /// \name Vertex manipulation functions. //@{ - /*! - * Replace the point associated with the given vertex. + /*! replaces the point associated with the given vertex. * \param v The vertex to modify. * \param p The point that should be associated with the edge. * \pre p is geometrically equivalent to the current point @@ -1463,8 +1436,7 @@ public: */ Vertex_handle modify_vertex(Vertex_handle v, const Point_2& p); - /*! - * Remove an isolated vertex from the interior of a given face. + /*! removes an isolated vertex from the interior of a given face. * \param v The vertex to remove. * \pre v is an isolated vertex (it has no incident halfedges). * \return A handle for the face containing v. @@ -1476,8 +1448,7 @@ public: /// \name Halfedge manipulation functions. //@{ - /*! - * Replace the x-monotone curve associated with the given edge. + /*! replaces the x-monotone curve associated with the given edge. * \param e The edge to modify. * \param cv The curve that should be associated with the edge. * \pre cv is geometrically equivalent to the current curve @@ -1486,8 +1457,7 @@ public: */ Halfedge_handle modify_edge(Halfedge_handle e, const X_monotone_curve_2& cv); - /*! - * Split a given edge into two, and associate the given x-monotone + /*! splits a given edge into two, and associate the given x-monotone * curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param cv1 The curve that should be associated with the first split edge. @@ -1503,8 +1473,7 @@ public: const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2); - /*! - * Merge two edges to form a single edge, and associate the given x-monotone + /*! merges two edges to form a single edge, and associate the given x-monotone * curve with the merged edge. * \param e1 The first edge to merge (one of the pair of twin halfedges). * \param e2 The second edge to merge (one of the pair of twin halfedges). @@ -1514,8 +1483,7 @@ public: Halfedge_handle merge_edge(Halfedge_handle e1, Halfedge_handle e2, const X_monotone_curve_2& cv); - /*! - * Remove an edge from the arrangement. + /*! removes an edge from the arrangement. * \param e The edge to remove (one of the pair of twin halfedges). * \param remove_source Should the source vertex of e be removed if it * becomes isolated (true by default). @@ -1529,8 +1497,7 @@ public: //@} - /*! - * Cleans the inner CCB if sweep mode was used, by removing all + /*! cleans the inner CCB if sweep mode was used, by removing all * non-valid inner CCBs */ void clean_inner_ccbs_after_sweep() @@ -1566,12 +1533,12 @@ protected: /// \name Determining the boundary-side conditions. //@{ - /*! Determines whether a boundary-side category indicates an open side. + /*! determines whether a boundary-side category indicates an open side. */ inline bool is_open(Arr_boundary_side_tag) const { return false; } inline bool is_open(Arr_open_side_tag) const { return true; } - /*! Determines whether the given x and y parameter spaces are open. + /*! determines whether the given x and y parameter spaces are open. * These parameter spaces are typically associated with a particular curve * end. * \param ps_x The parameter space in x. @@ -1587,12 +1554,12 @@ protected: } - /*! Determines whether a boundary-side category indicates a constructed side. + /*! determines whether a boundary-side category indicates a constructed side. */ inline bool is_contracted(Arr_boundary_side_tag) const { return false; } inline bool is_contracted(Arr_contracted_side_tag) const { return true; } - /*! Determines whether a boundary-side category indicates a constructed side. + /*! determines whether a boundary-side category indicates a constructed side. */ inline bool is_identified(Arr_boundary_side_tag) const { return false; } inline bool is_identified(Arr_identified_side_tag) const { return true; } @@ -1601,7 +1568,7 @@ protected: /// \name Allocating and de-allocating points and curves. //@{ - /*! Allocate a new point. */ + /*! allocates a new point. */ Point_2*_new_point(const Point_2& pt) { Point_2* p_pt = m_points_alloc.allocate(1); @@ -1609,7 +1576,7 @@ protected: return (p_pt); } - /*! De-allocate a point. */ + /*! deallocates a point. */ void _delete_point(Point_2& pt) { Point_2* p_pt = &pt; @@ -1617,7 +1584,7 @@ protected: m_points_alloc.deallocate(p_pt, 1); } - /*! Allocate a new curve. */ + /*! allocates a new curve. */ X_monotone_curve_2* _new_curve(const X_monotone_curve_2& cv) { X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1); @@ -1625,7 +1592,7 @@ protected: return (p_cv); } - /*! De-allocate a curve. */ + /*! deallocates a curve. */ void _delete_curve(X_monotone_curve_2& cv) { X_monotone_curve_2* p_cv = &cv; @@ -1636,33 +1603,34 @@ protected: /// \name Converting handles to pointers (for the arrangement accessor). //@{ - /*! Access the DCEL (non-const version). */ + /*! accesses the DCEL (non-const version). */ inline Dcel& _dcel() { return (m_topol_traits.dcel()); } - /*! Access the DCEL (const version). */ + + /*! accesses the DCEL (const version). */ inline const Dcel& _dcel() const { return (m_topol_traits.dcel()); } - /*! Convert a vertex handle to a pointer to a DCEL vertex. */ + /*! converts a vertex handle to a pointer to a DCEL vertex. */ inline DVertex* _vertex(Vertex_handle vh) const { return (&(*vh)); } - /*! Convert a constant vertex handle to a pointer to a DCEL vertex. */ + /*! converts a constant vertex handle to a pointer to a DCEL vertex. */ inline const DVertex* _vertex(Vertex_const_handle vh) const { return (&(*vh)); } - /*! Convert a halfedge handle to a pointer to a DCEL halfedge. */ + /*! converts a halfedge handle to a pointer to a DCEL halfedge. */ inline DHalfedge* _halfedge(Halfedge_handle hh) const { return (&(*hh)); } - /*! Convert a constant halfedge handle to a pointer to a DCEL halfedge. */ + /*! converts a constant halfedge handle to a pointer to a DCEL halfedge. */ inline const DHalfedge* _halfedge(Halfedge_const_handle hh) const { return (&(*hh)); } - /*! Convert a face handle to a pointer to a DCEL face. */ + /*! converts a face handle to a pointer to a DCEL face. */ inline DFace* _face(Face_handle fh) const { return (&(*fh)); } - /*! Convert a constant face handle to a pointer to a DCEL face. */ + /*! converts a constant face handle to a pointer to a DCEL face. */ inline const DFace* _face(Face_const_handle fh) const { return (&(*fh)); } //@} @@ -1670,28 +1638,27 @@ protected: /// \name Converting pointers to handles (for the arrangement accessor). //@{ - /*! Convert a pointer to a DCEL vertex to a vertex handle. */ + /*! converts a pointer to a DCEL vertex to a vertex handle. */ Vertex_handle _handle_for(DVertex* v) { return (Vertex_handle(v)); } - /*! Convert a pointer to a DCEL vertex to a constant vertex handle. */ + /*! converts a pointer to a DCEL vertex to a constant vertex handle. */ Vertex_const_handle _const_handle_for(const DVertex* v) const { return (Vertex_const_handle(v)); } - /*! Convert a pointer to a DCEL halfedge to a halfedge handle. */ + /*! converts a pointer to a DCEL halfedge to a halfedge handle. */ Halfedge_handle _handle_for(DHalfedge* he) { return (Halfedge_handle(he)); } - - /*! Convert a pointer to a DCEL halfedge to a constant halfedge handle. */ + /*! convertss a pointer to a DCEL halfedge to a constant halfedge handle. */ Halfedge_const_handle _const_handle_for(const DHalfedge* he) const { return (Halfedge_const_handle(he)); } - /*! Convert a pointer to a DCEL face to a face handle. */ + /*! converts a pointer to a DCEL face to a face handle. */ Face_handle _handle_for(DFace* f) { return (Face_handle(f)); } - /*! Convert a pointer to a DCEL face to a constant face handle. */ + /*! converts a pointer to a DCEL face to a constant face handle. */ Face_const_handle _const_handle_for(const DFace* f) const { return (Face_const_handle(f)); } //@} @@ -1759,7 +1726,7 @@ protected: Arr_parameter_space ps_x2, Arr_parameter_space ps_y2, Arr_all_sides_oblivious_tag) const; - /*! This is the implementation for the case where any one of the 4 boundary + /*! this is the implementation for the case where any one of the 4 boundary * sides can be of any type. */ bool _is_smaller(const X_monotone_curve_2& cv1, const Point_2& p1, @@ -1769,11 +1736,11 @@ protected: Arr_not_all_sides_oblivious_tag) const; /*! Given two x-monotone curves that share their minimal end point. - * The function return true if the y-coordinate of the first curve curve - * near its minimal end smaller than the y-coordinate of the second curve - * (near its minimal end). This function is used, for example, when - * a new curve is to be inserted into the arrangement. In this case the - * search is conducted over the curves that will comprise a new CCB. + * returns true if the y-coordinate of the first curve curve near its minimal + * end smaller than the y-coordinate of the second curve (near its minimal + * end). This function is used, for example, when a new curve is to be + * inserted into the arrangement. In this case the search is conducted over + * the curves that will comprise a new CCB. * * This is the implementation for the case where all 4 boundary sides are * oblivious. @@ -1802,8 +1769,7 @@ protected: Arr_parameter_space ps_y, Arr_not_all_sides_oblivious_tag) const; - /*! - * Locate the place for the given curve around the given vertex. + /*! locates the place for the given curve around the given vertex. * \param v The given arrangement vertex. * \param cv The given x-monotone curve. * \param ind Whether we refer to the minimal or maximal end of cv. @@ -1815,8 +1781,7 @@ protected: DHalfedge* _locate_around_vertex(DVertex* v, const X_monotone_curve_2& cv, Arr_curve_end ind) const; - /*! - * Compute the distance (in halfedges) between two halfedges. + /*! computes the distance (in halfedges) between two halfedges. * \param e1 The source halfedge. * \param e2 The destination halfedge. * \pre e1 and e2 belong to the same connected component @@ -1826,8 +1791,7 @@ protected: unsigned int _halfedge_distance(const DHalfedge* e1, const DHalfedge* e2) const; - /*! - * Compare the length of the induced paths from e1 to e2 and + /*! compares the length of the induced paths from e1 to e2 and * from e2 to e1. * \pre e1 and e2 belong to the same connected component * \return The comparison result @@ -1835,24 +1799,21 @@ protected: Comparison_result _compare_induced_path_length(const DHalfedge* e1, const DHalfedge* e2) const; - /*! - * Update the indices according to boundary locations + /*! updates the indices according to boundary locations */ void _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr, Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next, int& x_index, int& y_index, Arr_true) const; - /*! - * Update the indices according to boundary locations (i.e. does nothing) + /*! update the indices according to boundary locations (i.e. does nothing) */ void _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr, Arr_parameter_space ps_x_next, Arr_parameter_space ps_y_next, int& x_index, int& y_index, Arr_false) const; - /*! - * Is the first given x-monotone curve above the second given? + /*! Is the first given x-monotone curve above the second given? * \param xcv1 the first given curve * \param ps_y1 the parameter space in y of xcv1 * \param xcv2 the second given curve @@ -1866,8 +1827,7 @@ protected: Arr_parameter_space ps_y1, Arr_has_identified_side_tag) const; - /*! - * Is the first given x-monotone curve above the second given? + /*! Is the first given x-monotone curve above the second given? * \param xcv1 the first given curve * \param ps_y1 the parameter space in y of xcv1 * \param xcv2 the second given curve @@ -1881,8 +1841,7 @@ protected: Arr_parameter_space ps_y1, Arr_has_contracted_side_tag) const; - /*! - * Is the first given x-monotone curve above the second given? + /*! Is the first given x-monotone curve above the second given? * \param xcv1 the first given curve * \param ps_y1 the parameter space in y of xcv1 * \param xcv2 the second given curve @@ -1896,8 +1855,7 @@ protected: Arr_parameter_space ps_y1, Arr_boundary_cond_tag) const; - /*! - * Compute the signs (in left/right and bottom/top) of a path + /*! computes the signs (in left/right and bottom/top) of a path * induced by the sequence he_to=>cv,cv_dir=>he_away, and reports * as side-effect the halfedges pointing to local minima copied * to an outputiterator. @@ -1922,8 +1880,7 @@ protected: const DHalfedge* he_away, OutputIterator local_mins_it) const; - /*! - * Compute the signs (in left/right and bottom/top) of a closed ccb (loop) + /*! computes the signs (in left/right and bottom/top) of a closed ccb (loop) * represented by a given halfedge, and the halfedge pointing to the smallest * vertex on the ccb. * \param he The representative halfedge on the ccb. @@ -1942,8 +1899,7 @@ protected: Arr_parameter_space& ps_y_min, int& index_min) const; - /*! - * Compute the signs (in left/right and bottom/top) of a closed ccb (loop) + /*! computes the signs (in left/right and bottom/top) of a closed ccb (loop) * represented by a given halfedge. * \param he The representative halfedge on the ccb. * \return A pair of signs for the induced path. @@ -1953,19 +1909,18 @@ protected: */ std::pair _compute_signs(const DHalfedge* he, Arr_true) const; - /*! Compute the signs (in left/right and bottom/top) of a closed ccb (loop) + /*! computes the signs (in left/right and bottom/top) of a closed ccb (loop) * represented by a given halfedge for the case where non of the boundaries * is identified. * \return the pair (ZERO, ZERO) */ std::pair _compute_signs(const DHalfedge* he, Arr_false) const; - /*! - * Given two predecessor halfedges that will be used for inserting a + /*! given two predecessor halfedges that will be used for inserting a * new halfedge pair (he_to is the predecessor of the directed curve * cv, cv_dir and he_away will be the successor), such that the * insertion will create a new face that forms a hole inside an existing - * face, determine whether he_to=>cv,cv_dir=>he_away will be part + * face, determines whether he_to=>cv,cv_dir=>he_away will be part * of the new outer ccb of the new face. * \param he_to The predecessor halfedge. * \param cv The x-monotone curve we use to connect he_to's target and @@ -1987,16 +1942,14 @@ protected: InputIterator lm_begin, InputIterator lm_end) const; - /*! - * Move a given outer CCB from one face to another. + /*! moves a given outer CCB from one face to another. * \param from_face The face currently containing the component. * \param to_face The face into which we should move the component. * \param he A halfedge lying on the outer component. */ void _move_outer_ccb(DFace* from_face, DFace* to_face, DHalfedge* he); - /*! - * Move a given inner CCB (hole) from one face to another. + /*! moves a given inner CCB (hole) from one face to another. * \param from_face The face currently containing the component. * \param to_face The face into which we should move the component. * \param he A halfedge lying on the inner component. @@ -2010,37 +1963,32 @@ protected: */ void _move_all_inner_ccb(DFace* from_face, DFace* to_face); - /*! - * Insert the given vertex as an isolated vertex inside the given face. + /*! inserts the given vertex as an isolated vertex inside the given face. * \param f The face that should contain the isolated vertex. * \param v The isolated vertex. */ void _insert_isolated_vertex(DFace* f, DVertex* v); - /*! - * Move a given isolated vertex from one face to another. + /*! moves a given isolated vertex from one face to another. * \param from_face The face currently containing the isolated vertex. * \param to_face The face into which we should move the isolated vertex. * \param v The isolated vertex. */ void _move_isolated_vertex(DFace* from_face, DFace* to_face, DVertex* v); - /*! - * Move all isolated vertices from one face to another. + /*! moves all isolated vertices from one face to another. * \param from_face The face currently containing the isolated vertices. * \param to_face The face into which we should move the isolated vertices. */ void _move_all_isolated_vertices(DFace* from_face, DFace* to_face); - /*! - * Create a new vertex and associate it with the given point. + /*! creates a new vertex and associate it with the given point. * \param p The point. * \return A pointer to the newly created vertex. */ DVertex* _create_vertex(const Point_2& p); - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param p The point on the boundary. * \param bx The boundary condition in x. * \param by The boundary condition in y. @@ -2051,8 +1999,7 @@ protected: Arr_parameter_space bx, Arr_parameter_space by); - /*! - * Create a new boundary vertex. + /*! creates a new boundary vertex. * \param cv The curve incident to the boundary. * \param ind The relevant curve-end. * \param bx The boundary condition in x. @@ -2065,8 +2012,7 @@ protected: Arr_parameter_space bx, Arr_parameter_space by); - /*! - * Locate the DCEL features that will be used for inserting the given point, + /*! locates the DCEL features that will be used for inserting the given point, * which has a boundary condition, and set a proper vertex there. * \param f The face that contains the point. * \param p The point. @@ -2079,8 +2025,7 @@ protected: Arr_parameter_space bx, Arr_parameter_space by); - /*! - * Locate the DCEL features that will be used for inserting the given curve + /*! locates the DCEL features that will be used for inserting the given curve * end, which has a boundary condition, and set a proper vertex there. * \param f The face that contains the curve end. * \param cv The x-monotone curve. @@ -2098,8 +2043,7 @@ protected: Arr_parameter_space by, DHalfedge** p_pred); - /*! - * Insert an x-monotone curve into the arrangement, such that both its + /*! inserts an x-monotone curve into the arrangement, such that both its * endpoints correspond to free arrangement vertices (newly created vertices * or existing isolated vertices), so a new inner CCB is formed in the face * that contains the two vertices. @@ -2116,8 +2060,7 @@ protected: Arr_halfedge_direction cv_dir, DVertex* v1, DVertex* v2); - /*! - * Insert an x-monotone curve into the arrangement, such that one of its + /*! inserts an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other * endpoint corresponds to a free vertex (a newly created vertex or an @@ -2134,8 +2077,7 @@ protected: Arr_halfedge_direction cv_dir, DVertex* v); - /*! - * Insert an x-monotone curve into the arrangement, where the end vertices + /*! inserts an x-monotone curve into the arrangement, where the end vertices * are given by the target points of two given halfedges. * The two halfedges should be given such that in case a new face is formed, * it will be the incident face of the halfedge directed from the first @@ -2164,46 +2106,40 @@ protected: bool& swapped_predecessors, bool allow_swap_of_predecessors = true); - /*! - * Relocate all inner CCBs and isolated vertices to their proper position, + /*! relocates all inner CCBs and isolated vertices to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * \param new_he The new halfedge that caused the split, such that the new * face lies to its left and the old face to its right. */ void _relocate_in_new_face(DHalfedge* new_he); - /*! - * Relocate all inner CCBs to their proper position, + /*! relocates all inner CCBs to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * \param new_he The new halfedge that caused the split, such that the new * face lies to its left and the old face to its right. */ void _relocate_inner_ccbs_in_new_face(DHalfedge* new_he); - /*! - * Relocate all vertices to their proper position, + /*! relocates all vertices to their proper position, * immediately after a face has split due to the insertion of a new halfedge. * \param new_he The new halfedge that caused the split, such that the new * face lies to its left and the old face to its right. */ void _relocate_isolated_vertices_in_new_face(DHalfedge* new_he); - /*! - * Replace the point associated with the given vertex. + /*! replaces the point associated with the given vertex. * \param v The vertex to modify. * \param p The point that should be associated with the edge. */ void _modify_vertex(DVertex* v, const Point_2& p); - /*! - * Replace the x-monotone curve associated with the given edge. + /*! replaces the x-monotone curve associated with the given edge. * \param e The edge to modify. * \param cv The curve that should be associated with the edge. */ void _modify_edge(DHalfedge* he, const X_monotone_curve_2& cv); - /*! - * Check if the given vertex represents one of the ends of a given curve. + /*! checks if the given vertex represents one of the ends of a given curve. * \param v The vertex. * \param cv The curve. * \param ind Indicates whether the minimal or the maximal end of cv is @@ -2213,8 +2149,7 @@ protected: bool _are_equal(const DVertex* v, const X_monotone_curve_2& cv, Arr_curve_end ind) const; - /*! - * Split a given edge into two at a given point, and associate the given + /*! splits a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. @@ -2229,8 +2164,7 @@ protected: const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2); - /*! - * Split a given edge into two at a given vertex, and associate the given + /*! splits a given edge into two at a given vertex, and associate the given * x-monotone curves with the split edges. * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. @@ -2245,8 +2179,7 @@ protected: const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2); - /*! - * Remove a pair of twin halfedges from the arrangement. + /*! removes a pair of twin halfedges from the arrangement. * \param e One of the halfedges to be removed. * \param remove_source Should the source vertex of e be removed if it * becomes isolated. @@ -2258,8 +2191,7 @@ protected: */ DFace* _remove_edge(DHalfedge* e, bool remove_source, bool remove_target); - /*! - * Decide whether a hole is created when an edge is removed. + /*! determines whether a hole is created when an edge is removed. * * \param signs1 signs of future ccb1 * \param signs2 signs of future ccb2 @@ -2270,16 +2202,14 @@ protected: std::pair< CGAL::Sign, CGAL::Sign > signs2, bool same_face); - /*! - * Remove a vertex in case it becomes redundant after the deletion of an + /*! removes a vertex in case it becomes redundant after the deletion of an * incident edge. * \param v The vertex. * \param f The face that contains v (in case it becomes isolated). */ void _remove_vertex_if_redundant(DVertex* v, DFace* f); - /*! - * Remove an isolated vertex from the interior of its face (but not from + /*! removes an isolated vertex from the interior of its face (but not from * the DCEL). * \param v The isolated vertex to remove. */ @@ -2289,28 +2219,27 @@ protected: /// \name Auxiliary (protected) functions for validity checking. //@{ - /*! Check the validity of a given vertex. */ + /*! checks the validity of a given vertex. */ bool _is_valid(Vertex_const_handle v) const; - /*! Check the validity of a given halfedge. */ + /*! checks the validity of a given halfedge. */ bool _is_valid(Halfedge_const_handle he) const; - /*! Check the validity of a given face. */ + /*! checks the validity of a given face. */ bool _is_valid(Face_const_handle f) const; - /*! Check the validity of an outer CCB. */ + /*! checks the validity of an outer CCB. */ bool _is_outer_ccb_valid(const DOuter_ccb* oc, const DHalfedge* first) const; - /*! Check the validity of an inner CCB. */ + /*! checks the validity of an inner CCB. */ bool _is_inner_ccb_valid(const DInner_ccb* ic, const DHalfedge* first) const; - /*! - * Check that all vertices are unique (no two vertices with the same + /*! checks that all vertices are unique (no two vertices with the same * geometric point. */ bool _are_vertices_unique() const; - /*! Check that the curves around a given vertex are ordered clockwise. */ + /*! checks that the curves around a given vertex are ordered clockwise. */ bool _are_curves_ordered_cw_around_vertrex(Vertex_const_handle v) const; //@} @@ -2319,14 +2248,12 @@ protected: /// \name Managing and notifying the arrangement observers. //@{ - /*! - * Register a new observer (so it starts receiving notifications). + /*! registers a new observer (so it starts receiving notifications). * \param p_obs A pointer to the observer object. */ void _register_observer(Observer* p_obs) { m_observers.push_back(p_obs); } - /*! - * Unregister a new observer (so it stops receiving notifications). + /*! unregisters a new observer (so it stops receiving notifications). * \param p_obs A pointer to the observer object. * \return Whether the observer was successfully unregistered. */ @@ -2855,8 +2782,8 @@ protected: // For now the solution is to add a dummy variable at the end (referring // to point-location). Maybe the proper solution is to use std::enable_if // together with appropriate tag. -/*! - * Insert a curve or x-monotone curve into the arrangement (incremental + +/*! inserts a curve or x-monotone curve into the arrangement (incremental * insertion). * The inserted curve can be x-monotone (or not) and may intersect the * existing arrangement. @@ -2870,8 +2797,7 @@ void insert(Arrangement_on_surface_2& arr, const Curve& c, const PointLocation& pl, typename PointLocation::Point_2* = 0); -/*! - * Insert a curve or x-monotone curve into the arrangement (incremental +/*! inserts a curve or x-monotone curve into the arrangement (incremental * insertion). * The inserted curve can be x-monotone (or not) and may intersect the * existing arrangement. The default "walk" point-location strategy is used @@ -2883,8 +2809,7 @@ template void insert(Arrangement_on_surface_2& arr, const Curve& c); -/*! - * Insert a range of curves or x-monotone curves into the arrangement +/*! inserts a range of curves or x-monotone curves into the arrangement * (aggregated insertion). * The inserted curves may intersect one another and may also intersect the * existing arrangement. @@ -2897,8 +2822,7 @@ template void insert(Arrangement_on_surface_2& arr, InputIterator begin, InputIterator end); -/*! - * Insert an x-monotone curve into the arrangement (incremental insertion) +/*! inserts an x-monotone curve into the arrangement (incremental insertion) * when the location of the left endpoint of the curve is known and is * given as an isertion hint. * The inserted x-monotone curve may intersect the existing arrangement. @@ -2914,8 +2838,7 @@ void insert(Arrangement_on_surface_2& arr, typename Arr_point_location_result< Arrangement_on_surface_2 >::type obj); -/*! - * Insert an x-monotone curve into the arrangement, such that the curve +/*! inserts an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the * arrangement (incremental insertion). * \param arr The arrangement. @@ -2932,8 +2855,7 @@ insert_non_intersecting_curve const typename GeomTraits::X_monotone_curve_2& c, const PointLocation& pl); -/*! - * Insert an x-monotone curve into the arrangement, such that the curve +/*! inserts an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the * arrangement (incremental insertion). The default point-location strategy * is used for the curve insertion. @@ -2949,8 +2871,7 @@ insert_non_intersecting_curve (Arrangement_on_surface_2& arr, const typename GeomTraits::X_monotone_curve_2& c); -/*! - * Insert a range of pairwise interior-disjoint x-monotone curves into +/*! inserts a range of pairwise interior-disjoint x-monotone curves into * the arrangement, such that the curve interiors do not intersect with * any existing edge or vertex in the arrangement (aggregated insertion). * \param arr The arrangement. @@ -2965,8 +2886,7 @@ void insert_non_intersecting_curves (Arrangement_on_surface_2& arr, InputIterator begin, InputIterator end); -/*! - * Remove an edge from the arrangement. In case it is possible to merge +/*! removes an edge from the arrangement. In case it is possible to merge * the edges incident to the end-vertices of the removed edge after its * deletion, the function performs these merges as well. * \param arr The arrangement. @@ -2979,8 +2899,7 @@ remove_edge(Arrangement_on_surface_2& arr, typename Arrangement_on_surface_2::Halfedge_handle e); -/*! - * Insert a vertex that corresponds to a given point into the arrangement. +/*! inserts a vertex that corresponds to a given point into the arrangement. * The inserted point may lie on any existing arrangement feature. * \param arr The arrangement. * \param p The point to be inserted. @@ -2993,8 +2912,7 @@ insert_point(Arrangement_on_surface_2& arr, const typename GeomTraits::Point_2& p, const PointLocation& pl); -/*! - * Insert a vertex that corresponds to a given point into the arrangement. +/*! inserts a vertex that corresponds to a given point into the arrangement. * The inserted point may lie on any existing arrangement feature. * \param arr The arrangement. * \param p The point to be inserted. @@ -3005,8 +2923,7 @@ typename Arrangement_on_surface_2::Vertex_handle insert_point(Arrangement_on_surface_2& arr, const typename GeomTraits::Point_2& p); -/*! - * Remove a vertex from the arrangement. +/*! removes a vertex from the arrangement. * \param arr The arrangement. * \param v The vertex to remove. * \return Whether the vertex has been removed or not. @@ -3018,8 +2935,7 @@ remove_vertex(Arrangement_on_surface_2& arr, TopTraits>::Vertex_handle v); -/*! - * Check the validity of the arrangement. In particular, check that the +/*! checks the validity of the arrangement. In particular, check that the * edegs are disjoint-interior, and the holes are located in their proper * position. * \param arr The arrangement. @@ -3028,7 +2944,7 @@ remove_vertex(Arrangement_on_surface_2& arr, template bool is_valid(const Arrangement_on_surface_2& arr); -/*! Compute the zone of the given x-monotone curve in the existing arrangement. +/*! compute the zone of the given x-monotone curve in the existing arrangement. * Meaning, it output the arrangement's vertices, edges and faces that the * x-monotone curve intersects. * \param arr The arrangement. @@ -3046,8 +2962,7 @@ OutputIterator zone(Arrangement_on_surface_2& arr, OutputIterator oi, const PointLocation& pl); -/*! - * Compute the zone of the given x-monotone curve in the existing arrangement. +/*! computes the zone of the given x-monotone curve in the existing arrangement. * Overloaded version with no point location object - the walk point-location * strategy is used as default. * \param arr The arrangement. @@ -3062,8 +2977,7 @@ OutputIterator zone(Arrangement_on_surface_2& arr, const typename GeomTraits::X_monotone_curve_2& c, OutputIterator oi); -/*! - * Checks if the given curve/x-monotone curve intersects the existing +/*! checks if the given curve/x-monotone curve intersects the existing * arrangement. * \param arr The arrangement. * \param c The curve/x-monotone curve. @@ -3076,8 +2990,7 @@ template & arr, const Curve& c, const PointLocation& pl); -/*! - * Checks if the given curve/x-monotone curve intersects the existing +/*! checks if the given curve/x-monotone curve intersects the existing * arrangement. * Overloaded version with no point location object - the walk point-location * strategy is used as default. @@ -3089,11 +3002,12 @@ template bool do_intersect(Arrangement_on_surface_2& arr, const Curve& c); -} //namespace CGAL +} // namespace CGAL // The function definitions can be found under: #include #include #include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h index 34855a735c8..796d2c92e79 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h @@ -188,29 +188,29 @@ public: Halfedges_set m_halfedges; public: - /*! Default constructor. */ + /*! constructs default. */ Curve_halfedges() {} - /*! Constructor from a given curve. */ + /*! constructs from a given curve. */ Curve_halfedges(const Curve_2& curve) : Curve_2(curve) {} using iterator = typename Halfedges_set::iterator; using const_iterator = typename Halfedges_set::const_iterator; private: - /*! Get the number of edges induced by the curve. */ + /*! obtains the number of edges induced by the curve. */ Size size() const { return m_halfedges.size(); } - /*! Get an iterator for the first edge in the set (const version). */ + /*! obtains an iterator for the first edge in the set (const version). */ const_iterator begin() const { return m_halfedges.begin(); } - /*! Get an iterator for the first edge in the set (non-const version). */ + /*! obtains an iterator for the first edge in the set (non-const version). */ iterator begin() { return m_halfedges.begin(); } - /*! Get a past-the-end iterator for the set edges (const version). */ + /*! obtains a past-the-end iterator for the set edges (const version). */ const_iterator end() const { return m_halfedges.end(); } - /*! Get a past-the-end iterator for the set edges (non-const version). */ + /*! obtains a past-the-end iterator for the set edges (non-const version). */ iterator end() { return m_halfedges.end(); } /*! Insert an edge to the set. */ @@ -220,17 +220,17 @@ public: return res.first; } - /*! Erase an edge, given by its position, from the set. */ + /*! erases an edge, given by its position, from the set. */ void erase(iterator pos) { m_halfedges.erase(pos); } - /*! Erase an edge from the set. */ + /*! erases an edge from the set. */ void _erase(Halfedge_handle he) { size_t res = m_halfedges.erase(he); if (res == 0) res = m_halfedges.erase(he->twin()); CGAL_assertion(res != 0); } - /*! Cleat the edges set. */ + /*! cleats the edges set. */ void clear() { m_halfedges.clear(); } }; @@ -257,8 +257,7 @@ protected: virtual void after_create_edge(Halfedge_handle e) override { _register_edge(e); } - /*! - * Notification before the modification of an existing edge. + /*! Notification before the modification of an existing edge. * \param e A handle to one of the twin halfedges to be updated. * \param c The x-monotone curve to be associated with the edge. */ @@ -318,7 +317,7 @@ protected: private: - /*! Register the given halfedge in the set(s) associated with its curve. + /*! registers the given halfedge in the set(s) associated with its curve. */ void _register_edge(Halfedge_handle e) { for (auto di = e->curve().data().begin(); di != e->curve().data().end(); @@ -328,8 +327,7 @@ protected: } } - /*! - * Unregister the given halfedge from the set(s) associated with its curve. + /*! unregisters the given halfedge from the set(s) associated with its curve. */ void _unregister_edge(Halfedge_handle e) { for (auto di = e->curve().data().begin(); di != e->curve().data().end(); @@ -356,49 +354,49 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_on_surface_with_history_2 (); - /*! Copy constructor. */ + /*! constructs copy. */ Arrangement_on_surface_with_history_2 (const Self& arr); - /*! Constructor given a traits object. */ + /*! constructs from a traits object. */ Arrangement_on_surface_with_history_2 (const Geometry_traits_2 *tr); //@} /// \name Assignment functions. //@{ - /*! Assignment operator. */ + /*! assigns. */ Self& operator= (const Self& arr); - /*! Assign an arrangement with history. */ + /*! assigns an arrangement with history. */ void assign (const Self& arr); //@} /// \name Destruction functions. //@{ - /*! Destructor. */ + /*! destructs. */ virtual ~Arrangement_on_surface_with_history_2 (); - /*! Clear the arrangement. */ + /*! clears the arrangement. */ virtual void clear (); //@} - /*! Access the geometry-traits object (const version). */ + /*! accesses the geometry-traits object (const version). */ inline const Geometry_traits_2 * geometry_traits () const { return (this->m_geom_traits); } - /*! Access the topology-traits object (non-const version). */ + /*! accesses the topology-traits object (non-const version). */ inline Topology_traits * topology_traits () { return (&(this->m_topol_traits)); } - /*! Access the topology-traits object (const version). */ + /*! accesses the topology-traits object (const version). */ inline const Topology_traits* topology_traits () const { return (&(this->m_topol_traits)); @@ -488,8 +486,7 @@ public: /// \name Manipulating edges. //@{ - /*! - * Split a given edge into two at the given split point. + /*! splits a given edge into two at the given split point. * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. * \pre p lies in the interior of the curve associated with e. @@ -498,8 +495,7 @@ public: */ Halfedge_handle split_edge (Halfedge_handle e, const Point_2& p); - /*! - * Merge two edges to form a single edge. + /*! merges two edges to form a single edge. * \param e1 The first edge to merge (one of the pair of twin halfedges). * \param e2 The second edge to merge (one of the pair of twin halfedges). * \pre e1 and e2 must have a common end-vertex of degree 2 and must @@ -508,8 +504,7 @@ public: */ Halfedge_handle merge_edge (Halfedge_handle e1, Halfedge_handle e2); - /*! - * Check if two edges can be merged to a single edge. + /*! checks if two edges can be merged to a single edge. * \param e1 The first edge (one of the pair of twin halfedges). * \param e2 The second edge (one of the pair of twin halfedges). * \return true iff e1 and e2 are mergeable. @@ -521,8 +516,7 @@ protected: /// \name Curve insertion and deletion. //@{ - /*! - * Insert a curve into the arrangement. + /*! inserts a curve into the arrangement. * \param cv The curve to be inserted. * \param pl a point-location object. * \return A handle to the inserted curve. @@ -550,8 +544,7 @@ protected: return (--ch); } - /*! - * Insert a curve into the arrangement, using the default point-location + /*! inserts a curve into the arrangement, using the default point-location * strategy. * \param cv The curve to be inserted. * \return A handle to the inserted curve. @@ -579,8 +572,7 @@ protected: return (--ch); } - /*! - * Insert a range of curves into the arrangement. + /*! inserts a range of curves into the arrangement. * \param begin An iterator pointing to the first curve in the range. * \param end A past-the-end iterator for the last curve in the range. */ @@ -606,8 +598,7 @@ protected: CGAL::insert (base_arr, data_curves.begin(), data_curves.end()); } - /*! - * Remove a curve from the arrangement (remove all the edges it induces). + /*! removes a curve from the arrangement (remove all the edges it induces). * \param ch A handle to the curve to be removed. * \return The number of removed edges. */ @@ -650,8 +641,7 @@ protected: public: - /*! - * Set our arrangement to be the overlay the two given arrangements. + /*! sets our arrangement to be the overlay the two given arrangements. * \param arr1 The first arrangement. * \param arr2 The second arrangement. * \param overlay_tr An overlay-traits class. @@ -770,8 +760,7 @@ public: // Global insertion, removal and overlay functions. //----------------------------------------------------------------------------- -/*! - * Insert a curve into the arrangement (incremental insertion). +/*! inserts a curve into the arrangement (incremental insertion). * The inserted curve may not necessarily be x-monotone and may intersect the * existing arrangement. * \param arr The arrangement-with-history object. @@ -793,8 +782,7 @@ insert (Arrangement_on_surface_with_history_2& arr, return (arr_access.insert_curve (c, pl)); } -/*! - * Insert a curve into the arrangement (incremental insertion). +/*! inserts a curve into the arrangement (incremental insertion). * The inserted curve may not necessarily be x-monotone and may intersect the * existing arrangement. The default "walk" point-location strategy is used * for inserting the curve. @@ -816,8 +804,7 @@ insert (Arrangement_on_surface_with_history_2& arr, } -/*! - * Insert a range of curves into the arrangement (aggregated insertion). +/*! inserts a range of curves into the arrangement (aggregated insertion). * The inserted curves may intersect one another and may also intersect the * existing arrangement. * \param arr The arrangement-with-history object. @@ -836,8 +823,7 @@ void insert (Arrangement_on_surface_with_history_2& arr, arr_access.insert_curves (begin, end); } -/*! - * Remove a curve from the arrangement (remove all the edges it induces). +/*! removes a curve from the arrangement (remove all the edges it induces). * \param ch A handle to the curve to be removed. * \return The number of removed edges. */ @@ -855,8 +841,7 @@ remove_curve(Arrangement_on_surface_with_history_2& arr, return (arr_access.remove_curve (ch)); } -/*! - * Compute the overlay of two input arrangement. +/*! computes the overlay of two input arrangement. * \param arr1 The first arrangement. * \param arr2 The second arrangement. * \param res Output: The resulting arrangement. @@ -880,8 +865,7 @@ overlay (const Arrangement_on_surface_with_history_2& res._overlay (arr1, arr2, ovl_traits); } -/*! - * Compute the overlay of two input arrangement. +/*! computes the overlay of two input arrangement. * \param arr1 The first arrangement. * \param arr2 The second arrangement. * \param res Output: The resulting arrangement. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h index 010fa182c00..52da7e5598d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h @@ -128,17 +128,17 @@ public: /// \name Constructors. //@{ - /*! Default constructor. */ + /*! constructs default. */ Arrangement_with_history_2 () : Base () {} - /*! Copy constructor (from a base arrangement). */ + /*! constructs copy (from a base arrangement). */ Arrangement_with_history_2 (const Base & base) : Base (base) {} - /*! Constructor given a traits object. */ + /*! constructs from a traits object. */ Arrangement_with_history_2 (const Traits_2 * tr) : Base (tr) {} @@ -147,14 +147,14 @@ public: /// \name Assignment functions. //@{ - /*! Assignment operator (from a base arrangement). */ + /*! assigns (from a base arrangement). */ Self& operator= (const Base & base) { Base::assign (base); return (*this); } - /*! Assign an arrangement. */ + /*! assigns an arrangement. */ void assign (const Base & base) { Base::assign (base); @@ -165,13 +165,13 @@ public: ///! \name Specialized access methods. //@{ - /*! Get the geometry-traits class (for backward compatibility). */ + /*! obtains the geometry-traits class (for backward compatibility). */ const Traits_2 * traits () const { return (this->geometry_traits()); } - /*! Get the number of vertices at infinity. */ + /*! obtains the number of vertices at infinity. */ Size number_of_vertices_at_infinity () const { // The vertices at infinity are valid, but not concrete: @@ -179,7 +179,7 @@ public: this->topology_traits()->number_of_concrete_vertices()); } - /*! Get the number of unbounded faces. */ + /*! obtains the number of unbounded faces. */ Size number_of_unbounded_faces () const { typename Base::Face_const_iterator fit = this->faces_begin(); @@ -196,7 +196,7 @@ public: return (n_unb); } - /*! Get the unbounded face (non-const version). */ + /*! obtains the unbounded face (non-const version). */ Face_handle unbounded_face () { // The fictitious un_face contains all other valid faces in a single @@ -216,7 +216,7 @@ public: return (Face_handle (p_oc->face())); } - /*! Get the unbounded face (const version). */ + /*! obtains the unbounded face (const version). */ Face_const_handle unbounded_face () const { // The fictitious un_face contains all other valid faces in a single diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h index cb0e7117833..811fdb931e2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -173,7 +173,7 @@ protected: X_monotone_curve_2 m_sub_cv2; // Auxiliary variable (for curve split). public: - /*! Constructor. + /*! constructs. * \param _arr The arrangement for which we compute the zone. * \param _visitor A pointer to a zone-visitor object. */ @@ -191,7 +191,7 @@ public: visitor->init(&arr); } - /*! Initialize the zone-computation process with a given curve. + /*! initializes the zone-computation process with a given curve. * \param _cv The query curve. * \param pl A point-location object associated with the arrangement. */ @@ -242,7 +242,7 @@ public: } } - /*! Initialize the zone-computation process with a given curve and an object + /*! initializes the zone-computation process with a given curve and an object * that wraps the location of the curve's left end. * \param cv The query curve. * \param obj An object that represents the location of the left end of the @@ -250,13 +250,13 @@ public: */ void init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj); - /*! Compute the zone of the given curve and issue the appropriate + /*! computes the zone of the given curve and issue the appropriate * notifications for the visitor. */ void compute_zone(); private: - /*! Check whether two curves with a common endpoint overlap. + /*! checks whether two curves with a common endpoint overlap. * \pre p == min_point(cv1) * \pre p == min_point(cv2) * \todo move this function to a more accessible place so that it can be reused @@ -265,7 +265,7 @@ private: const Point_2& p) const { return do_overlap_impl(cv1, cv2, p, Are_all_sides_oblivious_category()); } - /*! Check whether two curves with a common min endpoint overlap. + /*! checks whether two curves with a common min endpoint overlap. */ bool do_overlap_impl(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, @@ -273,13 +273,13 @@ private: return m_geom_traits->compare_y_at_x_right_2_object()(cv1, cv2, p) == EQUAL; } - /*! Check whether two curves with a common min endpoint overlap. + /*! checks whether two curves with a common min endpoint overlap. */ bool do_overlap_impl(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, const Point_2& p, Arr_not_all_sides_oblivious_tag) const; - /*! Find a face containing the query curve m_cv around the given vertex. + /*! finds a face containing the query curve m_cv around the given vertex. * In case an overlap occurs, sets m_intersect_he to be the overlapping edge. * \param v The query vertex. * \param he Output: The predecessor of m_cv around the vertex. @@ -288,7 +288,7 @@ private: */ bool _find_prev_around_vertex(Vertex_handle v, Halfedge_handle& he); - /*! Direct the halfedge for the location of the given subcurve around a split + /*! directs the halfedge for the location of the given subcurve around a split * point that occurs in the interior of a given edge, when the subcurve lies * to the right of the split point. * In case of overlaps, it sets also m_found_overlap and m_intersect_he. @@ -306,7 +306,7 @@ private: const Point_2& cv_left_pt, Halfedge_handle query_he); - /*! Direct the halfedge for the location of the given subcurve around a split + /*! directs the halfedge for the location of the given subcurve around a split * point that occurs in the interior of a given edge, when the subcurve lies * to the left of the split point. * \param cv_ins The curve to be inserted, whose right endpoint coincides @@ -321,7 +321,7 @@ private: _direct_intersecting_edge_to_left(const X_monotone_curve_2& cv_ins, Halfedge_handle query_he); - /*! Get the next intersection of m_cv with the given halfedge. + /*! obtains the next intersection of m_cv with the given halfedge. * \param he A handle to the halfedge. * \param skip_first_point Should we skip the first intersection point. * \param intersect_on_right_boundary Output: If an intersetion point is @@ -339,14 +339,14 @@ private: bool skip_first_point, Arr_parameter_space& intersection_location); - /*! Remove the next intersection of m_cv with the given halfedge from the map. + /*! removes the next intersection of m_cv with the given halfedge from the map. * \param he A handle to the halfedge. * \pre The list of intersections with the curve of he has already been * computed, and it is not empty. */ void _remove_next_intersection(Halfedge_handle he); - /*! Check whether the given point lies completely to the left of the given + /*! checks whether the given point lies completely to the left of the given * edge. * \param p The point. * \param he The halfedge. @@ -370,7 +370,7 @@ private: bool _is_to_left_impl(const Point_2& p, Halfedge_handle he, Arr_not_all_sides_oblivious_tag) const; - /*! Check whether the given point lies completely to the right of the given + /*! checks whether the given point lies completely to the right of the given * edge. * \param p The point. * \param he The halfedge. @@ -394,7 +394,7 @@ private: bool _is_to_right_impl(const Point_2& p, Halfedge_handle he, Arr_not_all_sides_oblivious_tag) const; - /*! Check whether an intersection point is valid. A valid intersection point + /*! checks whether an intersection point is valid. A valid intersection point * must be to the left of the left end of the curve involved. */ bool is_intersection_valid(const Point_2& ip, @@ -415,14 +415,14 @@ private: Arr_parameter_space& intersection_location, Arr_boundary_cond_tag) const; - /*! Compute the (lexicographically) leftmost intersection of the query + /*! computes the (lexicographically) leftmost intersection of the query * curve with a given halfedge on the boundary of a face in the arrangement. */ void _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary, Arr_parameter_space& leftmost_location); - /*! Compute the (lexicographically) leftmost intersection of the query + /*! computes the (lexicographically) leftmost intersection of the query * curve with the boundary of a given face in the arrangement. * The function computes sets m_intersect_p, m_intersect_he (or alternatively * m_overlap_cv and m_intersect_he) and set the flags m_found_intersect and @@ -434,7 +434,7 @@ private: void _leftmost_intersection_with_face_boundary(Face_handle face, bool on_boundary); - /*! Compute the zone of an x-monotone curve in a given arrangement face. + /*! computes the zone of an x-monotone curve in a given arrangement face. * The left endpoint of the curve either lies in the face interior or on * the boundary of the face. * This function updates m_cv and its left endpoint and also sets m_left_v @@ -451,7 +451,7 @@ private: */ bool _zone_in_face(Face_handle face, bool on_boundary); - /*! Compute the zone of an overlapping subcurve m_overlap_cv of m_cv and the + /*! computes the zone of an overlapping subcurve m_overlap_cv of m_cv and the * curve currently associated with m_intersect_he. * This function updates m_cv and its left endpoint and also sets m_left_v * and m_left_he for the remaining portion of the curve. @@ -462,7 +462,7 @@ private: bool _zone_in_overlap(); }; -} //namespace CGAL +} // namespace CGAL // The function definitions can be found under: #include diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h index 332f1518179..c4acd8c87f6 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h @@ -65,48 +65,48 @@ protected: public: - /*! Default constructor.*/ + /*! constructs default.*/ Arr_text_formatter(): m_out(nullptr), m_in(nullptr) {} - /*! Construct an output formatter. */ + /*! constructs an output formatter. */ Arr_text_formatter(std::ostream& os) : m_out(&os), m_in(nullptr) {} - /*! Construct an input formatter. */ + /*! constructs an input formatter. */ Arr_text_formatter(std::istream& is) : m_out(nullptr), m_in(&is) {} - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_text_formatter() {} - /*! Set the output stream. */ + /*! sets the output stream. */ void set_out(std::ostream& os) { m_out = &os; } - /*! Set the input stream. */ + /*! sets the input stream. */ void set_in(std::istream& is) { m_in = &is; } - /*! Get the output stream. */ + /*! obtains the output stream. */ inline std::ostream& out() { CGAL_assertion(m_out != nullptr); return (*m_out); } - /*! Get the input stream. */ + /*! obtains the input stream. */ inline std::istream& in() { CGAL_assertion(m_in != nullptr); @@ -116,7 +116,7 @@ public: /// \name Global write functions. //@{ - /*! Write a begin-arrangement comment. */ + /*! writes a begin-arrangement comment. */ void write_arrangement_begin() { CGAL_assertion(m_out != nullptr); @@ -125,51 +125,51 @@ public: _write_comment("BEGIN ARRANGEMENT"); } - /*! Write an end-arrangement comment. */ + /*! writes an end-arrangement comment. */ void write_arrangement_end() { _write_comment("END ARRANGEMENT"); set_mode(*m_out, m_old_out_mode); } - /*! Write a labeled size value. */ + /*! writes a labeled size value. */ void write_size(const char *label, Size size) { _write_comment(label); out() << size << '\n'; } - /*! Write a begin-vertices comment. */ + /*! writes a begin-vertices comment. */ void write_vertices_begin() { _write_comment("BEGIN VERTICES"); } - /*! Write an end-vertices comment. */ + /*! writes an end-vertices comment. */ void write_vertices_end() { _write_comment("END VERTICES"); } - /*! Write a begin-edges comment. */ + /*! writes a begin-edges comment. */ void write_edges_begin() { _write_comment("BEGIN EDGES"); } - /*! Write an end-edges comment. */ + /*! writes an end-edges comment. */ void write_edges_end() { _write_comment("END EDGES"); } - /*! Write a begin-faces comment. */ + /*! writes a begin-faces comment. */ void write_faces_begin() { _write_comment("BEGIN FACES"); } - /*! Write an end-faces comment. */ + /*! writes an end-faces comment. */ void write_faces_end() { _write_comment("END FACES"); @@ -273,7 +273,7 @@ public: /// \name Global read functions. //@{ - /*! Start reading an arrangement. */ + /*! starts reading an arrangement. */ void read_arrangement_begin() { CGAL_assertion(m_in != nullptr); @@ -282,14 +282,14 @@ public: _skip_comments(); } - /*! Read the arrangement edge. */ + /*! reads the arrangement edge. */ void read_arrangement_end() { _skip_comments(); set_mode(*m_in, m_old_in_mode); } - /*! Read a size value (with a label comment line before it). */ + /*! reads a size value (with a label comment line before it). */ Size read_size(const char* /* title */ = nullptr) { std::size_t val; @@ -301,7 +301,7 @@ public: return (val); } - /*! Reading the arrangement vertices. */ + /*! reads the arrangement vertices. */ void read_vertices_begin() { _skip_comments(); @@ -312,7 +312,7 @@ public: _skip_comments(); } - /*! Reading the arrangement edges. */ + /*! reads the arrangement edges. */ void read_edges_begin() { _skip_comments(); @@ -323,7 +323,7 @@ public: _skip_comments(); } - /*! Reading the arrangement faces. */ + /*! reads the arrangement faces. */ void read_faces_begin() { _skip_comments(); @@ -431,13 +431,13 @@ public: protected: - /*! Write a comment line. */ + /*! writes a comment line. */ void _write_comment(const char *str) { out() << "# " << str << std::endl; } - /*! Skip until end of line. */ + /*! skips until end of line. */ void _skip_until_EOL() { CGAL_assertion(m_in != nullptr); @@ -446,7 +446,7 @@ protected: while ((c = m_in->get()) != EOF && c != '\n') {}; } - /*! Skip comment lines. */ + /*! skips comment lines. */ void _skip_comments() { CGAL_assertion(m_in != nullptr); @@ -492,28 +492,28 @@ public: typedef typename Base::Halfedge_const_handle Halfedge_const_handle; typedef typename Base::Face_const_handle Face_const_handle; - /*! Default constructor.*/ + /*! constructs default.*/ Arr_face_extended_text_formatter() : Base() {} - /*! Construct an output formatter. */ + /*! constructs an output formatter. */ Arr_face_extended_text_formatter(std::ostream& os) : Base(os) {} - /*! Construct an input formatter. */ + /*! constructs an input formatter. */ Arr_face_extended_text_formatter(std::istream& is) : Base(is) {} - /*! Write the auxiliary data associated with the given face. */ + /*! writes the auxiliary data associated with the given face. */ virtual void write_face_data(Face_const_handle f) { this->out() << f->data() << '\n'; } - /*! Read a face-data object and attach it to the given face. */ + /*! reads a face-data object and attach it to the given face. */ virtual void read_face_data(Face_handle f) { this->in() >> f->data(); @@ -548,20 +548,20 @@ public: typedef typename Base::Halfedge_const_handle Halfedge_const_handle; typedef typename Base::Face_const_handle Face_const_handle; - /*! Default constructor.*/ + /*! constructs default.*/ Arr_extended_dcel_text_formatter() : Base() {} - /*! Construct an output formatter. */ + /*! constructs an output formatter. */ Arr_extended_dcel_text_formatter(std::ostream& os) : Base(os) {} - /*! Construct an input formatter. */ + /*! constructs an input formatter. */ Arr_extended_dcel_text_formatter(std::istream& is) : Base(is) {} - /*! Write the auxiliary data associated with the given vertex. */ + /*! write the auxiliary data associated with the given vertex. */ virtual void write_vertex_data(Vertex_const_handle v) { this->out() << '\n' << v->data(); } - /*! Read a vertex-data object and attach it to the given vertex. */ + /*! reads a vertex-data object and attach it to the given vertex. */ virtual void read_vertex_data(Vertex_handle v) { using Vertex = typename Arrangement_2::Vertex; using Type = decltype(std::declval().data()); @@ -572,11 +572,11 @@ public: this->_skip_until_EOL(); } - /*! Write the auxiliary data associated with the given halfedge. */ + /*! writes the auxiliary data associated with the given halfedge. */ virtual void write_halfedge_data(Halfedge_const_handle he) { this->out() << '\n' << he->data(); } - /*! Read a halfedge-data object and attach it to the given halfedge. */ + /*! reads a halfedge-data object and attach it to the given halfedge. */ virtual void read_halfedge_data(Halfedge_handle he) { using Halfedge = typename Arrangement_2::Halfedge; using Type = decltype(std::declval().data()); @@ -587,11 +587,11 @@ public: this->_skip_until_EOL(); } - /*! Write the auxiliary data associated with the given face. */ + /*! writes the auxiliary data associated with the given face. */ virtual void write_face_data(Face_const_handle f) { this->out() << f->data() << '\n'; } - /*! Read a face-data object and attach it to the given face. */ + /*! reads a face-data object and attach it to the given face. */ virtual void read_face_data(Face_handle f) { using Face = typename Arrangement_2::Face; using Type = decltype(std::declval().data()); @@ -603,6 +603,6 @@ public: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h index cf2026e7ef4..1567540b271 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h @@ -79,7 +79,7 @@ namespace CGAL { public: - /*! Constructor. */ + /*! constructs. */ Arrangement_2_writer(const Arrangement_2& arr) : m_arr(arr), m_dcel(nullptr), @@ -90,11 +90,11 @@ namespace CGAL { m_dcel = &(arr_access.dcel()); } - /*! Destructor. */ + /*! destructs. */ virtual ~Arrangement_2_writer() {} - /*! Write the arrangement. */ + /*! writes the arrangement. */ template void operator()(Formatter& formatter) { @@ -141,7 +141,7 @@ namespace CGAL { protected: - /*! Write a vertex. */ + /*! writes a vertex. */ template void _write_vertex(Formatter& formatter, Vertex_const_iterator vit) { @@ -174,7 +174,7 @@ namespace CGAL { formatter.write_vertex_end(); } - /*! Write an edge (a pair of halfedges). */ + /*! writes an edge (a pair of halfedges). */ template void _write_edge(Formatter& formatter, Edge_const_iterator hit) { @@ -215,7 +215,7 @@ namespace CGAL { formatter.write_edge_end(); } - /*! Write a face. */ + /*! writes a face. */ template void _write_face(Formatter& formatter, Face_const_iterator fit) const { @@ -284,7 +284,7 @@ namespace CGAL { formatter.write_face_end(); } - /*! Write the edges along a given CCB. */ + /*! writes the edges along a given CCB. */ template void _write_ccb(Formatter& formatter, const DHalfedge* ccb) const { @@ -298,7 +298,7 @@ namespace CGAL { formatter.write_ccb_halfedges_end(); } - /*! Get the mapped index of a given vertex. */ + /*! obtains the mapped index of a given vertex. */ int _index(const DVertex* v) const { typename Vertex_index_map::const_iterator pos = m_v_index.find(v); @@ -307,7 +307,7 @@ namespace CGAL { return (pos->second); } - /*! Get the mapped index of a given halfedge. */ + /*! obtains the mapped index of a given halfedge. */ int _index(const DHalfedge* he) const { typename Halfedge_index_map::const_iterator pos = m_he_index.find(he); @@ -316,7 +316,7 @@ namespace CGAL { return (pos->second); } - /*! Get the number of edges along a given CCB. */ + /*! obtains the number of edges along a given CCB. */ std::size_t _circulator_size(const DHalfedge* ccb) const { CGAL_assertion(ccb != nullptr); @@ -333,6 +333,6 @@ namespace CGAL { } }; -} //namespace CGAL +} // namespace CGAL -#endif // CGAL_IO_ARRANGEMENT_2_WRITER_H +#endif diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h index 1418044d5f4..e1accd10731 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h @@ -83,7 +83,7 @@ protected: const Gt2* m_base_traits; public: - /*! Constructor. */ + /*! constructs. */ Arr_basic_insertion_traits_2(const Gt2& tr) : m_base_traits(&tr) {} @@ -214,7 +214,7 @@ public: Base_equal_2 m_base_equal; Halfedge_handle invalid_he; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -255,7 +255,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 function object */ + /*! obtains a Construct_min_vertex_2 function object */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return (Construct_min_vertex_2 @@ -270,7 +270,7 @@ public: Base_equal_2 m_base_equal; Halfedge_handle invalid_he; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -312,7 +312,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 function object */ + /*! obtains a Construct_max_vertex_2 function object */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return (Construct_max_vertex_2 @@ -325,7 +325,7 @@ public: protected: Base_compare_xy_2 m_base_cmp_xy; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -346,7 +346,7 @@ public: } }; - /*! Obtain a Compare_xy_2 function object */ + /*! obtains a Compare_xy_2 function object */ Compare_xy_2 compare_xy_2_object() const { return (Compare_xy_2(m_base_traits->compare_xy_2_object())); } @@ -357,7 +357,7 @@ public: protected: Base_compare_y_at_x_2 m_base_cmp_y_at_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -375,7 +375,7 @@ public: { return (m_base_cmp_y_at_x(p.base(), xcv.base())); } }; - /*! Obtain a Compare_y_at_x_2 function object */ + /*! obtains a Compare_y_at_x_2 function object */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); } @@ -386,7 +386,7 @@ public: protected: Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -405,7 +405,7 @@ public: { return (m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base())); } }; - /*! Obtain a Compare_y_at_x_right_2 function object */ + /*! obtains a Compare_y_at_x_right_2 function object */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return (Compare_y_at_x_right_2 @@ -419,7 +419,7 @@ public: protected: Base_equal_2 m_base_eq; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -440,7 +440,7 @@ public: { return (m_base_eq(p1.base(), p2.base())); } }; - /*! Obtain an `Equal_2` function object */ + /*! obtains an `Equal_2` function object */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } @@ -449,7 +449,7 @@ public: protected: Base_compare_x_2 m_base_cmp_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -464,7 +464,7 @@ public: { return (m_base_cmp_x(p1.base(), p2.base())); } }; - /*! Obtain a Compare_x_2 function object */ + /*! obtains a Compare_x_2 function object */ Compare_x_2 compare_x_2_object() const { return (Compare_x_2(m_base_traits->compare_x_2_object())); } @@ -473,7 +473,7 @@ public: protected: Base_is_vertical_2 m_base_is_vert; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -488,7 +488,7 @@ public: { return (m_base_is_vert(xcv.base())); } }; - /*! Obtain a Is_vertical_2 function object */ + /*! obtains a Is_vertical_2 function object */ Is_vertical_2 is_vertical_2_object() const { return (Is_vertical_2(m_base_traits->is_vertical_2_object())); } @@ -502,7 +502,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -526,7 +526,7 @@ public: { return m_base->parameter_space_in_x_2_object()(xcv.base()); } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(m_base_traits); } @@ -538,7 +538,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -558,7 +558,7 @@ public: { return m_base->is_on_x_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_x_identification_2 function object */ + /*! obtains a Is_on_x_identification_2 function object */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } @@ -570,7 +570,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -590,7 +590,7 @@ public: { return m_base->compare_y_on_boundary_2_object()(p1.base(), p2.base()); } }; - /*! Obtain a Compare_y_on_boundary_2 object + /*! obtains a Compare_y_on_boundary_2 object */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(m_base_traits); } @@ -603,7 +603,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -628,7 +628,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 object + /*! obtains a Compare_y_near_boundary_2 object */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(m_base_traits); } @@ -643,7 +643,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -667,7 +667,7 @@ public: { return m_base->parameter_space_in_y_2_object()(xcv.base()); } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(m_base_traits); } @@ -679,7 +679,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -699,7 +699,7 @@ public: { return m_base->is_on_y_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! obtains a Is_on_y_identification_2 function object */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } @@ -711,7 +711,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -724,13 +724,13 @@ public: friend class Arr_basic_insertion_traits_2; public: - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_base->compare_x_on_boundary_2_object()(p1.base(), p2.base()); } - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const Point_2& p, @@ -740,7 +740,7 @@ public: return m_base->compare_x_on_boundary_2_object()(p.base(), xcv.base(), ce); } - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -753,7 +753,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 object + /*! obtains a Compare_x_on_boundary_2 object */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(m_base_traits); } @@ -766,7 +766,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle non * stateless traits objects, (which stores data). * The constructor is declared private to allow only the functor @@ -779,7 +779,7 @@ public: friend class Arr_basic_insertion_traits_2; public: - /*! Use tag dispatching to avoid compilation errors in case the functor + /*! uses tag dispatching to avoid compilation errors in case the functor * is not defined */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -791,12 +791,12 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 object + /*! obtains a Compare_x_near_boundary_2 object */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(m_base_traits); } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h index 89e916f59a1..e14d641cecb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h @@ -101,17 +101,17 @@ protected: // event. public: - /*! Default constructor. */ + /*! constructs default. */ Arr_construction_event_base(): m_halfedge(), m_vertex(), m_right_curves_counter(0) {} - /*! Destructor */ + /*! destructs */ ~Arr_construction_event_base() {} - /*! Add a curve to the right of the event. */ + /*! adds a curve to the right of the event. */ std::pair add_curve_to_right(Subcurve* curve, const Gt2* tr) { @@ -123,7 +123,7 @@ public: return res; } - /*! Add a curve pair to the right of the event. */ + /*! adds a curve pair to the right of the event. */ std::pair add_curve_pair_to_right(Subcurve* sc1, Subcurve* sc2) { @@ -132,7 +132,7 @@ public: return (Base::add_curve_pair_to_right(sc1, sc2)); } - /*! using the additional data that we store at the event, we compute + /*! using the additional data that we store at the event, computes * how much we have to jump (he = he->next()->twin()) from the halfedge * that is stored in the event, to the halfedge that is previous to 'curve' * that is about to be inserted into the arrangement. @@ -173,7 +173,7 @@ public: return (i); } - /*! Return true iff 'curve' is the toppest curve among the halfedges + /*! returns true iff 'curve' is the toppest curve among the halfedges * to the right of the event that were already were inserted to the * arrangement. */ @@ -191,38 +191,38 @@ public: return true; } - /*! Resize the bit-vector indicating whether the incident curves are already + /*! resizes the bit-vector indicating whether the incident curves are already * in the arrangement, and set all flags to false. */ void init_subcurve_in_arrangement_flags(size_t n) { m_isCurveInArr.resize(n, false); } - /*! Check if the i'th subcurve is in the arrangement. */ + /*! checks if the i'th subcurve is in the arrangement. */ bool is_subcurve_in_arrangement(unsigned int i) const { return (m_isCurveInArr[i]); } - /*! Set the flag indicating whether the i'th subcurve is in the arrangement. + /*! sets the flag indicating whether the i'th subcurve is in the arrangement. */ void set_subcurve_in_arrangement(unsigned int i, bool flag) { m_isCurveInArr[i] = flag; } - /*! Set the halfedge handle. */ + /*! sets the halfedge handle. */ void set_halfedge_handle(Halfedge_handle h) { m_halfedge = h; } - /*! Get the halfedge handle. */ + /*! obtains the halfedge handle. */ Halfedge_handle halfedge_handle() const { return m_halfedge; } - /*! Set the vertex handle. */ + /*! sets the vertex handle. */ void set_vertex_handle(Vertex_handle v) { m_vertex = v; } - /*! Get the vertex handle. */ + /*! obtains the vertex handle. */ Vertex_handle vertex_handle() const { return m_vertex; } - /*! Decrement the count of curves to the right that we have't done yet with + /*! decrements the count of curves to the right that we have't done yet with * (haven't been inserted to the arrangement). */ unsigned int dec_right_curves_counter() { return (--m_right_curves_counter); } - /*! Get the number of subcurves to the right of the event that we have't + /*! obtains the number of subcurves to the right of the event that we have't * done yet with (haven't been inserted to the arrangement). */ unsigned int right_curves_counter() const { return (m_right_curves_counter); } diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h index 798cd0f0c18..b9946fa5af6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h @@ -134,7 +134,7 @@ protected: const Vertex_handle m_invalid_vertex; // An invalid vertex handle. public: - /*! Constructor. */ + /*! constructs. */ Arr_construction_ss_visitor(Arrangement_2* arr) : m_helper(arr), m_arr(arr), @@ -145,7 +145,7 @@ public: m_invalid_vertex() { m_helper.set_halfedge_indices_map(m_he_indices_table); } - /*! Destructor. */ + /*! destructs. */ virtual ~Arr_construction_ss_visitor() {} /// \name Sweep-line notifications. @@ -157,14 +157,12 @@ public: /* A notification issued after the sweep process stops. */ inline void after_sweep(); - /*! - * A notification invoked before the sweep-line starts handling the given + /*! A notification invoked before the sweep-line starts handling the given * event. */ inline void before_handle_event(Event* event); - /*! - * A notification invoked after the sweep-line finishes handling the given + /*! A notification invoked after the sweep-line finishes handling the given * event. */ bool after_handle_event(Event* event, Status_line_iterator iter, bool flag); @@ -176,7 +174,7 @@ public: /// \name Insertion functions. //@{ - /*! Insert the given subcurve in the interior of a face. + /*! inserts the given subcurve in the interior of a face. * \param cv The geometric subcurve. * \param sc The sweep-line subcurve information. * \return A handle to the inserted halfedge. @@ -184,7 +182,7 @@ public: virtual Halfedge_handle insert_in_face_interior(const X_monotone_curve_2& cv, Subcurve* sc); - /*! Insert the given subcurve given its left end-vertex. + /*! inserts the given subcurve given its left end-vertex. * \param cv The geometric entity. * \param prev The predecessor halfedge around the left vertex. * \param sc The sweep-line subcurve information. @@ -194,7 +192,7 @@ public: insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle he, Subcurve* sc); - /*! Insert the given subcurve given its right end-vertex. + /*! inserts the given subcurve given its right end-vertex. * \param cv The geometric entity. * \param prev The predecessor halfedge around the right vertex. * \param sc The sweep-line subcurve information. @@ -205,7 +203,7 @@ public: Halfedge_handle prev, Subcurve* sc); - /*! Insert the given subcurve given its two end-vertices. + /*! inserts the given subcurve given its two end-vertices. * \param cv The geometric subcurve. * \param prev1 The predecessor halfedge around the left vertex. * \param prev2 The predecessor halfedge around the right vertex. @@ -219,7 +217,7 @@ public: Subcurve* sc, bool& new_face_created); - /*! Insert an isolated vertex into the arrangement. + /*! inserts an isolated vertex into the arrangement. * \param pt The point associated with the vertex. * \param iter The location of the corresponding event in the status line. * \return A handle to the inserted vertex. @@ -227,7 +225,7 @@ public: virtual Vertex_handle insert_isolated_vertex(const Point_2& pt, Status_line_iterator iter); - /*! Relocate holes and isolated vertices inside a newly created face f2, + /*! relocates holes and isolated vertices inside a newly created face f2, * that was split from f1 after the insertion of a new edge. * \param he The halfedge that caused the face split. Its incident face is * the new face f2, and the incident face of its twin is f1. @@ -235,23 +233,21 @@ public: void relocate_in_new_face(Halfedge_handle he); //@} - /*! Get the last event associated with the given subcurve. */ + /*! obtains the last event associated with the given subcurve. */ Event* last_event_on_subcurve(Subcurve* sc) { return sc->last_event(); } private: /// \name Auxiliary functions. //@{ - /*! - * Cast a Traits::Point_2 object into an Arrangement_2::Point_2 object. + /*! casts a Traits::Point_2 object into an Arrangement_2::Point_2 object. * These two types may not be the same when the addition visitor inherits * from this base class. */ inline const typename Arrangement_2::Point_2& _point(const Point_2& p) const { return (static_cast(p)); } - /*! - * Cast a Traits::X_monotone_curve_2 object into an + /*! casts a Traits::X_monotone_curve_2 object into an * Arrangement_2::X_monotone_curve_2 object. * These two types may not be the same when the addition visitor inherits * from this base class. @@ -262,18 +258,18 @@ private: return (static_cast(cv)); } - /*! Map the given subcurve index to the given halfedge handle. + /*! maps the given subcurve index to the given halfedge handle. */ void _map_new_halfedge(unsigned int i, Halfedge_handle he); - /*! Move halfedge indices from the top face to the last inserted curve. + /*! moves halfedge indices from the top face to the last inserted curve. * This is the implementation for the case where all 4 boundary sides are * oblivious. */ void move_halfedge_indices(Event* event, Status_line_iterator iter, Arr_all_sides_oblivious_tag); - /*! Move halfedge indices from the top face to the last inserted curve. + /*! moves halfedge indices from the top face to the last inserted curve. * This is the implementation for the case where all 4 boundary sides are * not oblivious. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h index b20b165a6ef..ae838819564 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h @@ -81,14 +81,14 @@ public: typedef Event* Event_ptr; typedef std::list Halfedge_indices_list; - /*! Construct default. */ + /*! constructs default. */ Arr_construction_subcurve_base() : Base(), m_last_event(0), m_index(0) {} - /*! Constructor from an x-monotone curve. */ + /*! constructs from an x-monotone curve. */ Arr_construction_subcurve_base(X_monotone_curve_2& curve) : Base(curve), m_last_event(0), @@ -113,10 +113,10 @@ protected: // may represent a hole. public: - /*! Initialize the curve. */ + /*! initializes the curve. */ void init(const X_monotone_curve_2& curve) { Base::init(curve); } - /*! Set the event associated with the left end of the subcurve. */ + /*! sets the event associated with the left end of the subcurve. */ template void set_left_event(SweepEvent* left) { @@ -124,31 +124,31 @@ public: set_last_event(left); } - /*! Set the last event on the subcurve. */ + /*! sets the last event on the subcurve. */ void set_last_event(Event_ptr e) { m_last_event = e; } - /*! Obtain the last event. */ + /*! obtains the last event. */ Event_ptr last_event() const { return m_last_event; } - /*! Obtain the subcurve index. */ + /*! obtains the subcurve index. */ unsigned int index() const { return m_index; } - /*! Set the subcurve index. */ + /*! sets the subcurve index. */ void set_index(unsigned int i) { m_index = i; } - /*! Check whether the index is valid. */ + /*! checks whether the index is valid. */ bool has_valid_index() const { return (m_index != 0); } - /*! Add an index of a halfedge below the subcurve. */ + /*! adds an index of a halfedge below the subcurve. */ void add_halfedge_index(unsigned int i) { m_halfedge_indices.push_back(i); } - /*! Clear the indices of the halfedges below the subcurve. */ + /*! clears the indices of the halfedges below the subcurve. */ void clear_halfedge_indices() { m_halfedge_indices.clear(); } - /*! Check if there are any halfedges below the subcurve. */ + /*! checks if there are any halfedges below the subcurve. */ bool has_halfedge_indices() const { return (!m_halfedge_indices.empty()); } - /*! Obtain the indices of the halfedges below the subcurve. */ + /*! obtains the indices of the halfedges below the subcurve. */ Halfedge_indices_list& halfedge_indices_list() { return m_halfedge_indices; } }; @@ -200,16 +200,15 @@ public: typedef typename Base::Event_ptr Event_ptr; typedef typename Base::Halfedge_indices_list Halfedge_indices_list; - /*! Construct default. */ + /*! constructs default. */ Arr_construction_subcurve() {} - /*! Constructor from an x-monotone curve. */ + /*! constructs from an x-monotone curve. */ Arr_construction_subcurve(X_monotone_curve_2& curve) : Base(curve) {} }; - } // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h index 0abc509bcd5..c2ce569cc1b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h @@ -70,7 +70,7 @@ public: typedef Tag_false Has_merge_category; public: - /*! Constructor with a traits class. */ + /*! constructs from a traits class. */ Arr_insertion_traits_2(const Gt2& tr) : Base(tr) {} /*! A functor that compares compares the y-coordinates of two x-monotone @@ -81,7 +81,7 @@ public: //! The base operators. Base_intersect_2 m_base_intersect; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -143,7 +143,7 @@ public: } }; - /*! Obtain a Intersect_2 function object */ + /*! obtains a Intersect_2 function object */ Intersect_2 intersect_2_object () const { return (Intersect_2(this->m_base_traits->intersect_2_object())); } @@ -153,7 +153,7 @@ public: //! The base operator. Base_split_2 m_base_split; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -173,7 +173,7 @@ public: } }; - /*! Obtain a Split_2 function object */ + /*! obtains a Split_2 function object */ Split_2 split_2_object() const { return (Split_2(this->m_base_traits->split_2_object())); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h index ae975dbc42c..096504e6ecb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_subcurve.h @@ -90,54 +90,54 @@ protected: // contains the subcurve. public: - /*! Constructor. */ + /*! constructs. */ Arr_overlay_subcurve() : Base(), m_above(nullptr) { m_top_face.red = nullptr; } - /*! constructor given a curve. */ + /*! constructs given a curve. */ Arr_overlay_subcurve(const X_monotone_curve_2& curve) : Base(curve), m_above(nullptr) { m_top_face.red = nullptr; } - /*! Get the subcurve lying above this subcurve in the status line. */ + /*! obtains the subcurve lying above this subcurve in the status line. */ Self* subcurve_above() const { return m_above; } - /*! Set the subcurve above. */ + /*! sets the subcurve above. */ void set_subcurve_above(Self* sc) { m_above = sc; } - /*! Get the color of the associated curve. */ + /*! obtains the color of the associated curve. */ Color color() const { return (this->last_curve().color()); } - /*! Check if two subcurves have the same color. */ + /*! checks if two subcurves have the same color. */ bool has_same_color(const Self* sc) const { return (this->last_curve().color() == sc->color()); } - /*! Get the red halfedge that represents the subcurve. */ + /*! obtains the red halfedge that represents the subcurve. */ Halfedge_handle_red red_halfedge_handle() const { return (this->last_curve().red_halfedge_handle()); } - /*! Get the blue halfedge that represents the subcurve. */ + /*! obtains the blue halfedge that represents the subcurve. */ Halfedge_handle_blue blue_halfedge_handle() const { return (this->last_curve().blue_halfedge_handle()); } - /*! Get the red top face that contains the subcurve. */ + /*! obtains the red top face that contains the subcurve. */ const Face_handle_red red_top_face() const { return Face_handle_red(m_top_face.red); } - /*! Get the blue top face that contains the subcurve. */ + /*! obtains the blue top face that contains the subcurve. */ const Face_handle_blue blue_top_face() const { return Face_handle_blue(m_top_face.blue); } - /*! Set the red top face. */ + /*! sets the red top face. */ void set_red_top_face(Face_handle_red fh) { m_top_face.red = &(*fh); } - /*! Set the blue top face. */ + /*! sets the blue top face. */ void set_blue_top_face(Face_handle_blue fh) { m_top_face.blue = &(*fh); } - /*! Copy the top face from the given subcurve. */ + /*! copies the top face from the given subcurve. */ void set_top_face(const Self* sc) { CGAL_precondition(sc->m_above == nullptr); diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h index 0adb3c3e831..5a3024de96c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h @@ -125,10 +125,10 @@ private: const Gt2* m_base_traits; // The base traits object. public: - /*! Default constructor. */ + /*! constructs default. */ Arr_overlay_traits_2() {} - /*! Constructor from a base traits class. */ + /*! constructs from a base traits class. */ Arr_overlay_traits_2(const Gt2& base_tr) : m_base_traits(&base_tr) {} const Gt2* base_traits() const { return m_base_traits; } @@ -148,21 +148,21 @@ public: Halfedge_handle_blue m_blue_halfedge_handle; // The blue halfedge. public: - /*! Default constructor. */ + /*! constructs default. */ Ex_x_monotone_curve_2() : m_base_xcv(), m_red_halfedge_handle(), m_blue_halfedge_handle() {} - /*! Constructor from a curve. */ + /*! constructs from a curve. */ Ex_x_monotone_curve_2(const Base& xcv) : m_base_xcv(xcv), m_red_halfedge_handle(), m_blue_halfedge_handle() {} - /*! Constructor from a curve and halfedge handles. */ + /*! constructs from a curve and halfedge handles. */ Ex_x_monotone_curve_2(const Base& xcv, Halfedge_handle_red he_r, Halfedge_handle_blue he_b) : @@ -176,27 +176,27 @@ public: (he_b->direction() == ARR_RIGHT_TO_LEFT)); } - /*! Get the base curve (const version). */ + /*! obtains the base curve (const version). */ const Base& base() const { return m_base_xcv; } - /*! Get the base curve (non-const version). */ + /*! obtains the base curve (non-const version). */ Base& base() { return m_base_xcv; } - /*! Casting to a base curve (const version). */ + /*! casts to a base curve (const version). */ operator const Base&() const { return m_base_xcv; } - /*! Casting to a base curve (const version). */ + /*! casts to a base curve (const version). */ operator Base&() { return m_base_xcv; } - /*! Get the red halfedge handle. */ + /*! obtains the red halfedge handle. */ Halfedge_handle_red red_halfedge_handle() const { return m_red_halfedge_handle; } - /*! Get the blue halfedge handle. */ + /*! obtains the blue halfedge handle. */ Halfedge_handle_blue blue_halfedge_handle() const { return m_blue_halfedge_handle; } - /*! Set the red halfedge handle. */ + /*! sets the red halfedge handle. */ void set_red_halfedge_handle(Halfedge_handle_red he_r) { CGAL_precondition((he_r == Halfedge_handle_red()) || @@ -205,7 +205,7 @@ public: m_red_halfedge_handle = he_r; } - /*! Set the blue halfedge handle. */ + /*! sets the blue halfedge handle. */ void set_blue_halfedge_handle(Halfedge_handle_blue he_b) { CGAL_precondition((he_b == Halfedge_handle_blue()) || @@ -214,7 +214,7 @@ public: m_blue_halfedge_handle = he_b; } - /*! Get the color of the subcurve. */ + /*! obtains the color of the subcurve. */ Color color() const { Halfedge_handle_red null_red_he; @@ -258,21 +258,21 @@ public: Optional_cell_blue m_blue_cell; // The "blue" object. public: - /*! Default constructor. */ + /*! constructs default. */ Ex_point_2() : m_base_pt(), m_red_cell(), m_blue_cell() {} - /*! Constructor from a base point. */ + /*! constructs from a base point. */ Ex_point_2(const Base& pt) : m_base_pt(pt), m_red_cell(), m_blue_cell() {} - /*! Constructor from a base point with red and blue objects. */ + /*! constructs from a base point with red and blue objects. */ Ex_point_2(const Base& pt, const Optional_cell_red& cell_red, const Optional_cell_blue& cell_blue) : m_base_pt(pt), @@ -280,53 +280,53 @@ public: m_blue_cell(cell_blue) {} - /*! Get the base point (const version). */ + /*! obtains the base point (const version). */ const Base& base() const { return m_base_pt; } - /*! Get the base point (non-const version). */ + /*! obtains the base point (non-const version). */ Base& base() { return m_base_pt; } - /*! Casting to a base point (const version). */ + /*! casts to a base point (const version). */ operator const Base&() const { return m_base_pt; } - /*! Casting to a base point (non-const version). */ + /*! casts to a base point (non-const version). */ operator Base&() { return m_base_pt; } - /*! Get the red object. */ + /*! obtains the red object. */ const Optional_cell_red& red_cell() const { return m_red_cell; } - /*! Get the blue object. */ + /*! obtains the blue object. */ const Optional_cell_blue& blue_cell() const { return m_blue_cell; } - /*! Check if the red object is empty. */ + /*! checks if the red object is empty. */ bool is_red_cell_empty() const { return !m_red_cell; } - /*! Check if the blue object is empty. */ + /*! checks if the blue object is empty. */ bool is_blue_cell_empty() const { return !m_blue_cell; } - /*! Set the red object. */ + /*! sets the red object. */ void set_red_cell(const Optional_cell_red& cell_red) { m_red_cell = cell_red; } - /*! Set the blue object. */ + /*! sets the blue object. */ void set_blue_cell(const Optional_cell_blue& cell_blue) { m_blue_cell = cell_blue; } - /*! Obtain the red cell handle or nullptr if it doesn't exist. */ + /*! obtains the red cell handle or nullptr if it doesn't exist. */ const Cell_handle_red* red_cell_handle() const { return m_red_cell ? &(*m_red_cell) : nullptr; } - /*! Obtain the blue cell handle or nullptr if it doesn't exist. */ + /*! obtains the blue cell handle or nullptr if it doesn't exist. */ const Cell_handle_blue* blue_cell_handle() const { return m_blue_cell ? &(*m_blue_cell) : nullptr; } - /*! Obtain the red vertex handle or nullptr if it doesn't exist. */ + /*! obtains the red vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_red* red_vertex_handle() const { return m_red_cell ? std::get_if(&(*m_red_cell)) : nullptr; } - /*! Obtain the blue vertex handle or nullptr if it doesn't exist. */ + /*! obtains the blue vertex handle or nullptr if it doesn't exist. */ const Vertex_handle_blue* blue_vertex_handle() const { return @@ -354,7 +354,7 @@ public: //! The base traits. const Arr_overlay_traits_2& m_traits; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -500,7 +500,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } /*! A functor that splits an arc at a point. */ @@ -509,7 +509,7 @@ public: //! The base operator. Base_split_2 m_base_split; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -535,7 +535,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(m_base_traits->split_2_object()); } @@ -546,7 +546,7 @@ public: Base_construct_min_vertex_2 m_base_min_v; Base_equal_2 m_base_equal; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -588,7 +588,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return @@ -603,7 +603,7 @@ public: Base_construct_max_vertex_2 m_base_max_v; Base_equal_2 m_base_equal; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -645,7 +645,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return @@ -659,7 +659,7 @@ public: //! The base operator. Base_is_vertical_2 m_base_is_vert; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -674,7 +674,7 @@ public: { return m_base_is_vert(xcv.base()); } }; - /*! Obtain a Is_vertical_2 functor object. */ + /*! obtains a Is_vertical_2 functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(m_base_traits->is_vertical_2_object()); } @@ -686,7 +686,7 @@ public: //! The base operator. Base_equal_2 m_base_equal; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -705,7 +705,7 @@ public: { return m_base_equal(xcv1.base(), xcv2.base()); } }; - /*! Obtain an `Equal_2` functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(m_base_traits->equal_2_object()); } @@ -715,7 +715,7 @@ public: //! The base operator. Base_compare_x_2 m_base_cmp_x; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -730,7 +730,7 @@ public: { return m_base_cmp_x(p1.base(), p2.base()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(m_base_traits->compare_x_2_object()); } @@ -740,7 +740,7 @@ public: //! The base operator. Base_compare_xy_2 m_base_cmp_xy; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -781,7 +781,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return (Compare_xy_2(m_base_traits->compare_xy_2_object())); } @@ -793,7 +793,7 @@ public: //! The base operator. Base_compare_y_at_x_2 m_base_cmp_y_at_x; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -811,7 +811,7 @@ public: { return m_base_cmp_y_at_x(p.base(), xcv.base()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); } @@ -823,7 +823,7 @@ public: //! The base operator. Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -842,7 +842,7 @@ public: { return m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base()); } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return @@ -859,7 +859,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -949,7 +949,7 @@ public: } }; - /*! Obtain an Parameter_space_in_x_2 functor object. */ + /*! obtains an Parameter_space_in_x_2 functor object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(m_base_traits); } @@ -961,7 +961,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -979,7 +979,7 @@ public: { return m_base->is_on_x_identification_2_object()(xcv.base()); } }; - /*! Obtain an Is_on_x_identification_2 functor object. */ + /*! obtains an Is_on_x_identification_2 functor object. */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } @@ -991,7 +991,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1008,7 +1008,7 @@ public: { return m_base->compare_y_on_boundary_2_object()(pt1.base(), pt2.base()); } }; - /*! Obtain a Compare_y_on_boundary_2 functor. */ + /*! obtains a Compare_y_on_boundary_2 functor. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(m_base_traits); } @@ -1020,7 +1020,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1044,7 +1044,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 functor. */ + /*! obtains a Compare_y_near_boundary_2 functor. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(m_base_traits); } @@ -1059,7 +1059,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -1081,7 +1081,7 @@ public: { return m_base->parameter_space_in_y_2_object()(xcv.base()); } }; - /*! Obtain an Parameter_space_in_y_2 functor object. */ + /*! obtains an Parameter_space_in_y_2 functor object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(m_base_traits); } @@ -1093,7 +1093,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared protected to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -1111,7 +1111,7 @@ public: { return m_base->is_on_y_identification_2_object()(xcv.base()); } }; - /*! Obtain an Is_on_y_identification_2 functor object. */ + /*! obtains an Is_on_y_identification_2 functor object. */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } @@ -1123,7 +1123,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1157,7 +1157,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 functor. */ + /*! obtains a Compare_x_on_boundary_2 functor. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(m_base_traits); } @@ -1169,7 +1169,7 @@ public: //! The base traits. const Gt2* m_base; - /*! Constructor. + /*! constructs. * \param base The base traits class. It must be passed, to handle the * case it is not stateless (e.g., it stores data). * The constructor is declared protected to allow only the functor @@ -1192,7 +1192,7 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 functor. */ + /*! obtains a Compare_x_near_boundary_2 functor. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(m_base_traits); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h index cd31fc96daf..ae70a142872 100644 --- a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h @@ -111,14 +111,13 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ Halfedge_around_vertex_iterator () : _counter(-1), _cend(-1) {} - /*! - * Constructor. + /*! constructs. * \param circ A circulator for the halfedges around a vertex. * \param out_edges Do we need the outgoing or the ingoing halfedges. * \param counter A counter associated with the iterator. @@ -236,16 +235,16 @@ public: // Types not required by any of these concepts: typedef CGAL::Vertex_around_target_iterator adjacency_iterator; - /*! Constructor. */ + /*! constructs. */ graph_traits (const Arrangement_on_surface_2& arr) : p_arr (const_cast (&arr)), arr_access (const_cast (arr)) {} - /*! Nulls */ + /*! nulls */ static vertex_descriptor null_vertex() { return vertex_descriptor(); } - /*! Traverse the vertices. */ + /*! traverses the vertices. */ vertices_size_type number_of_vertices() { return arr_access.number_of_valid_vertices(); @@ -261,7 +260,7 @@ public: return arr_access.valid_vertices_end(); } - /*! Traverse the edges. */ + /*! traverses the edges. */ edge_iterator edges_begin() { return p_arr->halfedges_begin(); @@ -272,7 +271,7 @@ public: return p_arr->halfedges_end(); } - /*! Get the vertex degree (in degree or out degree). */ + /*! obtains the vertex degree (in degree or out degree). */ degree_size_type degree (vertex_descriptor v) { if (v->is_isolated()) @@ -293,7 +292,7 @@ public: return deg; } - /*! Traverse the outgoing halfedges of a given vertex. */ + /*! traverses the outgoing halfedges of a given vertex. */ out_edge_iterator out_edges_begin (vertex_descriptor v) { if (v->is_isolated()) @@ -311,7 +310,7 @@ public: return out_edge_iterator (v->incident_halfedges(), true, deg, deg); } - /*! Traverse the ingoing halfedges of a given vertex. */ + /*! traverses the ingoing halfedges of a given vertex. */ in_edge_iterator in_edges_begin (vertex_descriptor v) { if (v->is_isolated()) @@ -350,7 +349,7 @@ class graph_traits > : public: - /*! Constructor. */ + /*! constructs. */ graph_traits (const CGAL::Arrangement_2& arr) : Base (arr) {} @@ -363,8 +362,7 @@ namespace CGAL { // Functions required by the IncidenceGraph concept: // ------------------------------------------------- -/*! - * Get the out-degree of a vertex in a given arrangement. +/*! obtains the out-degree of a vertex in a given arrangement. * \param v The vertex. * \param arr The arrangement. * \param Number of outgoing halfedges from v. @@ -385,8 +383,7 @@ out_degree (typename return gt_arr.degree (v); } -/*! - * Return a range of the out-edges of a vertex given by its descriptor and the +/*! returns a range of the out-edges of a vertex given by its descriptor and the * arrangement it belongs to. * \param v The vertex. * \param arr The arrangement. @@ -427,8 +424,7 @@ adjacent_vertices(typename return CGAL::vertices_around_target(v,arr); } -/*! - * Get the source vertex of an arrangement edge. +/*! obtains the source vertex of an arrangement edge. * \param e The edge. * \param arr The arrangement. * \return The source vertex of e. @@ -446,8 +442,7 @@ source (typename return e->source(); } -/*! - * Get the target vertex of an arrangement edge. +/*! obtains the target vertex of an arrangement edge. * \param e The edge. * \param arr The arrangement. * \return The source vertex of e. @@ -468,8 +463,7 @@ target (typename // Functions required by the BidirectionalGraph concept: // ----------------------------------------------------- -/*! - * Get the in-degree of a vertex in a given arrangement. +/*! obtains the in-degree of a vertex in a given arrangement. * \param v The vertex. * \param arr The arrangement. * \param Number of ingoing halfedges to v. @@ -490,8 +484,7 @@ in_degree (typename return gt_arr.degree (v); } -/*! - * Return a range of the in-edges of a vertex given by its descriptor and the +/*! returns a range of the in-edges of a vertex given by its descriptor and the * arrangement it belongs to. * \param v The vertex. * \param arr The arrangement. @@ -518,8 +511,7 @@ in_edges (typename return std::make_pair (gt_arr.in_edges_begin (v), gt_arr.in_edges_end (v)); } -/*! - * Get the degree of a vertex in a given arrangement. +/*! obtains the degree of a vertex in a given arrangement. * \param v The vertex. * \param arr The arrangement. * \param Number of ingoing and outgoing halfedges incident to v. @@ -543,8 +535,7 @@ degree (typename // Functions required by the VertexListGraph concept: // -------------------------------------------------- -/*! - * Get the number of vertices in the given arrangement. +/*! obtains the number of vertices in the given arrangement. * \param arr The arrangement. * \return Number of vertices. */ @@ -560,8 +551,7 @@ num_vertices (const CGAL::Arrangement_on_surface_2& arr) return gt_arr.number_of_vertices(); } -/*! - * Get the range of vertices of the given arrangement. +/*! obtains the range of vertices of the given arrangement. * \param arr The arrangement. * \return A pair of vertex iterators. */ @@ -585,8 +575,7 @@ vertices (const CGAL::Arrangement_on_surface_2& arr) // Functions required by the EdgeListGraph concept: // ------------------------------------------------ -/*! - * Get the number of halfedges in the given arrangement. +/*! obtains the number of halfedges in the given arrangement. * \param arr The arrangement. * \return Number of halfedges (graph edges). */ @@ -599,8 +588,7 @@ num_edges (const CGAL::Arrangement_on_surface_2& arr) return arr.number_of_halfedges(); } -/*! - * Get the range of halfedges of the given arrangement. +/*! obtains the range of halfedges of the given arrangement. * \param arr The arrangement. * \return A pair of halfedge iterators. */ @@ -621,7 +609,7 @@ edges (const CGAL::Arrangement_on_surface_2& arr) return std::make_pair (gt_arr.edges_begin(), gt_arr.edges_end()); } -} //namespace CGAL +} // namespace CGAL #include From 462532edab7c91fafce72db773dd2d239bf4bcc6 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 13 Nov 2024 03:51:10 +0200 Subject: [PATCH 15/34] Fixed tense on manual of functions --- .../Arr_geodesic_arc_on_sphere_traits_2.h | 338 +++++++++--------- .../CGAL/Arr_geometry_traits/Bezier_cache.h | 10 +- .../CGAL/Arr_geometry_traits/Bezier_point_2.h | 26 +- .../Arr_geometry_traits/Bezier_x_monotone_2.h | 6 +- .../Arr_geometry_traits/Circle_segment_2.h | 184 +++++----- .../CGAL/Arr_geometry_traits/Conic_arc_2.h | 98 ++--- .../Conic_x_monotone_arc_2.h | 84 ++--- .../Consolidated_curve_data_aux.h | 21 +- .../CGAL/Arr_geometry_traits/Polycurve_2.h | 65 ++-- .../CGAL/Arr_geometry_traits/Polyline_2.h | 32 +- .../CGAL/Arr_geometry_traits/Rational_arc_2.h | 196 ++++------ .../include/CGAL/Arr_linear_traits_2.h | 212 ++++++----- .../Arr_non_caching_segment_basic_traits_2.h | 41 +-- .../CGAL/Arr_non_caching_segment_traits_2.h | 39 +- .../Arr_batched_point_location_traits_2.h | 81 ++--- .../Arr_lm_generator_base.h | 14 +- .../CGAL/Arr_point_location/Td_traits.h | 22 +- .../CGAL/Arr_polycurve_basic_traits_2.h | 204 +++++------ .../include/CGAL/Arr_segment_traits_2.h | 165 ++++----- 19 files changed, 879 insertions(+), 959 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index 7039cc0167e..80c03fbf866 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -25,7 +25,6 @@ */ #include - #include #include @@ -71,39 +70,39 @@ private: inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); } public: - /*! Default constructor */ + /*! constructs default */ Arr_extended_direction_3() : Direction_3(0, 0, 1), m_location(MAX_BOUNDARY_LOC) {} - /*! Constructor */ + /*! constructs */ Arr_extended_direction_3(const Direction_3& dir, Location_type location) : Direction_3(dir), m_location(location) {} - /*! Copy constructor */ + /*! constructs copy */ Arr_extended_direction_3(const Arr_extended_direction_3& other) : Direction_3(static_cast(other)) { m_location = other.discontinuity_type(); } - /*! Assignment operator */ + /*! assigs */ Arr_extended_direction_3& operator=(const Arr_extended_direction_3& other) { *(static_cast(this)) = static_cast(other); m_location = other.discontinuity_type(); return (*this); } - /*! Set the location type of the point. + /*! sets the location type of the point. */ void set_location(Location_type location) { m_location = location; } - /*! Obtain the location type of the point. + /*! obtains the location type of the point. */ Location_type location() const { return m_location; } - /*! Obtain the discontinuity type of the point. + /*! obtains the discontinuity type of the point. * \todo deprecate this one; use the above instead. */ Location_type discontinuity_type() const { return m_location; } @@ -151,7 +150,7 @@ public: using Curve_2 = Arr_geodesic_arc_on_sphere_3; using Multiplicity = std::size_t; - /*! Default constructor */ + /*! constructs default */ Arr_geodesic_arc_on_sphere_traits_2() {} using FT = typename Kernel::FT; @@ -162,7 +161,7 @@ public: using Vector_2 = typename Kernel::Vector_2; protected: - /*! Obtain the intersection of the identification arc and the \f$xy\f$-plane. + /*! obtains the intersection of the identification arc and the \f$xy\f$-plane. * By default, it is the vector directed along the negative \f$x\f$-axis * (\f$x = -\infty\f$). * \return the intersection of the identification arc and the \f$xy\f$-plane. @@ -172,7 +171,7 @@ protected: return d; } - /*! Obtain the normal of the plane that contains the identification arc. + /*! obtains the normal of the plane that contains the identification arc. * By default, it is the vector directed along the positive \f$y\f$-axis * (\f$y = \infty\f$). * \return the normal of the plane that contains the identification arc. @@ -182,7 +181,7 @@ protected: return d; } - /*! Obtain the 2D direction directed along the negative \f$x\f$-axis. + /*! obtains the 2D direction directed along the negative \f$x\f$-axis. * \return the direction directed at \f$x = -\infty\f$. */ inline static const Direction_2& neg_x_2() { @@ -190,7 +189,7 @@ protected: return d; } - /*! Obtain the 2D direction directed along the negative \f$y\f$-axis. + /*! obtains the 2D direction directed along the negative \f$y\f$-axis. * \return the direction directed at \f$y = -\infty\f$. */ inline static const Direction_2& neg_y_2() { @@ -198,19 +197,19 @@ protected: return d; } - /*! Obtain the sign of the \f$x\f$-coordinate of a direction in space + /*! obtains the sign of the \f$x\f$-coordinate of a direction in space * \param d the direction in space. * \return the sign of the \f$x\f$-coordinate of `d`. */ inline static Sign x_sign(Direction_3 d) { return CGAL::sign(d.dx()); } - /*! Obtain the sign of the \f$y\f$-coordinate of a direction in space + /*! obtains the sign of the \f$y\f$-coordinate of a direction in space * \param d the direction in space. * \return the sign of the \f$y\f$-coordinate of `d`. */ inline static Sign y_sign(Direction_3 d) { return CGAL::sign(d.dy()); } - /*! Obtain the sign of the \f$z\f$-coordinate of a direction in space + /*! obtains the sign of the \f$z\f$-coordinate of a direction in space * \param d the direction in space * \return the sign of the \f$z\f$-coordinate of `d`. */ @@ -218,28 +217,28 @@ protected: typedef Direction_2 (*Project)(const Direction_3& d) ; - /*! Project a 3D direction onto the \f$xy\f$-plane + /*! projects a 3D direction onto the \f$xy\f$-plane * \param d the 3D direction. * \return the projection onto the \f$xy\f$-plane. */ inline static Direction_2 project_xy(const Direction_3& d) { return Direction_2(d.dx(), d.dy()); } - /*! Project a 3D direction onto the \f$yz\f$-plane. + /*! projects a 3D direction onto the \f$yz\f$-plane. * \param d the 3D direction. * \return the projection onto the \f$yz\f$-plane. */ inline static Direction_2 project_yz(const Direction_3& d) { return Direction_2(d.dy(), d.dz()); } - /*! Project a 3D direction onto the \f$zx\f$-plane. + /*! projects a 3D direction onto the \f$zx\f$-plane. * \param d the 3D direction. * \return the projection onto the \f$xz\f$-plane. */ inline static Direction_2 project_xz(const Direction_3& d) { return Direction_2(d.dx(), d.dz()); } - /*! Project a 3D direction onto the \f$yz\f$-plane and reflect the + /*! projects a 3D direction onto the \f$yz\f$-plane and reflect the * \f$y\f$-coordinate. * \param d the 3D direction. * \return the projection onto the \f$yz\f$-plane. @@ -247,7 +246,7 @@ protected: inline static Direction_2 project_minus_yz(const Direction_3& d) { return Direction_2(-d.dy(), d.dz()); } - /*! Project a 3D direction onto the \f$zx\f$-plane and reflect the + /*! projects a 3D direction onto the \f$zx\f$-plane and reflect the * \f$x\f$- coordinate. * \param d the 3D direction. * \return the projection onto the \f$xz\f$-plane. @@ -255,7 +254,7 @@ protected: inline static Direction_2 project_minus_xz(const Direction_3& d) { return Direction_2(-d.dx(), d.dz()); } - /*! Compare the relative position of a direction and a plane given by its + /*! compares the relative position of a direction and a plane given by its * normal. * \param normal the direction of the plane. * \param dir the direction. @@ -266,7 +265,7 @@ protected: return CGAL::sign(dot); } - /*! Compute the orientation of two directions. + /*! computes the orientation of two directions. * \param d1 the first direction. * \param d2 the second direction. * \return the relative orientation of `d1` and `d2`. @@ -277,7 +276,7 @@ protected: return kernel.orientation_2_object()(d1.vector(), d2.vector()); } - /*! Constructs a plane that contains two directions. + /*! constructs a plane that contains two directions. * \param d1 the first direction. * \param d2 the second direction. */ @@ -289,7 +288,7 @@ protected: return v.direction(); } - /*! Determined whether a direction is contained in a plane given by its + /*! determines whether a direction is contained in a plane given by its * normal * \param normal the direction of the 3D plane. * \param dir the 3D direction. @@ -302,7 +301,7 @@ protected: } public: - /*! Compare two endpoint directions by v. + /*! compares two endpoint directions by v. * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - v(d1) < v(d2); @@ -336,7 +335,7 @@ public: CGAL::compare(dot_p2 * dot_p2 * norm1, dot_p1 * dot_p1 * norm2); } - /*! Compare two directions contained in the xy plane by u. + /*! compares two directions contained in the xy plane by u. * \param d1 the first direction. * \param d2 the second direction. * \return SMALLER - u(d1) < u(d2); @@ -352,7 +351,7 @@ public: LARGER : SMALLER; } - /*! Compare two endpoint directions by u. + /*! compares two endpoint directions by u. * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); @@ -369,7 +368,7 @@ public: return compare_x(d1_2, d2_2); } - /*! Compare two endpoint directions lexigoraphically: by u, then by v. + /*! compares two endpoint directions lexigoraphically: by u, then by v. * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); @@ -387,7 +386,7 @@ public: return res; } - /*! Determine whether the given point is in the \f$x\f$-range of the + /*! determines whether the given point is in the \f$x\f$-range of the * spherical_arc. * \param point the query point direction. * \return true if point is in the \f$x\f$-range of the (closed) spherical_arc @@ -420,7 +419,7 @@ public: return kernel.counterclockwise_in_between_2_object()(p, l, r); } - /*! Compute the intersection of a curve and the identification curve. + /*! computes the intersection of a curve and the identification curve. * \param[in] cv the curve. */ void intersection_with_identification(const X_monotone_curve_2& xcv, @@ -432,7 +431,7 @@ public: Direction_3(normal.dz(), 0, -(normal.dx())); } - /*! Compute the intersection of a curve and the identification curve. + /*! computes the intersection of a curve and the identification curve. * \param[in] cv the curve. */ void intersection_with_identification(const X_monotone_curve_2& xcv, @@ -444,7 +443,7 @@ public: dp = Direction_3(atan_x, atan_y, z); } - /*! Compute the intersection of a curve and the identification curve. + /*! computes the intersection of a curve and the identification curve. * \param[in] cv the curve */ bool overlap_with_identification(const X_monotone_curve_2& xcv, @@ -455,7 +454,7 @@ public: ((y_sign(normal) == POSITIVE) && xcv.is_directed_right()))); } - /*! Compute the intersection of a curve and the identification curve. + /*! computes the intersection of a curve and the identification curve. * \param[in] cv the curve. */ bool overlap_with_identification(const X_monotone_curve_2& xcv, @@ -485,7 +484,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_point_2(const Traits& traits) : m_traits(traits) {} @@ -493,7 +492,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Construct a point on the sphere from three coordinates, which define + /*! constructs a point on the sphere from three coordinates, which define * a (not necessarily normalized) direction. * \param[in] x the \f$x\f$-coordinate. * \param[in] y the \f$y\f$-coordinate. @@ -507,7 +506,7 @@ public: return p; } - /*! Construct a point on the sphere from a (not necessarily normalized) + /*! constructs a point on the sphere from a (not necessarily normalized) * direction. * \param other the other direction. */ @@ -519,7 +518,7 @@ public: return p; } - /*! Initialize a point on the sphere, + /*! initializes a point on the sphere, * \param[in] p the point to initialize. */ void init(Point_2& p, std::true_type) const { @@ -537,7 +536,7 @@ public: p.set_location(location); } - /*! Initialize a point on the sphere, + /*! initializes a point on the sphere, * \param[in] p the point to initialize. */ void init(Point_2& p, std::false_type) const { @@ -559,7 +558,7 @@ public: } }; - /*! Obtain a point construction functor. + /*! obtains a point construction functor. */ Construct_point_2 construct_point_2_object() const { return Construct_point_2(*this); } @@ -573,7 +572,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} @@ -581,7 +580,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Construct the minor arc from two endpoint directions. The minor arc + /*! constructs the minor arc from two endpoint directions. The minor arc * is the one with the smaller angle among the two geodesic arcs with * the given endpoints. * 1. Find out whether the arc is \f$x\f$-monotone. @@ -616,7 +615,7 @@ public: return xcv; } - /*! Construct a full spherical_arc from a plane + /*! constructs a full spherical_arc from a plane * \param plane the containing plane. * \pre the plane is not vertical */ @@ -639,7 +638,7 @@ public: xcv.set_target(p); } - /*! Construct a spherical_arc from two endpoints directions contained + /*! constructs a spherical_arc from two endpoints directions contained * in a plane. * \param[in] plane the containing plane. * \param[in] source the source-point direction. @@ -651,7 +650,7 @@ public: { return X_monotone_curve_2(source, target, normal); } private: - /*! Initialize a spherical_arc given that the two endpoint directions + /*! initializes a spherical_arc given that the two endpoint directions * have been set. It is assumed that the arc is the one with the smaller * angle among the two. * 1. Find out whether the arc is \f$x\f$-monotone. @@ -749,7 +748,7 @@ public: } }; - /*! Obtain an \f$x\f$-monotone geodesic arc construction functor. + /*! obtains an \f$x\f$-monotone geodesic arc construction functor. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -762,7 +761,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_curve_2(const Traits& traits) : m_traits(traits) {} @@ -770,7 +769,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Construct a spherical_arc from two endpoint directions. It is assumed + /*! constructs a spherical_arc from two endpoint directions. It is assumed * that the arc is the one with the smaller angle among the two. * 1. Find out whether the arc is \f$x\f$-monotone. * 2. If it is \f$x\f$-monotone, @@ -864,7 +863,7 @@ public: return cv; } - /*! Construct a spherical_arc from two endpoint directions contained + /*! constructs a spherical_arc from two endpoint directions contained * in a plane. * \param[in] source the source-point direction. * \param[in] target the target-point direction. @@ -988,7 +987,7 @@ public: return cv; } - /*! Construct a full spherical_arc from a plane + /*! constructs a full spherical_arc from a plane * \param plane the containing plane. */ Curve_2 operator()(const Direction_3& normal) const { @@ -1004,7 +1003,7 @@ public: } }; - /*! Obtain a geodesic arc construction functor. + /*! obtains a geodesic arc construction functor. */ Construct_curve_2 construct_curve_2_object() const { return Construct_curve_2(*this); } @@ -1018,7 +1017,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Traits& traits) : m_traits(traits) {} @@ -1026,7 +1025,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the \f$x\f$-coordinates of two directional points. + /*! compares the \f$x\f$-coordinates of two directional points. * \param p1 the first directional point. * \param p2 the second directional point. * \return SMALLER - x(p1) < x(p2); @@ -1044,7 +1043,7 @@ public: }; protected: - /*! Obtain the positive (north) pole + /*! obtains the positive (north) pole * \return the positive (north) pole */ inline static const Point_2& pos_pole() { @@ -1052,7 +1051,7 @@ protected: return p; } - /*! Obtain the negative (south) pole + /*! obtains the negative (south) pole * \return the negative (south) pole */ inline static const Point_2& neg_pole() { @@ -1061,7 +1060,7 @@ protected: } public: - /*! Obtain a `Compare_x_2` function object. */ + /*! obtains a `Compare_x_2` function object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } /*! A functor that compares two directional points lexigoraphically: @@ -1074,7 +1073,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_xy_2(const Traits& traits) : m_traits(traits) {} @@ -1082,7 +1081,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare two directional points lexigoraphically: by x, then by y. + /*! compares two directional points lexigoraphically: by x, then by y. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); @@ -1101,13 +1100,13 @@ public: } }; - /*! Obtain a `Compare_xy_2` function object. */ + /*! obtains a `Compare_xy_2` function object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } /*! A functor that obtain the left endpoint of an \f$x\f$-monotone arc */ class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of and arc. + /*! obtains the left endpoint of and arc. * \param xc the arc. * \return the left endpoint. */ @@ -1115,14 +1114,14 @@ public: { return xc.left(); } }; - /*! Obtain a `Construct_min_vertex_2` function object. */ + /*! obtains a `Construct_min_vertex_2` function object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } /*! A functor that obtain the right endpoint of an \f$x\f$-monotone arc */ class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of an arc. + /*! obtains the right endpoint of an arc. * \param xc the arc. * \return the right endpoint. */ @@ -1130,14 +1129,14 @@ public: { return xc.right(); } }; - /*! Obtain a `Construct_max_vertex_2` function object. */ + /*! obtains a `Construct_max_vertex_2` function object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } /*! A functor that checks whether an \f$x\f$-monotone arc is a vertical */ class Is_vertical_2 { public: - /*! Check whether a given arc is vertical. + /*! checks whether a given arc is vertical. * \param xc the arc. * \return true if the curve is a vertical spherical_arc; false otherwise. * \pre the arc is not degenerate (consists of a single point) @@ -1148,7 +1147,7 @@ public: } }; - /*! Obtain an `Is_vertical_2` function object. */ + /*! obtains an `Is_vertical_2` function object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } /*! A functor that compares the \f$y\f$-coordinates of a directional point and @@ -1161,7 +1160,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {} @@ -1169,7 +1168,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Return the location of the given point with respect to the input arc. + /*! returns the location of the given point with respect to the input arc. * \param xc the arc. * \param p the point. * \return SMALLER - y(p) < xc(x(p)), i.e. the point is below the curve; @@ -1206,7 +1205,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_2` function object. */ + /*! obtains a `Compare_y_at_x_2` function object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -1220,7 +1219,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {} @@ -1228,7 +1227,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the left of their intersection point. * \param xc1 the first curve. * \param xc2 the second curve. @@ -1322,7 +1321,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_left_2` function object. */ + /*! obtains a `Compare_y_at_x_left_2` function object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -1336,7 +1335,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {} @@ -1344,7 +1343,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the right of their intersection point. * \param xc1 the first curve. * \param xc2 the second curve. @@ -1437,7 +1436,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_right_2` function object. */ + /*! obtains a `Compare_y_at_x_right_2` function object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -1451,7 +1450,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Equal_2(const Traits& traits) : m_traits(traits) {} @@ -1459,7 +1458,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Determines whether the two \f$x\f$-monotone curves are the same (have + /*! determines whether the two \f$x\f$-monotone curves are the same (have * the same graph). * \param xc1 the first curve. * \param xc2 the second curve. @@ -1485,7 +1484,7 @@ public: equal_3(Direction_3(xc1.right()), Direction_3(xc2.right()))); } - /*! Determines whether the two points are the same. + /*! determines whether the two points are the same. * \param p1 the first point. * \param p2 the second point. * \return true if the two point are the same; false otherwise. @@ -1496,7 +1495,7 @@ public: } }; - /*! Obtain an `Equal_2` function object. */ + /*! obtains an `Equal_2` function object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -1513,7 +1512,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Parameter_space_in_x_2(const Traits& traits) : m_traits(traits) {} @@ -1521,7 +1520,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Obtains the parameter space at the end of an arc along the \f$x\f$-axis. + /*! obtains the parameter space at the end of an arc along the \f$x\f$-axis. * Only called for arcs whose interior lie in the interior of the * parameter space, that is, the arc does not coincide with the * identification. Thus, it returns ARR_LEFT_BOUNDARY or ARR_RIGHT_BOUNDARY @@ -1550,7 +1549,7 @@ public: ((xcv.right().is_no_boundary()) ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY); } - /*! Obtains the parameter space at a point along the \f$x\f$-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * Every non-interior point is assumed to lie on the left-right * identification. * Points at the poles additionally lie on the bottom or top boundary. @@ -1564,7 +1563,7 @@ public: } }; - /*! Obtain a Parameter_space_in_x_2 function object. */ + /*! obtains a Parameter_space_in_x_2 function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(*this); } @@ -1573,7 +1572,7 @@ public: */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of an arc along the \f$y\f$-axis. + /*! obtains the parameter space at the end of an arc along the \f$y\f$-axis. * Only called for arcs whose interior lie in the interior of the * parameter space, that is, the arc does not coincide with the * identification. Thus, it returns ARR_BOTTOM_BOUNDARY or ARR_TOP_BOUNDARY @@ -1597,7 +1596,7 @@ public: ((xcv.right().is_max_boundary()) ? ARR_TOP_BOUNDARY : ARR_INTERIOR); } - /*! Obtains the parameter space of a point along the \f$y\f$-axis. + /*! obtains the parameter space of a point along the \f$y\f$-axis. * That is, ARR_BOTTOM_BOUNDARY is returned if p coincides with the * south pole and ARR_TOP_BOUNDARY if p coincides with the north pole. * Otherwise ARR_INTERIOR is returned. @@ -1611,7 +1610,7 @@ public: } }; - /*! Obtain a `Parameter_space_in_y_2` function object. */ + /*! obtains a `Parameter_space_in_y_2` function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } @@ -1626,7 +1625,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_on_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -1634,7 +1633,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the \f$x\f$-coordinate of a direction with the + /*! compares the \f$x\f$-coordinate of a direction with the * \f$x\f$-coordinate of an arc end projected onto the boundary. * \param point the point direction. * \param xcv the arc, the endpoint of which is compared. @@ -1673,7 +1672,7 @@ public: return m_traits.compare_x(p, q); } - /*! Compare the \f$x\f$-coordinates of two arc ends projected onto the + /*! compares the \f$x\f$-coordinates of two arc ends projected onto the * boundary of the parameter space. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - @@ -1737,7 +1736,7 @@ public: { CGAL_error(); return EQUAL; } }; - /*! Obtain a `Compare_x_on_boundary_2` function object. + /*! obtains a `Compare_x_on_boundary_2` function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } @@ -1752,7 +1751,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_near_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -1760,8 +1759,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - - /*! Compare the \f$x\f$-coordinates of 2 arc ends near the boundary of the + /*! compares the \f$x\f$-coordinates of 2 arc ends near the boundary of the * parameter space. * \param xcv1 the first arc. * \param xcv2 the second arc. @@ -1801,7 +1799,7 @@ public: } }; - /*! Obtain a `Compare_x_near_boundary_2` function object. */ + /*! obtains a `Compare_x_near_boundary_2` function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(*this); } @@ -1816,7 +1814,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_near_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -1824,7 +1822,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the \f$y\f$-coordinates of 2 curves at their ends near the + /*! compares the \f$y\f$-coordinates of 2 curves at their ends near the * boundary of the parameter space. * \param xcv1 the first arc. * \param xcv2 the second arc. @@ -1945,7 +1943,7 @@ public: } }; - /*! Obtain a `Compare_y_near_boundary_2` function object. */ + /*! obtains a `Compare_y_near_boundary_2` function object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1959,7 +1957,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Is_on_y_identification_2(const Traits& traits) : m_traits(traits) {} @@ -1967,14 +1965,14 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Determine whether a point lies on the vertical identification arc. + /*! determines whether a point lies on the vertical identification arc. * \param p the point. * \return a Boolean indicating whether p lies on the vertical * identification arc (including the poles) */ bool operator()(const Point_2& p) const { return !p.is_no_boundary(); } - /*! Determine whether an arc coincides with the vertical identification + /*! determines whether an arc coincides with the vertical identification * arc. * \param xcv the arc. * \return a Boolean indicating whether xcv coincides with the vertical @@ -2003,7 +2001,7 @@ public: } }; - /*! Obtain an `Is_on_y_identification_2` function object. */ + /*! obtains an `Is_on_y_identification_2` function object. */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(*this); } @@ -2017,7 +2015,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_on_boundary_2(const Traits& traits) : m_traits(traits) {} @@ -2025,7 +2023,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the \f$y\f$-coordinate of two given points that lie on the + /*! compares the \f$y\f$-coordinate of two given points that lie on the * vertical identification curve. * \param p1 the first point. * \param p2 the second point. @@ -2059,7 +2057,7 @@ public: }; - /*! Obtain a `Compare_y_on_boundary_2` function object. */ + /*! obtains a `Compare_y_on_boundary_2` function object. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(*this); } //@} @@ -2078,7 +2076,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Make_x_monotone_2(const Traits& traits) : m_traits(traits) {} @@ -2086,7 +2084,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + /*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them * into a given output iterator. As spherical_arcs are always x_monotone, * only one object will be contained in the iterator. * \param xc the curve. @@ -2226,7 +2224,7 @@ public: } }; - /*! Obtain a `Make_x_monotone_2` function object. */ + /*! obtains a `Make_x_monotone_2` function object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(*this); } @@ -2238,7 +2236,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Split_2(const Traits& traits) : m_traits(traits) {} @@ -2246,7 +2244,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Split a given \f$x\f$-monotone curve at a given point into two + /*! splits a given \f$x\f$-monotone curve at a given point into two * sub-curves. * \param xc the curve to split * \param p the split point. @@ -2295,7 +2293,7 @@ public: } }; - /*! Obtain a `Split_2` function object. */ + /*! obtains a `Split_2` function object. */ Split_2 split_2_object() const { return Split_2(*this); } /*! The clockwise-in-between function object. */ @@ -2306,7 +2304,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Clockwise_in_between_2(const Traits& traits) : m_traits(traits) {} @@ -2321,7 +2319,7 @@ public: } }; - /*! Obtain a `Clockwise_in_between_2` function object. */ + /*! obtains a `Clockwise_in_between_2` function object. */ Clockwise_in_between_2 clockwise_in_between_2_object() const { return Clockwise_in_between_2(*this); } @@ -2329,7 +2327,7 @@ public: class Intersect_2 { private: - /*! Computes the intersection between two arcs contained in the same plane + /*! computes the intersection between two arcs contained in the same plane * \param l1_3 * \param r1_3 * \param l2_3 @@ -2496,7 +2494,7 @@ public: return oi; } - /*! Determine whether a direction pierces an arc. + /*! determines whether a direction pierces an arc. * \param point the direction. * \param xc the arc. * \return true iff point pierces xc. @@ -2558,7 +2556,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -2566,7 +2564,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two spherical_arcs may itersect only once, * only a single intersection will be contained in the iterator. * \param xc1 the first curve. @@ -2613,7 +2611,7 @@ public: return oi; } - /*! If the endpoints of one arc coincide with the 2 poles resp, + /* If the endpoints of one arc coincide with the 2 poles resp, * the other arc is completely overlapping. */ if (xc1.left().is_min_boundary() && xc1.right().is_max_boundary()) { @@ -2624,7 +2622,7 @@ public: *oi++ = xc1; return oi; } - /*! Find an endpoint that does not coincide with a pole, and project + /* Find an endpoint that does not coincide with a pole, and project * it onto the xy plane. If the projection coincide with the negative * x, project onto the zx plane. Otherwise project onto the yz plane. */ @@ -2680,7 +2678,7 @@ public: } }; - /*! Obtain an `Intersect_2` function object. */ + /*! obtains an `Intersect_2` function object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } /*! A functor that tests whether two \f$x\f$-monotone arcs can be merged. */ @@ -2690,7 +2688,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Are_mergeable_2(const Traits& traits) : m_traits(traits) {} @@ -2698,7 +2696,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param xc1 the first curve. * \param xc2 the second curve. * \return true if the two arcs are mergeable; false otherwise. @@ -2749,7 +2747,7 @@ public: } }; - /*! Obtain an `Are_mergeable_2` function object. */ + /*! obtains an `Are_mergeable_2` function object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } @@ -2761,7 +2759,7 @@ public: //! The traits (in case it has state) const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -2769,7 +2767,7 @@ public: friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Merge two given \f$x\f$-monotone curves into a single curve + /*! merges two given \f$x\f$-monotone curves into a single curve * (spherical_arc). * \param xc1 the first curve. * \param xc2 the second curve. @@ -2851,7 +2849,7 @@ public: } }; - /*! Obtain a `Merge_2` function object. */ + /*! obtains a `Merge_2` function object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -2865,7 +2863,7 @@ public: class Approximate_2 { public: - /*! Return an approximation of a point coordinate. + /*! returns an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -2878,7 +2876,7 @@ public: ((i == 1) ? CGAL::to_double(p.dy()) : CGAL::to_double(p.dz())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { Approximate_kernel::Direction_3 dir(operator()(p, 0), operator()(p, 1), @@ -2887,7 +2885,7 @@ public: return Approximate_point_2(dir, loc); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, @@ -2987,7 +2985,7 @@ public: } }; - /*! Obtain an `Approximate_2` function object. */ + /*! obtains an `Approximate_2` function object. */ Approximate_2 approximate_2_object() const { return Approximate_2(); } //@} @@ -2997,7 +2995,7 @@ public: class Compare_endpoints_xy_2 { public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param xc the curve. * \return SMALLER if the curve is directed right; @@ -3007,13 +3005,13 @@ public: { return (xc.is_directed_right()) ? SMALLER : LARGER; } }; - /*! Obtain a `Compare_endpoints_xy_2` function object. */ + /*! obtains a `Compare_endpoints_xy_2` function object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } class Construct_opposite_2 { public: - /*! Construct an opposite \f$x\f$-monotone (with swapped source and target). + /*! constructs an opposite \f$x\f$-monotone (with swapped source and target). * \param xc the curve. * \return the opposite curve. */ @@ -3021,7 +3019,7 @@ public: { return xc.opposite(); } }; - /*! Obtain a `Construct_opposite_2` function object. */ + /*! obtains a `Construct_opposite_2` function object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } //@} @@ -3037,7 +3035,7 @@ public: return os; } - /*! Inserter for the spherical_arc class used by the traits-class */ + /*! inserters a spherical_arc used by the traits-class */ template friend OutputStream& operator<<(OutputStream& os, const X_monotone_curve_2& xc) { @@ -3045,7 +3043,7 @@ public: return os; } - /*! Extractor for the spherical_arc class used by the traits-class */ + /*! extracts a spherical_arc used by the traits-class */ template friend InputStream& operator>>(InputStream& is, X_monotone_curve_2& arc) { CGAL_error_msg("Not implemented yet!"); @@ -3107,7 +3105,7 @@ protected: inline Sign z_sign(Direction_3 d) const { return CGAL::sign(d.dz()); } public: - /*! Default constructor - constructs an empty arc */ + /*! constructs default; constructs an empty arc */ Arr_x_monotone_geodesic_arc_on_sphere_3() : m_is_vertical(false), m_is_directed_right(false), @@ -3116,7 +3114,7 @@ public: m_is_empty(true) {} - /*! Constructor + /*! constructs * \param src the source point of the arc * \param trg the target point of the arc * \param plane the plane that contains the arc @@ -3142,7 +3140,7 @@ public: m_is_empty(is_empty) {} - /*! Copy constructor + /*! constructs copy * \param other the other arc */ Arr_x_monotone_geodesic_arc_on_sphere_3 @@ -3157,7 +3155,7 @@ public: m_is_empty = other.m_is_empty; } - /*! Assignment operator */ + /*! assigns */ Arr_x_monotone_geodesic_arc_on_sphere_3& operator= (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) { m_source = other.m_source; @@ -3171,7 +3169,7 @@ public: return (*this); } - /*! Initialize a spherical_arc given that the two endpoint directions + /*! initializes a spherical_arc given that the two endpoint directions * have been set. It is assumed that the arc is the one with the smaller * angle among the two. * 1. Find out whether the arc is \f$x\f$-monotone. @@ -3265,7 +3263,7 @@ public: Direction_3(m_target))); } - /*! Construct a full spherical_arc from a plane + /*! constructs a full spherical_arc from a plane * \param plane the containing plane. * \pre the plane is not vertical */ @@ -3296,7 +3294,7 @@ public: Arr_extended_direction_3(d, Arr_extended_direction_3::MID_BOUNDARY_LOC); } - /*! Construct a full spherical_arc from a common endpoint and a plane + /*! constructs a full spherical_arc from a common endpoint and a plane * \param plane the containing plane. * \pre the point lies on the plane * \pre the point lies on the open discontinuity arc @@ -3318,7 +3316,7 @@ public: #endif } - /*! Construct a spherical_arc from two endpoints directions contained + /*! constructs a spherical_arc from two endpoints directions contained * in a plane. * \param plane the containing plane. * \param source the source-point direction. @@ -3383,17 +3381,17 @@ public: set_is_directed_right(z_sign(normal) == POSITIVE); } - /*! Set the source endpoint direction. + /*! sets the source endpoint direction. * \param p the endpoint to set. */ void set_source(const Arr_extended_direction_3& p) { m_source = p; } - /*! Set the target endpoint direction. + /*! sets the target endpoint direction. * \param p the endpoint to set. */ void set_target(const Arr_extended_direction_3& p) { m_target = p; } - /*! Set the direction of the underlying plane. + /*! sets the direction of the underlying plane. * \param normal the plane direction. */ void set_normal(const Direction_3& normal) { m_normal = normal; } @@ -3404,46 +3402,46 @@ public: void set_is_degenerate(bool flag) { m_is_degenerate = flag; } void set_is_empty(bool flag) { m_is_empty = flag; } - /*! Obtain the source */ + /*! obtains the source */ const Arr_extended_direction_3& source() const { return m_source; } - /*! Obtain the target */ + /*! obtains the target */ const Arr_extended_direction_3& target() const { return m_target; } - /*! Obtain the normal to the containing plane */ + /*! obtains the normal to the containing plane */ const Direction_3& normal() const { return m_normal; } - /*! Obtain the (lexicographically) left endpoint direction */ + /*! obtains the (lexicographically) left endpoint direction */ const Arr_extended_direction_3& left() const { return (m_is_directed_right ? m_source : m_target); } - /*! Obtain the (lexicographically) right endpoint */ + /*! obtains the (lexicographically) right endpoint */ const Arr_extended_direction_3& right() const { return (m_is_directed_right ? m_target : m_source); } - /*! Determines whether the curve is vertical */ + /*! determines whether the curve is vertical */ bool is_vertical() const { return m_is_vertical; } - /*! Determines whether the curve is directed lexicographically from left to + /*! determines whether the curve is directed lexicographically from left to * right */ bool is_directed_right() const { return m_is_directed_right; } - /*! Determines whether the curve is a full circle */ + /*! determines whether the curve is a full circle */ bool is_full() const { return m_is_full; } - /*! Determines whether the curve is degenerate */ + /*! determines whether the curve is degenerate */ bool is_degenerate() const { return m_is_degenerate; } - /*! Determines whether the curve is degenerate */ + /*! determines whether the curve is degenerate */ bool is_empty() const { return m_is_empty; } - /*! Determines whether the curve is a meridian */ + /*! determines whether the curve is a meridian */ bool is_meridian() const { return left().is_min_boundary() && right().is_max_boundary(); } #if 0 - /*! Create a bounding box for the spherical_arc */ + /*! creates a bounding box for the spherical_arc */ Bbox_2 bbox() const { Kernel kernel; Segment_2 seg = kernel.construct_spherical_arc_2_object()(this->m_source, @@ -3452,7 +3450,7 @@ public: } #endif - /*! Flip the spherical_arc (swap it source and target) */ + /*! flips the spherical_arc (swap it source and target) */ Arr_x_monotone_geodesic_arc_on_sphere_3 opposite() const { Arr_x_monotone_geodesic_arc_on_sphere_3 opp; opp.m_source = this->m_target; @@ -3466,7 +3464,7 @@ public: return opp; } - /*! Determined whether a direction is contained in a plane + /*! determines whether a direction is contained in a plane * \param plane the 3D plane. * \param dir the 3D direction. * \return true if dir is contained in plane; false otherwise. @@ -3512,10 +3510,10 @@ protected: bool m_is_x_monotone; public: - /*! Default constructor - constructs an empty arc */ + /*! constructs default; constructs an empty arc */ Arr_geodesic_arc_on_sphere_3() : Base(), m_is_x_monotone(true) {} - /*! Copy constructor + /*! constructs copy * \param other the other arc */ #ifdef DOXYGEN_RUNNING @@ -3524,7 +3522,7 @@ public: { m_is_x_monotone = other.m_is_x_monotone; } #endif - /*! Constructor + /*! constructs * \param src the source point of the arc * \param trg the target point of the arc * \param normal the normal to the plane that contains the arc @@ -3553,7 +3551,7 @@ public: CGAL_precondition(this->has_on(trg)); } - /*! Construct a spherical_arc from two endpoint directions contained + /*! constructs a spherical_arc from two endpoint directions contained * in a plane. * \param plane the containing plane. * \param source the source-point direction. @@ -3675,7 +3673,7 @@ public: (!plane_is_positive && !ccib(d, t, s))); } - /*! Construct a full spherical_arc from a normal to a plane. + /*! constructs a full spherical_arc from a normal to a plane. * \param normal the normal to the plane containing the arc. */ Arr_geodesic_arc_on_sphere_3(const Direction_3& normal) { @@ -3688,18 +3686,18 @@ public: set_is_x_monotone(false); } - /*! Indicates whether the arc is \f$x\f$-monotone + /*! indicates whether the arc is \f$x\f$-monotone * \return true if the arc is \f$x\f$-monotone; false otherwise */ bool is_x_monotone() const { return m_is_x_monotone; } - /*! Set the flag that indicates whether the arc is \f$x\f$-monotone + /*! sets the flag that indicates whether the arc is \f$x\f$-monotone * \param flag indicates whether the arc is \f$x\f$-monotone */ void set_is_x_monotone(bool flag) { m_is_x_monotone = flag; } }; -/*! Inserter for the spherical_arc class used by the traits-class */ +/*! inserts a spherical_arc used by the traits-class */ template OutputStream& operator<<(OutputStream& os, const Arr_extended_direction_3& ed) { @@ -3721,7 +3719,7 @@ OutputStream& operator<<(OutputStream& os, return os; } -/*! Inserter for the spherical_arc class used by the traits-class */ +/*! inserters a spherical_arc used by the traits-class */ template OutputStream& operator<<(OutputStream& os, @@ -3742,7 +3740,7 @@ operator<<(OutputStream& os, return os; } -/*! Extractor for the spherical-arc point class used by the traits-class */ +/*! extracts a spherical-arc point used by the traits-class */ template InputStream& operator>>(InputStream& is, Arr_extended_direction_3& point) { @@ -3757,7 +3755,7 @@ operator>>(InputStream& is, Arr_extended_direction_3& point) { return is; } -/*! Extractor for the spherical_arc class used by the traits-class */ +/*! extracts a spherical_arc used by the traits-class */ template InputStream& operator>>(InputStream& is, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h index 0d30f01166c..9598456cd59 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h @@ -63,7 +63,7 @@ public: Algebraic x; // The x-coordinate. Algebraic y; // The y-coordinate. - /*! Constructor. */ + /*! constructs. */ Intersection_point (const Algebraic& _s, const Algebraic& _t, const Algebraic& _x, const Algebraic& _y) : s(_s), t(_t), @@ -124,7 +124,7 @@ private: app_y (0) {} - /*! Constructor. */ + /*! constructs. */ My_point_2 (typename Parameter_list::const_iterator it, const Algebraic& _x, const Algebraic& _y) : prm_it (it), @@ -134,7 +134,7 @@ private: app_y (CGAL::to_double(_y)) {} - /*! Get the parameter value. */ + /*! obtains the parameter value. */ const Algebraic& parameter () const { return (*prm_it); @@ -177,7 +177,7 @@ private: public: - /*! Constructor. */ + /*! constructs. */ _Bezier_cache () {} @@ -869,6 +869,6 @@ _Bezier_cache::_compute_resultant return (det); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h index a2318c0d7d1..83161c83b46 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h @@ -95,7 +95,7 @@ private: public: - /*! Constructor, given an exact algebraic representation. */ + /*! constructs, given an exact algebraic representation. */ Originator (const Curve_2& c, const Algebraic& t) : _curve (c), _xid (0), @@ -104,7 +104,7 @@ private: set_parameter (t); } - /*! Constructor, given an exact algebraic representation. */ + /*! constructs, given an exact algebraic representation. */ Originator (const Curve_2& c, unsigned int xid, const Algebraic& t) : _curve (c), @@ -114,7 +114,7 @@ private: set_parameter (t); } - /*! Constructor with bounding information and no exact representation. */ + /*! constructs with bounding information and no exact representation. */ Originator (const Curve_2& c, const Bez_point_bound& bpb) : _curve (c), _xid (0), @@ -122,7 +122,7 @@ private: p_t (nullptr) {} - /*! Constructor with bounding information and no exact representation. */ + /*! constructs with bounding information and no exact representation. */ Originator (const Curve_2& c, unsigned int xid, const Bez_point_bound& bpb) : _curve (c), @@ -174,19 +174,19 @@ private: return (*this); } - /*! Get the originating curve. */ + /*! obtains the originating curve. */ const Curve_2& curve () const { return (_curve); } - /*! Get the serial number of the originating x-monotone curve. */ + /*! obtains the serial number of the originating x-monotone curve. */ unsigned int xid () const { return (_xid); } - /*! Get the bounding information. */ + /*! obtains the bounding information. */ const Bez_point_bound& point_bound () const { return (_bpb); @@ -264,7 +264,7 @@ private: BoundNT t_min; /*!< Minimal parameter value. */ BoundNT t_max; /*!< Maximal parameter value. */ - /*! Constructor given control points an a t-range. */ + /*! constructs given control points an a t-range. */ Subcurve (const Control_points& _ctrl, const BoundNT& _tmin, const BoundNT& _tmax) : @@ -273,7 +273,7 @@ private: t_max (_tmax) {} - /*! Constructor given a t-range. */ + /*! constructs given a t-range. */ Subcurve (const BoundNT& _tmin, const BoundNT& _tmax) : t_min (_tmin), @@ -924,7 +924,7 @@ public: _rep()._bbox = bbox; } - /*! Get the bounding box of the point. */ + /*! obtains the bounding box of the point. */ void get_bbox (typename Bounding_traits::NT& min_x, typename Bounding_traits::NT& min_y, typename Bounding_traits::NT& max_x, @@ -938,13 +938,13 @@ public: private: - /*! Get the representation (const version). */ + /*! obtains the representation (const version). */ inline const Bpt_rep& _rep () const { return (*(this->ptr())); } - /*! Get the representation (non-const version). */ + /*! obtains the representation (non-const version). */ inline Bpt_rep& _rep () { return (*(this->ptr())); @@ -1701,6 +1701,6 @@ void _Bezier_point_2_rep::_make_exact CGAL_error(); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h index 02bd94b4e21..ba17acc09ad 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h @@ -130,7 +130,7 @@ private: Rational t_min; Rational t_max; - /*! Get the rational bounding box of the subcurve. */ + /*! obtains the rational bounding box of the subcurve. */ void bbox(Rational& x_min, Rational& y_min, Rational& x_max, Rational& y_max) const { @@ -464,7 +464,7 @@ private: const Point_2& p, Bezier_cache& cache) const; - /*! Get the range of t-value over which the subcurve is defined. + /*! obtains the range of t-value over which the subcurve is defined. * \param cache Caches the vertical tangency points and intersection points. * \return A pair comprised of the t-value for the source point and the * t-value for the target point. @@ -2585,6 +2585,6 @@ _exact_vertical_position(const Point_2& p, return EQUAL; } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index dfa75584c53..9c799d7b76a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -50,13 +50,13 @@ private: CoordNT _y; public: - /*! Default constructor. */ + /*! constructs default. */ _One_root_point_2_rep() : _x(0), _y(0) {} - /*! Constructor of a point with one-root coefficients. + /*! constructs a point with one-root coefficients. This constructor of a point can also be used with rational coefficients thanks to convertor of CoordNT. */ _One_root_point_2_rep(const CoordNT& x, const CoordNT& y) : @@ -83,28 +83,29 @@ private: public: typedef typename Point_rep::CoordNT CoordNT; - /*! Default constructor. */ + /*! constructs default. */ _One_root_point_2() : Point_handle(Point_rep()) {} - /*! Copy constructor. */ + /*! constructs copy. */ _One_root_point_2(const Self& p) : Point_handle(p) {} _One_root_point_2& operator=(const _One_root_point_2&)=default; - /*! Constructor of a point with one-root coefficients. - This constructor of a point can also be used with rational coefficients - thanks to convertor of CoordNT. */ + /*! constructs a point with one-root coefficients. + * This constructor of a point can also be used with rational coefficients + * thanks to convertor of CoordNT. + */ _One_root_point_2(const CoordNT& x, const CoordNT& y) : Point_handle(Point_rep(x, y)) {} - /*! Get the x-coordinate. */ + /*! obtains the x-coordinate. */ const CoordNT& x() const { return (this->ptr()->_x); } - /*! Get the y-coordinate. */ + /*! obtains the y-coordinate. */ const CoordNT& y() const { return (this->ptr()->_y); } - /*! Check for equality. */ + /*! checks for equality. */ bool equals(const Self& p) const { if (this->identical(p)) return (true); @@ -117,7 +118,7 @@ public: bool operator == (const Self& p) const { return equals(p); } - /*! Set the point coordinates. */ + /*! sets the point coordinates. */ void set(const NT& x, const NT& y) { this->copy_on_write(); @@ -126,7 +127,7 @@ public: return; } - /*! Set the point coordinates. */ + /*! sets the point coordinates. */ void set(const CoordNT& x, const CoordNT& y) { this->copy_on_write(); @@ -136,8 +137,7 @@ public: } }; -/*! - * Exporter for conic arcs. +/*! exports a conic arc. */ template std::ostream& operator<<(std::ostream& os, @@ -187,14 +187,14 @@ protected: Orientation m_orient; // The orientation (COLLINEAR for line segments). public: - /*! Default constructor. */ + /*! constructs default. */ _Circle_segment_2() : m_is_full(false), m_has_radius(false), m_orient(COLLINEAR) {} - /*! Constructor from a line segment. + /*! constructs from a line segment. * \param seg The segment. */ _Circle_segment_2(const Segment_2& seg) : @@ -206,7 +206,7 @@ public: m_orient(COLLINEAR) {} - /*! Constructor from of a line segment. + /*! constructs from of a line segment. * \param ps The source point. * \param pt The target point. */ @@ -220,7 +220,7 @@ public: m_orient(COLLINEAR) {} - /*! Constructor of a segment, given a supporting line and two endpoints, + /*! constructs a segment, given a supporting line and two endpoints, * which need not necessarily have rational coordinates. * \param line The supporting line. * \param source The source point. @@ -243,7 +243,7 @@ public: -target.y() * line.b()) == EQUAL); } - /*! Constructor from a circle. + /*! constructs from a circle. * \param circ The circle. */ _Circle_segment_2(const Circle_2& circ) : @@ -253,7 +253,7 @@ public: m_orient(circ.orientation()) { CGAL_assertion(m_orient != COLLINEAR); } - /*! Constructor from a circle. + /*! constructs from a circle. * \param c The circle center. * \param r The radius. * \param orient The orientation of the circle. @@ -267,7 +267,7 @@ public: m_orient(orient) { CGAL_assertion (orient != COLLINEAR); } - /*! Constructor of a circular arc, given a supporting circle and two + /*! constructs a circular arc, given a supporting circle and two * endpoints, which need not necessarily have rational coordinates. * The orientation of the circle determines the orientation of the arc. * \param circ The supporting circle. @@ -297,7 +297,7 @@ public: CGAL::square(target.y() - circ.center().y())) == EQUAL); } - /*! Constructor of a circular arc, given a supporting circle and two + /*! constructs a circular arc, given a supporting circle and two * endpoints, which need not necessarily have rational coordinates. * \param c The circle center. * \param r The radius. @@ -330,7 +330,7 @@ public: CGAL::square(target.y() - c.y())) == EQUAL); } - /*! Constructor of a circular arc, from the given three points, in case of + /*! constructs a circular arc, from the given three points, in case of * three collinear points, a segment will be constructed. * \param p1 The arc source. * \param p2 A point in the interior of the arc. @@ -408,19 +408,19 @@ public: m_circ = Circle_2(circ_center, sqr_rad, m_orient); } - /*! Get the orientation of the curve. + /*! obtains the orientation of the curve. * \return COLLINEAR in case of a line segment, * CLOCKWISE or COUNTERCLOCKWISE for circular curves. */ inline Orientation orientation() const { return (m_orient); } - /*! Check if the arc is linear. */ + /*! checks if the arc is linear. */ inline bool is_linear() const { return (m_orient == COLLINEAR); } - /*! Check if the arc is circular. */ + /*! checks if the arc is circular. */ inline bool is_circular() const { return (m_orient != COLLINEAR); } - /*! Obtain the supporting line. + /*! obtains the supporting line. * \pre The curve orientation is COLLINEAR. */ const Line_2& supporting_line() const @@ -429,7 +429,7 @@ public: return m_line; } - /*! Obtain the supporting circle. + /*! obtains the supporting circle. * \pre The curve orientation is not COLLINEAR. */ const Circle_2& supporting_circle() const @@ -438,11 +438,10 @@ public: return m_circ; } - /*! Check if the curve is a full circle. */ + /*! checks if the curve is a full circle. */ bool is_full() const { return (m_is_full); } - /*! - * Get the source point. + /*! obtains the source point. * \pre The curve is not a full circle. */ const Point_2& source() const @@ -451,8 +450,7 @@ public: return (m_source); } - /*! - * Get the target point. + /*! obtains the target point. * \pre The curve is not a full circle. */ const Point_2& target() const @@ -461,7 +459,7 @@ public: return (m_target); } - /*! Get the vertical tangency points the arc contains. + /*! obtains the vertical tangency points the arc contains. * \param vpts Output: The vertical tangency points. * \pre The curve is circular. * \return The number of points (0, 1, or 2). @@ -514,7 +512,7 @@ public: } private: - /*! Obtain the vertical tangency points the arc contains, assuming it is + /*! obtains the vertical tangency points the arc contains, assuming it is * counterclockwise oriented. * \param vpts Output: The vertical tangency points. * \return The number of points (0, 1, or 2). @@ -580,7 +578,7 @@ private: return (n_vpts); } - /*! Obtain the index of the quarter-plane containing the given point, + /*! obtains the index of the quarter-plane containing the given point, * where the circle center is considered to be the origin. */ int _quart_index(const Point_2& p) const @@ -606,7 +604,7 @@ private: } }; -/*! Exporter for line segments and circular arcs. +/*! exports a line segments or a circular arc. */ template std::ostream& @@ -648,8 +646,7 @@ public: typedef std::pair Intersection_point; typedef std::list Intersection_list; - /*! - * \struct Less functor for Curve_id_pair. + /*! \struct Less functor for Curve_id_pair. */ struct Less_id_pair { bool operator()(const Curve_id_pair& ip1, const Curve_id_pair& ip2) const @@ -692,7 +689,7 @@ protected: // The rest of the bits represent the curve index. public: - /*! Default constructor. + /*! constructs default. */ _X_monotone_circle_segment_2() : m_first(), @@ -703,7 +700,7 @@ public: m_info(0) {} - /*! Construct an arc from a line segment. + /*! constructs an arc from a line segment. * \param line The supporting line. * \param source The source point. * \param target The target point. @@ -734,7 +731,7 @@ public: if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK); } - /*! Construct a segment arc from two kernel points + /*! constructs a segment arc from two kernel points * \param source the source point. * \ param target the target point. * \pre source and target are not equal. @@ -766,7 +763,7 @@ public: if (res == SMALLER) m_info = (m_info | IS_DIRECTED_RIGHT_MASK); } - /*! Construct a circular arc. + /*! constructs a circular arc. * \param line The supporting line. * \param source The source point. * \param target The target point. @@ -795,14 +792,14 @@ public: else m_info = (m_info | CLOCKWISE_CODE); } - /*! Check if the arc is linear. */ + /*! checks if the arc is linear. */ inline bool is_linear () const { return ((m_info & ORIENTATION_MASK) == 0); } - /*! Check if the arc is circular. */ + /*! checks if the arc is circular. */ inline bool is_circular () const { return ((m_info & ORIENTATION_MASK) != 0); } - /*! Obtain the supporting line. + /*! obtains the supporting line. * \pre The arc is linear (a line segment). */ Line_2 supporting_line() const @@ -811,7 +808,7 @@ public: return (Line_2 (a(), b(), c())); } - /*! Obtain the supporting circle. + /*! obtains the supporting circle. * \pre The arc is circular. */ Circle_2 supporting_circle() const @@ -822,13 +819,13 @@ public: return (Circle_2(center , sqr_r(), orientation())); } - /*! Get the source point. */ + /*! obtains the source point. */ inline const Point_2& source() const { return (m_source); } - /*! Get the target point. */ + /*! obtains the target point. */ inline const Point_2& target() const { return (m_target); } - /*! True if the arc is directed right, false otherwise. */ + /*! returns true if the arc is directed right, false otherwise. */ bool is_directed_right() const { return ((m_info & IS_DIRECTED_RIGHT_MASK) != 0); } @@ -836,15 +833,15 @@ public: bool has_right() const { return true; } - /*! Get the left endpoint of the arc. */ + /*! obtains the left endpoint of the arc. */ inline const Point_2& left() const { return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_source : m_target); } - /*! Get the right endpoint of the arc. */ + /*! obtains the right endpoint of the arc. */ inline const Point_2& right() const { return (((m_info & IS_DIRECTED_RIGHT_MASK) != 0) ? m_target : m_source); } - /*! Check whether the given point is in the x-range of the arc. + /*! checks whether the given point is in the x-range of the arc. */ bool is_in_x_range(const Point_2& p) const { @@ -856,11 +853,11 @@ public: return (CGAL::compare (p.x(), right().x()) != LARGER); } - /*! Check if the arc is a vertical segment. */ + /*! checks if the arc is a vertical segment. */ inline bool is_vertical() const { return ((m_info & IS_VERTICAL_SEGMENT_MASK) != 0); } - /*! Get the orientation of the arc. */ + /*! obtains the orientation of the arc. */ inline Orientation orientation() const { unsigned int or_ = (m_info & ORIENTATION_MASK); @@ -871,7 +868,7 @@ public: return (CGAL::COLLINEAR); } - /*! Check the position of a given point with respect to the arc. + /*! checks the position of a given point with respect to the arc. */ Comparison_result point_position(const Point_2& p) const { @@ -879,7 +876,7 @@ public: else return (_circ_point_position (p)); } - /*! Compare the two arcs to the right of their intersection point. + /*! compares the two arcs to the right of their intersection point. */ Comparison_result compare_to_right(const Self& cv, const Point_2& p) const { @@ -895,7 +892,7 @@ public: } } - /*! Compare the two arcs to the left of their intersection point. + /*! compares the two arcs to the left of their intersection point. */ Comparison_result compare_to_left(const Self& cv, const Point_2& p) const { @@ -911,7 +908,7 @@ public: } } - /*! Check whether the two arcs have the same supporting curve. + /*! checks whether the two arcs have the same supporting curve. */ bool has_same_supporting_curve(const Self& cv) const { @@ -951,7 +948,7 @@ public: CGAL::compare(fact2*c(), fact1*cv.c()) == EQUAL); } - /*! Check whether the two curves are equal. + /*! checks whether the two curves are equal. */ bool equals(const Self& cv) const { @@ -970,7 +967,7 @@ public: m_source.equals(cv.m_target) && m_target.equals(cv.m_source))); } - /*! Split the curve at a given point into two sub-arcs. + /*! splits the curve at a given point into two sub-arcs. */ void split(const Point_2& p, Self& c1, Self& c2) const { @@ -989,7 +986,7 @@ public: } } - /*! Compute the intersections between the two arcs or segments. + /*! computes the intersections between the two arcs or segments. */ template OutputIterator intersect(const Self& cv, OutputIterator oi, @@ -1076,7 +1073,7 @@ public: return oi; } - /*! Check whether it is possible to merge our arc with the given arc. + /*! checks whether it is possible to merge our arc with the given arc. */ bool can_merge_with(const Self& cv) const { @@ -1089,7 +1086,7 @@ public: return (right().equals(cv.left()) || left().equals(cv.right())); } - /*! Merge our arc with the given arc. + /*! merges our arc with the given arc. * \pre The two arcs are mergeable. */ void merge(const Self& cv) @@ -1111,7 +1108,7 @@ public: } } - /*! construct an opposite arc. */ + /*! constructs an opposite arc. */ Self construct_opposite() const { Self opp_cv; @@ -1153,23 +1150,22 @@ public: } protected: - /*! Get the curve index. */ + /*! obtains the curve index. */ inline unsigned int _index() const { return (m_info >> INDEX_SHIFT_BITS); } /// \name Accessors for circular arcs. //@{ - /*! Get the x-coordinate of the center of the supporting circle. */ + /*! obtains the x-coordinate of the center of the supporting circle. */ inline const NT& x0() const { return (m_first); } - /*! Get the y-coordinate of the center of the supporting circle. */ + /*! obtains the y-coordinate of the center of the supporting circle. */ inline const NT& y0() const { return (m_second); } - /*! Get the squared radius of the supporting circle. */ + /*! obtains the squared radius of the supporting circle. */ inline const NT& sqr_r() const { return (m_third); } - /*! - * Check if the circular arc lies on the upper half of the supporting circle. + /*! checks if the circular arc lies on the upper half of the supporting circle. */ inline bool _is_upper() const { @@ -1186,21 +1182,20 @@ protected: /// \name Accessors for line segments. //@{ - /*! Get the coefficient of x in the equation of the supporting line. */ + /*! obtains the coefficient of x in the equation of the supporting line. */ inline const NT& a() const { return (m_first); } - /*! Get the coefficient of y in the equation of the supporting line. */ + /*! obtains the coefficient of y in the equation of the supporting line. */ inline const NT& b() const { return (m_second); } - /*! Get the free coefficient in the equation of the supporting line. */ + /*! obtains the free coefficient in the equation of the supporting line. */ inline const NT& c() const { return (m_third); } //@} /// \name Auxiliary functions for the point_position predicate. //@{ - /*! - * Check the position of a given point with respect to a line segment. + /*! checks the position of a given point with respect to a line segment. */ Comparison_result _line_point_position(const Point_2& p) const { @@ -1232,8 +1227,7 @@ protected: return (CGAL::compare (p.y(), y_proj)); } - /*! - * Check the position of a given point with respect to a circular arc. + /*! checks the position of a given point with respect to a circular arc. */ Comparison_result _circ_point_position(const Point_2& p) const { @@ -1274,8 +1268,7 @@ protected: /// \name Auxiliary functions for the compare_to_right predicate. //@{ - /*! - * Compare two line segments to the right of their intersection point. + /*! compares two line segments to the right of their intersection point. */ Comparison_result _lines_compare_to_right(const Self& cv, const Point_2& /* p */) const @@ -1295,8 +1288,7 @@ protected: return (CGAL::compare (cv.a()/cv.b(), a()/b())); } - /*! - * Compare a circular arcs (this) and a line segment (cv) to the right of + /*! compares a circular arcs (this) and a line segment (cv) to the right of * their intersection point. */ Comparison_result _circ_line_compare_to_right(const Self& cv, @@ -1339,7 +1331,7 @@ protected: return (_is_upper() ? SMALLER : LARGER); } - /*! Compare two circular arcs to the right of their intersection point. + /*! compares two circular arcs to the right of their intersection point. */ Comparison_result _circs_compare_to_right(const Self& cv, const Point_2& p) const @@ -1471,8 +1463,7 @@ protected: /// \name Auxiliary functions for the compare_to_left predicate. //@{ - /*! - * Compare two line segments to the left of their intersection point. + /*! compares two line segments to the left of their intersection point. */ Comparison_result _lines_compare_to_left(const Self& cv, const Point_2& ) const @@ -1494,7 +1485,7 @@ protected: return (CGAL::compare (a()/b(), cv.a()/cv.b())); } - /*! Compare a circular arcs (this) and a line segment (cv) to the left of + /*! compares a circular arcs (this) and a line segment (cv) to the left of * their intersection point. */ Comparison_result _circ_line_compare_to_left(const Self& cv, @@ -1540,8 +1531,7 @@ protected: return (_is_upper() ? SMALLER : LARGER); } - /*! - * Compare the two arcs to the left of their intersection point. + /*! compares the two arcs to the left of their intersection point. */ Comparison_result _circs_compare_to_left(const Self& cv, const Point_2& p) const @@ -1675,7 +1665,7 @@ protected: /// \name Auxiliary functions for computing intersections. //@{ - /*! Compute the intersections between two line segments. + /*! computes the intersections between two line segments. */ void _lines_intersect(const Self& cv, Intersection_list& inter_list) const @@ -1701,7 +1691,7 @@ protected: inter_list.push_back(Intersection_point(p, mult)); } - /*! Compute the intersections between the supporting circle of (*this) and + /*! computes the intersections between the supporting circle of (*this) and * the supporting line of the segment cv. */ void _circ_line_intersect(const Self& cv, @@ -1826,7 +1816,7 @@ protected: } } - /*! Compute the intersections between two circles. + /*! computes the intersections between two circles. */ void _circs_intersect(const Self& cv, Intersection_list& inter_list) const { @@ -1891,7 +1881,7 @@ protected: } } - /*! Check if the given point lies on the arc. + /*! checks if the given point lies on the arc. * \pre p lies on the supporting curve. */ bool _is_between_endpoints(const Point_2& p) const @@ -1928,7 +1918,7 @@ protected: return (this->is_in_x_range(p)); } - /*! Check whether the given point lies in the interior of the arc. + /*! checks whether the given point lies in the interior of the arc. * \pre p lies on the supporting curve. */ bool _is_strictly_between_endpoints(const Point_2& p) const @@ -1937,7 +1927,7 @@ protected: return (_is_between_endpoints(p)); } - /*! Compute the overlap with a given arc having the same supporting curve. + /*! computes the overlap with a given arc having the same supporting curve. * \param cv The given arc. * \param overlap Output: The overlapping arc (if any). * \return Whether we found an overlap. @@ -2048,7 +2038,7 @@ protected: *oi++ = std::make_pair(x_right, y_right); // The right point. } - /*! Trim the arc given its new endpoints. + /*! trims the arc given its new endpoints. * \param ps The new source point. * \param pt The new target point. * \return The new trimmed arc. @@ -2068,7 +2058,7 @@ protected: //@} }; -/*! Exporter for circular arcs (or line segments). +/*! exports a circular arcs or a line segment */ template std::ostream& @@ -2082,6 +2072,6 @@ operator<<(std::ostream& os, return (os); } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h index c115673ff53..b0bd7fd018e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h @@ -105,7 +105,7 @@ public: /// \name Deprecated Constructions. //@{ - /*!Construct a conic arc which is the full conic: + /*! constructs a conic arc which is the full conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * \pre The conic C must be an ellipse (so 4rs - t^2 > 0). */ @@ -129,7 +129,7 @@ public: _set_full(rat_coeffs, true); } - /*! Construct a conic arc which lies on the conic: + /*! constructs a conic arc which lies on the conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * \param orient The orientation of the arc (clockwise or counterclockwise). * \param source The source point. @@ -156,7 +156,7 @@ public: _set(rat_coeffs); } - /*! Construct a segment conic arc from two endpoints. + /*! constructs a segment conic arc from two endpoints. * \param source the source point with rational coordinates. */ CGAL_DEPRECATED Conic_arc_2(const Point_2& source, const Point_2& target) : @@ -186,7 +186,7 @@ public: m_extra_data->side = ZERO; } - /*! Construct a conic arc from the given line segment. + /*! constructs a conic arc from the given line segment. * \param seg The line segment with rational endpoints. */ CGAL_DEPRECATED Conic_arc_2 (const Rat_segment_2& seg) : @@ -241,7 +241,7 @@ public: _set(rat_coeffs); } - /*! Set a circular arc that corresponds to a full circle. + /*! sets a circular arc that corresponds to a full circle. * \param circ The circle (with rational center and rational squared radius). */ CGAL_DEPRECATED Conic_arc_2(const Rat_circle_2& circ) : @@ -277,7 +277,7 @@ public: _set_full(rat_coeffs, false); } - /*! Set a circular arc that lies on the given circle: + /*! sets a circular arc that lies on the given circle: * C: (x - x0)^2 + (y - y0)^2 = R^2 * \param orient The orientation of the circle. * \param source The source point. @@ -342,7 +342,7 @@ public: _set(rat_coeffs); } - /*! Construct a circular arc from the given three points. + /*! constructs a circular arc from the given three points. * \param p1 The arc source. * \param p2 A point in the interior of the arc. * \param p3 The arc target. @@ -424,7 +424,7 @@ public: _set(rat_coeffs); } - /*! Construct a conic arc from the given five points, specified by the + /*! constructs a conic arc from the given five points, specified by the * points p1, p2, p3, p4 and p5. * \param p1 The source point of the given arc. * \param p2,p3,p4 Points lying on the conic arc, between p1 and p5. @@ -515,7 +515,7 @@ public: } } - /*! Construct a conic arc which lies on the conic: + /*! constructs a conic arc which lies on the conic: * C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 * The source and the target are specified by the intersection of the * conic with: @@ -684,7 +684,7 @@ public: _set(rat_coeffs); } - /*! Get a bounding box for the conic arc. + /*! obtains a bounding box for the conic arc. * \return The bounding box. */ CGAL_DEPRECATED Bbox_2 bbox() const { @@ -769,7 +769,7 @@ public: //@} protected: - /*! Calculate the vertical tangency points of the arc. + /*! calculates the vertical tangency points of the arc. * \param vpts The vertical tangency points. * \pre The vpts vector should be allocated at the size of 2. * \return The number of vertical tangency points. @@ -797,7 +797,7 @@ protected: return m; } - /*! Calculate the horizontal tangency points of the arc. + /*! calculates the horizontal tangency points of the arc. * \param hpts The horizontal tangency points. * \pre The hpts vector should be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -825,7 +825,7 @@ protected: return m; } - /*! Check whether the given point is strictly between the source and the + /*! checks whether the given point is strictly between the source and the * target (but not any of them). * The point is assumed to be on the conic's boundary. * \param p The query point. @@ -892,7 +892,7 @@ protected: } } - /*! Find the vertical tangency points of the underlying conic. + /*! finds the vertical tangency points of the underlying conic. * \param ps The output points of vertical tangency. * This area must be allocated at the size of 2. * \return The number of vertical tangency points. @@ -970,7 +970,7 @@ protected: return n; } - /*! Find the horizontal tangency points of the underlying conic. + /*! finds the horizontal tangency points of the underlying conic. * \param ps The output points of horizontal tangency. * This area must be allocated at the size of 2. * \return The number of horizontal tangency points. @@ -1020,7 +1020,7 @@ protected: return n; } - /*! Set the properties of a conic arc that is really a full curve + /*! sets the properties of a conic arc that is really a full curve * (that is, an ellipse). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of x^2, y^2, xy, x, y and the free coefficient resp. @@ -1074,7 +1074,7 @@ protected: else reset_flags(); // invalid arc } - /*! Check whether the given point lies on the supporting conic of the arc. + /*! checks whether the given point lies on the supporting conic of the arc. * \param p The query point. * \return (true) if p lies on the supporting conic; (false) otherwise. */ @@ -1093,7 +1093,7 @@ protected: return (CGAL::sign(val) == ZERO); } - /*! Build the data for hyperbolic arc, containing the characterization of the + /*! builds the data for hyperbolic arc, containing the characterization of the * hyperbolic branch the arc is placed on. */ CGAL_DEPRECATED void _build_hyperbolic_arc_data() { @@ -1189,7 +1189,7 @@ protected: sign_of_extra_data(m_target.x(), m_target.y())); } - /*! Check whether the given point is between the source and the target. + /*! checks whether the given point is between the source and the target. * The point is assumed to be on the conic's boundary. * \param p The query point. * \return (true) if the point is between the two endpoints, @@ -1206,7 +1206,7 @@ protected: else return _is_strictly_between_endpoints(p); } - /*! Find the y coordinates of the underlying conic at a given x coordinate. + /*! finds the y coordinates of the underlying conic at a given x coordinate. * \param x The x coordinate. * \param ys The output y coordinates. * \pre The vector ys must be allocated at the size of 2. @@ -1224,7 +1224,7 @@ protected: return (_solve_quadratic_equation(A, B, C, ys[0], ys[1])); } - /*! Find all points on the arc with a given x-coordinate. + /*! finds all points on the arc with a given x-coordinate. * \param p A placeholder for the x-coordinate. * \param ps The point on the arc at x(p). * \pre The vector ps should be allocated at the size of 2. @@ -1248,7 +1248,7 @@ protected: return m; } - /*! Solve the given quadratic equation: Ax^2 + B*x + C = 0. + /*! solves the given quadratic equation: Ax^2 + B*x + C = 0. * \param x_minus The root obtained from taking -sqrt(discriminant). * \param x_plus The root obtained from taking -sqrt(discriminant). * \return The number of disticnt solutions to the equation. @@ -1289,7 +1289,7 @@ protected: return 2; } - /*! Find the x coordinates of the underlying conic at a given y coordinate. + /*! finds the x coordinates of the underlying conic at a given y coordinate. * \param y The y coordinate. * \param xs The output x coordinates. * \pre The vector xs must be allocated at the size of 2. @@ -1308,7 +1308,7 @@ protected: return (_solve_quadratic_equation(A, B, C, xs[0], xs[1])); } - /*! Find all points on the arc with a given y-coordinate. + /*! finds all points on the arc with a given y-coordinate. * \param p A placeholder for the y-coordinate. * \param ps The point on the arc at x(p). * \pre The vector ps should be allocated at the size of 2. @@ -1332,7 +1332,7 @@ protected: return m; } - /*! Set the properties of a conic arc (for the usage of the constructors). + /*! sets the properties of a conic arc (for the usage of the constructors). * \param rat_coeffs A vector of size 6, storing the rational coefficients * of x^2, y^2, xy, x, y and the free coefficient resp. */ @@ -1454,7 +1454,7 @@ public: /// \name Construction and destruction functions. //@{ - /*! Default constructor. + /*! constructs default. */ Conic_arc_2() : m_r(0), m_s(0), m_t(0), m_u(0), m_v(0), m_w(0), @@ -1463,7 +1463,7 @@ public: m_extra_data(nullptr) {} - /*! Copy constructor. + /*! constructs copy. * \param arc The copied arc. */ Conic_arc_2(const Self& arc) : @@ -1478,11 +1478,11 @@ public: new Extra_data(*(arc.m_extra_data)) : nullptr; } - /*! Destructor. + /*! destructs. */ virtual ~Conic_arc_2() { if (m_extra_data != nullptr) delete m_extra_data; } - /*! Assignment operator. + /*! assigns. * \param arc The copied arc. */ const Self& operator=(const Self& arc) { @@ -1515,15 +1515,15 @@ public: /// \name Get the arc properties. //@{ - /*! Determine whether the arc is valid. + /*! determines whether the arc is valid. */ bool is_valid() const { return test_flag(IS_VALID); } - /*! Determine whether the arc represents a full conic curve. + /*! determines whether the arc represents a full conic curve. */ bool is_full_conic() const { return test_flag(IS_FULL_CONIC); } - /*! Obtain the coefficients of the underlying conic. + /*! obtains the coefficients of the underlying conic. */ const Integer& r() const { return (m_r); } const Integer& s() const { return (m_s); } @@ -1532,7 +1532,7 @@ public: const Integer& v() const { return (m_v); } const Integer& w() const { return (m_w); } - /*! Obtain the arc's source. + /*! obtains the arc's source. * \return The source point. * \pre The arc does not represent a full conic curve. */ @@ -1541,14 +1541,14 @@ public: return m_source; } - /*! Obtain the non const reference to the curve source point. + /*! obtains the non const reference to the curve source point. */ Point_2& source() { CGAL_precondition(! is_full_conic()); return (this->m_source); } - /*! Obtain the arc's target. + /*! obtains the arc's target. * \return The target point. * \pre The arc does not represent a full conic curve. */ @@ -1557,19 +1557,19 @@ public: return m_target; } - /*! Obtain the non const reference to the curve source point. + /*! obtains the non const reference to the curve source point. */ Point_2& target() { CGAL_precondition(! is_full_conic()); return this->m_target; } - /*! Obtain the orientation of the arc. + /*! obtains the orientation of the arc. * \return The orientation. */ Orientation orientation() const { return m_orient; } - /*! Obtain the extra data. + /*! obtains the extra data. */ const Extra_data* extra_data() const { return m_extra_data; } //@} @@ -1603,17 +1603,17 @@ public: // only friends have the privilege to use. //@{ - /*! Set the source point of the conic arc. + /*! sets the source point of the conic arc. * \param ps The new source point. */ void set_source(const Point_2& ps) { m_source = ps; } - /*! Set the target point of the conic arc. + /*! sets the target point of the conic arc. * \param pt The new source point. */ void set_target(const Point_2& pt) { m_target = pt; } - /*! Set the coefficients. + /*! sets the coefficients. */ void set_coefficients(Integer r, Integer s, Integer t, Integer u, Integer v, Integer w) { @@ -1625,22 +1625,22 @@ public: m_w = w; } - /*! Set the orientation. + /*! sets the orientation. */ void set_orientation(Orientation orient) { m_orient = orient; } - /*! Set the endpoints. + /*! sets the endpoints. */ void set_endpoints(const Point_2& source, const Point_2& target) { m_source = source; m_target = target; } - /*! Set the extra data field. + /*! sets the extra data field. */ void set_extra_data(Extra_data* extra_data) { m_extra_data = extra_data; } - /*! Set the extra data field. + /*! sets the extra data field. */ void set_extra_data(const Algebraic& a, const Algebraic& b, const Algebraic& c, Sign side) @@ -1652,7 +1652,7 @@ public: m_extra_data->side = side; } - /*! Update the extra data field. + /*! updates the extra data field. */ void update_extra_data() { const Algebraic x1 = source().x(); @@ -1675,7 +1675,7 @@ public: /// \name Auxiliary functions. //@{ - /*! Evaluate the sign of (a*x + b*y + c) stored with the extra data field + /*! evaluates the sign of (a*x + b*y + c) stored with the extra data field * at a given point. * \param px The x-coordinate of query point. * \param py The y-coordinate of query point. @@ -1691,7 +1691,7 @@ public: //@} }; -/*! Exporter for conic arcs. +/*! exports a conic arc. */ template std::ostream& @@ -1721,6 +1721,6 @@ operator<< (std::ostream& os, return os; } -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h index 97f8dd74181..c9e17b4d85f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h @@ -88,7 +88,7 @@ public: /// \name Deprecated Constructions. //@{ - // /*! Construct an x-monotone arc from a conic arc. + // /*! constructs an x-monotone arc from a conic arc. // * \param arc The given (base) arc. // * \param id The ID of the base arc. // */ @@ -100,7 +100,7 @@ public: // _set(); // } - /*! Construct an x-monotone sub-arc from a conic arc. + /*! constructs an x-monotone sub-arc from a conic arc. * \param arc The given (base) arc. * \param source The source point. * \param target The target point. @@ -118,7 +118,7 @@ public: _set(); } - /*! Construct a special segment connecting to given endpoints (for the usage + /*! constructs a special segment connecting to given endpoints (for the usage * of the landmarks point-location strategy). * \param source The source point. * \param target The target point. @@ -141,7 +141,7 @@ public: set_flag(IS_SPECIAL_SEGMENT); } - /*! Construct a special segment of a given line connecting to given + /*! constructs a special segment of a given line connecting to given * endpoints. * \param a, b, c The coefficients of the supporting line (ax + by + c = 0). * \param source The source point. @@ -200,7 +200,7 @@ public: //@} private: - /*! Set the properties of the x-monotone conic arc (for the usage of the + /*! sets the properties of the x-monotone conic arc (for the usage of the * constructors). */ CGAL_DEPRECATED void _set() { @@ -304,11 +304,11 @@ public: /// \name Public constructors, assignment operators, and destructors. //@{ - /*! Default constructor. + /*! constructs default. */ Conic_x_monotone_arc_2() : Base(), m_id() {} - /*! Copy constructor. + /*! constructs copy. * \param arc The copied arc. */ Conic_x_monotone_arc_2(const Self& arc) : @@ -322,7 +322,7 @@ public: m_id(arc.m_id) {} - /*! Assignment operator. + /*! assigns. * \param arc The copied arc. */ const Self& operator=(const Self& arc) { @@ -353,13 +353,13 @@ private: /// \name private constructors to be used only by the traits class template. //@{ - /*! Construct an x-monotone arc from a conic arc. + /*! constructs an x-monotone arc from a conic arc. * \param arc The given (base) arc. * \pre The given arc is x-monotone. */ Conic_x_monotone_arc_2(const Base& arc) : Base(arc), m_id() {} - /*! Construct an x-monotone arc from a conic arc. + /*! constructs an x-monotone arc from a conic arc. * \param arc The given (base) arc. * \param id The ID of the base arc. */ @@ -373,15 +373,15 @@ public: /// \name Accessing the arc properties. //@{ - /*! Obtain the facing mask. + /*! obtains the facing mask. */ size_t facing_mask() const { return this->m_info & FACING_MASK; } - /*! Obtain the degree mask. + /*! obtains the degree mask. */ size_t degree_mask() const { return this->m_info & DEGREE_MASK; } - /*! Obtain the coefficients of the underlying conic. + /*! obtains the coefficients of the underlying conic. */ const Integer& r() const { return ( this->m_r); } const Integer& s() const { return ( this->m_s); } @@ -390,50 +390,50 @@ public: const Integer& v() const { return ( this->m_v); } const Integer& w() const { return ( this->m_w); } - /*! Obtain the left endpoint of the arc. + /*! obtains the left endpoint of the arc. */ const Point_2& left() const { if (this->test_flag(IS_DIRECTED_RIGHT)) return this->source(); else return this->target(); } - /*! Obtain the right endpoint of the arc. + /*! obtains the right endpoint of the arc. */ const Point_2& right() const { if (this->test_flag(IS_DIRECTED_RIGHT)) return this->target(); else return this->source(); } - /*! Determine whether the conic arc is directed iexicographically right. + /*! determines whether the conic arc is directed iexicographically right. */ bool is_directed_right() const { return this->test_flag(IS_DIRECTED_RIGHT); } - /*! Determine whether the conic arc is a vertical segment. + /*! determines whether the conic arc is a vertical segment. */ bool is_vertical() const { return this->test_flag(IS_VERTICAL_SEGMENT); } - /*! Determine whether the conic arc is a facing up. + /*! determines whether the conic arc is a facing up. */ bool is_upper() const { return this->test_flag(FACING_UP); } - /*! Determine whether the conic arc is a facing down. + /*! determines whether the conic arc is a facing down. */ bool is_lower() const { return this->test_flag(FACING_DOWN); } - /*! Check whether the arc is a special segment connecting two algebraic + /*! checks whether the arc is a special segment connecting two algebraic * endpoints (and has no underlying integer conic coefficients). */ bool is_special_segment() const { return this->test_flag(IS_SPECIAL_SEGMENT); } - /*! Obtain the mask of the DEGREE_1 flag. + /*! obtains the mask of the DEGREE_1 flag. */ static constexpr size_t degree_1_mask() { return flag_mask(DEGREE_1); } - /*! Obtain the mask of the DEGREE_1 flag. + /*! obtains the mask of the DEGREE_1 flag. */ static constexpr size_t degree_2_mask() { return flag_mask(DEGREE_2); } - /*! Obtain the algebraic coefficients. + /*! obtains the algebraic coefficients. */ Algebraic alg_r() const { return m_alg_r; } Algebraic alg_s() const { return m_alg_s; } @@ -442,11 +442,11 @@ public: Algebraic alg_v() const { return m_alg_v; } Algebraic alg_w() const { return m_alg_w; } - /*! Obtain the conic id. + /*! obtains the conic id. */ Conic_id id() const { return m_id; } - /*! Check whether the given point lies on the arc. + /*! checks whether the given point lies on the arc. * \param p The query point. * \param (true) if p lies on the arc; (false) otherwise. */ @@ -474,7 +474,7 @@ public: return _is_between_endpoints(p); } - /*! Obtain a bounding box for the conic arc. + /*! obtains a bounding box for the conic arc. * \return The bounding box. */ CGAL_DEPRECATED Bbox_2 bbox() const { return Base::bbox(); } @@ -483,7 +483,7 @@ public: // Setters //@{ - /*! Set the algebraic coefficients. + /*! sets the algebraic coefficients. */ void set_alg_coefficients(const Algebraic& alg_r, const Algebraic& alg_s, const Algebraic& alg_t, const Algebraic& alg_u, @@ -497,7 +497,7 @@ public: m_alg_w = alg_w; } - /*! Add a generating conic ID. + /*! adds a generating conic ID. */ void set_generating_conic(const Conic_id& id) { this->m_source.set_generating_conic(id); @@ -505,7 +505,7 @@ public: } //@} - /*! Compute a point on an arc with the same \f$x\f$-coordiante as the given + /*! computes a point on an arc with the same \f$x\f$-coordiante as the given * point. * \param p The given point. * \pre The arc is not vertical and `p` is in the \f$x\f$-range of the arc. @@ -590,7 +590,7 @@ public: /// \name Constructing points on the arc. //@{ - /*! Obtain a polyline approximating the conic arc. + /*! obtains a polyline approximating the conic arc. * \param n The maximal number of sample points. * \param oi An output iterator, whose value-type is pair * (representing an approximated point). @@ -659,7 +659,7 @@ public: /// \name Constructing x-monotone arcs. //@{ - /*! Flip the arc. + /*! flips the arc. * \return An arc with swapped source and target and a reverse orientation. */ Self flip() const { @@ -680,7 +680,7 @@ public: return arc; } - /*! Trim the arc given its new endpoints. + /*! trims the arc given its new endpoints. * \param ps The new source point. * \param pt The new target point. * \return The new trimmed arc. @@ -730,7 +730,7 @@ public: //@} - /*! Compare two arcs immediately to the leftt of their intersection point. + /*! compares two arcs immediately to the leftt of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -855,7 +855,7 @@ public: return slope_res; } - /*! Compare two arcs immediately to the right of their intersection point. + /*! compares two arcs immediately to the right of their intersection point. * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \param p The reference intersection point. @@ -972,7 +972,7 @@ public: return slope_res; // both are facing down } - /*! Check whether two arcs are equal (have the same graph). + /*! checks whether two arcs are equal (have the same graph). * \param xcv1 The first compared arc. * \param xcv2 The second compared arc. * \return `true` if the two arcs have the same graph; `false` otherwise. @@ -1007,7 +1007,7 @@ public: eq(xcv1.target(), xcv2.source())); } - /*! Check whether it is possible to merge the arc with the given arc. + /*! checks whether it is possible to merge the arc with the given arc. * \param xcv1 The first arc. * \param xcv2 The second arc. * \return `true` if it is possible to merge the two arcs; @@ -1028,7 +1028,7 @@ public: return (eq(xcv1.right(), xcv2.left()) || eq(xcv1.left(), xcv2.right())); } - /*! Merge the current arc with the given arc. + /*! merges the current arc with the given arc. * \param xcv1 The first arc to merge with. * \param xcv2 The second arc to merge with. * \pre The two arcs are mergeable. @@ -1060,7 +1060,7 @@ private: /// \name Auxiliary (private) functions. //@{ - /*! Check whether the given point lies on the supporting conic of the arc. + /*! checks whether the given point lies on the supporting conic of the arc. * \param px The x-coordinate of query point. * \param py The y-coordinate of query point. * \return (true) if p lies on the supporting conic; (false) otherwise. @@ -1078,7 +1078,7 @@ private: } public: - /*! Obtain the i'th order derivative by x of the conic at the point p=(x,y). + /*! obtains the i'th order derivative by x of the conic at the point p=(x,y). * \param p The point where we derive. * \param i The order of the derivatives (either 1, 2 or 3). * \param slope_numer The numerator of the slope. @@ -1187,7 +1187,7 @@ public: CGAL_error(); } - /*! Obtain the i'th order derivative by y of the conic at the point p=(x,y). + /*! obtains the i'th order derivative by y of the conic at the point p=(x,y). * \param p The point where we derive. * \param i The order of the derivatives (either 1, 2 or 3). * \param slope_numer The numerator of the slope. @@ -1297,7 +1297,7 @@ public: } private: - /*! Compute the multiplicity of an intersection point. + /*! computes the multiplicity of an intersection point. * \param arc The arc to intersect with. * \param p The intersection point. * \return The multiplicity of the intersection point. @@ -1348,7 +1348,7 @@ private: }; -/*! Exporter for x-monotone conic arcs. +/*! exports an x-monotone conic arc. */ template std::ostream& operator<<(std::ostream& os, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h index 41564af33a6..d8dd55e7653 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Consolidated_curve_data_aux.h @@ -42,19 +42,19 @@ private: public: - /*! Default constructor. */ + /*! constructs default. */ _Unique_list () : m_list() {} - /*! Construct a singleton list. */ + /*! constructs a singleton list. */ _Unique_list (const Data& data) : m_list () { m_list.push_back (data); } - /*! Go over the data objects in list. */ + /*! traverses the data objects in list. */ const_iterator begin () const { return (m_list.begin()); @@ -65,13 +65,13 @@ public: return (m_list.end()); } - /*! Get the list size. */ + /*! obtains the list size. */ std::size_t size () const { return (m_list.size()); } - /*! Get the first (or last) data object. */ + /*! obtains the first (or last) data object. */ const Data& front () const { return (m_list.front()); @@ -105,8 +105,7 @@ public: return (true); } - /*! - * Find the given data object is contained in the list. + /*! finds the given data object is contained in the list. * \param data The data object. * \return An iterator for the data object, or end() if it is not found. */ @@ -123,8 +122,7 @@ public: return (iter); } - /*! - * Insert an object into the list. + /*! inserts an object into the list. * \param data The data object. * \return (true) if the data object has been successfully inserted; * (false) otherwise (if it already exists). @@ -138,8 +136,7 @@ public: return (true); } - /*! - * Erase an object from the list. + /*! erases an object from the list. * \param data The data object. * \return (true) if the data object has been successfully erased; * (false) otherwise (if it is not in the list). @@ -163,7 +160,7 @@ public: return (false); } - /*! Clear the list. */ + /*! clears the list. */ void clear () { m_list.clear(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h index addc072c217..5f9ca2187bb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polycurve_2.h @@ -53,10 +53,10 @@ public: typedef typename Subcurves_container::size_type Size; typedef typename Subcurves_container::size_type size_type; - /*! Construct default. */ + /*! constructs default. */ Polycurve_2() : m_subcurves() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ Polycurve_2(const Subcurve_type_2& seg) : m_subcurves() { m_subcurves.push_back(seg); } @@ -70,7 +70,7 @@ public: * this class. */ - /*! Construct from a range. The range can be either: + /*! constructs from a range. The range can be either: * * For the sake of backwards compatibility we have to keep the possibility * of construction from a range of points. Therefore, we have to test the @@ -100,7 +100,7 @@ public: construct_polycurve(begin, end, Is_point()); } - /*! Construct a polycurve from a range of subcurves. + /*! constructs a polycurve from a range of subcurves. * \param begin An iterator pointing to the first subcurve in the range. * \param end An iterator pointing after the past-the-end subcurve * in the range. @@ -111,7 +111,7 @@ public: std::false_type) { m_subcurves.assign(begin, end); } - /*! Construct a polycurve from a range of points. + /*! constructs a polycurve from a range of points. * \param begin An iterator pointing to the first point in the range. * \param end An iterator pointing after the last point in the range. * \pre There are at least 2 points in the range. @@ -150,7 +150,7 @@ public: * becomes friendly...) */ - /*! Append a subcurve to the (x-monotone) polycurve. + /*! appends a subcurve to the (x-monotone) polycurve. * Warning: This is a risky function! Don't use it! Prefer the * provided implementation in the traits class. * \param seg The new subcurve to be appended to the polycurve. @@ -160,7 +160,7 @@ public: inline void push_back(const Subcurve_type_2& seg) { this->m_subcurves.push_back(seg); } - /*! Append a subcurve to the (x-monotone) polycurve. + /*! appends a subcurve to the (x-monotone) polycurve. * Warning: This is a risky function! Don't use it! Prefer the * provided implementation in the traits class. * \param seg The new subcurve to be appended to the polycurve. @@ -170,7 +170,7 @@ public: inline void push_front(const Subcurve_type_2& seg) { this->m_subcurves.insert(this->m_subcurves.begin(), seg); } - /*! Append a point to the polycurve. + /*! appends a point to the polycurve. * To properly implemented this function the traits class is needed, * thus it is deprecated. */ @@ -182,7 +182,7 @@ public: m_subcurves.push_back(Subcurve_type_2(ps, pt)); } - /*! Compute the bounding box of the polycurve. + /*! computes the bounding box of the polycurve. * \return The bounding-box. */ Bbox_2 bbox() const @@ -235,14 +235,14 @@ public: { return m_index != std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } public: - /*! Default constructor. */ + /*! constructs default. */ Point_const_iterator() : m_cvP(nullptr), m_num_pts(0), m_index(std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) {} - /*! Dereference operator. + /*! dereferences. * \return The current point. */ const Point_type_2& operator*() const @@ -275,7 +275,7 @@ public: return temp; } - /*! Decrement operators. */ + /*! decrements. */ Point_const_iterator& operator--() { if ((m_cvP != nullptr) && (is_index_valid())) --m_index; @@ -303,39 +303,39 @@ public: typedef Point_const_iterator const_iterator; typedef Point_const_reverse_iterator const_reverse_iterator; - /*! Obtain an iterator for the polycurve points.*/ + /*! obtains an iterator for the polycurve points.*/ Point_const_iterator points_begin() const { if (number_of_subcurves() == 0) return (Point_const_iterator()); else return (Point_const_iterator(this, 0)); } - /*! Obtain an iterator for the polycurve points.*/ + /*! obtains an iterator for the polycurve points.*/ CGAL_DEPRECATED Point_const_iterator begin() const { return points_begin(); } - /*! Obtain a past-the-end iterator for the polycurve points.*/ + /*! obtains a past-the-end iterator for the polycurve points.*/ Point_const_iterator points_end() const { if (number_of_subcurves() == 0) return (Point_const_iterator()); else return (Point_const_iterator(this, number_of_subcurves() + 1)); } - /*! Obtain a past-the-end iterator for the polycurve points.*/ + /*! obtains a past-the-end iterator for the polycurve points.*/ CGAL_DEPRECATED Point_const_iterator end() const { return points_end(); } - /*! Obtain a reverse iterator for the polycurve points. */ + /*! obtains a reverse iterator for the polycurve points. */ Point_const_reverse_iterator points_rbegin() const { return Point_const_reverse_iterator(points_end()); } - /*! Obtain a reverse iterator for the polycurve points. */ + /*! obtains a reverse iterator for the polycurve points. */ CGAL_DEPRECATED Point_const_reverse_iterator rbegin() const { return points_rbegin(); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Point_const_reverse_iterator points_rend() const { return Point_const_reverse_iterator(points_begin()); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ CGAL_DEPRECATED Point_const_reverse_iterator rend() const { return points_rend(); } @@ -345,7 +345,7 @@ public: typedef typename std::reverse_iterator Subcurve_const_reverse_iterator; - /*! Obtain an iterator for the polycurve subcurves. */ + /*! obtains an iterator for the polycurve subcurves. */ Subcurve_const_iterator subcurves_begin() const { return m_subcurves.begin(); } @@ -353,7 +353,7 @@ public: CGAL_DEPRECATED Subcurve_const_iterator begin_subcurves() const { return subcurves_begin(); } - /*! Obtain a past-the-end iterator for the polycurve subcurves. */ + /*! obtains a past-the-end iterator for the polycurve subcurves. */ Subcurve_const_iterator subcurves_end() const { return m_subcurves.end(); } @@ -361,11 +361,11 @@ public: CGAL_DEPRECATED Subcurve_const_iterator end_subcurves() const { return subcurves_end(); } - /*! Obtain a reverse iterator for the polycurve subcurves. */ + /*! obtains a reverse iterator for the polycurve subcurves. */ Subcurve_const_reverse_iterator subcurves_rbegin() const { return (Subcurve_const_reverse_iterator(subcurves_end())); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Subcurve_const_reverse_iterator subcurves_rend() const { return (Subcurve_const_reverse_iterator(subcurves_begin())); } @@ -379,7 +379,7 @@ public: CGAL_DEPRECATED std::size_t points() const { return (number_of_subcurves() == 0) ? 0 : number_of_subcurves() + 1; } - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ size_type number_of_subcurves() const @@ -388,7 +388,7 @@ public: /*! Deprecated! Replaced by number_of_subcurves(). */ CGAL_DEPRECATED size_type size() const { return number_of_subcurves(); } - /*! Obtain the ith subcurve of the polycurve. + /*! obtains the ith subcurve of the polycurve. * \param[in] i The subcurve index(from 0 to size()-1). * \return A const reference to the subcurve. */ @@ -398,7 +398,7 @@ public: return (m_subcurves[i]); } - /*! Clear the polycurve. */ + /*! clears the polycurve. */ inline void clear() { m_subcurves.clear(); } }; @@ -416,13 +416,13 @@ public: typedef Polycurve_2 Base; - /*! Construct default. */ + /*! constructs default. */ X_monotone_polycurve_2() : Base() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ X_monotone_polycurve_2(Subcurve_type_2 seg) : Base(seg) {} - /*! Construct from a range. + /*! constructs from a range. * Similar to the constructor of a general polycurve. * Like in the case of general polycurve, for the sake of backwards * compatibility we have to keep an implementation of construction @@ -437,7 +437,7 @@ public: construct_x_monotone_polycurve(begin, end, Is_point()); } - /*! Construct from a range of subcurves. + /*! constructs from a range of subcurves. * This constructor is expected to be called only from the * traits class, after the input was verified there. * \pre The range of subcurves form an x-monotone polycurve. @@ -447,7 +447,7 @@ public: std::false_type) {} - /*! Construct from a range of points, defining the endpoints of the + /*! constructs from a range of points, defining the endpoints of the * polycurve subcurves. */ template @@ -458,6 +458,7 @@ public: }; } // namespace polycurve + } //namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h index 288ec0166fb..5cf4aabb31f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Polyline_2.h @@ -47,33 +47,33 @@ public: typedef typename Base::Subcurve_const_reverse_iterator Segment_const_reverse_iterator; - /*! Construct default. */ + /*! constructs default. */ Polyline_2() : Base() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ Polyline_2(const Subcurve_type_2& subcurve) : Base(subcurve) {} - /*! Construct from a range. */ + /*! constructs from a range. */ template Polyline_2(InputIterator begin, InputIterator end) : Base(begin, end) {} - /*! Obtain an iterator for the polycurve subcurves. */ + /*! obtains an iterator for the polycurve subcurves. */ Segment_const_iterator begin_segments() const { return this->subcurves_begin(); } - /*! Obtain a past-the-end iterator for the polycurve subcurves. */ + /*! obtains a past-the-end iterator for the polycurve subcurves. */ Segment_const_iterator end_segments() const { return this->subcurves_end(); } - /*! Obtain a reverse iterator for the polycurve subcurves. */ + /*! obtains a reverse iterator for the polycurve subcurves. */ Segment_const_reverse_iterator rbegin_segments() const { return this->subcurves_rbegin(); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Segment_const_reverse_iterator rend_segments() const { return this->subcurves_rend() ; } - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const @@ -96,13 +96,13 @@ public: typedef typename Base::Subcurve_const_reverse_iterator Segment_const_reverse_iterator; - /*! Construct default. */ + /*! constructs default. */ X_monotone_polyline_2() : Base() {} - /*! Construct from a subcurve. */ + /*! constructs from a subcurve. */ X_monotone_polyline_2(Subcurve_type_2 seg) : Base(seg) {} - /*! Construct from a range. + /*! constructs from a range. * Similar to the constructor of a general polycurve. * Like in the case of general polycurve, for the sake of backwards * compatibility we have to keep an implementation of construction @@ -113,23 +113,23 @@ public: Base(begin, end) {} - /*! Obtain an iterator for the polycurve subcurves. */ + /*! obtains an iterator for the polycurve subcurves. */ Segment_const_iterator begin_segments() const { return this->subcurves_begin(); } - /*! Obtain a past-the-end iterator for the polycurve subcurves. */ + /*! obtains a past-the-end iterator for the polycurve subcurves. */ Segment_const_iterator end_segments() const { return this->subcurves_end(); } - /*! Obtain a reverse iterator for the polycurve subcurves. */ + /*! obtains a reverse iterator for the polycurve subcurves. */ Segment_const_reverse_iterator rbegin_segments() const { return this->subcurves_rbegin(); } - /*! Obtain a reverse past-the-end iterator for the polycurve points. */ + /*! obtains a reverse past-the-end iterator for the polycurve points. */ Segment_const_reverse_iterator rend_segments() const { return this->subcurves_rend() ; } - /*! Obtain the number of subcurves that comprise the poyline. + /*! obtains the number of subcurves that comprise the poyline. * \return The number of subcurves. */ Segments_size_type number_of_segments() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h index aea70d5331a..fe37236feb4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h @@ -98,15 +98,13 @@ public: /// \name Construction methods. //@{ - /*! - * Default constructor. + /*! constructs default. */ _Base_rational_arc_2 () : _info (0) {} - /*! - * Constructor of a whole polynomial curve. + /*! constructs a whole polynomial curve. * \param pcoeffs The rational coefficients of the polynomial p(x). */ _Base_rational_arc_2 (const Rat_vector& pcoeffs) : @@ -178,8 +176,7 @@ public: _info = (_info | IS_VALID); } - /*! - * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the + /*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the * ray is directed to the right, or for x_s >= x if it is directed to the * left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -266,8 +263,7 @@ public: _info = (_info | IS_VALID); } - /*! - * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max. + /*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param x_s The x-coordinate of the source point. * \param x_t The x-coordinate of the target point. @@ -313,8 +309,7 @@ public: _info = (_info | IS_VALID); } - /*! - * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x. + /*! constructs a polynomial function, defined by y = p(x)/q(x) for any x. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). */ @@ -368,8 +363,7 @@ public: (IS_CONTINUOUS | IS_VALID) : IS_VALID ) ); } - /*! - * Constructor of a ray of a rational function, defined by y = p(x)/q(x), + /*! constructs a ray of a rational function, defined by y = p(x)/q(x), * for x_s <= x if the ray is directed to the right, or for x_s >= x if it * is directed to the left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -461,8 +455,7 @@ public: (IS_CONTINUOUS | IS_VALID) : IS_VALID ) ); } - /*! - * Constructor of a bounded rational arc, defined by y = p(x)/q(x), + /*! constructs a bounded rational arc, defined by y = p(x)/q(x), * where: x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). @@ -550,19 +543,19 @@ public: /// \name Accessing the arc properties. //@{ - /*! Get the numerator polynomial of the underlying rational function. */ + /*! obtains the numerator polynomial of the underlying rational function. */ const Polynomial& numerator () const { return (_numer); } - /*! Get the denominator polynomial of the underlying rational function. */ + /*! obtains the denominator polynomial of the underlying rational function. */ const Polynomial& denominator () const { return (_denom); } - /*! Check if the x-coordinate of the source point is infinite. */ + /*! checks if the x-coordinate of the source point is infinite. */ Arr_parameter_space source_infinite_in_x () const { return @@ -571,7 +564,7 @@ public: ARR_INTERIOR; } - /*! Check if the y-coordinate of the source point is infinite. */ + /*! checks if the y-coordinate of the source point is infinite. */ Arr_parameter_space source_infinite_in_y () const { return @@ -580,7 +573,7 @@ public: ARR_INTERIOR; } - /*! Check if the x-coordinate of the target point is infinite. */ + /*! checks if the x-coordinate of the target point is infinite. */ Arr_parameter_space target_infinite_in_x () const { return @@ -589,7 +582,7 @@ public: ARR_INTERIOR; } - /*! Check if the y-coordinate of the target point is infinite. */ + /*! checks if the y-coordinate of the target point is infinite. */ Arr_parameter_space target_infinite_in_y () const { return @@ -598,7 +591,7 @@ public: ARR_INTERIOR; } - /*! Get the source point. */ + /*! obtains the source point. */ const Point_2& source () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -607,7 +600,7 @@ public: return (_ps); } - /*! Get the x-coordinate of the source point. */ + /*! obtains the x-coordinate of the source point. */ Algebraic source_x () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -615,7 +608,7 @@ public: return (_ps.x()); } - /*! Get the y-coordinate of the source point. */ + /*! obtains the y-coordinate of the source point. */ Algebraic source_y () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -623,7 +616,7 @@ public: return (_ps.y()); } - /*! Get the target point. */ + /*! obtains the target point. */ const Point_2& target () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -632,7 +625,7 @@ public: return (_pt); } - /*! Get the x-coordinate of the target point. */ + /*! obtains the x-coordinate of the target point. */ Algebraic target_x () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -640,7 +633,7 @@ public: return (_pt.x()); } - /*! Get the y-coordinate of the target point. */ + /*! obtains the y-coordinate of the target point. */ Algebraic target_y () const { CGAL_precondition ((_info & IS_VALID) != 0 && @@ -648,35 +641,35 @@ public: return (_pt.y()); } - /*! Check if the x-coordinate of the left point is infinite. */ + /*! checks if the x-coordinate of the left point is infinite. */ Arr_parameter_space left_infinite_in_x () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? source_infinite_in_x() : target_infinite_in_x(); } - /*! Check if the y-coordinate of the left point is infinite. */ + /*! checks if the y-coordinate of the left point is infinite. */ Arr_parameter_space left_infinite_in_y () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? source_infinite_in_y() : target_infinite_in_y(); } - /*! Check if the x-coordinate of the right point is infinite. */ + /*! checks if the x-coordinate of the right point is infinite. */ Arr_parameter_space right_infinite_in_x () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? target_infinite_in_x() : source_infinite_in_x(); } - /*! Check if the y-coordinate of the right point is infinite. */ + /*! checks if the y-coordinate of the right point is infinite. */ Arr_parameter_space right_infinite_in_y () const { return ((_info & IS_DIRECTED_RIGHT) != 0) ? target_infinite_in_y() : source_infinite_in_y(); } - /*! Get the left endpoint. */ + /*! obtains the left endpoint. */ const Point_2& left () const { CGAL_precondition (left_infinite_in_x() == ARR_INTERIOR && @@ -684,7 +677,7 @@ public: return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt); } - /*! Get the right endpoint. */ + /*! obtains the right endpoint. */ const Point_2& right () const { CGAL_precondition (right_infinite_in_x() == ARR_INTERIOR && @@ -692,19 +685,19 @@ public: return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps); } - /*! Check if the arc is valid. */ + /*! checks if the arc is valid. */ bool is_valid () const { return ((_info & IS_VALID) != 0); } - /*! Check if the arc is continuous. */ + /*! checks if the arc is continuous. */ bool is_continuous () const { return ((_info & IS_CONTINUOUS) != 0); } - /*! Check if the arc is directed right. */ + /*! checks if the arc is directed right. */ bool is_directed_right () const { return ((_info & IS_DIRECTED_RIGHT) != 0); @@ -714,20 +707,19 @@ public: /// \name Modifiers. //@{ - /*! Mark the arc as being continuous. */ + /*! marks the arc as being continuous. */ void set_continuous () { _info = (_info | IS_CONTINUOUS); } - /*! Mark the arc as being invalid. */ + /*! marks the arc as being invalid. */ void set_invalid () { _info = (_info & ~IS_VALID); } - /*! - * Split the arc into two at a given pole. The function returns the sub-arc + /*! splits the arc into two at a given pole. The function returns the sub-arc * to the left of the pole and sets (*this) to be the right sub-arc. * \param x0 The x-coordinate of the pole. * \pre x0 lies in the interior of the arc. @@ -791,8 +783,7 @@ public: /// \name Predicates. //@{ - /*! - * Get the relative position of the point with respect to the rational arc. + /*! obtains the relative position of the point with respect to the rational arc. * \param p The query point. * \pre p is in the x-range of the arc. * \return SMALLER if the point is below the arc; @@ -816,8 +807,7 @@ public: return (CGAL::compare (p.y(), y)); } - /*! - * Compare the x-coordinate of a vertical asymptote of the arc (one of its + /*! compares the x-coordinate of a vertical asymptote of the arc (one of its * ends) and the given point. */ Comparison_result compare_end (const Point_2& p, @@ -852,8 +842,7 @@ public: return ((ce == ARR_MIN_END) ? SMALLER : LARGER); } - /*! - * Compare the x-coordinate of a vertical asymptotes of the two arcs. + /*! compares the x-coordinate of a vertical asymptotes of the two arcs. */ Comparison_result compare_ends (Arr_curve_end ind1, const Self& arc, Arr_curve_end ind2) const @@ -1021,8 +1010,7 @@ public: return (val_res); } - /*! - * Compare the slopes of the arc with another given arc at their given + /*! compares the slopes of the arc with another given arc at their given * intersection point. * \param cv The given arc. * \param p The intersection point. @@ -1106,8 +1094,7 @@ public: return (EQUAL); } - /*! - * Compare the two arcs at x = -oo. + /*! compares the two arcs at x = -oo. * \param arc The given arc. * \pre Both arcs have a left end which is unbounded in x. * \return SMALLER if (*this) lies below the other arc; @@ -1162,8 +1149,7 @@ public: return (flip_res ? SMALLER : LARGER); } - /*! - * Compare the two arcs at x = +oo. + /*! compares the two arcs at x = +oo. * \param arc The given arc. * \pre Both arcs are have a right end which is unbounded in x. * \return SMALLER if (*this) lies below the other arc; @@ -1218,8 +1204,7 @@ public: return (flip_res ? SMALLER : LARGER); } - /*! - * Check whether the two arcs are equal (have the same graph). + /*! checks whether the two arcs are equal (have the same graph). * \param arc The compared arc. * \return (true) if the two arcs have the same graph; (false) otherwise. */ @@ -1276,8 +1261,7 @@ public: return (true); } - /*! - * Check whether it is possible to merge the arc with the given arc. + /*! checks whether it is possible to merge the arc with the given arc. * \param arc The query arc. * \return (true) if it is possible to merge the two arcs; * (false) otherwise. @@ -1311,8 +1295,7 @@ public: /// \name Constructions of points and curves. //@{ - /*! - * Flip the arc (swap its source and target). + /*! flips the arc (swap its source and target). * \return The flipped arc. */ Self flip () const @@ -1341,8 +1324,7 @@ public: return (arc); } - /*! - * Print the rational arc. + /*! prints the rational arc. */ std::ostream& print (std::ostream& os) const { @@ -1386,8 +1368,7 @@ protected: /// \name Auxiliary (protected) functions. //@{ - /*! - * Check if the given x-value is in the x-range of the arc. + /*! checks if the given x-value is in the x-range of the arc. * \param x The x-value. * \param eq_src Output: Is this value equal to the x-coordinate of the * source point. @@ -1470,8 +1451,7 @@ protected: return (true); } - /*! - * Check if the given x-value is in the x-range of the arc, excluding its + /*! checks if the given x-value is in the x-range of the arc, excluding its * open ends. */ bool _is_in_true_x_range (const Algebraic& x) const @@ -1494,8 +1474,7 @@ protected: return (true); } - /*! - * Check if the underlying rational function is the same in the given arc. + /*! checks if the underlying rational function is the same in the given arc. * \param arc The given arc. * \return (true) if arc's underlying rational function is the same * as of *this; (false) otherwise. @@ -1506,8 +1485,7 @@ protected: return (_numer * arc._denom == _denom * arc._numer); } - /*! - * Compute the sign of the given polynomial at x = -oo. + /*! computes the sign of the given polynomial at x = -oo. */ CGAL::Sign _sign_at_minus_infinity (const Polynomial& poly) const { @@ -1531,8 +1509,7 @@ protected: return ((lead_sign == CGAL::POSITIVE) ? CGAL::NEGATIVE : CGAL::POSITIVE); } - /*! - * Compute the sign of the given polynomial at x = +oo. + /*! computes the sign of the given polynomial at x = +oo. */ CGAL::Sign _sign_at_plus_infinity (const Polynomial& poly) const { @@ -1548,8 +1525,7 @@ protected: return (CGAL::sign (nt_traits.get_coefficient (poly, degree))); } - /*! - * Compute infinity type of the rational function P(x)/Q(x) at x = -oo. + /*! computes infinity type of the rational function P(x)/Q(x) at x = -oo. * \param y Output: The value of the horizontal asymptote (if exists). * \return The infinity type for the y-coordinate at x = -oo. */ @@ -1588,8 +1564,7 @@ protected: ((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY); } - /*! - * Compute infinity type of the rational function P(x)/Q(x) at x = +oo. + /*! computes infinity type of the rational function P(x)/Q(x) at x = +oo. * \param y Output: The value of the horizontal asymptote (if exists). * \return The infinity type for the y-coordinate at x = +oo. */ @@ -1625,8 +1600,7 @@ protected: ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY; } - /*! - * Compute all zeros of the denominator polynomial that lie within the + /*! computes all zeros of the denominator polynomial that lie within the * x-range of the arc. */ template @@ -1673,7 +1647,7 @@ protected: return (oi); } - /*! Check whether the arc is continuous. */ + /*! checks whether the arc is continuous. */ bool _is_continuous () { // Compute the roots of the denominator polynomial, and make sure @@ -1687,8 +1661,7 @@ protected: return (q_roots.empty()); } - /*! - * Determine the signs of the rational functions infinitisimally to the left + /*! determines the signs of the rational functions infinitisimally to the left * and to the right of the given pole. * \param x0 The x-coordinate of the pole. * \pre x0 lies in the interior of the arc. @@ -1754,8 +1727,7 @@ protected: return (std::make_pair (sign_left, sign_right)); } - /*! - * Print a polynomial nicely. + /*! prints a polynomial nicely. */ std::ostream& _print_polynomial (std::ostream& os, const Polynomial& poly, @@ -1797,8 +1769,7 @@ protected: //@} }; -/*! - * Exporter for rational arcs. +/*! exports a rational arc. */ template std::ostream& @@ -1836,15 +1807,13 @@ public: /// \name Construction methods. //@{ - /*! - * Default constructor. + /*! constructs default. */ _Continuous_rational_arc_2 () : Base() {} - /*! - * Constructor from a base arc. + /*! constructors from a base arc. */ _Continuous_rational_arc_2 (const Base& arc) : Base (arc) @@ -1852,16 +1821,14 @@ public: CGAL_precondition (arc.is_continuous()); } - /*! - * Constructor of a whole polynomial curve. + /*! constructs a whole polynomial curve. * \param pcoeffs The rational coefficients of the polynomial p(x). */ _Continuous_rational_arc_2 (const Rat_vector& pcoeffs) : Base (pcoeffs) {} - /*! - * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the + /*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the * ray is directed to the right, or for x_s >= x if it is directed to the * left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -1874,8 +1841,7 @@ public: Base (pcoeffs, x_s, dir_right) {} - /*! - * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max. + /*! constructors a polynomial arc, defined by y = p(x), x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param x_s The x-coordinate of the source point. * \param x_t The x-coordinate of the target point. @@ -1886,8 +1852,7 @@ public: Base (pcoeffs, x_s, x_t) {} - /*! - * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x. + /*! constructs a polynomial function, defined by y = p(x)/q(x) for any x. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). * \pre The denominator polynomial q(x) does not have any roots. @@ -1903,8 +1868,7 @@ public: } } - /*! - * Constructor of a ray of a rational function, defined by y = p(x)/q(x), + /*! constructs a ray of a rational function, defined by y = p(x)/q(x), * for x_s <= x if the ray is directed to the right, or for x_s >= x if it * is directed to the left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -1927,8 +1891,7 @@ public: } } - /*! - * Constructor of a bounded rational arc, defined by y = p(x)/q(x), + /*! constructs a bounded rational arc, defined by y = p(x)/q(x), * where: x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). @@ -1954,8 +1917,7 @@ public: /// \name Constructions of points and curves. //@{ - /*! - * Compute the intersections with the given arc. + /*! computes the intersections with the given arc. * \param arc The given intersecting arc. * \param oi The output iterator. * \return The past-the-end iterator. @@ -2148,8 +2110,7 @@ public: return oi; } - /*! - * Split the arc into two at a given split point. + /*! splits the arc into two at a given split point. * \param p The split point. * \param c1 Output: The first resulting arc, lying to the left of p. * \param c2 Output: The first resulting arc, lying to the right of p. @@ -2195,8 +2156,7 @@ public: return; } - /*! - * Merge the current arc with the given arc. + /*! merges the current arc with the given arc. * \param arc The arc to merge with. * \pre The two arcs are mergeable. */ @@ -2349,23 +2309,20 @@ public: /// \name Construction methods. //@{ - /*! - * Default constructor. + /*! constructs default. */ _Rational_arc_2 () : Base() {} - /*! - * Constructor of a whole polynomial curve. + /*! constructs a whole polynomial curve. * \param pcoeffs The rational coefficients of the polynomial p(x). */ _Rational_arc_2 (const Rat_vector& pcoeffs) : Base (pcoeffs) {} - /*! - * Constructor of a polynomial ray, defined by y = p(x), for x_s <= x if the + /*! constructs a polynomial ray, defined by y = p(x), for x_s <= x if the * ray is directed to the right, or for x_s >= x if it is directed to the * left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -2378,8 +2335,7 @@ public: Base (pcoeffs, x_s, dir_right) {} - /*! - * Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max. + /*! constructs a polynomial arc, defined by y = p(x), x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param x_s The x-coordinate of the source point. * \param x_t The x-coordinate of the target point. @@ -2390,8 +2346,7 @@ public: Base (pcoeffs, x_s, x_t) {} - /*! - * Constructor of a polynomial function, defined by y = p(x)/q(x) for any x. + /*! constructs a polynomial function, defined by y = p(x)/q(x) for any x. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). */ @@ -2399,8 +2354,7 @@ public: Base (pcoeffs, qcoeffs) {} - /*! - * Constructor of a ray of a rational function, defined by y = p(x)/q(x), + /*! constructs a ray of a rational function, defined by y = p(x)/q(x), * for x_s <= x if the ray is directed to the right, or for x_s >= x if it * is directed to the left. * \param pcoeffs The rational coefficients of the polynomial p(x). @@ -2414,8 +2368,7 @@ public: Base (pcoeffs, qcoeffs, x_s, dir_right) {} - /*! - * Constructor of a bounded rational arc, defined by y = p(x)/q(x), + /*! constructs a bounded rational arc, defined by y = p(x)/q(x), * where: x_min <= x <= x_max. * \param pcoeffs The rational coefficients of the polynomial p(x). * \param qcoeffs The rational coefficients of the polynomial q(x). @@ -2429,8 +2382,7 @@ public: {} //@} - /*! - * Subdivide the given portion of a rational function into continuous + /*! subdivides the given portion of a rational function into continuous * sub-arcs, splitting it at the roots of the denominator polynomial. * \param oi An output iterator of _Continuous_rational_arc_2 objects. */ @@ -2475,7 +2427,7 @@ public: protected: - /*! Check whether the arc is continuous. */ + /*! checks whether the arc is continuous. */ void _check_continuity () { if (this->_is_continuous()) @@ -2489,6 +2441,6 @@ protected: } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h index 623aa0934e6..bf8792fdac5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h @@ -70,8 +70,7 @@ public: typedef CGAL::Segment_assertions > Segment_assertions; - /*! - * \class Representation of a linear with cached data. + /*! \class Representation of a linear with cached data. */ class _Linear_object_cached_2 { public: @@ -100,7 +99,7 @@ public: public: - /*! Default constructor. + /*! constructs default. */ _Linear_object_cached_2() : has_source(true), @@ -111,7 +110,7 @@ public: is_degen(true) {} - /*! Constructor for segment from two points. + /*! constructs from two points. * \param p1 source point. * \param p2 target point. * \pre The two points must not be equal. @@ -137,7 +136,7 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Constructor from a segment. + /*! constructs from a segment. * \param seg The segment. * \pre The segment is not degenerate. */ @@ -165,7 +164,7 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Constructor from a ray. + /*! constructs from a ray. * \param ray The ray. * \pre The ray is not degenerate. */ @@ -193,7 +192,7 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Constructor from a line. + /*! constructs from a line. * \param ln The line. * \pre The line is not degenerate. */ @@ -221,7 +220,7 @@ public: has_pos_slope = _has_positive_slope(); } - /*! Check whether the \f$x\f$-coordinate of the left point is infinite. + /*! checks whether the \f$x\f$-coordinate of the left point is infinite. * \return `ARR_LEFT_BOUNDARY` if the left point is near the boundary; * `ARR_INTERIOR` if the \f$x\f$-coordinate is finite. */ @@ -234,7 +233,7 @@ public: (has_target ? ARR_INTERIOR : ARR_LEFT_BOUNDARY); } - /*! Check whether the \f$y\f$-coordinate of the left point is infinite. + /*! checks whether the \f$y\f$-coordinate of the left point is infinite. * \return `ARR_BOTTOM_BOUNDARY` if the left point is at \f$y = -\infty\f$; * `ARR_INTERIOR` if the \f$y\f$-coordinate is finite. * `ARR_TOP_BOUNDARY` if the left point is at \f$y = +\infty\f$; @@ -255,11 +254,11 @@ public: return (has_pos_slope ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY); } - /*! Check whether the left point is finite. + /*! checks whether the left point is finite. */ bool has_left() const { return (is_right ? has_source : has_target); } - /*! Obtain the (lexicographically) left endpoint. + /*! obtains the (lexicographically) left endpoint. * \pre The left point is finite. */ const Point_2& left() const @@ -268,7 +267,7 @@ public: return (is_right ? ps : pt); } - /*! Set the (lexicographically) left endpoint. + /*! sets the (lexicographically) left endpoint. * \param p The point to set. * \pre p lies on the supporting line to the left of the right endpoint. */ @@ -293,7 +292,7 @@ public: } } - /*! Set the (lexicographically) left endpoint as infinite. + /*! sets the (lexicographically) left endpoint as infinite. */ void set_left() { @@ -303,7 +302,7 @@ public: else has_target = false; } - /*! Check whether the \f$x\f$-coordinate of the right point is infinite. + /*! checks whether the \f$x\f$-coordinate of the right point is infinite. * \return `ARR_RIGHT_BOUNDARY` if the right point is near the boundary; * `ARR_INTERIOR` if the \f$x\f$-coordinate is finite. */ @@ -316,7 +315,7 @@ public: (has_source ? ARR_INTERIOR : ARR_RIGHT_BOUNDARY); } - /*! Check whether the \f$y\f$-coordinate of the right point is infinite. + /*! checks whether the \f$y\f$-coordinate of the right point is infinite. * \return `ARR_BOTTOM_BOUNDARY` if the right point is at \f$y = -\infty\f$; * `ARR_INTERIOR` if the \f$y\f$-coordinate is finite. * `ARR_TOP_BOUNDARY` if the right point is at \f$y = +\infty\f$; @@ -337,11 +336,11 @@ public: return (has_pos_slope ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY); } - /*! Check whether the right point is finite. + /*! checks whether the right point is finite. */ bool has_right() const { return (is_right ? has_target : has_source); } - /*! Obtain the (lexicographically) right endpoint. + /*! obtains the (lexicographically) right endpoint. * \pre The right endpoint is finite. */ const Point_2& right() const @@ -350,7 +349,7 @@ public: return (is_right ? pt : ps); } - /*! Set the (lexicographically) right endpoint. + /*! sets the (lexicographically) right endpoint. * \param p The point to set. * \pre p lies on the supporting line to the right of the left endpoint. */ @@ -374,7 +373,7 @@ public: } } - /*! Set the (lexicographically) right endpoint as infinite. + /*! sets the (lexicographically) right endpoint as infinite. */ void set_right() { @@ -384,7 +383,7 @@ public: else has_source = false; } - /*! Obtain the supporting line. + /*! obtains the supporting line. */ const Line_2& supp_line() const { @@ -392,7 +391,7 @@ public: return (l); } - /*! Check whether the curve is vertical. + /*! checks whether the curve is vertical. */ bool is_vertical() const { @@ -400,15 +399,15 @@ public: return (is_vert); } - /*! Check whether the curve is degenerate. + /*! checks whether the curve is degenerate. */ bool is_degenerate() const { return (is_degen); } - /*! Check whether the curve is directed lexicographic from left to right + /*! checks whether the curve is directed lexicographic from left to right */ bool is_directed_right() const { return (is_right); } - /*! Check whether the given point is in the \f$x\f$-range of the object. + /*! checks whether the given point is in the \f$x\f$-range of the object. * \param p The query point. * \return (true) is in the \f$x\f$-range of the segment; (false) if it is * not. @@ -447,7 +446,7 @@ public: return (res2 != LARGER); } - /*! Check whether the given point is in the \f$y\f$-range of the object. + /*! checks whether the given point is in the \f$y\f$-range of the object. * \param p The query point. * \pre The object is vertical. * \return (true) is in the \f$y\f$-range of the segment; (false) if it is @@ -480,7 +479,7 @@ public: } private: - /*! Determine if the supporting line has a positive slope. + /*! determines if the supporting line has a positive slope. */ bool _has_positive_slope() const { @@ -503,7 +502,7 @@ public: typedef unsigned int Multiplicity; public: - /*! Default constructor. + /*! constructs default. */ Arr_linear_traits_2() {} @@ -518,7 +517,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -530,7 +529,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the \f$x\f$-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2); @@ -544,13 +543,13 @@ public: } }; - /*! Obtain a `Compare_x_2` functor. */ + /*! obtains a `Compare_x_2` functor. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } /*! A functor that compares the he endpoints of an $x$-monotone curve. */ class Compare_endpoints_xy_2{ public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv The curve. * \return SMALLER if the curve is directed right; @@ -560,7 +559,7 @@ public: { return (xcv.is_directed_right()) ? (SMALLER) : (LARGER); } }; - /*! Obtain a `Compare_endpoints_xy_2` functor. */ + /*! obtains a `Compare_endpoints_xy_2` functor. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } @@ -571,7 +570,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -613,7 +612,7 @@ public: } }; - /*! Obtain a `Trim_2` functor object. */ + /*! obtains a `Trim_2` functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } class Construct_opposite_2{ @@ -623,7 +622,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -652,14 +651,14 @@ public: } }; - /*! Get a Construct_opposite_2 functor object. */ + /*! obtains a Construct_opposite_2 functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(*this); } /*! A functor that compares the \f$x\f$-coordinates of two points */ class Compare_xy_2 { public: - /*! Compare two points lexigoraphically: by \f$x\f$, then by \f$y\f$. + /*! compares two points lexigoraphically: by \f$x\f$, then by \f$y\f$. * \param p1 The first point. * \param p2 The second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -673,13 +672,13 @@ public: } }; - /*! Obtain a `Compare_xy_2` functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } /*! A functor that obtains the left endpoint of a segment or a ray. */ class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of the \f$x\f$-monotone curve (segment). + /*! obtains the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \pre The left end of cv is a valid (bounded) point. * \return The left endpoint. @@ -693,14 +692,14 @@ public: } }; - /*! Obtain a `Construct_min_vertex_2` functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } /*! A functor that obtains the right endpoint of a segment or a ray. */ class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the \f$x\f$-monotone curve (segment). + /*! obtains the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv The curve. * \pre The right end of cv is a valid (bounded) point. * \return The right endpoint. @@ -714,14 +713,14 @@ public: } }; - /*! Obtain a `Construct_max_vertex_2` functor object. */ + /*! obtains a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } /*! A functor that checks whether a given linear curve is vertical. */ class Is_vertical_2 { public: - /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv The curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -732,7 +731,7 @@ public: } }; - /*! Obtain an `Is_vertical_2` functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } /*! A functor that compares the \f$y\f$-coordinates of a point and a line at @@ -745,7 +744,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -757,7 +756,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Obtain the location of the given point with respect to the input curve. + /*! obtains the location of the given point with respect to the input curve. * \param cv The curve. * \param p The point. * \pre p is in the \f$x\f$-range of cv. @@ -787,7 +786,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_2` functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -796,7 +795,7 @@ public: */ class Compare_y_at_x_left_2 { public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the left of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -839,7 +838,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a Compare_y_at_x_left_2 functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(); } @@ -848,7 +847,7 @@ public: */ class Compare_y_at_x_right_2 { public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the right of their intersection point. * \param cv1 The first curve. * \param cv2 The second curve. @@ -889,7 +888,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_right_2` functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(); } @@ -898,7 +897,7 @@ public: */ class Equal_2 { public: - /*! Check whether the two \f$x\f$-monotone curves are the same (have the + /*! checks whether the two \f$x\f$-monotone curves are the same (have the * same graph). * \param cv1 The first curve. * \param cv2 The second curve. @@ -935,7 +934,7 @@ public: (! cv1.has_right() || equal (cv1.right(), cv2.right()))); } - /*! Check whether the two points are the same. + /*! checks whether the two points are the same. * \param p1 The first point. * \param p2 The second point. * \return (true) if the two point are the same; (false) otherwise. @@ -947,7 +946,7 @@ public: } }; - /*! Obtain an `Equal_2` functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(); } //@} @@ -959,7 +958,7 @@ public: */ class Parameter_space_in_x_2 { public: - /*! Obtains the parameter space at the end of a line along the \f$x\f$-axis. + /*! obtains the parameter space at the end of a line along the \f$x\f$-axis. * \param xcv the line * \param ce the line end indicator: * ARR_MIN_END - the minimal end of xc or @@ -979,7 +978,7 @@ public: xcv.left_infinite_in_x() : xcv.right_infinite_in_x(); } - /*! Obtains the parameter space at a point along the \f$x\f$-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * \param p the point. * \return the parameter space at `p`. */ @@ -987,7 +986,7 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a `Parameter_space_in_x_2` function object. */ + /*! obtains a `Parameter_space_in_x_2` function object. */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(); } @@ -996,7 +995,7 @@ public: */ class Parameter_space_in_y_2 { public: - /*! Obtains the parameter space at the end of a line along the \f$y\f$-axis. + /*! obtains the parameter space at the end of a line along the \f$y\f$-axis. * Note that if the line end coincides with a pole, then unless the line * coincides with the identification arc, the line end is considered to * be approaching the boundary, but not on the boundary. @@ -1022,7 +1021,7 @@ public: xcv.left_infinite_in_y() : xcv.right_infinite_in_y(); } - /*! Obtains the parameter space at a point along the \f$y\f$-axis. + /*! obtains the parameter space at a point along the \f$y\f$-axis. * \param p the point. * \return the parameter space at `p`. */ @@ -1030,7 +1029,7 @@ public: { return ARR_INTERIOR; } }; - /*! Obtain a `Parameter_space_in_y_2` function object. */ + /*! obtains a `Parameter_space_in_y_2` function object. */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } @@ -1044,7 +1043,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -1056,7 +1055,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the \f$x\f$-limit of a vertical line at a point with the + /*! compares the \f$x\f$-limit of a vertical line at a point with the * \f$x\f$-limit of a line end on the boundary at \f$y = +/- \infty\f$. * \param p the point direction. * \param xcv the line, the endpoint of which is compared. @@ -1082,7 +1081,7 @@ public: return (kernel.compare_x_at_y_2_object()(p, xcv.supp_line())); } - /*! Compare the \f$x\f$-limits of 2 arcs ends on the boundary of the + /*! compares the \f$x\f$-limits of 2 arcs ends on the boundary of the * parameter space at \f$y = +/- \infty\f$. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - @@ -1104,7 +1103,7 @@ public: Comparison_result operator()(const X_monotone_curve_2 & xcv1, Arr_curve_end /* ce1 */, const X_monotone_curve_2 & xcv2, - Arr_curve_end /*! ce2 */) const + Arr_curve_end /* ce2 */) const { CGAL_precondition(! xcv1.is_degenerate()); CGAL_precondition(! xcv2.is_degenerate()); @@ -1118,7 +1117,7 @@ public: } }; - /*! Obtain a `Compare_x_on_boundary_2` function object. */ + /*! obtains a `Compare_x_on_boundary_2` function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } @@ -1127,7 +1126,7 @@ public: */ class Compare_x_near_boundary_2 { public: - /*! Compare the \f$x\f$-coordinates of 2 arcs ends near the boundary of the + /*! compares the \f$x\f$-coordinates of 2 arcs ends near the boundary of the * parameter space at y\f$ = +/- \infty\f$. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - @@ -1151,7 +1150,7 @@ public: Comparison_result operator()(const X_monotone_curve_2& CGAL_precondition_code(xcv1), const X_monotone_curve_2& CGAL_precondition_code(xcv2), - Arr_curve_end /*! ce2 */) const + Arr_curve_end /* ce2 */) const { CGAL_precondition(! xcv1.is_degenerate()); CGAL_precondition(! xcv2.is_degenerate()); @@ -1161,7 +1160,7 @@ public: } }; - /*! Obtain a `Compare_x_near_boundary_2` function object. */ + /*! obtains a `Compare_x_near_boundary_2` function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(); } @@ -1175,7 +1174,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -1187,7 +1186,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Compare the \f$y\f$-limits of 2 lines at their ends on the boundary + /*! compares the \f$y\f$-limits of 2 lines at their ends on the boundary * of the parameter space at \f$x = +/- \infty\f$. * \param xcv1 the first arc. * \param xcv2 the second arc. @@ -1230,7 +1229,7 @@ public: } }; - /*! Obtain a `Compare_y_near_boundary_2` function object. */ + /*! obtains a `Compare_y_near_boundary_2` function object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1241,9 +1240,9 @@ public: class Make_x_monotone_2 { public: - /*! Cut the given curve into \f$x\f$-monotone subcurves and insert them into - * the given output iterator. As segments are always x_monotone, only one - * object will be contained in the iterator. + /*! cuts the given curve into \f$x\f$-monotone subcurves and insert them + * into the given output iterator. As segments are always x_monotone, only + * one object will be contained in the iterator. * \param cv The curve. * \param oi an output iterator for the result. Its dereference type is a * variant that wraps a \c Point_2 or an \c X_monotone_curve_2 @@ -1261,13 +1260,13 @@ public: } }; - /*! Obtain a `Make_x_monotone_2` functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } class Split_2 { public: - /*! Split a given \f$x\f$-monotone curve at a given point into two + /*! splits a given \f$x\f$-monotone curve at a given point into two * sub-curves. * \param cv The curve to split * \param p The split point. @@ -1300,7 +1299,7 @@ public: } }; - /*! Obtain a `Split_2` functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(); } class Intersect_2 { @@ -1310,7 +1309,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -1318,7 +1317,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two segments may itersect only once, only a * single intersection will be contained in the iterator. * \param cv1 The first curve. @@ -1416,12 +1415,12 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object () const { return Intersect_2(*this); } class Are_mergeable_2 { public: - /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable - if they are supported @@ -1451,7 +1450,7 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object. */ + /*! obtains an Are_mergeable_2 functor object. */ Are_mergeable_2 are_mergeable_2_object () const { return Are_mergeable_2(); } /*! \class Merge_2 @@ -1464,7 +1463,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -1472,7 +1471,7 @@ public: friend class Arr_linear_traits_2; public: - /*! Merge two given \f$x\f$-monotone curves into a single curve (segment). + /*! merges two given \f$x\f$-monotone curves into a single curve (segment). * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -1512,7 +1511,7 @@ public: } }; - /*! Obtain a `Merge_2` functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -1522,7 +1521,7 @@ public: class Approximate_2 { public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -1536,13 +1535,13 @@ public: } }; - /*! Obtain an `Approximate_2` functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(); } //! Functor class Construct_x_monotone_curve_2 { public: - /*! Obtain an \f$x\f$-monotone curve connecting the two given endpoints. + /*! obtains an \f$x\f$-monotone curve connecting the two given endpoints. * \param p The first point. * \param q The second point. * \pre p and q must not be the same. @@ -1557,7 +1556,7 @@ public: } }; - /*! Obtain a `Construct_x_monotone_curve_2` functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(); } //@} @@ -1568,14 +1567,13 @@ public: //! Functor typedef Construct_x_monotone_curve_2 Construct_curve_2; - /*! Obtain a `Construct_curve_2` functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} }; -/*! - * \class A representation of a segment, as used by the Arr_segment_traits_2 +/*! \class A representation of a segment, as used by the Arr_segment_traits_2 * traits-class. */ template @@ -1594,41 +1592,41 @@ public: typedef typename Kernel::Line_2 Line_2; public: - /*! Default constructor. + /*! constructs default. */ Arr_linear_object_2() : Base() {} - /*! Constructor from two points. + /*! constructs from two points. * \param s The source point. * \param t The target point. * \pre The two points must not be the same. */ Arr_linear_object_2(const Point_2& s, const Point_2& t) : Base(s, t) {} - /*! Constructor from a segment. + /*! constructs from a segment. * \param seg The segment. * \pre The segment is not degenerate. */ Arr_linear_object_2(const Segment_2& seg) : Base(seg) {} - /*! Constructor from a ray. + /*! constructs from a ray. * \param ray The segment. * \pre The ray is not degenerate. */ Arr_linear_object_2(const Ray_2& ray) : Base(ray) {} - /*! Constructor from a line. + /*! constructs from a line. * \param line The line. * \pre The line is not degenerate. */ Arr_linear_object_2(const Line_2& line) : Base(line) {} - /*! Check whether the object is actually a segment. + /*! checks whether the object is actually a segment. */ bool is_segment() const { return (! this->is_degen && this->has_source && this->has_target); } - /*! Cast to a segment. + /*! casts to a segment. * \pre The linear object is really a segment. */ Segment_2 segment() const @@ -1640,12 +1638,12 @@ public: return seg; } - /*! Check whether the object is actually a ray. + /*! checks whether the object is actually a ray. */ bool is_ray() const { return (! this->is_degen && (this->has_source != this->has_target)); } - /*! Cast to a ray. + /*! casts to a ray. * \pre The linear object is really a ray. */ Ray_2 ray() const @@ -1660,12 +1658,12 @@ public: return ray; } - /*! Check whether the object is actually a line. + /*! checks whether the object is actually a line. */ bool is_line() const { return (! this->is_degen && ! this->has_source && ! this->has_target); } - /*! Cast to a line. + /*! casts to a line. * \pre The linear object is really a line. */ Line_2 line() const @@ -1674,7 +1672,7 @@ public: return (this->l); } - /*! Get the supporting line. + /*! obtains the supporting line. * \pre The object is not a point. */ const Line_2& supporting_line() const @@ -1683,7 +1681,7 @@ public: return (this->l); } - /*! Get the source point. + /*! obtains the source point. * \pre The object is a point, a segment or a ray. */ const Point_2& source() const @@ -1695,7 +1693,7 @@ public: else return (this->pt); // For a "flipped" ray. } - /*! Get the target point. + /*! obtains the target point. * \pre The object is a point or a segment. */ const Point_2& target() const @@ -1704,7 +1702,7 @@ public: return (this->pt); } - /*! Create a bounding box for the linear object. + /*! creates a bounding box for the linear object. */ Bbox_2 bbox() const { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h index 2d2fa2e609f..b15cf639204 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h @@ -73,9 +73,8 @@ public: typedef Arr_oblivious_side_tag Top_side_category; typedef Arr_oblivious_side_tag Right_side_category; - /*! Default Constructor */ - Arr_non_caching_segment_basic_traits_2() - {} + /*! constructs default */ + Arr_non_caching_segment_basic_traits_2() {} /// \name Types and functor inherited from the kernel //@{ @@ -116,8 +115,7 @@ public: */ class Compare_y_at_x_left_2 { public: - - /* Compare the \f$y\f$-value of two segments immediately to the left of + /* compares the \f$y\f$-value of two segments immediately to the left of * their intersection point. * \param cv1 The first segment. * \param cv2 The second segment. @@ -163,19 +161,16 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const - { - return Compare_y_at_x_left_2(); - } + { return Compare_y_at_x_left_2(); } /*! \class * A functor for comparing two segments to the right of a point. */ class Compare_y_at_x_right_2 { public: - - /*! Compare the \f$y\f$-value of two segments immediately to the right of + /*! compares the \f$y\f$-value of two segments immediately to the right of * their intersection point. * \param cv1 The first segment. * \param cv2 The second segment. @@ -220,11 +215,9 @@ public: } }; - /*! Obtain a `Compare_y_at_x_right_2` functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const - { - return Compare_y_at_x_right_2(); - } + { return Compare_y_at_x_right_2(); } //@} /// \name Functor definitions for the landmarks point-location strategy. @@ -240,7 +233,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -248,7 +241,7 @@ public: friend class Arr_non_caching_segment_basic_traits_2; public: - /*! Return an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p The exact point. * \param i The coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -260,12 +253,12 @@ public: return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, @@ -284,20 +277,18 @@ public: } }; - /*! Get an Approximate_2 functor object. */ + /*! obtains an Approximate_2 functor object. */ Approximate_2 approximate_2_object () const { return Approximate_2(*this); } typedef typename Kernel::Construct_segment_2 Construct_x_monotone_curve_2; - /*! Get a `Construct_x_monotone_curve_2` functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const - { - return (this->construct_segment_2_object()); - } + { return (this->construct_segment_2_object()); } //@} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h index 58acefda211..4029a7be681 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h @@ -52,7 +52,7 @@ public: typedef typename Base::Segment_assertions Segment_assertions; typedef typename Base::Has_exact_division Has_exact_division; - /*! Default constructor */ + /*! constructs default */ Arr_non_caching_segment_traits_2() : Base() {} /// \name Types and functors inherited from the base @@ -118,7 +118,7 @@ public: */ class Make_x_monotone_2 { public: - /*! Subdivide a given curve into x-monotone subcurves and insert them into + /*! subdivides a given curve into x-monotone subcurves and insert them into * a given output iterator. As segments are always x_monotone, only one * x-monotone curve is inserted into the output iterator. * \param cv the segment. @@ -138,7 +138,7 @@ public: } }; - /*! Obtain a Make_x_monotone_2 functor object. */ + /*! obtains a Make_x_monotone_2 functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } @@ -149,7 +149,7 @@ public: typedef Arr_non_caching_segment_traits_2 Self; public: - /*! Split a given x-monotone curve at a given point into two sub-curves. + /*! splits a given x-monotone curve at a given point into two sub-curves. * \param cv The curve to split * \param p The split point. * \param c1 Output: The left resulting subcurve (p is its right endpoint). @@ -189,7 +189,7 @@ public: } }; - /*! Obtain a Split_2 functor object. */ + /*! obtains a Split_2 functor object. */ Split_2 split_2_object() const { return Split_2(); } /*! \class @@ -202,7 +202,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -210,7 +210,7 @@ public: friend class Arr_non_caching_segment_traits_2; public: - /*! Find the intersections of the two given segments and insert them into + /*! finds the intersections of the two given segments and insert them into * the given output iterator. As two segments may itersect only once, only * a single intersection will be contained in the iterator. * \param cv1 The first curve. @@ -264,7 +264,7 @@ public: } }; - /*! Obtain an Intersect_2 functor object. */ + /*! obtains an Intersect_2 functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } /*! \class @@ -277,7 +277,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Are_mergeable_2(const Traits* traits) : m_traits(traits) {} @@ -285,7 +285,7 @@ public: friend class Arr_non_caching_segment_traits_2; public: - /*! Check whether it is possible to merge two given x-monotone curves. + /*! checks whether it is possible to merge two given x-monotone curves. * \param cv1 The first curve. * \param cv2 The second curve. * \return (true) if the two curves are mergeable, that is, if they are @@ -308,7 +308,7 @@ public: } }; - /*! Obtain an Are_mergeable_2 functor object */ + /*! obtains an Are_mergeable_2 functor object */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(this); } @@ -322,7 +322,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits* traits) : m_traits(traits) {} @@ -330,7 +330,7 @@ public: friend class Arr_non_caching_segment_traits_2; public: - /*! Merge two given segments into a single segment. + /*! merges two given segments into a single segment. * \param cv1 The first curve. * \param cv2 The second curve. * \param c Output: The merged curve. @@ -365,7 +365,7 @@ public: } }; - /*! Obtain a Merge_2 functor object */ + /*! obtains a Merge_2 functor object */ Merge_2 merge_2_object() const { return Merge_2(this); } //@} @@ -373,14 +373,13 @@ public: //@{ typedef typename Kernel::Construct_opposite_segment_2 Construct_opposite_2; - /*! Obtain a Construct_opposite_2 functor object */ + /*! obtains a Construct_opposite_2 functor object */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } class Compare_endpoints_xy_2 { public: - /*! - * Compare the two endpoints of a given curve lexigoraphically. + /*! compares the two endpoints of a given curve lexigoraphically. * \param cv The curve. * \return SMALLER if cv is directed from left to right and LARGER * otherwise. @@ -397,7 +396,7 @@ public: } }; - /*! Obtain a Compare_endpoints_xy_2 functor object */ + /*! obtains a Compare_endpoints_xy_2 functor object */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } //@} @@ -408,14 +407,14 @@ public: //! Functor typedef typename Kernel::Construct_segment_2 Construct_curve_2; - /*! Obtain a Construct_curve_2 functor object. */ + /*! obtains a Construct_curve_2 functor object. */ Construct_curve_2 construct_curve_2_object() const { return this->construct_segment_2_object(); } //@} }; -} //namespace CGAL +} // namespace CGAL #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h index b83ca0189e2..2a356de0179 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_batched_point_location_traits_2.h @@ -77,7 +77,7 @@ protected: const Base_traits_2* m_base_traits; public: - /*! Constructor. */ + /*! constructs. */ Arr_batched_point_location_traits_2(const Base_traits_2& tr) : m_base_traits(&tr) {} @@ -184,7 +184,7 @@ public: //! The base operator. Base_construct_min_vertex_2 m_base_min_v; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -197,8 +197,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param xcv The curve. * \return The left endpoint. */ @@ -211,7 +210,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return @@ -224,7 +223,7 @@ public: //! The base operator. Base_construct_max_vertex_2 m_base_max_v; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -237,8 +236,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! - * Get the right endpoint of the x-monotone curve . + /*! obtains the right endpoint of the x-monotone curve . * \param xcv The curve. * \return The right endpoint. */ @@ -251,7 +249,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return @@ -266,7 +264,7 @@ public: Vertex_const_handle invalid_v; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -280,8 +278,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! - * Get the left endpoint of the x-monotone curve (segment). + /*! obtains the left endpoint of the x-monotone curve (segment). * \param xcv The curve. * \return The left endpoint. */ @@ -295,7 +292,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(m_base_traits->compare_xy_2_object()); } @@ -307,7 +304,7 @@ public: //! The base operator. Base_compare_y_at_x_2 m_base_cmp_y_at_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -325,7 +322,7 @@ public: { return (m_base_cmp_y_at_x(p.base(), xcv.base())); } }; - /*! Obtain a Compare_y_at_x_2 function object. */ + /*! obtains a Compare_y_at_x_2 function object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return (Compare_y_at_x_2(m_base_traits->compare_y_at_x_2_object())); } @@ -337,7 +334,7 @@ public: //! The base operator. Base_compare_y_at_x_right_2 m_base_cmp_y_at_x_right; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -356,7 +353,7 @@ public: { return (m_base_cmp_y_at_x_right(xcv1.base(), xcv2.base(), p.base())); } }; - /*! Obtain a Compare_y_at_x_right_2 function object. */ + /*! obtains a Compare_y_at_x_right_2 function object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return (Compare_y_at_x_right_2 @@ -374,7 +371,7 @@ public: Vertex_const_handle invalid_v; Halfedge_const_handle invalid_he; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -389,7 +386,7 @@ public: friend class Arr_batched_point_location_traits_2; public: - /*! Check if two curves are the same. */ + /*! checks if two curves are the same. */ bool operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2) const { @@ -400,7 +397,7 @@ public: return (m_base_eq(xcv1.base(), xcv2.base())); } - /*! Check if the two points are the same. */ + /*! checks if the two points are the same. */ bool operator()(const Point_2& p1, const Point_2& p2) const { if (p1.vertex_handle() == p2.vertex_handle() && @@ -411,7 +408,7 @@ public: } }; - /*! Obtain an `Equal_2` function object. */ + /*! obtains an `Equal_2` function object. */ Equal_2 equal_2_object() const { return (Equal_2(m_base_traits->equal_2_object())); } @@ -421,7 +418,7 @@ public: //! The base operator. Base_compare_x_2 m_base_cmp_x; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -436,7 +433,7 @@ public: { return (m_base_cmp_x(p1.base(), p2.base())); } }; - /*! Obtain a Compare_x_2 function object. */ + /*! obtains a Compare_x_2 function object. */ Compare_x_2 compare_x_2_object() const { return (Compare_x_2(m_base_traits->compare_x_2_object())); } @@ -446,7 +443,7 @@ public: //! The base operator. Base_is_vertical_2 m_base_is_vert; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -461,7 +458,7 @@ public: { return (m_base_is_vert(xcv.base())); } }; - /*! Obtain a Is_vertical_2 function object. */ + /*! obtains a Is_vertical_2 function object. */ Is_vertical_2 is_vertical_2_object() const { return (Is_vertical_2(m_base_traits->is_vertical_2_object())); } @@ -476,7 +473,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -498,7 +495,7 @@ public: { return m_base->parameter_space_in_x_2_object() (xcv.base()); } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(m_base_traits); } @@ -510,7 +507,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -528,7 +525,7 @@ public: { return m_base->is_on_x_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_x_identification_2 function object */ + /*! obtains a Is_on_x_identification_2 function object */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } @@ -540,7 +537,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -574,7 +571,7 @@ public: } }; - /*! Obtain a Compare_y_on_boundary_2 functor object. */ + /*! obtains a Compare_y_on_boundary_2 functor object. */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(m_base_traits); } @@ -586,7 +583,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -610,7 +607,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 functor object. */ + /*! obtains a Compare_y_near_boundary_2 functor object. */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(m_base_traits); } @@ -624,7 +621,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -646,7 +643,7 @@ public: { return m_base->parameter_space_in_y_2_object()(xcv.base()); } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(m_base_traits); } @@ -658,7 +655,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, * constructing it. @@ -676,7 +673,7 @@ public: { return m_base->is_on_y_identification_2_object()(xcv.base()); } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! obtains a Is_on_y_identification_2 function object */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } @@ -688,7 +685,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -722,7 +719,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 functor object. */ + /*! obtains a Compare_x_on_boundary_2 functor object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(m_base_traits); } @@ -734,7 +731,7 @@ public: //! The base traits. const Base_traits_2* m_base; - /*! Constructor. + /*! constructs. * \param tr The base traits class. It must be passed, to handle * non stateless traits (e.g., it stores data). * The constructor is declared private to allow only the functor @@ -757,11 +754,11 @@ public: } }; - /*! Obtain a Compare_x_near_boundary_2 function object. */ + /*! obtains a Compare_x_near_boundary_2 function object. */ Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(m_base_traits); } }; -} //namespace CGAL +} // namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h index c7bd903ee70..f40b9e1edea 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h @@ -98,14 +98,14 @@ public: bool is_empty() const { return nn.is_empty(); } private: - /*! Copy constructor - not supported. */ + /*! Copy constructor not supported. */ Arr_landmarks_generator_base(const Self&); - /*! Assignment operator - not supported. */ + /*! Assignment operator not supported. */ Self& operator=(const Self& ); public: - /*! Constructor from an arrangement. + /*! constructs from an arrangement. * \param arr (in) The arrangement. */ Arr_landmarks_generator_base(const Base_aos& arr) : @@ -120,7 +120,7 @@ public: // inherited class. } - /*! Create the landmarks set (choosing the landmarks) , + /*! creates the landmarks set (choosing the landmarks) , * and saving them in the nearest-neighbor search structure. */ virtual void build_landmark_set() { @@ -136,7 +136,7 @@ public: updated = true; } - /*! clear the set of landmarks. + /*! clears the set of landmarks. */ virtual void clear_landmark_set() { nn.clear(); @@ -144,7 +144,7 @@ public: updated = false; } - /*! Obtain the nearest neighbor (landmark) to the given point. + /*! obtains the nearest neighbor (landmark) to the given point. * \param p The query point. * \param obj Output: The location of the nearest landmark point in the * arrangement (a vertex, halfedge, or face handle). @@ -399,7 +399,7 @@ public: //@} protected: - /*! Create the list of landmarks with their location. + /*! creates the list of landmarks with their location. * This is a pure virtual function, and the class that inherites from * this generator must implement it. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h index 391fb264658..729b3fcc831 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h @@ -171,7 +171,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -352,7 +352,7 @@ public: }; - /*! Obtain a Compare_curve_end_x_2 functor object. */ + /*! obtains a Compare_curve_end_x_2 functor object. */ Compare_curve_end_x_2 compare_curve_end_x_2_object () const { return Compare_curve_end_x_2(this); @@ -371,7 +371,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -481,7 +481,7 @@ public: }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a Compare_y_at_x_2 functor object. */ Compare_curve_end_y_at_x_2 compare_curve_end_y_at_x_2_object () const { return Compare_curve_end_y_at_x_2(this); @@ -498,7 +498,7 @@ public: const Traits* m_traits; const Traits_base* m_traits_base; //MICHAL: rational-upd - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -586,7 +586,7 @@ public: }; - /*! Obtain an Equal_curve_end_2 functor object. */ + /*! obtains an Equal_curve_end_2 functor object. */ Equal_curve_end_2 equal_curve_end_2_object () const { return Equal_curve_end_2(this); @@ -601,7 +601,7 @@ public: /*! The traits (in case it has state) */ const Traits* m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) * The constructor is declared private to allow only the functor * obtaining function, which is a member of the nesting class, @@ -613,8 +613,7 @@ public: friend class Td_traits; public: - /*! - * Compare two edge ends lexigoraphically: by x, then by y. + /*! compares two edge ends lexigoraphically: by x, then by y. * \param cv1, cv1_end The first cv end. * \param cv2, cv2_end The second cv end. * \return LARGER if x(cv1-end) > x(cv2-end), @@ -860,15 +859,12 @@ public: } }; - /*! Obtain a Compare_curve_end_xy_2 functor object. */ + /*! obtains a Compare_curve_end_xy_2 functor object. */ Compare_curve_end_xy_2 compare_curve_end_xy_2_object () const { return Compare_curve_end_xy_2(this); } - - - // Td_traits class ctors and dtor Td_traits(const Traits_base& t) : Traits_base(t) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index f540146b2cb..aef731fa798 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -85,20 +85,20 @@ protected: enum { INVALID_INDEX = 0xffffffff }; public: - /*! Construct default. */ + /*! constructs default. */ Arr_polycurve_basic_traits_2() : m_subcurve_traits(new Subcurve_traits_2()), m_own_traits(true) {} - /*! Construct from a subcurve traits. + /*! constructs from a subcurve traits. * \param seg_traits an already existing subcurve tarits, which is passed in; * it will be used by the class. */ Arr_polycurve_basic_traits_2(const Subcurve_traits_2* geom_traits) : m_subcurve_traits(geom_traits), m_own_traits(false) {} - /*! Construct copy. + /*! constructs copy. * If the 'other' polycurve traits owns its subcurve traits, then make * this polycurve traits own its subcurve traits as well * \param other the other traits. @@ -117,7 +117,7 @@ public: ~Arr_polycurve_basic_traits_2() { if (m_own_traits) delete m_subcurve_traits; } - /*! Obtain the subcurve traits. + /*! obtains the subcurve traits. * \return the subcurve traits. */ const Subcurve_traits_2* subcurve_traits_2() const @@ -147,13 +147,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$x\f$-coordinates of two directional points. + /*! compares the \f$x\f$-coordinates of two directional points. * \param p1 the first directional point. * \param p2 the second directional point. * \return `SMALLER` - \f$x\f$(`p1`) < \f$x\f$(`p2`); @@ -165,7 +165,7 @@ public: Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->compare_x_2_object()(p1, p2); } - /*! Compare two ends of \f$x\f$-monotone curves in \f$x\f$. + /*! compares two ends of \f$x\f$-monotone curves in \f$x\f$. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -177,7 +177,7 @@ public: Arr_curve_end ce1, const Point_2& p2) { return operator()(xs1, ce1, p2, All_sides_oblivious_category()); } - /*! Compare two ends of \f$x\f$-monotone curves in x. + /*! compares two ends of \f$x\f$-monotone curves in x. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -296,7 +296,7 @@ public: } }; - /*! Obtain a Compare_x_2 functor object. */ + /*! obtains a Compare_x_2 functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } //! Compare two curve-ends or points lexigoraphically: by x, then by y. @@ -310,13 +310,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_xy_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare two directional points lexigoraphically: by \f$x\f$, then by + /*! compares two directional points lexigoraphically: by \f$x\f$, then by * \f$y\f$. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. @@ -332,7 +332,7 @@ public: Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p1, p2); } - /*! Compare two ends of \f$x\f$-monotone curves lexicographically. + /*! compares two ends of \f$x\f$-monotone curves lexicographically. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -344,7 +344,7 @@ public: Arr_curve_end ce1, const Point_2& p2) { return operator()(xs1, ce1, p2, All_sides_oblivious_category()); } - /*! Compare two ends of \f$x\f$-monotone curves lexicographically. + /*! compares two ends of \f$x\f$-monotone curves lexicographically. * \param xs1 the first curve. * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve * `xs1`: @@ -517,7 +517,7 @@ public: } }; - /*! Obtain a Compare_xy_2 functor object. */ + /*! obtains a Compare_xy_2 functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } /*! A functor that obtain the lexicographically smallest endpoint of an @@ -533,13 +533,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /* Constructor. */ + /*! constructs. */ Construct_min_vertex_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain the left endpoint of the \f$x\f$-monotone polycurve. The return + /*! obtains the left endpoint of the \f$x\f$-monotone polycurve. The return * type is the same as the return type of the corresponding operator in the * functor of the subtraits, which is either by value or by reference. * \param xcv the polycurve curve. @@ -561,7 +561,7 @@ public: } }; - /*! Obtain a Construct_min_vertex_2 functor object. */ + /*! obtains a Construct_min_vertex_2 functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(*this); } @@ -578,13 +578,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Construct_max_vertex_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain the right endpoint of the \f$x\f$-monotone polycurve. The return + /*! obtains the right endpoint of the \f$x\f$-monotone polycurve. The return * type is the same as the return type of the corresponding operator in the * functor of the subtraits, which is either by value or by reference. * \param xcv the polycurve. @@ -603,7 +603,7 @@ public: } }; - /*! Obtain a Construct_max_vertex_2 functor object. */ + /*! obtains a Construct_max_vertex_2 functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(*this); } @@ -618,13 +618,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Is_vertical_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv the curve. * \return `true` if the curve is a vertical segment; `false` otherwise. */ @@ -637,7 +637,7 @@ public: } }; - /*! Obtain an Is_vertical_2 functor object. */ + /*! obtains an Is_vertical_2 functor object. */ Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(*this); } /*! A functor that compares the \f$y\f$-coordinates of a point and an @@ -762,13 +762,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain the location of the given point with respect to the input curve. + /*! obtains the location of the given point with respect to the input curve. * \param p the point. * \param xcv the polycurve curve. * \pre `p` is in the \f$x\f$-range of `xcv`. @@ -781,7 +781,7 @@ public: const X_monotone_curve_2& xcv) const { return operator()(p, xcv, All_sides_oblivious_category()); } - /*! Obtain the location of the given curve_end with respect to the input + /*! obtains the location of the given curve_end with respect to the input * curve. * \param xcv The polycurve curve. * \param ce the curve-end indicator of the \f$x\f$-monotone subcurve xl: @@ -801,7 +801,7 @@ public: { return operator()(xs1, ce1, xs2, All_sides_oblivious_category()); } }; - /*! Obtain a Compare_y_at_x_2 functor object. */ + /*! obtains a Compare_y_at_x_2 functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -818,13 +818,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_left_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the y value of two \f$x\f$-monotone curves immediately to the + /*! compares the y value of two \f$x\f$-monotone curves immediately to the * left of their intersection point. * \param cv1 the first polycurve curve. * \param cv2 the second polycurve curve. @@ -851,7 +851,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_left_2 functor object. */ + /*! obtains a Compare_y_at_x_left_2 functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -868,13 +868,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_at_x_right_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the right of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. @@ -901,7 +901,7 @@ public: } }; - /*! Obtain a Compare_y_at_x_right_2 functor object. + /*! obtains a Compare_y_at_x_right_2 functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -919,11 +919,11 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Equal_2(const Polycurve_basic_traits_2& poly_tr) : m_poly_traits(poly_tr) {} public: - /*! Check whether the two points are the same. + /*! checks whether the two points are the same. * \param p1 the first point. * \param p2 the second point. * \return `true` if the two point are the same; `false` otherwise. @@ -931,7 +931,7 @@ public: bool operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->equal_2_object()(p1, p2); } - /*! Check whether the two \f$x\f$-monotone curves are the same (have the + /*! checks whether the two \f$x\f$-monotone curves are the same (have the * same graph). * \param cv1 the first curve. * \param cv2 the second curve. @@ -1008,7 +1008,7 @@ public: } }; - /*! Obtain an Equal_2 functor object. */ + /*! obtains an Equal_2 functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } /*! A functor that lexicographically compares the endpoints of a curve. */ @@ -1022,13 +1022,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_endpoints_xy_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the endpoints of an \(x\)-monotone curve lexicographically. + /*! compares the endpoints of an \(x\)-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv the curve. * \return `SMALLER` if `cv` is oriented left-to-right; @@ -1062,13 +1062,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor */ + /*! constructs */ Construct_opposite_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Construct the reversed \f$x\f$-monotone polycurve of the input. + /*! constructs the reversed \f$x\f$-monotone polycurve of the input. * Note that the functor constructs the opposites of _all_ subcurves * constituting `xcv`. * \param xcv the \f$x\f$-monotone polycurve to be reveres @@ -1132,7 +1132,7 @@ public: using Approximate_point_2 = typename has_approximate_2::Approximate_point_2; - /*! Obtain an Approximate_2 functor object. */ + /*! obtains an Approximate_2 functor object. */ Approximate_2 approximate_2_object_impl(std::false_type) const { return subcurve_traits_2()->approximate_2_object(); } @@ -1152,7 +1152,7 @@ public: //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - /*! Constructor. */ + /*! constructs. */ Construct_point_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} @@ -1160,7 +1160,7 @@ public: friend class Arr_polycurve_basic_traits_2; public: - /*! Construct a point. + /*! constructs a point. * Apply perfect forwarding. */ template @@ -1171,7 +1171,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_point_2 construct_point_2_object() const { return Construct_point_2(*this); } @@ -1186,13 +1186,14 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Construct_x_monotone_curve_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtain an \f$x\f$-monotone polycurve that consists of one given subcurve. + /*! obtains an \f$x\f$-monotone polycurve that consists of one given + * subcurve. * \param seg input subcurve. * \pre seg is not degenerated. * \return an \f$x\f$-monotone polycurve with one subcurve. @@ -1223,7 +1224,7 @@ public: return X_monotone_curve_2(seg); } - /*! Construct an \f$x\f$-monotone polycurve, which is well-oriented, from a + /*! constructs an \f$x\f$-monotone polycurve, which is well-oriented, from a * range of elements. * \pre the elements in the range should form a continuous well-oriented * \f$x\f$-monotone polycurve. @@ -1238,7 +1239,7 @@ public: return constructor_impl(begin, end, Is_point()); } - /*! Construct an \f$x\f$-monotone polycurve from a range of points. + /*! constructs an \f$x\f$-monotone polycurve from a range of points. * The polycurve may be oriented left-to-right or right-to-left * depending on the lexicographical order of the points in the input. * \pre range contains at least two points. @@ -1253,7 +1254,7 @@ public: std::true_type) const { CGAL_error_msg("Cannot construct a polycurve from a range of points!"); } - /*! Obtain an \f$x\f$-monotone polycurve from a range of subcurves. + /*! obtains an \f$x\f$-monotone polycurve from a range of subcurves. * \param begin An iterator pointing to the first subcurve in the range. * \param end An iterator pointing to the past-the-end subcurve * in the range. @@ -1345,7 +1346,7 @@ public: } }; - /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + /*! obtains a Construct_x_monotone_curve_2 functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } @@ -1368,13 +1369,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Parameter_space_in_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtains the parameter space at the end of a curve along the + /*! obtains the parameter space at the end of a curve along the * \f$x\f$-axis. Note that if the curve-end coincides with a pole, then * unless the curve coincides with the identification curve, the curve-end * is considered to be approaching the boundary, but not on the boundary. @@ -1405,7 +1406,7 @@ public: return geom_traits->parameter_space_in_x_2_object()(xs, ce); } - /*! Obtains the parameter space at a point along the \f$x\f$-axis. + /*! obtains the parameter space at a point along the \f$x\f$-axis. * \param p the point. * \return the parameter space at `p`. * \pre `p` does not lie on the vertical identification curve. @@ -1416,7 +1417,7 @@ public: } }; - /*! Obtain a Parameter_space_in_x_2 function object */ + /*! obtains a Parameter_space_in_x_2 function object */ Parameter_space_in_x_2 parameter_space_in_x_2_object() const { return Parameter_space_in_x_2(*this); } @@ -1433,13 +1434,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Parameter_space_in_y_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Obtains the parameter space at the end of an curve along the + /*! obtains the parameter space at the end of an curve along the * \f$y\f$-axis. Note that if the curve-end coincides with a pole, then * unless the curve coincides with the identification curve, the curve-end * is considered to be approaching the boundary, but not on the boundary. @@ -1470,7 +1471,7 @@ public: return geom_traits->parameter_space_in_y_2_object()(xs, ce); } - /*! Obtains the parameter space at a point along the \f$y\f$-axis. + /*! obtains the parameter space at a point along the \f$y\f$-axis. * \param p the point. * \return the parameter space at `p`. * \pre p does not lie on the horizontal identification curve. @@ -1482,7 +1483,7 @@ public: } }; - /*! Obtain a Parameter_space_in_y_2 function object */ + /*! obtains a Parameter_space_in_y_2 function object */ Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(*this); } @@ -1499,13 +1500,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_x_on_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate + /*! compares the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate * of an \f$x\f$-curve-end on the boundary. * \param point the point. * \param xcv the \f$x\f$-monotone curve, the endpoint of which is compared. @@ -1525,7 +1526,7 @@ public: Arr_curve_end ce) const { return operator()(point, xcv, ce, Bottom_or_top_sides_category()); } - /*! Compare the \f$x\f$-coordinates of 2 curve-ends on the boundary of the + /*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary of the * parameter space. * \param xcv1 the first curve. * \param ce1 the first curve-end indicator: @@ -1553,7 +1554,7 @@ public: { return operator()(xcv1, ce1, xcv2, ce2, Bottom_or_top_sides_category()); } private: - /*! \brief compares the \f$x\f$-coordinates of a point with the + /*! compares the \f$x\f$-coordinates of a point with the * \f$x\f$-coordinate of an \f$x\f$-monotone curve-end on the boundary. */ Comparison_result operator()(const Point_2& point, @@ -1570,7 +1571,7 @@ public: return geom_traits->compare_x_on_boundary_2_object()(point, xs, ce); } - /*! \brief compares the \f$x\f$-coordinates of 2 curve-ends on the boundary + /*! compares the \f$x\f$-coordinates of 2 curve-ends on the boundary * of the parameter space. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, @@ -1597,13 +1598,12 @@ public: const Arr_curve_end ce) const { return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; } - /*! Given a point \f$p\f$, an x-monotone curve \f$C(t) = (X(t),Y(t))\f$, - * and an enumerator that specifies either the minimum end or the - * maximum end of the curve, and thus maps to a parameter value - * \f$d \in \{0,1\}\f$, compare x_p and limit{t => d} X(t). - * If the parameter space is unbounded, a precondition ensures that \f$C\f$ - * has a vertical asymptote at its \f$d\f$-end; that is - * limit{t => d} X(t) is finite. + /*! given a point \f$p\f$, an \f$x\f$-monotone curve \f$C(t) = + * (X(t),Y(t))\f$, and an enumerator that specifies either the minimum end + * or the maximum end of the curve, and thus maps to a parameter value \f$d + * \in \{0,1\}\f$, compares x_p and limit{t => d} X(t). If the parameter + * space is unbounded, a precondition ensures that \f$C\f$ has a vertical + * asymptote at its \f$d\f$-end; that is limit{t => d} X(t) is finite. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xcv, @@ -1616,7 +1616,7 @@ public: return cmp_x_on_boundary(p, xcv[index], ce); } - /*! Given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and + /*! given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and * \f$C2_(t) = (X_2(t),Y_2(t))\f$ and two enumerators that specify either * the minimum ends or the maximum ends of the curves, and thus map to * parameter values \f$d_1 \in \{0,1\}\f$ and \f$d_2 \in \{0,1\}\f$ for @@ -1624,7 +1624,7 @@ public: * limit{t => d1} X1(t) and limit{t => d2} X2(t). * If the parameter space is unbounded, a precondition ensures that * \f$C_1\f$ and \f$C_2\f$ have vertical asymptotes at their respective - * ends; that is, limit{t => d1} X1(t) and limit{t =? d2} X2(t) are finite. + * ends; that is, limit{t => d1} X1(t) and limit{t => d2} X2(t) are finite. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1/* for xcv1 */, @@ -1649,7 +1649,7 @@ public: } }; - /*! Obtain a Compare_x_on_boundary_2 function object. */ + /*! obtains a Compare_x_on_boundary_2 function object. */ Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } @@ -1703,13 +1703,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_on_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$y\f$-coordinate of two given points that lie on the + /*! compares the \f$y\f$-coordinate of two given points that lie on the * vertical identification curve. * \param p1 the first point. * \param p2 the second point. @@ -1725,7 +1725,7 @@ public: } }; - /*! Obtain a Compare_y_on_boundary_2 function object */ + /*! obtains a Compare_y_on_boundary_2 function object */ Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(*this); } @@ -1742,13 +1742,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Compare_y_near_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Compare the \f$y\f$-coordinates of 2 curves at their ends near the + /*! compares the \f$y\f$-coordinates of 2 curves at their ends near the * boundary of the parameter space. * \param xcv1 the first curve. * \param xcv2 the second curve. @@ -1780,7 +1780,7 @@ public: } }; - /*! Obtain a Compare_y_near_boundary_2 function object */ + /*! obtains a Compare_y_near_boundary_2 function object */ Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(*this); } @@ -1797,13 +1797,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Is_on_y_identification_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Determine whether a point lies in the vertical boundary. + /*! determines whether a point lies in the vertical boundary. * \param p the point. * \return a Boolean indicating whether `p` lies in the vertical boundary. */ @@ -1812,7 +1812,7 @@ public: return geom_traits->is_on_y_identification_2_object()(p); } - /*! Determine whether an \f$x\f$-monotone curve lies in the vertical + /*! determines whether an \f$x\f$-monotone curve lies in the vertical * boundary. * \param xcv the \f$x\f$-monotone curve. * \return a Boolean indicating whether `xcv` lies in the vertical boundary. @@ -1825,7 +1825,7 @@ public: } }; - /*! Obtain a Is_on_y_identification_2 function object */ + /*! obtains a Is_on_y_identification_2 function object */ Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(*this); } @@ -1842,13 +1842,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Is_on_x_identification_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Determine whether a point lies in the vertical boundary. + /*! determines whether a point lies in the vertical boundary. * \param p the point. * \return a Boolean indicating whether `p` lies in the vertical boundary. */ @@ -1857,7 +1857,7 @@ public: return geom_traits->is_on_x_identification_2_object()(p); } - /*! Determine whether an \f$x\f$-monotone curve lies in the vertical + /*! determines whether an \f$x\f$-monotone curve lies in the vertical * boundary. * \param `xcv` the \f$x\f$-monotone curve. * \return a Boolean indicating whether `xcv` lies in the vertical boundary. @@ -1870,7 +1870,7 @@ public: } }; - /*! Obtain a Is_on_x_identification_2 function object */ + /*! obtains a Is_on_x_identification_2 function object */ Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(*this); } @@ -1906,13 +1906,13 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Push_back_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! Append a subcurve to an existing \f$x\f$-monotone polycurve at the back. + /*! appends a subcurve to an existing \f$x\f$-monotone polycurve at the back. */ void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg) const @@ -2071,7 +2071,7 @@ public: } }; - /*! Obtain a Push_back_2 functor object. */ + /*! obtains a Push_back_2 functor object. */ Push_back_2 push_back_2_object() const { return Push_back_2(*this); } /* Functor to augment a polycurve by adding a subcurve at the front. @@ -2087,7 +2087,7 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Push_front_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} @@ -2225,7 +2225,7 @@ public: } }; - /*! Obtain a Push_front_2 functor object. */ + /*! obtains a Push_front_2 functor object. */ Push_front_2 push_front_2_object() const { return Push_front_2(*this); } //! A functor that trimps an \f$x\f$-monotone curve. @@ -2239,11 +2239,11 @@ public: friend class Arr_polycurve_basic_traits_2; - /*! Constructor. */ + /*! constructs. */ Trim_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} public: - /*! \brief returns a trimmed version of the polycurve with `source` and + /*! returns a trimmed version of the polycurve with `source` and * `target` as end points. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, @@ -2339,7 +2339,7 @@ public: } }; - /*! Obtain a Trim_2 functor object. */ + /*! obtains a Trim_2 functor object. */ Trim_2 trim_2_object() const { return Trim_2(*this); } ///@} @@ -2349,7 +2349,7 @@ protected: * Roadmap: locate() should return an iterator to the located subcurve */ - /*! Obtain the index of the subcurve in the polycurve that contains a point + /*! obtains the index of the subcurve in the polycurve that contains a point * \f$q\f$ in its \f$x\f$-range. The function performs a binary search, so if * the point \f$q\f$ is in the \f$x\f$-range of the polycurve with \f$n\f$ * subcurves, the subcurve containing it can be located in \cgalBigO{log n} @@ -2491,7 +2491,7 @@ protected: { return m_compare(xs, ce, m_x_monotone_subcurve, m_curve_end); } }; - /*! Locate the index of a curve in a polycurve that contains an endpoint + /*! locates the index of a curve in a polycurve that contains an endpoint * of a curve. * This implementation is used in the case where at least one side of the * parameter space is not oblivious. @@ -2521,7 +2521,7 @@ protected: return locate_gen(xcv, compare); } - /*! Locate the index of a curve in a polycurve that contains an endpoint + /*! locates the index of a curve in a polycurve that contains an endpoint * of a curve. * This implementation is used in the case where all sides of the parameter * space is oblivious. @@ -2540,7 +2540,7 @@ protected: return locate(xcv, p); } - /*! Locate the index of a curve in a polycurve that contains a point. + /*! locates the index of a curve in a polycurve that contains a point. * This implementation is used in the case where at least one side of the * parameter space is not oblivious. * \param(in) xcv the given polycurve. @@ -2567,7 +2567,7 @@ protected: return locate_gen(xcv, compare); } - /*! Locate the index of a curve in a polycurve that contains a point. + /*! locates the index of a curve in a polycurve that contains a point. * This implementation is used in the case where all sides of the parameter * space are oblivious. * \param(in) xcv the given polycurve. @@ -2599,7 +2599,7 @@ protected: return locate_gen(xcv, compare); } - /*! Find the index of the subcurve in the polycurve that is defined to the + /*! finds the index of the subcurve in the polycurve that is defined to the * left (or to the right) of the point `q`. * \param cv the polycurve curve. * \param q the point. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index 287c4ea0967..0e2d4819b1b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -96,23 +96,23 @@ public: /// \name Creation //@{ - /*! Construct default. */ + /*! constructs default. */ _Segment_cached_2(); - /*! Construct a segment from a Kernel segment. + /*! constructs a segment from a Kernel segment. * \param seg the segment. * \pre the segment is not degenerate. */ _Segment_cached_2(const Segment_2& seg); - /*! Construct a segment from two endpoints. + /*! constructs a segment from two endpoints. * \param source the source point. * \param target the target point. * \param `source` and `target` are not equal. */ _Segment_cached_2(const Point_2& source, const Point_2& target); - /*! Construct a segment from two endpoints on a supporting line. + /*! constructs a segment from two endpoints on a supporting line. * \param line the supporting line. * \param source the source point. * \param target the target point. @@ -121,7 +121,7 @@ public: _Segment_cached_2(const Line_2& line, const Point_2& source, const Point_2& target); - /*! Construct a segment from all fields. + /*! constructs a segment from all fields. * \param line the supporting line. * \param source the source point. * \param target the target point. @@ -133,7 +133,7 @@ public: const Point_2& source, const Point_2& target, bool is_directed_right, bool is_vert, bool is_degen); - /*! Assign. + /*! assigns. * \param seg the source segment to copy from * \pre the segment is not degenerate. */ @@ -144,44 +144,44 @@ public: /// \name Accessors //@{ - /*! Obtain the supporting line. + /*! obtains the supporting line. * \return the supporting line. */ const Line_2& line() const; - /*! Obtain the segment source. + /*! obtains the segment source. * \return the segment source. */ const Point_2& source() const; - /*! Obtain the segment target. + /*! obtains the segment target. * \return the segment target. */ const Point_2& target() const; - /*! Determine whether the curve is vertical. + /*! determines whether the curve is vertical. * \return a Boolean flag indicating whether the curve is vertical. */ bool is_vertical() const; - /*! Determine whether the curve is degenerate. + /*! determines whether the curve is degenerate. * return a Boolean flag indicating whether the curve is degenerate. */ bool is_degenerate() const; - /*! Determine whether the curve is lexicographically directed from left to + /*! determines whether the curve is lexicographically directed from left to * right. * \return a Boolean flag indicating whether the curve is lexicographically * directed from left to right. */ bool is_directed_right() const; - /*! Obtain the (lexicographically) left endpoint. + /*! obtains the (lexicographically) left endpoint. * \return the (lexicographically) left endpoint. */ const Point_2& left() const; - /*! Obtain the (lexicographically) right endpoint. + /*! obtains the (lexicographically) right endpoint. * \return the (lexicographically) right endpoint. */ const Point_2& right() const; @@ -191,13 +191,13 @@ public: /// \name Modifiers //@{ - /*! Set the (lexicographically) left endpoint. + /*! sets the (lexicographically) left endpoint. * \param p the point to set. * \pre p lies on the supporting line to the left of the right endpoint. */ void set_left(const Point_2& p); - /*! Set the (lexicographically) right endpoint. + /*! sets the (lexicographically) right endpoint. * \param p the point to set. * \pre p lies on the supporting line to the right of the left endpoint. */ @@ -208,14 +208,15 @@ public: /// \name Deprecated //@{ - /*! Determine whether the given point is in the \f$x\f$-range of the segment. + /*! determine whether the given point is in the \f$x\f$-range of the segment. * \param p the query point. * \return (true) is in the \f$x\f$-range of the segment; (false) if it is * not. */ CGAL_DEPRECATED bool is_in_x_range(const Point_2& p) const; - /*! Determine whether the given point is in the \f$y\f$-range of the segment. + /*! determines whether the given point is in the \f$y\f$-range of the + * segment. * \param p the query point. * \return (true) is in the \f$y\f$-range of the segment; (false) if it is * not. @@ -233,7 +234,7 @@ public: typedef unsigned int Multiplicity; public: - /*! Construct default. */ + /*! constructs default. */ Arr_segment_traits_2() {} /// \name Basic functor definitions. @@ -246,7 +247,7 @@ public: //! The traits (in case it has state). const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_x_2(const Traits& traits) : m_traits(traits) {} @@ -254,7 +255,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the \f$x\f$-coordinates of two points. + /*! compares the \f$x\f$-coordinates of two points. * \param p1 the first point. * \param p2 the second point. * \return `LARGER` if x(p1) > x(p2); @@ -268,7 +269,7 @@ public: } }; - /*! Obtain a `Compare_x_2` functor object. */ + /*! obtains a `Compare_x_2` functor object. */ Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } class Compare_xy_2 { @@ -278,7 +279,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_xy_2(const Traits& traits) : m_traits(traits) {} @@ -286,7 +287,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare two points lexicographically: by x, then by y. + /*! compares two points lexicographically: by x, then by y. * \param p1 the first point. * \param p2 the second point. * \return LARGER if x(p1) > x(p2), or if x(p1) = x(p2) and y(p1) > y(p2); @@ -300,12 +301,12 @@ public: } }; - /*! Obtain a `Compare_xy_2` functor object. */ + /*! obtains a `Compare_xy_2` functor object. */ Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } class Construct_min_vertex_2 { public: - /*! Obtain the left endpoint of the \f$x\f$-monotone curve (segment). + /*! obtains the left endpoint of the \f$x\f$-monotone curve (segment). * \param cv the curve. * \return the left endpoint. */ @@ -313,13 +314,13 @@ public: { return (cv.left()); } }; - /*! Obtain a `Construct_min_vertex_2` functor object. */ + /*! obtains a `Construct_min_vertex_2` functor object. */ Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } class Construct_max_vertex_2 { public: - /*! Obtain the right endpoint of the \f$x\f$-monotone curve (segment). + /*! obtains the right endpoint of the \f$x\f$-monotone curve (segment). * \param cv the curve. * \return the right endpoint. */ @@ -327,13 +328,13 @@ public: { return (cv.right()); } }; - /*! Obtain a `Construct_max_vertex_2` functor object. */ + /*! obtains a `Construct_max_vertex_2` functor object. */ Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } class Is_vertical_2 { public: - /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. + /*! checks whether the given \f$x\f$-monotone curve is a vertical segment. * \param cv the curve. * \return (true) if the curve is a vertical segment; (false) otherwise. */ @@ -341,17 +342,17 @@ public: { return (cv.is_vertical()); } }; - /*! Obtain an `Is_vertical_2` functor object. */ + /*! obtains an `Is_vertical_2` functor object. */ Is_vertical_2 is_vertical_2_object () const { return Is_vertical_2(); } class Compare_y_at_x_2 { protected: typedef Arr_segment_traits_2 Traits; - /*! the traits (in case it has state) */ + /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_2(const Traits& traits) : m_traits(traits) {} @@ -359,7 +360,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Return the location of the given point with respect to the input curve. + /*! returns the location of the given point with respect to the input curve. * \param cv the curve. * \param p the point. * \pre `p` is in the \f$x\f$-range of `cv`. @@ -389,7 +390,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_2` functor object. */ + /*! obtains a `Compare_y_at_x_2` functor object. */ Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } @@ -400,7 +401,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_left_2(const Traits& traits) : m_traits(traits) {} @@ -408,7 +409,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the left of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. @@ -443,7 +444,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_left_2` functor object. */ + /*! obtains a `Compare_y_at_x_left_2` functor object. */ Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } @@ -454,7 +455,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Compare_y_at_x_right_2(const Traits& traits) : m_traits(traits) {} @@ -462,7 +463,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + /*! compares the \f$y\f$-value of two \f$x\f$-monotone curves immediately to * the right of their intersection point. * \param cv1 the first curve. * \param cv2 the second curve. @@ -495,7 +496,7 @@ public: } }; - /*! Obtain a `Compare_y_at_x_right_2` functor object. */ + /*! obtains a `Compare_y_at_x_right_2` functor object. */ Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } @@ -506,7 +507,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Equal_2(const Traits& traits) : m_traits(traits) {} @@ -514,7 +515,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Check whether the two \f$x\f$-monotone curves are the same (have the + /*! checks whether the two \f$x\f$-monotone curves are the same (have the * same graph). * \param cv1 the first curve. * \param cv2 the second curve. @@ -530,7 +531,7 @@ public: equal(cv1.right(), cv2.right())); } - /*! Determine whether the two points are the same. + /*! determines whether the two points are the same. * \param p1 the first point. * \param p2 the second point. * \return (true) if the two point are the same; (false) otherwise. @@ -542,7 +543,7 @@ public: } }; - /*! Obtain an `Equal_2` functor object. */ + /*! obtains an `Equal_2` functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } //@} @@ -555,7 +556,7 @@ public: */ class Make_x_monotone_2 { public: - /*! Subdivide a given curve into \f$x\f$-monotone subcurves and insert them + /*! subdivides a given curve into \f$x\f$-monotone subcurves and insert them * into a given output iterator. As segments are always \f$x\f$_monotone a * single object is inserted. * \param cv the curve. @@ -575,7 +576,7 @@ public: } }; - /*! Obtain a `Make_x_monotone_2` functor object. */ + /*! obtains a `Make_x_monotone_2` functor object. */ Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } @@ -586,7 +587,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Split_2(const Traits& traits) : m_traits(traits) {} @@ -594,7 +595,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Split a given \f$x\f$-monotone curve at a given point into two + /*! split a given \f$x\f$-monotone curve at a given point into two * sub-curves. * \param cv the curve to split * \param p the split point. @@ -622,7 +623,7 @@ public: } }; - /*! Obtain a `Split_2` functor object. */ + /*! obtains a `Split_2` functor object. */ Split_2 split_2_object() const { return Split_2(*this); } class Intersect_2 { @@ -632,7 +633,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Construct + /*! constructs * \param traits the traits (in case it has state) */ Intersect_2(const Traits& traits) : m_traits(traits) {} @@ -682,7 +683,7 @@ public: return false; } - /*! Determine whether the bounding boxes of two segments overlap + /*! determines whether the bounding boxes of two segments overlap */ bool do_bboxes_overlap(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2) const @@ -695,7 +696,7 @@ public: } public: - /*! Find the intersections of the two given curves and insert them into the + /*! finds the intersections of the two given curves and insert them into the * given output iterator. As two segments may intersect only once, only a * single intersection will be contained in the iterator. * \param cv1 the first curve. @@ -781,7 +782,7 @@ public: } }; - /*! Obtain an `Intersect_2` functor object. */ + /*! obtains an `Intersect_2` functor object. */ Intersect_2 intersect_2_object() const { return Intersect_2(*this); } class Are_mergeable_2 { @@ -791,7 +792,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Are_mergeable_2(const Traits& traits) : m_traits(traits) {} @@ -799,7 +800,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Check whether it is possible to merge two given \f$x\f$-monotone curves. + /*! checks whether it is possible to merge two given \f$x\f$-monotone curves. * \param cv1 the first curve. * \param cv2 the second curve. * \return (true) if the two curves are mergeable, that is, if they are @@ -822,7 +823,7 @@ public: } }; - /*! Obtain an `Are_mergeable_2` functor object. */ + /*! obtains an `Are_mergeable_2` functor object. */ Are_mergeable_2 are_mergeable_2_object() const { return Are_mergeable_2(*this); } @@ -836,7 +837,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Merge_2(const Traits& traits) : m_traits(traits) {} @@ -844,7 +845,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Merge two given \f$x\f$-monotone curves into a single curve (segment). + /*! merges two given \f$x\f$-monotone curves into a single curve (segment). * \param cv1 the first curve. * \param cv2 the second curve. * \param c Output: the merged curve. @@ -875,7 +876,7 @@ public: } }; - /*! Obtain a `Merge_2` functor object. */ + /*! obtains a `Merge_2` functor object. */ Merge_2 merge_2_object() const { return Merge_2(*this); } //@} @@ -892,7 +893,7 @@ public: /*! The traits (in case it has state) */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits. */ Approximate_2(const Traits& traits) : m_traits(traits) {} @@ -900,7 +901,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Obtain an approximation of a point coordinate. + /*! obtains an approximation of a point coordinate. * \param p the exact point. * \param i the coordinate index (either 0 or 1). * \pre `i` is either 0 or 1. @@ -912,12 +913,12 @@ public: return (i == 0) ? (CGAL::to_double(p.x())) : (CGAL::to_double(p.y())); } - /*! Obtain an approximation of a point. + /*! obtains an approximation of a point. */ Approximate_point_2 operator()(const Point_2& p) const { return Approximate_point_2(operator()(p, 0), operator()(p, 1)); } - /*! Obtain an approximation of an \f$x\f$-monotone curve. + /*! obtains an approximation of an \f$x\f$-monotone curve. */ template OutputIterator operator()(const X_monotone_curve_2& xcv, double /* error */, @@ -936,7 +937,7 @@ public: } }; - /*! Obtain an `Approximate_2` functor object. */ + /*! obtains an `Approximate_2` functor object. */ Approximate_2 approximate_2_object() const { return Approximate_2(*this); } //! Functor @@ -947,7 +948,7 @@ public: //! The traits (in case it has state). const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Construct_x_monotone_curve_2(const Traits& traits) : m_traits(traits) {} @@ -957,7 +958,7 @@ public: public: typedef typename Kernel::Segment_2 Segment_2; - /*! Obtain an \f$x\f$-monotone curve connecting two given endpoints. + /*! obtains an \f$x\f$-monotone curve connecting two given endpoints. * \param source the first point. * \param target the second point. * \pre `source` and `target` must not be equal. @@ -978,7 +979,7 @@ public: is_directed_right, is_vert, is_degen); } - /*! Obtain an \f$x\f$-monotone curve given a Kernel segment. + /*! obtains an \f$x\f$-monotone curve given a Kernel segment. * \param seg the segment. * \return the \f$x\f$-monotone curve. * \pre the segment is not degenerate. @@ -1001,7 +1002,7 @@ public: is_directed_right, is_vert, is_degen); } - /*! Obtain an \f$x\f$-monotone curve given two endpoints and the supporting + /*! obtains an \f$x\f$-monotone curve given two endpoints and the supporting * line. * \param line the supporting line. * \param the source point. @@ -1029,7 +1030,7 @@ public: } }; - /*! Obtain a `Construct_x_monotone_curve_2` functor object. */ + /*! obtains a `Construct_x_monotone_curve_2` functor object. */ Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} @@ -1040,7 +1041,7 @@ public: //! Functor typedef Construct_x_monotone_curve_2 Construct_curve_2; - /*! Obtain a `Construct_curve_2` functor object. */ + /*! obtains a `Construct_curve_2` functor object. */ Construct_curve_2 construct_curve_2_object() const { return Construct_x_monotone_curve_2(*this); } //@} @@ -1055,14 +1056,14 @@ public: /*! The traits (in case it has state). */ const Traits& m_traits; - /*! Constructor + /*! constructs * \param traits the traits (in case it has state) */ Trim_2(const Traits& traits) : m_traits(traits) {} friend class Arr_segment_traits_2; - /*! Obtain a trimmed version of a line. + /*! obtains a trimmed version of a line. * \param xseg the \f$x\f$-monotone segment. * \param src the new start endpoint. * \param tgt the new end endpoint. @@ -1097,12 +1098,12 @@ public: } }; - /*! Obtain a `Trim_2` functor object */ + /*! obtains a `Trim_2` functor object */ Trim_2 trim_2_object() const { return Trim_2(*this); } class Compare_endpoints_xy_2 { public: - /*! Compare the endpoints of an $x$-monotone curve lexicographically. + /*! compares the endpoints of an $x$-monotone curve lexicographically. * (assuming the curve has a designated source and target points). * \param cv the curve. * \return SMALLER if the curve is directed right; @@ -1112,7 +1113,7 @@ public: { return (cv.is_directed_right()) ? (SMALLER) : (LARGER); } }; - /*! Obtain a `Compare_endpoints_xy_2` functor object. */ + /*! obtains a `Compare_endpoints_xy_2` functor object. */ Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(); } @@ -1126,7 +1127,7 @@ public: { return (cv.flip()); } }; - /*! Obtain a `Construct_opposite_2` functor object. */ + /*! obtains a `Construct_opposite_2` functor object. */ Construct_opposite_2 construct_opposite_2_object() const { return Construct_opposite_2(); } //@} @@ -1149,7 +1150,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Determine whether a given point is in the \f$x\f$-range of a given + /*! determines whether a given point is in the \f$x\f$-range of a given * segment. * \param cv the segment. * \param p the point. @@ -1169,7 +1170,7 @@ public: } }; - /*! Obtain an `Is_in_x_range_2` functor object */ + /*! obtains an `Is_in_x_range_2` functor object */ Is_in_x_range_2 is_in_x_range_2_object() const { return Is_in_x_range_2(*this); } @@ -1188,7 +1189,7 @@ public: friend class Arr_segment_traits_2; public: - /*! Determine whether a given point is in the \f$y\f$-range of a given + /*! determines whether a given point is in the \f$y\f$-range of a given * segment. * \param cv the segment. * \param p the point. @@ -1208,7 +1209,7 @@ public: } }; - /*! Obtain an `Is_in_y_range_2` functor object */ + /*! obtains an `Is_in_y_range_2` functor object */ Is_in_y_range_2 is_in_y_range_2_object() const { return Is_in_y_range_2(*this); } @@ -1370,7 +1371,7 @@ template bool Arr_segment_traits_2::_Segment_cached_2::is_directed_right() const { return m_is_directed_right; } -//! \brief obtain the segment source. +//! \brief obtains the segment source. template const typename Kernel::Point_2& Arr_segment_traits_2::_Segment_cached_2::source() const { return m_ps; } From 8e5b107abcdcc480409bdcef4fd06ead77de325a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 14 Nov 2024 12:08:46 +0200 Subject: [PATCH 16/34] Specifically used "unsigned long long" to store the flags. --- .../include/CGAL/Arr_tracing_traits_2.h | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 746c0c35438..c3f09ef16e9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -80,89 +80,89 @@ private: using Base = BaseTraits; //! A set of bits that indicate whether operations should be traced. - std::size_t m_flags; + unsigned long long m_flags; bool compare_x_op() const - { return (0 != (m_flags & (0x1 << COMPARE_X_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_X_2_OP))); } bool compare_xy_op() const - { return (0 != (m_flags & (0x1 << COMPARE_XY_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_XY_2_OP))); } bool construct_min_vertex_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_MIN_VERTEX_2_OP))); } + { return (0 != (m_flags & (0x1ull << CONSTRUCT_MIN_VERTEX_2_OP))); } bool construct_max_vertex_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_MAX_VERTEX_2_OP))); } + { return (0 != (m_flags & (0x1ull << CONSTRUCT_MAX_VERTEX_2_OP))); } bool is_vertical_op() const - { return (0 != (m_flags & (0x1 << IS_VERTICAL_2_OP))); } + { return (0 != (m_flags & (0x1ull << IS_VERTICAL_2_OP))); } bool compare_y_at_x_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_AT_X_2_OP))); } bool equal_points_op() const - { return (0 != (m_flags & (0x1 << EQUAL_POINTS_2_OP))); } + { return (0 != (m_flags & (0x1ull << EQUAL_POINTS_2_OP))); } bool equal_curves_op() const - { return (0 != (m_flags & (0x1 << EQUAL_CURVES_2_OP))); } + { return (0 != (m_flags & (0x1ull << EQUAL_CURVES_2_OP))); } bool compare_y_at_x_left_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_LEFT_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_AT_X_LEFT_2_OP))); } bool compare_y_at_x_right_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_AT_X_RIGHT_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_AT_X_RIGHT_2_OP))); } bool make_x_monotone_op() const - { return (0 != (m_flags & (0x1 << MAKE_X_MONOTONE_2_OP))); } + { return (0 != (m_flags & (0x1ull << MAKE_X_MONOTONE_2_OP))); } bool split_op() const - { return (0 != (m_flags & (0x1 << SPLIT_2_OP))); } + { return (0 != (m_flags & (0x1ull << SPLIT_2_OP))); } bool intersect_op() const - { return (0 != (m_flags & (0x1 << INTERSECT_2_OP))); } + { return (0 != (m_flags & (0x1ull << INTERSECT_2_OP))); } bool are_mergeable_op() const - { return (0 != (m_flags & (0x1 << ARE_MERGEABLE_2_OP))); } + { return (0 != (m_flags & (0x1ull << ARE_MERGEABLE_2_OP))); } bool merge_op() const - { return (0 != (m_flags & (0x1 << MERGE_2_OP))); } + { return (0 != (m_flags & (0x1ull << MERGE_2_OP))); } bool construct_opposite_op() const - { return (0 != (m_flags & (0x1 << CONSTRUCT_2_OPPOSITE_2_OP))); } + { return (0 != (m_flags & (0x1ull << CONSTRUCT_2_OPPOSITE_2_OP))); } bool compare_endpoints_xy_op() const - { return (0 != (m_flags & (0x1 << COMPARE_ENDPOINTS_XY_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_ENDPOINTS_XY_2_OP))); } bool approximate_op() const - { return (0 != (m_flags & (0x1 << APPROXIMATE_2_OP))); } + { return (0 != (m_flags & (0x1ull << APPROXIMATE_2_OP))); } // left-right bool parameter_space_in_x_op() const - { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_X_2_OP))); } + { return (0 != (m_flags & (0x1ull << PARAMETER_SPACE_IN_X_2_OP))); } bool is_on_x_identification_op() const - { return m_flags & (0x1 << IS_ON_X_IDENTIFICATION_2_OP); } + { return (0 != (m_flags & (0x1ull << IS_ON_X_IDENTIFICATION_2_OP))); } bool compare_y_on_boundary_op() const - { return (0 != (m_flags & (0x1 << COMPARE_Y_ON_BOUNDARY_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_ON_BOUNDARY_2_OP))); } bool compare_y_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_Y_NEAR_BOUNDARY_2_OP); } + { return (0 != (m_flags & (0x1ull << COMPARE_Y_NEAR_BOUNDARY_2_OP))); } // bottom-top bool parameter_space_in_y_op() const - { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_Y_2_OP))); } + { return (0 != (m_flags & (0x1ull << PARAMETER_SPACE_IN_Y_2_OP))); } bool is_on_y_identification_op() const - { return m_flags & (0x1 << IS_ON_Y_IDENTIFICATION_2_OP); } + { return (0 != (m_flags & (0x1ull << IS_ON_Y_IDENTIFICATION_2_OP))); } bool compare_x_on_boundary_op() const - { return (0 != (m_flags & (0x1 << COMPARE_X_ON_BOUNDARY_2_OP))); } + { return (0 != (m_flags & (0x1ull << COMPARE_X_ON_BOUNDARY_2_OP))); } bool compare_x_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_2_OP); } + { return (0 != (m_flags & (0x1ull << COMPARE_X_NEAR_BOUNDARY_2_OP))); } public: /*! constructs default. */ @@ -176,7 +176,7 @@ public: /*! enables the trace of a traits operation. * \param id the operation identifier. */ - void enable_trace(Operation_id id) { m_flags |= 0x1 << id; } + void enable_trace(Operation_id id) { m_flags |= 0x1ull << id; } /*! enables the trace of all traits operations. */ @@ -185,7 +185,7 @@ public: /*! disables the trace of a traits operation. * \param id the operation identifier. */ - void disable_trace(Operation_id id) { m_flags &= ~(0x1 << id); } + void disable_trace(Operation_id id) { m_flags &= ~(0x1ull << id); } /*! disables the trace of all traits operations. */ From 84d0f6b9a610f08f6a2ff6760a6a03ecd8eeab5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Nov 2024 17:46:22 +0100 Subject: [PATCH 17/34] use default_random --- .../Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp index fa3220b0635..212d72f7112 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_io.cpp @@ -21,9 +21,10 @@ typedef Remeshing_triangulation::Cell_handle Cell_handle; int main(int argc, char* argv[]) { + const unsigned int nbv = (argc > 1) ? atoi(argv[1]) : 100; - CGAL::Random rng; + CGAL::Random rng = CGAL::get_default_random(); std::cout << "CGAL Random seed = " << CGAL::get_default_random().get_seed() << std::endl; std::vector points; From 42d435c9da44b2183737e129fd40f0a995f30d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 20 Nov 2024 18:01:52 +0100 Subject: [PATCH 18/34] add assertion to make sure that the rounding mode is good prior to the call --- Number_types/include/CGAL/FPU.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 927c2d4e29e..ede509604d4 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -618,6 +618,7 @@ inline double IA_sqrt_toward_zero(double d) { #ifdef CGAL_ALWAYS_ROUND_TO_NEAREST return (d > 0.0) ? nextafter(std::sqrt(d), 0.) : 0.0; #else + CGAL_assertion(FPU_get_cw()==CGAL_FE_UPWARD); FPU_set_cw(CGAL_FE_DOWNWARD); double i = (d > 0.0) ? CGAL_IA_FORCE_TO_DOUBLE(CGAL_BUG_SQRT(CGAL_IA_STOP_CPROP(d))) : 0.0; FPU_set_cw(CGAL_FE_UPWARD); From 2b0c79e85a333dc40739f18fe0babb6a1276961e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Nov 2024 10:14:17 +0100 Subject: [PATCH 19/34] update reuse to v5 --- .github/workflows/reuse.yml | 17 +++++++++-------- .../demo/Arrangement_on_surface_2_earth/Aos.cpp | 2 +- .../demo/Arrangement_on_surface_2_earth/Aos.h | 2 +- .../Arrangement_on_surface_2_earth/Aos_defs.h | 2 +- .../Aos_triangulator.cpp | 2 +- .../Aos_triangulator.h | 2 +- .../Arrangement_on_surface_2_earth/Camera.cpp | 2 +- .../Arrangement_on_surface_2_earth/Camera.h | 2 +- .../Camera_manip.cpp | 2 +- .../Camera_manip.h | 2 +- .../Camera_manip_rot.cpp | 2 +- .../Camera_manip_rot.h | 2 +- .../Camera_manip_rot_bpa.cpp | 2 +- .../Camera_manip_rot_bpa.h | 2 +- .../Camera_manip_zoom.cpp | 2 +- .../Camera_manip_zoom.h | 2 +- .../Common_defs.h | 2 +- .../GUI_country_pick_handler.cpp | 2 +- .../GUI_country_pick_handler.h | 2 +- .../GUI_event_handler.cpp | 2 +- .../GUI_event_handler.h | 2 +- .../Geodesic_arcs.cpp | 2 +- .../Geodesic_arcs.h | 2 +- .../Kml_reader.cpp | 2 +- .../Arrangement_on_surface_2_earth/Kml_reader.h | 2 +- .../Line_strips.cpp | 2 +- .../Line_strips.h | 2 +- .../Main_widget.cpp | 2 +- .../Main_widget.h | 2 +- .../Main_widget_old.h | 2 +- .../Message_manager.cpp | 2 +- .../Message_manager.h | 2 +- .../Shader_program.cpp | 2 +- .../Shader_program.h | 2 +- .../Single_vertex.cpp | 2 +- .../Single_vertex.h | 2 +- .../Arrangement_on_surface_2_earth/Sphere.cpp | 2 +- .../Arrangement_on_surface_2_earth/Sphere.h | 2 +- .../demo/Arrangement_on_surface_2_earth/Timer.h | 2 +- .../Arrangement_on_surface_2_earth/Tools.cpp | 2 +- .../demo/Arrangement_on_surface_2_earth/Tools.h | 2 +- .../Triangles.cpp | 2 +- .../Arrangement_on_surface_2_earth/Triangles.h | 2 +- .../Verification.cpp | 2 +- .../Verification.h | 2 +- .../Arrangement_on_surface_2_earth/Vertices.cpp | 2 +- .../Arrangement_on_surface_2_earth/Vertices.h | 2 +- .../World_coordinate_axes.cpp | 2 +- .../World_coordinate_axes.h | 2 +- .../Arrangement_on_surface_2_earth/arr_print.h | 2 +- .../Arrangement_on_surface_2_earth/earth.cpp | 2 +- .../CGAL/create_weighted_straight_skeleton_2.h | 2 +- .../include/CGAL/draw_straight_skeleton_2.h | 2 +- ...lygon_triangulation_graphics_scene_options.h | 2 +- .../include/CGAL/Regular_triangulation_2.h | 2 +- .../CGAL/Triangulation_2/internal/In_domain.h | 2 +- .../CGAL/draw_constrained_triangulation_2.h | 2 +- .../include/CGAL/draw_triangulation_2.h | 2 +- .../include/CGAL/mark_domain_in_triangulation.h | 2 +- .../include/CGAL/draw_voronoi_diagram_2.h | 2 +- 60 files changed, 68 insertions(+), 67 deletions(-) diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index e312e8a88ad..533abad36bc 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -10,17 +10,18 @@ jobs: reuse: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: REUSE version - uses: fsfe/reuse-action@v4 + - name: Checkout + uses: actions/checkout@v4 + - name: Display reuse-tool version + uses: fsfe/reuse-action@v5 with: args: --version - - name: REUSE lint - uses: fsfe/reuse-action@v4 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v5 with: args: --include-submodules lint - name: REUSE SPDX SBOM - uses: fsfe/reuse-action@v4 + uses: fsfe/reuse-action@v5 with: args: spdx - name: install dependencies @@ -29,7 +30,7 @@ jobs: run: | mkdir -p ./release cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake - - name: REUSE lint release tarball - uses: fsfe/reuse-action@v4 + - name: REUSE Compliance Check of release tarball + uses: fsfe/reuse-action@v5 with: args: --root ./release/CGAL-9.9 --include-submodules lint diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp index 2d782eec1ac..3faf4d76f8c 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.h index af4b9c2d2ff..49de97f2da9 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_defs.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_defs.h index 5332eb1e856..414202e9c13 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_defs.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_defs.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.cpp index e635345c38c..b1a866b65b2 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.h index 4d291b43e1e..bbbbe6e83e1 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos_triangulator.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.cpp index 0b4b6fa40f1..061e8e02149 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.h index 9d166a794b0..7629d747f3e 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.cpp index ef904a969ca..f25847b2a5b 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University(Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University(Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.h index d04f087f8fa..0b56e2d93ae 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.cpp index 7750fda4529..18885014973 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.h index 30f268507c9..6b11ca95cb9 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.cpp index 8d6a22cd7ac..a8327ca2ff8 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.h index 1867e6a74ba..0e041335aee 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_rot_bpa.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.cpp index 724ce32f134..f4c4e63c65b 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.h index 3ec15895a8a..e701db1f870 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Camera_manip_zoom.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Common_defs.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Common_defs.h index 42533e6434c..63a2549a8f5 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Common_defs.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Common_defs.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp index 0f9e9b7c796..58bc34f3ca2 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.h index 08fe585289e..d51fdcc479c 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.cpp index 848ea3d2cee..57fc5bce495 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.h index d29dce172f1..334d5aabfa1 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_event_handler.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.cpp index 83de65cb955..353e6198513 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.h index 7e8a3a13849..ebe4b914762 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Geodesic_arcs.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.cpp index 8ec7d23ea76..9e8df3dd72e 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.h index dbeaa5eeced..1ede700cb77 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Kml_reader.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.cpp index 93ab6cd5596..8cff0c0e0ad 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.h index a4b0d996adc..1e5b5bfca3f 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Line_strips.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp index 4d711d66128..f99c6c7e55b 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.h index 136c0220679..a9e3493ea34 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget_old.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget_old.h index 541a8f27d80..0bf4895eb8c 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget_old.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget_old.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.cpp index 69ddf0cdf02..76548edddcf 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.h index f2cb59fc1ee..3f0708feb32 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Message_manager.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.cpp index c52d2db408d..12c218b6286 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.h index 1c0c4d06061..c424197dccc 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Shader_program.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.cpp index ce94629bbfa..97ab1719c6d 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.h index 078b697e38f..f8e56d11e37 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Single_vertex.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.cpp index 8a24ae4c6b8..29d45c3fd1d 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.h index 983a40a89a0..c5266804633 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Sphere.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Timer.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Timer.h index 1c0606be591..e22edee8287 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Timer.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Timer.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.cpp index c2173dd20d2..be59c995576 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.h index 5b7c1362149..308a0dc8714 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Tools.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.cpp index 39eb89a7a5b..aec03a4f17a 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.h index ce24fc55d6a..b819870e128 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Triangles.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.cpp index 705f082eed6..55132c9b786 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.h index fc407256e5e..92e0480ebc3 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Verification.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.cpp index dc64111bf93..5a15e5a3a5f 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.h index 1ec741f3688..124d6be26fb 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Vertices.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.cpp index baea14f53bf..d85076c8810 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.h index 53d50109d90..80073d85535 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/World_coordinate_axes.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/arr_print.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/arr_print.h index 611bb8db15a..6e4b9fcc389 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/arr_print.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/arr_print.h @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/earth.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/earth.cpp index 4bd86b24e98..2a7a5f7d4ee 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/earth.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/earth.cpp @@ -1,4 +1,4 @@ -// Copyright(c) 2023, 2024 Tel-Aviv University (Israel). +// Copyright (c) 2023, 2024 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h index 85c4cd6b99e..96c42fb9925 100644 --- a/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/create_weighted_straight_skeleton_2.h @@ -1,4 +1,4 @@ -// Copyright(c) 2006 Fernando Luis Cacciola Carballal. All rights reserved. +// Copyright (c) 2006 Fernando Luis Cacciola Carballal. All rights reserved. // // This file is part of CGAL(www.cgal.org). // diff --git a/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h index 8ff502ba5e3..05d1c653940 100644 --- a/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/draw_straight_skeleton_2.h @@ -1,4 +1,4 @@ -// Copyright(c) 2018 INRIA Sophia-Antipolis (France). +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Triangulation_2/examples/Triangulation_2/polygon_triangulation_graphics_scene_options.h b/Triangulation_2/examples/Triangulation_2/polygon_triangulation_graphics_scene_options.h index 4768211fdfa..3b814a7a639 100644 --- a/Triangulation_2/examples/Triangulation_2/polygon_triangulation_graphics_scene_options.h +++ b/Triangulation_2/examples/Triangulation_2/polygon_triangulation_graphics_scene_options.h @@ -1,4 +1,4 @@ -// Copyright(c) 2022 GeometryFactory (France). +// Copyright (c) 2022 GeometryFactory (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Triangulation_2/include/CGAL/Regular_triangulation_2.h b/Triangulation_2/include/CGAL/Regular_triangulation_2.h index d7cae81c69e..94e5d5fb67a 100644 --- a/Triangulation_2/include/CGAL/Regular_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Regular_triangulation_2.h @@ -1,4 +1,4 @@ -// Copyright(c) 1997 INRIA Sophia-Antipolis (France). +// Copyright (c) 1997 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/In_domain.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/In_domain.h index f46b2f423ef..92f6fb29ff6 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/In_domain.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/In_domain.h @@ -1,4 +1,4 @@ -// Copyright(c) 2022 GeometryFactory (France). +// Copyright (c) 2022 GeometryFactory (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h b/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h index 05d933f92e9..441ac7f3fcb 100644 --- a/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h @@ -1,4 +1,4 @@ -// Copyright(c) 2022 GeometryFactory (France). +// Copyright (c) 2022 GeometryFactory (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 32a42879ae4..f91fa5b4aaa 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -1,4 +1,4 @@ -// Copyright(c) 2018 INRIA Sophia-Antipolis (France). +// Copyright (c) 2018 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Triangulation_2/include/CGAL/mark_domain_in_triangulation.h b/Triangulation_2/include/CGAL/mark_domain_in_triangulation.h index 1e6a108657f..249cd94e367 100644 --- a/Triangulation_2/include/CGAL/mark_domain_in_triangulation.h +++ b/Triangulation_2/include/CGAL/mark_domain_in_triangulation.h @@ -1,4 +1,4 @@ -// Copyright(c) 2022 GeometryFactory (France). +// Copyright (c) 2022 GeometryFactory (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index 534d5aa47c3..d5efc0c0a30 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -1,4 +1,4 @@ -// Copyright(c) 2019 Foundation for Research and Technology-Hellas (Greece). +// Copyright (c) 2019 Foundation for Research and Technology-Hellas (Greece). // All rights reserved. // // This file is part of CGAL (www.cgal.org). From 56f57215b6aa96385cdcac12b7d166791fa6e56e Mon Sep 17 00:00:00 2001 From: mbarbier Date: Wed, 27 Nov 2024 09:19:23 +0000 Subject: [PATCH 20/34] Fixing ICPC usage with modern cmake and wrappers Related to conan's conan-io/conan-center-index#25843 replaced 'fp-model strict' by 'fp-model=strict' https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/fp-model-fp.html for more compatibility with nvcc. as 'fp-model=strict' will be directly transmited to the compiler while 'fp-model strict' will have 'strict' being treated as a file input. Also added a CXX only filter for newer cmake 3.3+ --- Installation/CMakeLists.txt | 4 ++-- .../modules/CGAL_SetupCGALDependencies.cmake | 16 ++++++++++++---- Number_types/include/CGAL/Interval_nt.h | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 11ade3231f1..18f6f45c05a 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -429,12 +429,12 @@ if("${CMAKE_CXX_COMPILER}" MATCHES "icl" OR "${CMAKE_CXX_COMPILER}" MATCHES ) else() message( - STATUS "Using Intel Compiler version 11 or later. Adding -fp-model strict" + STATUS "Using Intel Compiler version 11 or later. Adding -fp-model=strict" ) if(WIN32) uniquely_add_flags(CGAL_CXX_FLAGS "/fp:strict") else() - uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model strict") + uniquely_add_flags(CGAL_CXX_FLAGS "-fp-model=strict") endif() endif() endif() diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 60e2bd25c4d..e3dadc7b4e4 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -132,11 +132,19 @@ function(CGAL_setup_CGAL_flags target) $<$:/bigobj> # Use /bigobj by default ) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") - message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) - if(WIN32) - target_compile_options(${target} INTERFACE "/fp:strict") + # cuda knows how to deal with 'fp-model=strict' but not 'fp-model strict' + if(CMAKE_VERSION VERSION_LESS 3.3) + if(WIN32) + target_compile_options(${target} INTERFACE "/fp:strict") + else() + target_compile_options(${target} INTERFACE "-fp-model=strict") + endif() else() - target_compile_options(${target} INTERFACE "-fp-model" "strict") + if(WIN32) + target_compile_options(${target} INTERFACE "$<$:/fp:strict>") + else() + target_compile_options(${target} INTERFACE "$<$:-fp-model=strict>") + endif() endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") message( STATUS "Using SunPro compiler, using STLPort 4." ) diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index 4a03e3ef882..f70312178b7 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -285,9 +285,9 @@ private: // the 2 negations and we get wrong rounding. typename Interval_nt<>::Internal_protector P; CGAL_assertion_msg(-CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1), - "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?"); + "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model=strict for Intel)?"); CGAL_assertion_msg(-CGAL_IA_DIV(-1., 10) != CGAL_IA_DIV(1., 10), - "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?"); + "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model=strict for Intel)?"); } }; From 1b7e7bea6a175d9f25b007bde8601d2173c66162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 28 Nov 2024 14:37:00 +0100 Subject: [PATCH 21/34] fix dynamic with default for graph inheriting from another graph --- .../graph/graph_traits_inheritance_macros.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h index 12faf7e2a0c..9a88014752d 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_inheritance_macros.h @@ -72,16 +72,16 @@ struct property_map namespace CGAL { \ template \ typename boost::property_map >::type \ -get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ } \ \ template \ typename boost::property_map >::const_type \ -get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ }\ } //CGAL namespace @@ -131,16 +131,16 @@ struct property_map namespace CGAL { \ template \ typename boost::property_map >::type \ -get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ } \ \ template \ typename boost::property_map >::const_type \ -get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g) \ +get(DTAG t, const CGAL_GRAPH_TRAITS_INHERITANCE_CLASS_NAME& g, const CGAL_XX_YATP& default_value = CGAL_XX_YATP()) \ { \ - return get(t, static_cast(g)); \ + return get(t, static_cast(g), default_value); \ }\ } //CGAL namespace From cab2412bee85151bbf6bafbe49bc776c6e4fbcda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 29 Nov 2024 21:13:11 +0100 Subject: [PATCH 22/34] add missing default for LCC --- ...properties_Linear_cell_complex_for_combinatorial_map.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h index 2689f86253c..842ff86f7cd 100644 --- a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h @@ -443,11 +443,11 @@ template , \ TAG >::const_type \ -get(TAG, const Linear_cell_complex_for_combinatorial_map&) \ +get(TAG, const Linear_cell_complex_for_combinatorial_map&, const T& default_value = T()) \ { \ typedef Linear_cell_complex_for_combinatorial_map LCC;\ typedef typename boost::graph_traits::DESC DESC; \ - return internal::Dynamic_property_map();\ + return internal::Dynamic_property_map(default_value);\ } \ \ template , \ TAG >::type \ -get(TAG, Linear_cell_complex_for_combinatorial_map&) \ +get(TAG, Linear_cell_complex_for_combinatorial_map&, const T& default_value = T()) \ { \ typedef Linear_cell_complex_for_combinatorial_map LCC;\ typedef typename boost::graph_traits::DESC DESC; \ - return internal::Dynamic_property_map();\ + return internal::Dynamic_property_map(default_value);\ } \ } From 36f6a36dac6abadd37c80bf55290e07908e0d2a1 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 2 Dec 2024 15:48:48 +0100 Subject: [PATCH 23/34] Errors in bibliography and incorrect usage of `\f[` command - The `&` in the bibliography has to be escaped - the doxygen command `\f[` should not be used to directly change the environment, for this the doxygen command `\f{` exists. --- Documentation/doc/biblio/cgal_manual.bib | 2 +- Documentation/doc/biblio/geom.bib | 2 +- .../doc/Polygon_mesh_processing/Polygon_mesh_processing.txt | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index 3f0f258a870..d1600747b48 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -1355,7 +1355,7 @@ Teillaud" @article{cgal:lrt-ccm-22, author = {Jacques-Olivier Lachaud and Pascal Romon and Boris Thibert}, - journal = {Discrete & Computational Geometry}, + journal = {Discrete \& Computational Geometry}, title = {Corrected Curvature Measures}, volume = {68}, pages = {477-524}, diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index f92a1b5cbd5..88f05c78f7f 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -142522,7 +142522,7 @@ of geometric optics." title = {{Fast and Robust QEF Minimization using Probabilistic Quadrics}}, author = {Trettner, Philip and Kobbelt, Leif}, year = {2020}, - publisher = {The Eurographics Association and John Wiley & Sons Ltd.}, + publisher = {The Eurographics Association and John Wiley \& Sons Ltd.}, ISSN = {1467-8659}, DOI = {10.1111/cgf.13933} } diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index e532de3e728..08d8d798f41 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -996,15 +996,13 @@ to derive new closed-form equations for the corrected curvature measures. These curvature measures are the first step for computing the curvatures. For a triangle \f$ \tau_{ijk} \f$, with vertices \a i, \a j, \a k: -\f[ - \begin{align*} +\f{align*}{ \mu^{(0)}(\tau_{ijk}) = &\frac{1}{2} \langle \bar{\mathbf{u}} \mid (\mathbf{x}_j - \mathbf{x}_i) \times (\mathbf{x}_k - \mathbf{x}_i) \rangle, \\ \mu^{(1)}(\tau_{ijk}) = &\frac{1}{2} \langle \bar{\mathbf{u}} \mid (\mathbf{u}_k - \mathbf{u}_j) \times \mathbf{x}_i + (\mathbf{u}_i - \mathbf{u}_k) \times \mathbf{x}_j + (\mathbf{u}_j - \mathbf{u}_i) \times \mathbf{x}_k \rangle, \\ \mu^{(2)}(\tau_{ijk}) = &\frac{1}{2} \langle \mathbf{u}_i \mid \mathbf{u}_j \times \mathbf{u}_k \rangle, \\ \mu^{\mathbf{X},\mathbf{Y}}(\tau_{ijk}) = & \frac{1}{2} \big\langle \bar{\mathbf{u}} \big| \langle \mathbf{Y} | \mathbf{u}_k -\mathbf{u}_i \rangle \mathbf{X} \times (\mathbf{x}_j - \mathbf{x}_i) \big\rangle -\frac{1}{2} \big\langle \bar{\mathbf{u}} \big| \langle \mathbf{Y} | \mathbf{u}_j -\mathbf{u}_i \rangle \mathbf{X} \times (\mathbf{x}_k - \mathbf{x}_i) \big\rangle, - \end{align*} -\f] +\f} where \f$ \langle \cdot \mid \cdot \rangle \f$ denotes the usual scalar product, \f$ \bar{\mathbf{u}}=\frac{1}{3}( \mathbf{u}_i + \mathbf{u}_j + \mathbf{u}_k )\f$. From c4760da918bd8cefdfb4aeb579ee79cccaea60b6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 3 Dec 2024 10:48:57 +0100 Subject: [PATCH 24/34] in OpenMesh, the outgoing halfedge of a boundary vertex must be the boundary halfedge --- BGL/include/CGAL/boost/graph/IO/OM.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BGL/include/CGAL/boost/graph/IO/OM.h b/BGL/include/CGAL/boost/graph/IO/OM.h index 9c582267ae1..052e6915b5a 100644 --- a/BGL/include/CGAL/boost/graph/IO/OM.h +++ b/BGL/include/CGAL/boost/graph/IO/OM.h @@ -110,6 +110,11 @@ bool write_OM(std::string fname, const Graph& g, VPM vpm, VFeaturePM vfpm, EFeat omesh.status(omv).set_feature(isfeature); } + for (auto v : vertices(omesh)) + { + adjust_border_halfedge(v, omesh); + } + return OpenMesh::IO::write_mesh(omesh, fname, OpenMesh::IO::Options::Status, precision); } } // end of internal namespace From 400e4a9d421192a6aa2771727c64c7873b697bff Mon Sep 17 00:00:00 2001 From: POUGET Marc Date: Mon, 2 Dec 2024 13:57:09 +0100 Subject: [PATCH 25/34] fixed mandatory code in CGAL_assert --- .../CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index da42c7429f9..04be8869a3b 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -78,12 +78,14 @@ namespace internal { intersection(*c_pq, *c_qr, std::back_inserter(inters)); CGAL_assertion(assign(pair, inters[0])); + assign(pair, inters[0]); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; CGAL_assertion(assign(pair, inters[1])); + assign(pair, inters[1]); return pair.first; } return pair.first; @@ -105,12 +107,14 @@ namespace internal { intersection(*l, *c, std::back_inserter(inters)); CGAL_assertion(assign(pair,inters[0])); + assign(pair,inters[0]); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; CGAL_assertion(assign(pair, inters[1])); + assign(pair, inters[1]); return pair.first; } return pair.first; @@ -241,11 +245,13 @@ namespace internal { std::pair pair; CGAL_assertion(assign(pair,inters[0])); + assign(pair,inters[0]); CGAL_assertion(pair.second == 1); if(_gt.less_y_2_object()(p, q)) return Line_arc_2(bis_pq,a,pair.first); CGAL_assertion(assign(pair,inters[1])); + assign(pair,inters[1]); CGAL_assertion(pair.second == 1); return Line_arc_2(bis_pq,a,pair.first); } @@ -262,6 +268,7 @@ namespace internal { std::pair pair; CGAL_assertion(assign(pair,inters[0])); + assign(pair,inters[0]); CGAL_assertion(pair.second == 1); Hyperbolic_point_2 approx_pinf(to_double(pair.first.x()), to_double(pair.first.y())); @@ -276,6 +283,7 @@ namespace internal { } CGAL_assertion(assign(pair,inters[1])); + assign(pair,inters[1]); if(_gt.orientation_2_object()(approx_c,approx_a,approx_pinf) == POSITIVE) return Circular_arc_2(*c_pq, pair.first, a); From 469434d8a67f2361cf35a27ecd61d929eedc5998 Mon Sep 17 00:00:00 2001 From: POUGET Marc Date: Mon, 2 Dec 2024 14:21:19 +0100 Subject: [PATCH 26/34] applied Seb suggestion --- ...bolic_Delaunay_triangulation_CK_traits_2.h | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index 04be8869a3b..ea57ad56e8b 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -77,16 +77,18 @@ namespace internal { std::vector< Intersection_result > inters; intersection(*c_pq, *c_qr, std::back_inserter(inters)); - CGAL_assertion(assign(pair, inters[0])); - assign(pair, inters[0]); - if(pair.second == 1) + CGAL_assertion_code(bool ok=) + assign(pair, inters[0]); + CGAL_assertion(ok); + if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_assertion(assign(pair, inters[1])); - assign(pair, inters[1]); - return pair.first; + CGAL_assertion_code(bool ok=) + assign(pair, inters[1]); + CGAL_assertion(ok); + return pair.first; } return pair.first; } @@ -106,16 +108,18 @@ namespace internal { std::vector< Intersection_result > inters; intersection(*l, *c, std::back_inserter(inters)); - CGAL_assertion(assign(pair,inters[0])); - assign(pair,inters[0]); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; - CGAL_assertion(assign(pair, inters[1])); - assign(pair, inters[1]); - return pair.first; + CGAL_assertion_code(bool ok=) + assign(pair, inters[1]); + CGAL_assertion(ok); + return pair.first; } return pair.first; } @@ -244,14 +248,16 @@ namespace internal { intersection(bis_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_assertion(assign(pair,inters[0])); - assign(pair,inters[0]); - CGAL_assertion(pair.second == 1); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); + CGAL_assertion(pair.second == 1); if(_gt.less_y_2_object()(p, q)) return Line_arc_2(bis_pq,a,pair.first); - CGAL_assertion(assign(pair,inters[1])); - assign(pair,inters[1]); + CGAL_assertion_code(bool ok=) + assign(pair,inters[1]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); return Line_arc_2(bis_pq,a,pair.first); } @@ -267,8 +273,9 @@ namespace internal { intersection(*c_pq, l_inf, std::back_inserter(inters)); std::pair pair; - CGAL_assertion(assign(pair,inters[0])); - assign(pair,inters[0]); + CGAL_assertion_code(bool ok=) + assign(pair,inters[0]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); Hyperbolic_point_2 approx_pinf(to_double(pair.first.x()), to_double(pair.first.y())); @@ -282,8 +289,9 @@ namespace internal { return Circular_arc_2(*c_pq, pair.first, a); } - CGAL_assertion(assign(pair,inters[1])); - assign(pair,inters[1]); + CGAL_assertion_code(bool ok=) + assign(pair,inters[1]); + CGAL_assertion(ok); if(_gt.orientation_2_object()(approx_c,approx_a,approx_pinf) == POSITIVE) return Circular_arc_2(*c_pq, pair.first, a); From 08320bc1b792048e36091e0edf38bfe8feceb87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 3 Dec 2024 08:58:51 +0100 Subject: [PATCH 27/34] declare only once --- ...perbolic_Delaunay_triangulation_CK_traits_2.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index ea57ad56e8b..9f0660d0d30 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -249,15 +249,15 @@ namespace internal { std::pair pair; CGAL_assertion_code(bool ok=) - assign(pair,inters[0]); + assign(pair,inters[0]); CGAL_assertion(ok); - CGAL_assertion(pair.second == 1); + CGAL_assertion(pair.second == 1); if(_gt.less_y_2_object()(p, q)) return Line_arc_2(bis_pq,a,pair.first); - CGAL_assertion_code(bool ok=) - assign(pair,inters[1]); - CGAL_assertion(ok); + CGAL_assertion_code(ok=) + assign(pair,inters[1]); + CGAL_assertion(ok); CGAL_assertion(pair.second == 1); return Line_arc_2(bis_pq,a,pair.first); } @@ -274,7 +274,7 @@ namespace internal { std::pair pair; CGAL_assertion_code(bool ok=) - assign(pair,inters[0]); + assign(pair,inters[0]); CGAL_assertion(ok); CGAL_assertion(pair.second == 1); @@ -289,8 +289,8 @@ namespace internal { return Circular_arc_2(*c_pq, pair.first, a); } - CGAL_assertion_code(bool ok=) - assign(pair,inters[1]); + CGAL_assertion_code(ok=) + assign(pair,inters[1]); CGAL_assertion(ok); if(_gt.orientation_2_object()(approx_c,approx_a,approx_pinf) == POSITIVE) return Circular_arc_2(*c_pq, pair.first, a); From b33ce790b872b6abac2ff17d35a454389e7c6c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 3 Dec 2024 09:12:38 +0100 Subject: [PATCH 28/34] remove tabs --- ...rbolic_Delaunay_triangulation_CK_traits_2.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h index 9f0660d0d30..1dce4427198 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_CK_traits_2.h @@ -78,17 +78,17 @@ namespace internal { intersection(*c_pq, *c_qr, std::back_inserter(inters)); CGAL_assertion_code(bool ok=) - assign(pair, inters[0]); - CGAL_assertion(ok); - if(pair.second == 1) + assign(pair, inters[0]); + CGAL_assertion(ok); + if(pair.second == 1) { if(_gt.has_on_bounded_side_2_object()(l_inf, pair.first)) return pair.first; CGAL_assertion_code(bool ok=) - assign(pair, inters[1]); + assign(pair, inters[1]); CGAL_assertion(ok); - return pair.first; + return pair.first; } return pair.first; } @@ -109,7 +109,7 @@ namespace internal { intersection(*l, *c, std::back_inserter(inters)); CGAL_assertion_code(bool ok=) - assign(pair,inters[0]); + assign(pair,inters[0]); CGAL_assertion(ok); if(pair.second == 1) { @@ -117,9 +117,9 @@ namespace internal { return pair.first; CGAL_assertion_code(bool ok=) - assign(pair, inters[1]); - CGAL_assertion(ok); - return pair.first; + assign(pair, inters[1]); + CGAL_assertion(ok); + return pair.first; } return pair.first; } From de60668b8302cf5b0f1f46b389ac0aa57aa5c76c Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Wed, 4 Dec 2024 13:56:39 +0100 Subject: [PATCH 29/34] typo --- .../doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index bbdfeb0b3f9..f102fa7f0ca 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -5662,7 +5662,7 @@ The package provides two traits-class decorators, namely debugging and informative metadata to an output stream. The former is used to count the number of invocations of traits-class functors, and the latter is used to trace these invocations. Note that the -constructors of each of these class templates applies perfect +constructors of each of these class templates apply perfect forwarding. The counting traits also exports the count of traits-class objects of specific types constructed during the execution of the program. The tracing traits supports filtering of traced functors. The From ad4c6817824c815fcbc1e4f4c883508fcf93c34c Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 4 Dec 2024 14:19:02 +0100 Subject: [PATCH 30/34] Spelling correction Spelling correction --- .../include/CGAL/Arr_circle_segment_traits_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index f2963584278..a2630c65104 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -140,7 +140,7 @@ public: } }; - /*! ontains a Compare_xy_2 functor object. */ + /*! obtains a Compare_xy_2 functor object. */ Compare_xy_2 compare_xy_2_object () const { return Compare_xy_2(); From 8a57cc484e5cdfc9e658e898295442678f4ee541 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 5 Dec 2024 11:48:40 +0100 Subject: [PATCH 31/34] add JSON output for platform information and refactor third-party library handling --- .../test_handling/create_testresult_page | 175 ++++++++++-------- Maintenance/test_handling/to_zipped_format | 20 ++ 2 files changed, 113 insertions(+), 82 deletions(-) diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index 3d8fb4f5170..50d3097557f 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -37,6 +37,7 @@ my @platforms_to_do; my @known_platforms; my %platform_short_names; my %platform_is_optimized; +my %platform_third_party_libs; my %platform_is_64bits; my @available_platforms; my %test_directories = (); @@ -490,80 +491,100 @@ sub print_platform_descriptions() EOF my ($platform_num)=(0); foreach $pf (@platforms_to_do) { - my $pf_num_plus_one = $platform_num + 1; - print OUTPUT "\n$pf_no\n"; - $pf_no++; - # my $pf_short = join('_',parse_platform_2($pf)); - (my $pf_short) = ($pf =~ m/_(.*)/); - print OUTPUT "; + close PLATFORM_JSON; + my $platform_info = decode_json($json_text); + $compiler = $platform_info->{compiler} // $compiler; + $operating_system = $platform_info->{operating_system} // $operating_system; + $tester_name = $platform_info->{tester_name} // $tester_name; + $tester_address = $platform_info->{tester_address} // $tester_address; + @versions_and_flags = ( + $platform_info->{CMake_version} // "?", + $platform_info->{Boost_version} // "?", + $platform_info->{MPFR_version} // "?", + $platform_info->{GMP_version} // "?", + $platform_info->{Qt_version} // "?", + $platform_info->{LEDA_version} // "?", + $platform_info->{CXXFLAGS} // "?", + $platform_info->{LDFLAGS} // "?", + ); + @versions_and_flags = reverse @versions_and_flags; + $platform_is_optimized{$pf} = $platform_info->{is_optimized} if defined $platform_info->{is_optimized}; + $platform_third_party_libs{$pf} = $platform_info->{third_party_libs} if defined $platform_info->{third_party_libs}; + } + elsif (open (PLATFORM_INFO, "; # CGAL_VERSION $_ = ; # COMPILER chomp; - my $compiler = $_; - print OUTPUT " title=\"$compiler\">$pf_short"; + $compiler = $_; $_ = ; # OPERATING_SYSTEM chomp; - my $operating_system = $_; + $operating_system = $_; $_ = ; # TESTER_NAME chomp; - my $tester_name = $_; + $tester_name = $_; $_ = ; # TESTER_ADDRESS chomp; - my $tester_address = $_; - - my $county = $testresults[$platform_num]->{"y"}; - my $countt = $testresults[$platform_num]->{"t"}; - my $countw = $testresults[$platform_num]->{"w"}; - my $counto = $testresults[$platform_num]->{"o"}; - my $countn = $testresults[$platform_num]->{"n"}; - my $countr = $testresults[$platform_num]->{"r"}; + $tester_address = $_; my $index = 8; - my @tmp; while ($index) { $index--; $_ = ; chomp; - $tmp[$index] = $_; + $versions_and_flags[$index] = $_; } - ($platform_is_optimized{$pf}) = ($tmp[1] =~ m|([-/]x?O[1-9])|); - $_ = ; + $_ = ; # TPL: chomp; - my $build_type = $platform_is_optimized{$pf} ? " - " : "YES"; - print OUTPUT "\n"; - print OUTPUT "$compiler\n"; # Compiler - print OUTPUT "$operating_system\n"; # Operating System - print OUTPUT "$tester_name\n"; - print OUTPUT "$county\n"; - print OUTPUT "$countt\n"; - print OUTPUT "$countw\n"; - print OUTPUT "$counto\n"; - print OUTPUT "$countn\n"; - print OUTPUT "$countr\n"; - print OUTPUT "$build_type\n"; - $index = 8; - while ($index) { - $index--; - $_ = $tmp[$index]; - if($index > 2) { - print OUTPUT "$_\n"; - } else { - print OUTPUT "$_\n"; - } - } - } else { - print OUTPUT ">$pf_short"; - my $index = 12; - while ($index) { - $index--; - print OUTPUT "?\n"; + $platform_third_party_libs{$pf} = $_; + } + my $pf_num_plus_one = $platform_num + 1; + $pf_no++; + # my $pf_short = join('_',parse_platform_2($pf)); + (my $pf_short) = ($pf =~ m/_(.*)/); + ($platform_is_64bits{$pf}) = ! ($pf =~ m/32/); + ($platform_is_optimized{$pf}) = ($versions_and_flags[1] =~ m|([-/]x?O[1-9])|); + my $county = $testresults[$platform_num]->{"y"}; + my $countt = $testresults[$platform_num]->{"t"}; + my $countw = $testresults[$platform_num]->{"w"}; + my $counto = $testresults[$platform_num]->{"o"}; + my $countn = $testresults[$platform_num]->{"n"}; + my $countr = $testresults[$platform_num]->{"r"}; + my $build_type = $platform_is_optimized{$pf} ? " - " : "YES"; + print OUTPUT < + $pf_num_plus_one + $pf_short + $compiler + $operating_system + $tester_name + $county + $countt + $countw + $counto + $countn + $countr + $build_type +EOF + my $index = 8; + while ($index) { + $index--; + $_ = $versions_and_flags[$index]; + if($index > 2) { + print OUTPUT " $_\n"; + } else { + print OUTPUT " $_\n"; } } ++$platform_num; + print OUTPUT " \n"; } print OUTPUT "\n

\n"; } @@ -768,37 +789,27 @@ sub create_summary_page { my @platforms_data; my ($platform_num, $platform) = (0, ""); foreach $platform (@platforms_to_do) { - my $third_party_libraries = ""; my @tpl_list = (); - if (open(PLATFORM_INFO, "results_${platform}.info")) { - my $line = ""; - while () { - $line = $_; - if ($line =~ /^TPL:/) { - $third_party_libraries = $line; - if ($third_party_libraries =~ /^TPL:\s*(.*)/) { - my $tpl_data = $1; - my @tpls = split /,\s*/, $tpl_data; - foreach my $tpl (@tpls) { - if ($tpl =~ /(.+)\s+not found/i) { - push @tpl_list, { - name => $1, - version => undef, - status => "not found" - }; - } - elsif ($tpl =~ /(.+)\s+(\S+)/) { - push @tpl_list, { - name => $1, - version => $2, - status => "found" - }; - } - } - } + my $third_party_libraries = $platform_third_party_libs{$platform}; + if ($third_party_libraries =~ /^TPL:\s*(.*)/) { + my $tpl_data = $1; + my @tpls = split /,\s*/, $tpl_data; + foreach my $tpl (@tpls) { + if ($tpl =~ /(.+)\s+not found/i) { + push @tpl_list, { + name => $1, + version => undef, + status => "not found" + }; + } + elsif ($tpl =~ /(.+)\s+(\S+)/) { + push @tpl_list, { + name => $1, + version => $2, + status => "found" + }; } } - close PLATFORM_INFO; } my $platform_info = { name => $platform, diff --git a/Maintenance/test_handling/to_zipped_format b/Maintenance/test_handling/to_zipped_format index edc20781c04..8c08aeda1f5 100755 --- a/Maintenance/test_handling/to_zipped_format +++ b/Maintenance/test_handling/to_zipped_format @@ -2,6 +2,7 @@ use Cwd; use strict; +use JSON; my $TMPDIR; my $version = ""; @@ -147,6 +148,25 @@ NEXT: if(! ($_= )) { print PLATFORM_NEW_RESULTS $_; } rename("${platform}.new_results","${platform}.txt") or die "cannot rename!"; + my $platform_info = { + "cgal_version" => $CGAL_VERSION, + "compiler" => $COMPILER, + "operating_system" => $OS, + "tester_name" => $TESTER_NAME, + "tester_address" => $TESTER_ADDRESS, + "CMake_version" => $CMAKE, + "Boost_version" => $BOOST, + "MPFR_version" => $MPFR, + "GMP_version" => $GMP, + "Qt_version" => $QT, + "LEDA_version" => $LEDA_VERSION, + "CXXFLAGS" => $CXXFLAGS, + "LDFLAGS" => $LDFLAGS, + "third_party_libs" => $TPL + }; + open PLATFORM_JSON , ">${platform}.json" or die "cannot open ${platform}.json"; + print PLATFORM_JSON JSON->new->utf8->pretty->encode($platform_info); + close PLATFORM_JSON; print PLATFORM_INFO <<"EOF"; $CGAL_VERSION $COMPILER From b37ddd57a88ee026545890e469cd4f60a3f6797e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 5 Dec 2024 14:31:08 +0100 Subject: [PATCH 32/34] fix/improve the code about third-party libs --- Maintenance/test_handling/Summary_Script.js | 12 +- .../test_handling/create_testresult_page | 327 ++++++++---------- Maintenance/test_handling/to_zipped_format | 23 +- 3 files changed, 166 insertions(+), 196 deletions(-) diff --git a/Maintenance/test_handling/Summary_Script.js b/Maintenance/test_handling/Summary_Script.js index 10b5156f97a..bde8e5d2adb 100644 --- a/Maintenance/test_handling/Summary_Script.js +++ b/Maintenance/test_handling/Summary_Script.js @@ -171,7 +171,7 @@ function platformContainer(platforms) { platforms.forEach(platform => { const $container = $('

', { class: 'platform ' + platform.name }).appendTo($platformContainer); $container.html(`

Results of ${platform.name}

`); - const tplArray = platform.tpl; + const tplArray = platform.third_party_libs; const $toggleButton = $('