-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aos 2 metadata traits decorators efif #8592
base: master
Are you sure you want to change the base?
Aos 2 metadata traits decorators efif #8592
Conversation
…aits_2 and Arr_counting_traits_2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just read quickly through the file, same problems might exist in other files.
|
||
/*! \ingroup PkgArrangementOnSurface2TraitsClasses | ||
* | ||
* A meradata traits-class decorator for the arrangement package. It counts the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meradata -> metadata ?
* 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trais -> traits?
concept -> concepts?
/*! Disable copy constructor. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one line?
/*! Obtain the counter of the given operation */ | ||
std::size_t count(Operation_id id) const; | ||
|
||
/*! Print the compare_x counter */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compare_x ?
Thanks; fixed all.
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Wed, 6 Nov 2024 at 19:09, albert-github ***@***.***> wrote:
***@***.**** commented on this pull request.
I just read quickly through the file, same problems might exist in other
files.
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> +// 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
meradata -> metadata ?
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> +// $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.
trais -> traits?
concept -> concepts?
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> + /*! Disable copy constructor.
+ */
one line?
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> + /// @{
+
+ /*! Construct default */
+ template <typename ... Args>
+ Arr_counting_traits_2(Args ... args) : Base(std::forward<Args>(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 */
compare_x ?
—
Reply to this email directly, view it on GitHub
<#8592 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNOHHEMIZLPUGODX2Z23Z7JELNAVCNFSM6AAAAABRJEXJ7OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMJYHE2DENRTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
trailing whitespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also run something like /build:v0
to create the documentation so you can check it.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit a strange sentence
*/ | ||
void disable_all_traces(); | ||
|
||
/// \name Types and functors inherited from the base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base
of what, class, traits, ...?
* \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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't if i==0
no be in a code font?
(same for if i==1
)
@@ -727,18 +667,18 @@ class Arr_counting_traits_2 : public Base_traits { | |||
{ ++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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here the x
is shown as a formula but at other places the y
of y-coordinate
is not shown as a formula ...
* \return An approximation of p's \f$x\f$-coordinate (if i == 0), or an | ||
* approximation of p's y-coordinate (if i == 1). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p
and if ...
in code format?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructors of each of these calls templates applies prefect | |
constructors of each of these calls templates applies perfect |
Thank you.
I fixed all these (and a bit more).
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Fri, 8 Nov 2024 at 16:25, Andreas Fabri ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
<#8592 (comment)>:
> @@ -5640,9 +5652,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<BaseTraits>` and
+`Arr_tracing_traits_2<BaseTraits>`, that can be used to insert
+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
⬇️ Suggested change
-constructors of each of these calls templates applies prefect
+constructors of each of these calls templates applies perfect
—
Reply to this email directly, view it on GitHub
<#8592 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNODIURJQPIWKBHFLCRLZ7TCVHAVCNFSM6AAAAABRJEXJ7OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMRTHE2DQNZXG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructors of each of these class templates applies perfect | |
constructors of each of these class templates apply perfect |
`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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
program listed below and coded in the file `count_and_trace.cpp` | |
program listed below |
/// \name Creation | ||
/// @{ | ||
|
||
/*! Construct default */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! Construct default */ | |
/*! constructs default */ |
template <typename ... Args> | ||
Arr_counting_traits_2(Args ... args) : Base(std::forward<Args>(args)...) {} | ||
|
||
/*! Disable copy constructor. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! Disable copy constructor. */ | |
/*! disables copy constructor. */ |
|
||
/// @} | ||
|
||
/*! Obtain the counter of the given operation */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! Obtain the counter of the given operation */ | |
/*! obtains the counter of the given operation */ |
@@ -374,7 +367,7 @@ class Arr_circle_segment_traits_2 { | |||
} | |||
}; | |||
|
|||
/*! Get an Equal_2 functor object. */ | |||
/*! Obtain an `Equal_2` functor object. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! Obtain an `Equal_2` functor object. */ | |
/*! obtains an `Equal_2` functor object. */ |
@@ -554,15 +547,15 @@ class Arr_circle_segment_traits_2 { | |||
} | |||
}; | |||
|
|||
/*! Obtain an Approximate_2 functor object. */ | |||
/*! Obtain an `Approximate_2` functor object. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! Obtain an `Approximate_2` functor object. */ | |
/*! obtains an `Approximate_2` functor object. */ |
@@ -573,8 +566,8 @@ class Arr_circle_segment_traits_2 { | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! 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 |
Make_x_monotone_2 make_x_monotone_2_object() const | ||
{ return Make_x_monotone_2(m_use_cache); } | ||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! 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 |
@@ -707,7 +700,7 @@ class Arr_circle_segment_traits_2 { | |||
} | |||
}; | |||
|
|||
/*! Get a Split_2 functor object. */ | |||
/*! Obtain a `Split_2` functor object. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/*! Obtain a `Split_2` functor object. */ | |
/*! obtains a `Split_2` functor object. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stop here but you get the idea
…ifogel/cgal into Aos_2-metadata_traits_decorators-efif
I fixed all those suggestions of the form Obtain => obtains.
However, these should be applied on a global scale.
I also spotted a few other suggestions and fixed them (except for the first
which is correct as is).
Anyhow, the code is ready.
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Tue, 12 Nov 2024 at 14:56, Sebastien Loriot ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
<#8592 (comment)>:
> @@ -5640,9 +5652,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<BaseTraits>` and
+`Arr_tracing_traits_2<BaseTraits>`, that can be used to insert
+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
⬇️ Suggested change
-constructors of each of these class templates applies perfect
+constructors of each of these class templates apply perfect
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt
<#8592 (comment)>:
> +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
+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
+`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`
⬇️ Suggested change
-program listed below and coded in the file `count_and_trace.cpp`
+program listed below
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> + 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 */
⬇️ Suggested change
- /*! Construct default */
+ /*! constructs default */
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> + 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 <typename ... Args>
+ Arr_counting_traits_2(Args ... args) : Base(std::forward<Args>(args)...) {}
+
+ /*! Disable copy constructor. */
⬇️ Suggested change
- /*! Disable copy constructor. */
+ /*! disables copy constructor. */
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> + NUMBER_OF_OPERATIONS
+ };
+
+ /// \name Creation
+ /// @{
+
+ /*! Construct default */
+ template <typename ... Args>
+ Arr_counting_traits_2(Args ... args) : Base(std::forward<Args>(args)...) {}
+
+ /*! Disable copy constructor. */
+ Arr_counting_traits_2(const Arr_counting_traits_2&) = delete;
+
+ /// @}
+
+ /*! Obtain the counter of the given operation */
⬇️ Suggested change
- /*! Obtain the counter of the given operation */
+ /*! obtains the counter of the given operation */
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> + /// \name Creation
+ /// @{
+
+ /*! Construct default */
+ template <typename ... Args>
+ Arr_counting_traits_2(Args ... args) : Base(std::forward<Args>(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 counter associated with an operation. */
⬇️ Suggested change
- /*! Print the counter associated with an operation. */
+ /*! prints the counter associated with an operation. */
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_counting_traits_2.h
<#8592 (comment)>:
> + 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;
+
+ /// @}
+
+ /// \name Obtain the appropriate functor
⬇️ Suggested change
- /// \name Obtain the appropriate functor
+ /// \name obtains the appropriate functor
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> + 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 */
⬇️ Suggested change
- /*! Construct default */
+ /*! constructs default */
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> + 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<typename ... Args>
+ Arr_tracing_traits_2(Args ... args) : Base(std::forward<Args>(args)...) {}
+
+ /*! Disable copy constructor. */
⬇️ Suggested change
- /*! Disable copy constructor. */
+ /*! disables copy constructor. */
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> + };
+
+public:
+ /// \name Creation
+ /// @{
+
+ /*! Construct default */
+ template<typename ... Args>
+ Arr_tracing_traits_2(Args ... args) : Base(std::forward<Args>(args)...) {}
+
+ /*! Disable copy constructor. */
+ Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete;
+
+ /// @}
+
+ /*! Enable the trace of a traits operation
⬇️ Suggested change
- /*! Enable the trace of a traits operation
+ /*! enables the trace of a traits operation
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> +
+ /*! Construct default */
+ template<typename ... Args>
+ Arr_tracing_traits_2(Args ... args) : Base(std::forward<Args>(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
⬇️ Suggested change
- /*! Enable the trace of all traits operations
+ /*! enables the trace of all traits operations
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> +
+ /*! 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
⬇️ Suggested change
- /*! Disable the trace of a traits operation
+ /*! disables the trace of a traits operation
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> +
+ /*! 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
⬇️ Suggested change
- /*! Disable the trace of all traits operations
+ /*! disables the trace of all traits operations
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> + 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
⬇️ Suggested change
- /// \name Types and functors inherited from the base
+ /// \name Types and functors inherited from `BaseTraits`
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> + 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
⬇️ Suggested change
- /// \name Obtain the appropriate functor
+ /// \name obtains the appropriate functor
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -94,8 +94,7 @@ class Arr_circle_segment_traits_2 {
class Compare_x_2
{
public:
- /*!
- * Compare the x-coordinates of two points.
+ /*! Compare the \f$x\f$-coordinates of two points.
⬇️ Suggested change
- /*! Compare the \f$x\f$-coordinates of two points.
+ /*! compares the \f$x\f$-coordinates of two points.
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -111,7 +110,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get a Compare_x_2 functor object. */
+ /*! Obtain a `Compare_x_2` functor object. */
⬇️ Suggested change
- /*! Obtain a `Compare_x_2` functor object. */
+ /*! obtains a `Compare_x_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -151,8 +150,7 @@ class Arr_circle_segment_traits_2 {
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).
⬇️ Suggested change
- /*! Get the left endpoint of the \f$x\f$-monotone curve (segment).
+ /*! gets the left endpoint of the \f$x\f$-monotone curve (segment).
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -162,7 +160,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get a Construct_min_vertex_2 functor object. */
+ /*! Obtain a `Construct_min_vertex_2` functor object. */
⬇️ Suggested change
- /*! Obtain a `Construct_min_vertex_2` functor object. */
+ /*! obtains a `Construct_min_vertex_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -171,8 +169,7 @@ class Arr_circle_segment_traits_2 {
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).
⬇️ Suggested change
- /*! Get the right endpoint of the \f$x\f$-monotone curve (segment).
+ /*! gets the right endpoint of the \f$x\f$-monotone curve (segment).
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -191,8 +188,7 @@ class Arr_circle_segment_traits_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.
⬇️ Suggested change
- /*! 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.
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -202,7 +198,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get an Is_vertical_2 functor object. */
+ /*! Obtain an `Is_vertical_2` functor object. */
⬇️ Suggested change
- /*! Obtain an `Is_vertical_2` functor object. */
+ /*! obtains an `Is_vertical_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -211,11 +207,10 @@ class Arr_circle_segment_traits_2 {
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.
⬇️ Suggested change
- /*! 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.
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -229,7 +224,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get a Compare_y_at_x_2 functor object. */
+ /*! Obtain a `Compare_y_at_x_2` functor object. */
⬇️ Suggested change
- /*! Obtain a `Compare_y_at_x_2` functor object. */
+ /*! obtains a `Compare_y_at_x_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -238,9 +233,8 @@ class Arr_circle_segment_traits_2 {
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
⬇️ Suggested change
- /*! 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
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -283,7 +277,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get a Compare_y_at_x_right_2 functor object. */
+ /*! Obtain a `Compare_y_at_x_right_2` functor object. */
⬇️ Suggested change
- /*! Obtain a `Compare_y_at_x_right_2` functor object. */
+ /*! obtains a `Compare_y_at_x_right_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -292,16 +286,15 @@ class Arr_circle_segment_traits_2 {
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
⬇️ Suggested change
- /*! 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
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -338,7 +331,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get a Compare_y_at_x_left_2 functor object. */
+ /*! Obtain a `Compare_y_at_x_left_2` functor object. */
⬇️ Suggested change
- /*! Obtain a `Compare_y_at_x_left_2` functor object. */
+ /*! obtains a `Compare_y_at_x_left_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -347,8 +340,8 @@ class Arr_circle_segment_traits_2 {
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
⬇️ Suggested change
- /*! 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
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -374,7 +367,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get an Equal_2 functor object. */
+ /*! Obtain an `Equal_2` functor object. */
⬇️ Suggested change
- /*! Obtain an `Equal_2` functor object. */
+ /*! obtains an `Equal_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -554,15 +547,15 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Obtain an Approximate_2 functor object. */
+ /*! Obtain an `Approximate_2` functor object. */
⬇️ Suggested change
- /*! Obtain an `Approximate_2` functor object. */
+ /*! obtains an `Approximate_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -573,8 +566,8 @@ class Arr_circle_segment_traits_2 {
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
⬇️ Suggested change
- /*! 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
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> Make_x_monotone_2 make_x_monotone_2_object() const
{ return Make_x_monotone_2(m_use_cache); }
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
⬇️ Suggested change
- /*! 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
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -707,7 +700,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get a Split_2 functor object. */
+ /*! Obtain a `Split_2` functor object. */
⬇️ Suggested change
- /*! Obtain a `Split_2` functor object. */
+ /*! obtains a `Split_2` functor object. */
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
<#8592 (comment)>:
> @@ -707,7 +700,7 @@ class Arr_circle_segment_traits_2 {
}
};
- /*! Get a Split_2 functor object. */
+ /*! Obtain a `Split_2` functor object. */
I stop here but you get the idea
—
Reply to this email directly, view it on GitHub
<#8592 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNOFBUCV56APE6QO722T2AH3H3AVCNFSM6AAAAABRJEXJ7OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMRYHE2TQOBXGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
/*! Enable the trace of a traits operation | ||
* \param id the operation identifier | ||
/*! enables the trace of a traits operation. | ||
* \param id the operation identifier. | ||
*/ | ||
void enable_trace(Operation_id id) { m_flags |= 0x1 << id; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89>C:\CGAL_ROOT\CGAL-6.1-Ic-19\include\CGAL\Arr_tracing_traits_2.h(179,55): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) [C:\CGAL_ROOT\CGAL-6.1-Ic-19\cmake\platforms\MSVC-2022-Community-Release\test\Arrangement_on_surface_2_Examples\count_and_trace.vcxproj]
not sure if it's a new warning
Probably not a new warning.
The constant 0x1 is indeed defined as an object of type int and with MSVC
the code
unsigned long long flags;
flags |= (0x1 << x);
causes the warning that you see.
The choice of using size_t for the flags was not such a good one anyway.
I changed the type to 'unsigned long long' and used a matching constant
'0x1ull'.
Anyhow, all fixed.
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Thu, 14 Nov 2024 at 08:39, Sebastien Loriot ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h
<#8592 (comment)>:
> Arr_tracing_traits_2(const Arr_tracing_traits_2&) = delete;
- /*! Enable the trace of a traits operation
- * \param id the operation identifier
+ /*! enables the trace of a traits operation.
+ * \param id the operation identifier.
*/
void enable_trace(Operation_id id) { m_flags |= 0x1 << id; }
89>C:\CGAL_ROOT\CGAL-6.1-Ic-19\include\CGAL\Arr_tracing_traits_2.h(179,55):
warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits
(was 64-bit shift intended?)
[C:\CGAL_ROOT\CGAL-6.1-Ic-19\cmake\platforms\MSVC-2022-Community-Release\test\Arrangement_on_surface_2_Examples\count_and_trace.vcxproj]
not sure if it's a new warning
—
Reply to this email directly, view it on GitHub
<#8592 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNODFQXPDGP64ZGEQ6PD2ARAQNAVCNFSM6AAAAABRJEXJ7OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMZVGE3DQMBSGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Summary of Changes
Introduces two traits decorators, namely
Arr_tracing_traits_2
andArr_counting_traits_2
, which can be used to extract debugging and informative metadata about the traits in use while the program is being executed. They have been part of the CGAL distribution for several years now . (Probably more than a decade.) I gave it a face lift, wrote the necessary documentation, and added a small example program called count_and_trace.cpp.Release Management