From 0624e615afd410b96100f0eca25af5e3d1cc8efc Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Sun, 17 May 2009 15:59:23 +0000 Subject: [PATCH] on_identification -> on_boundary --- .../include/CGAL/ArrTraitsFunctors-update.txt | 5 ++ .../include/CGAL/Arr_arc_on_sphere_trait_2.h | 18 ++++---- .../include/CGAL/Arr_counting_traits_2.h | 40 ++++++++-------- .../Arr_geodesic_arc_on_sphere_traits_2.h | 18 ++++---- .../Arr_batched_point_location_traits_2.h | 20 ++++---- .../CGAL/Arr_spherical_topology_traits_2.h | 2 +- .../Arr_spherical_topology_traits_2_impl.h | 2 +- .../include/CGAL/Arr_tracing_traits_2.h | 46 +++++++++---------- .../Arr_basic_insertion_traits_2.h | 42 ++++++++--------- 9 files changed, 98 insertions(+), 95 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/ArrTraitsFunctors-update.txt b/Arrangement_on_surface_2/include/CGAL/ArrTraitsFunctors-update.txt index 7b2a244532e..1a2e7f0dcd2 100644 --- a/Arrangement_on_surface_2/include/CGAL/ArrTraitsFunctors-update.txt +++ b/Arrangement_on_surface_2/include/CGAL/ArrTraitsFunctors-update.txt @@ -35,6 +35,11 @@ Tags to ensure selection of "dummy" functors +Files: +====== + +Arr_tracing_traits_2.h: Some functors are missing! + ######### diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_arc_on_sphere_trait_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_arc_on_sphere_trait_2.h index 86a7bdf6969..6d943646a9c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_arc_on_sphere_trait_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_arc_on_sphere_trait_2.h @@ -786,7 +786,7 @@ public: * that lie on the horizontal identification arc. * The parameter space does not contain a horizontal identification arc. */ - class Compare_x_on_identification_2 { + class Compare_x_on_boundary_2 { public: /*! Compare the x-coordinate of two given points that lie on the * horizontal identification arc. @@ -801,14 +801,14 @@ public: } }; - /*! Obtain a Compare_x_on_identification_2 function object */ - Compare_x_on_identification_2 compare_x_on_identification_2_object() const - { return Compare_x_on_identification_2(); } + /*! 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(); } /*! A functor that compares the y-coordinate of two given points * that lie on the vertical identification arc. */ - class Compare_y_on_identification_2 { + class Compare_y_on_boundary_2 { protected: typedef Arr_arc_on_sphere_traits_2 Traits; @@ -818,7 +818,7 @@ public: /*! Constructor * \param traits the traits (in case it has state) */ - Compare_y_on_identification_2(const Traits * traits) : m_traits(traits) {} + Compare_y_on_boundary_2(const Traits * traits) : m_traits(traits) {} friend class Arr_arc_on_sphere_traits_2; @@ -839,9 +839,9 @@ public: } }; - /*! Obtain a Compare_y_on_identification_2 function object */ - Compare_y_on_identification_2 compare_y_on_identification_2_object() const - { return Compare_y_on_identification_2(this); } + /*! 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); } //@} /// \name Functor definitions for supporting intersections. 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 4cb55320f8b..0915d2d9917 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 @@ -62,8 +62,8 @@ public: BOUNDARY_IN_Y_OP, COMPARE_X_NEAR_BOUNDARY_OP, COMPARE_Y_NEAR_BOUNDARY_OP, - COMPARE_X_ON_IDENTIFICATION_OP, - COMPARE_Y_ON_IDENTIFICATION_OP, + COMPARE_X_ON_BOUNDARY_OP, + COMPARE_Y_ON_BOUNDARY_OP, NUMBER_OF_OPERATIONS }; @@ -151,11 +151,11 @@ public: unsigned int count_compare_y_near_boundary() const { return m_counters[COMPARE_Y_NEAR_BOUNDARY_OP]; } - unsigned int count_compare_x_on_identification() const - { return m_counters[COMPARE_X_ON_IDENTIFICATION_OP]; } + unsigned int count_compare_x_on_boundary() const + { return m_counters[COMPARE_X_ON_BOUNDARY_OP]; } - unsigned int count_compare_y_on_identification() const - { return m_counters[COMPARE_Y_ON_IDENTIFICATION_OP]; } + unsigned int count_compare_y_on_boundary() const + { return m_counters[COMPARE_Y_ON_BOUNDARY_OP]; } /// \name Types and functors inherited from the base //@{ @@ -547,17 +547,17 @@ public: }; /*! A functor that compares the x-coordinate of two given points - * that lie on the horizontal identification curve. + * that lie on horizontal boundaries. */ - class Compare_x_on_identification_2 { + class Compare_x_on_boundary_2 { private: - typename Base::Compare_x_on_identification_2 m_object; + typename Base::Compare_x_on_boundary_2 m_object; unsigned int & m_counter; public: /*! Construct */ - Compare_x_on_identification_2(const Base * base, unsigned int & counter) : - m_object(base->compare_x_on_identification_2_object()), + Compare_x_on_boundary_2(const Base * base, unsigned int & counter) : + m_object(base->compare_x_on_boundary_2_object()), m_counter(counter) {} @@ -568,17 +568,17 @@ public: }; /*! A functor that compares the y-coordinate of two given points - * that lie on the vertical identification curve. + * that lie on vertical boundaries. */ - class Compare_y_on_identification_2 { + class Compare_y_on_boundary_2 { private: - typename Base::Compare_y_on_identification_2 m_object; + typename Base::Compare_y_on_boundary_2 m_object; unsigned int & m_counter; public: /*! Construct */ - Compare_y_on_identification_2(const Base * base, unsigned int & counter) : - m_object(base->compare_y_on_identification_2_object()), + Compare_y_on_boundary_2(const Base * base, unsigned int & counter) : + m_object(base->compare_y_on_boundary_2_object()), m_counter(counter) {} @@ -722,10 +722,10 @@ Out_stream & operator<<(Out_stream & os, << traits.count_compare_x_near_boundary() << std::endl << "# of COMPARE_Y_NEAR_BOUNDARY operation = " << traits.count_compare_y_near_boundary() << std::endl - << "# of COMPARE_X_ON_IDENTIFICATION operation = " - << traits.count_compare_x_on_identification() << std::endl - << "# of COMPARE_Y_ON_IDENTIFICATION operation = " - << traits.count_compare_y_on_identification() << std::endl + << "# of COMPARE_X_ON_BOUNDARY operation = " + << traits.count_compare_x_on_boundary() << std::endl + << "# of COMPARE_Y_ON_BOUNDARY operation = " + << traits.count_compare_y_on_boundary() << std::endl << "total # = " << sum << std::endl << "# of traits constructed = " << Traits::increment(false) << std::endl; 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 49877993f71..77e6de15334 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 @@ -1200,7 +1200,7 @@ public: * that lie on the horizontal identification arc. * The parameter space does not contain a horizontal identification arc. */ - class Compare_x_on_identification_2 { + class Compare_x_on_boundary_2 { public: /*! Compare the x-coordinate of two given points that lie on the * horizontal identification arc. @@ -1215,14 +1215,14 @@ public: } }; - /*! Obtain a Compare_x_on_identification_2 function object */ - Compare_x_on_identification_2 compare_x_on_identification_2_object() const - { return Compare_x_on_identification_2(); } + /*! 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(); } /*! A functor that compares the y-coordinate of two given points * that lie on the vertical identification arc. */ - class Compare_y_on_identification_2 { + class Compare_y_on_boundary_2 { protected: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; @@ -1232,7 +1232,7 @@ public: /*! Constructor * \param traits the traits (in case it has state) */ - Compare_y_on_identification_2(const Traits * traits) : m_traits(traits) {} + Compare_y_on_boundary_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1255,9 +1255,9 @@ public: } }; - /*! Obtain a Compare_y_on_identification_2 function object */ - Compare_y_on_identification_2 compare_y_on_identification_2_object() const - { return Compare_y_on_identification_2(this); } + /*! 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); } //@} /// \name Functor definitions for supporting intersections. 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 9d4dfef8010..47eec5f85e3 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 @@ -836,7 +836,7 @@ public: /*! A functor that compares the x-coordinate of two given points * that lie on the horizontal identification curve. */ - class Compare_x_on_identification_2 { + class Compare_x_on_boundary_2 { protected: //! The base traits. const Base_traits_2 * m_base; @@ -848,7 +848,7 @@ public: * obtaining function, which is a member of the nesting class, * constructing it. */ - Compare_x_on_identification_2(const Base_traits_2 * tr) : m_base(tr) {} + Compare_x_on_boundary_2(const Base_traits_2 * tr) : m_base(tr) {} //! Allow its functor obtaining function calling the private constructor. friend class Arr_batched_point_location_traits_2; @@ -861,16 +861,16 @@ public: } }; - /*! Obtain a Compare_x_on_identification_2 functor object. */ - Compare_x_on_identification_2 compare_x_on_identification_2_object () const + /*! Obtain a Compare_x_on_boundary_2 functor object. */ + Compare_x_on_boundary_2 compare_x_on_boundary_2_object () const { - return Compare_x_on_identification_2(m_base_traits); + return Compare_x_on_boundary_2(m_base_traits); } /*! A functor that compares the y-coordinate of two given points * that lie on the vertical identification curve. */ - class Compare_y_on_identification_2 { + class Compare_y_on_boundary_2 { protected: //! The base traits. const Base_traits_2 * m_base; @@ -882,7 +882,7 @@ public: * obtaining function, which is a member of the nesting class, * constructing it. */ - Compare_y_on_identification_2(const Base_traits_2 * tr) : m_base(tr) {} + Compare_y_on_boundary_2(const Base_traits_2 * tr) : m_base(tr) {} //! Allow its functor obtaining function calling the private constructor. friend class Arr_batched_point_location_traits_2; @@ -895,10 +895,10 @@ public: } }; - /*! Obtain a Compare_y_on_identification_2 functor object. */ - Compare_y_on_identification_2 compare_y_on_identification_2_object () const + /*! Obtain a Compare_y_on_boundary_2 functor object. */ + Compare_y_on_boundary_2 compare_y_on_boundary_2_object () const { - return Compare_y_on_identification_2(m_base_traits); + return Compare_y_on_boundary_2(m_base_traits); } }; 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 213e0ff1f57..cc632309e5b 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 @@ -109,7 +109,7 @@ private: Traits_adaptor_2 * m_traits; bool operator()(const Point_2 & p1, const Point_2 & p2) const { - return (m_traits->compare_y_on_identification_2_object()(p1, p2) == + return (m_traits->compare_y_on_boundary_2_object()(p1, p2) == SMALLER); } }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h index 7e6bcfd9710..2cb8c1a4700 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h @@ -443,7 +443,7 @@ are_equal(const Vertex * v, const Point_2 & p2 = (ind == ARR_MIN_END) ? m_traits->construct_min_vertex_2_object()(xc) : m_traits->construct_max_vertex_2_object()(xc); - return (m_traits->compare_y_on_identification_2_object()(p1, p2) == EQUAL); + return (m_traits->compare_y_on_boundary_2_object()(p1, p2) == EQUAL); } /*! \brief receives a notification on the creation of a new boundary vertex */ 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 e0aaf9a95ca..80a718b4ff3 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 @@ -62,8 +62,8 @@ public: BOUNDARY_IN_Y_OP, COMPARE_X_NEAR_BOUNDARY_OP, COMPARE_Y_NEAR_BOUNDARY_OP, - COMPARE_X_ON_IDENTIFICATION_OP, - COMPARE_Y_ON_IDENTIFICATION_OP, + COMPARE_X_ON_BOUNDARY_OP, + COMPARE_Y_ON_BOUNDARY_OP, NUMBER_OF_OPERATIONS }; @@ -137,11 +137,11 @@ private: bool compare_y_near_boundary_op() const { return m_flags & (0x1 << COMPARE_Y_NEAR_BOUNDARY_OP); } - bool compare_x_on_identification_op() const - { return m_flags & (0x1 << COMPARE_X_ON_IDENTIFICATION_OP); } + bool compare_x_on_boundary_op() const + { return m_flags & (0x1 << COMPARE_X_ON_BOUNDARY_OP); } - bool compare_y_on_identification_op() const - { return m_flags & (0x1 << COMPARE_Y_ON_IDENTIFICATION_OP); } + bool compare_y_on_boundary_op() const + { return m_flags & (0x1 << COMPARE_Y_ON_BOUNDARY_OP); } public: /*! Default constructor */ @@ -883,17 +883,17 @@ public: }; /*! A functor that compares the x-coordinate of two given points - * that lie on the horizontal identification curve. + * that lie on horizontal boundaries. */ - class Compare_x_on_identification_2 { + class Compare_x_on_boundary_2 { private: - typename Base::Compare_x_on_identification_2 m_object; + typename Base::Compare_x_on_boundary_2 m_object; bool m_enabled; public: /*! Construct */ - Compare_x_on_identification_2(const Base * base, bool enabled = true) : - m_object(base->compare_x_on_identification_object()), m_enabled(enabled) {} + Compare_x_on_boundary_2(const Base * base, bool enabled = true) : + m_object(base->compare_x_on_boundary_object()), m_enabled(enabled) {} /*! Operate * \param p1 the first point. * \param p2 the second point. @@ -901,7 +901,7 @@ public: 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_identification" << std::endl + std::cout << "compare_x_on_boundary" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; Comparison_result cr = m_object(p1, p2); @@ -911,17 +911,17 @@ public: }; /*! A functor that compares the y-coordinate of two given points - * that lie on the vertical identification curve. + * that lie on vertical boundaries. */ - class Compare_y_on_identification_2 { + class Compare_y_on_boundary_2 { private: - typename Base::Compare_y_on_identification_2 m_object; + typename Base::Compare_y_on_boundary_2 m_object; bool m_enabled; public: /*! Construct */ - Compare_y_on_identification_2(const Base * base, bool enabled = true) : - m_object(base->compare_y_on_identification_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) {} @@ -932,7 +932,7 @@ public: 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_identification" << std::endl + std::cout << "compare_y_on_boundary" << std::endl << " p1: " << p1 << std::endl << " p2: " << p2 << std::endl; Comparison_result cr = m_object(p1, p2); @@ -1004,16 +1004,14 @@ public: Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(this, compare_y_near_boundary_op()); } - Compare_x_on_identification_2 compare_x_on_identification_2_object() const + Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { - return Compare_x_on_identification_2(this, - compare_x_on_identification_op()); + return Compare_x_on_boundary_2(this, compare_x_on_boundary_op()); } - Compare_y_on_identification_2 compare_y_on_identification_2_object() const + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { - return Compare_y_on_identification_2(this, - compare_y_on_identification_op()); + return Compare_y_on_boundary_2(this, compare_y_on_boundary_op()); } //@} }; diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h index 43d76efae7d..53580e02b7a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_traits_2.h @@ -839,10 +839,10 @@ public: } - /*! A functor that compares the y-coordinates of two points on the - * identification curve. + /*! A functor that compares the y-coordinates of two points on vertical + * boundaries. */ - class Compare_y_on_identification_2 + class Compare_y_on_boundary_2 { protected: //! The base traits. @@ -852,7 +852,7 @@ public: const Point_2 & p2, Arr_bounded_boundary_tag) const { - return m_base->compare_y_on_identification_2_object()(p1.base(), + return m_base->compare_y_on_boundary_2_object()(p1.base(), p2.base()); } @@ -883,7 +883,7 @@ public: * obtaining function, which is a member of the nesting class, * constructing it. */ - Compare_y_on_identification_2 (const Traits_2 * base) : m_base(base) {} + Compare_y_on_boundary_2 (const Traits_2 * base) : m_base(base) {} //! Allow its functor obtaining function calling the private constructor. friend class Arr_basic_insertion_traits_2; @@ -899,15 +899,15 @@ public: } }; - /*! Obtain a Compare_y_on_identification_2 object + /*! Obtain a Compare_y_on_boundary_2 object */ - Compare_y_on_identification_2 compare_y_on_identification_2_object() const + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { - return Compare_y_on_identification_2(m_base_traits); + return Compare_y_on_boundary_2(m_base_traits); } - /*! A function object that determines whether a curve end is bounded. */ - class Is_bounded_2 { + /*! A function object that determines whether a curve end is closed. */ + class Is_closed_2 { protected: //! The base traits. const Traits_2 * m_base; @@ -919,41 +919,41 @@ public: * obtaining function, which is a member of the nesting class, * constructing it. */ - Is_bounded_2(const Traits_2 * base) : m_base(base) {} + Is_closed_2(const Traits_2 * base) : m_base(base) {} //! Allow its functor obtaining function calling the private constructor. friend class Arr_basic_insertion_traits_2; - bool is_bounded (const X_monotone_curve_2 &, Arr_curve_end, + bool is_closed (const X_monotone_curve_2 &, Arr_curve_end, Arr_no_boundary_tag) const { return true; } - bool is_bounded (const X_monotone_curve_2 &, Arr_curve_end, + bool is_closed (const X_monotone_curve_2 &, Arr_curve_end, Arr_has_boundary_tag) const { return true; } - bool is_bounded (const X_monotone_curve_2 & xcv, Arr_curve_end ce, + bool is_closed (const X_monotone_curve_2 & xcv, Arr_curve_end ce, Arr_unbounded_boundary_tag) const { - return m_base->is_bounded_2_object()(xcv, ce); + return m_base->is_closed_2_object()(xcv, ce); } public: - /*! Is the end of an x-monotone curve bounded? + /*! Is the end of an x-monotone curve closed? * \param xcv The x-monotone curve. * \param ce The end of xcv identifier. - * \return true is the curve end is bounded, and false otherwise + * \return true is the curve end is closed, and false otherwise */ bool operator() (const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { - return is_bounded(xcv, ce, Boundary_category()); + return is_closed(xcv, ce, Boundary_category()); } }; - /*! Obtain a Is_bounded_2 function object. */ - Is_bounded_2 is_bounded_2_object() const + /*! Obtain a Is_closed_2 function object. */ + Is_closed_2 is_closed_2_object() const { - return Is_bounded_2(m_base_traits); + return Is_closed_2(m_base_traits); } };