CGAL 6.3 - 2D Arrangements
Loading...
Searching...
No Matches
CGAL::Arr_counting_traits_2< BaseTraits > Class Template Reference

#include <CGAL/Arr_counting_traits_2.h>

Definition

template<typename BaseTraits>
class CGAL::Arr_counting_traits_2< BaseTraits >

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. For each traits method it maintains a counter that counts the number of invocations into the method.

It models all the concepts that the original traits models.

Examples
Arrangement_on_surface_2/count_and_trace.cpp.

Public Types

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 ,
  DO_INTERSECT_2_OP , INTERSECT_2_OP , ARE_MERGEABLE_2_OP , MERGE_2_OP ,
  CONSTRUCT_2_OPPOSITE_2_OP , CONSTRUCT_POINT_2_OP , CONSTRUCT_POINT_2_XY_OP , CONSTRUCT_X_MONOTONE_CURVE_2_OP ,
  CONSTRUCT_CURVE_2_OP , COMPARE_ENDPOINTS_XY_2_OP , APPROXIMATE_2_COORD_OP , APPROXIMATE_2_POINT_OP ,
  APPROXIMATE_2_CURVE_OP , APPROXIMATE_2_BOUNDED_CURVE_OP , PARAMETER_SPACE_IN_X_2_CURVE_END_OP , PARAMETER_SPACE_IN_X_2_POINT_OP ,
  IS_ON_X_IDENTIFICATION_2_POINT_OP , IS_ON_X_IDENTIFICATION_2_CURVE_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
}

Public Member Functions

std::size_t count (Operation_id id) const
 obtains the counter of the given operation.
template<typename OutStream>
OutStream & print (OutStream &os, Operation_id id) const
 prints the counter associated with an operation.
void clear_counters ()
 cleans all operation counters.
const Base & traits () const
 obtains a const reference to the traits being counted.
Base & traits ()
 obtains a reference to the traits being counted.
Shared_base shared_traits () const
 obtains the smart pointer to the traits being counted.

Types and functors coming from BaseTraits

using Has_left_category = typename Base::Has_left_category
using Has_merge_category = typename Base::Has_merge_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
 Defined only if the traits being counted models the concept AosTraits_2.
using Multiplicity = typename Base::Multiplicity
 Defined only if the traits being counted models the concept AosXMonotoneTraits_2.

Creation

template<typename ... Args>
 Arr_counting_traits_2 (Args ... args)
 constructs default.
 Arr_counting_traits_2 (std::shared_ptr< BaseTraits > traits)
 constructs from a shared pointer.
 Arr_counting_traits_2 (const Arr_counting_traits_2 &)=delete
 disables copy constructor.

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
Do_intersect_2 do_intersect_2_object () const
Split_2 split_2_object () const
 Supported only if the traits being counted models the concept AosXMonotoneTraits_2.
Intersect_2 intersect_2_object () const
Are_mergeable_2 are_mergeable_2_object () const
Merge_2 merge_2_object () const
Make_x_monotone_2 make_x_monotone_2_object () const
 Supported only if the traits being counted models the concept AosTraits_2.
Construct_opposite_2 construct_opposite_2_object () const
 Supported only if the traits being counted models the concept AosDirectionalXMonotoneTraits_2.
Compare_endpoints_xy_2 compare_endpoints_xy_2_object () const
Approximate_2 approximate_2_object () const
 Supported only if the traits being counted models the concept AosApproximateTraits_2.
Construct_point_2 construct_point_2_object () const
 Supported only if the traits being counted models the concept AosConstructPointTraits_2.
Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const
 Supported only if the traits being counted models the concept AosConstructXMonotoneCurveTraits_2.
Construct_curve_2 construct_curve_2_object () const
 Supported only if the traits being counted models the concept AosConstructCurveTraits_2.
Parameter_space_in_x_2 parameter_space_in_x_2_object () const
 Supported only if the traits being counted models the concepts AosOpenBoundaryTraits_2 or AosSphericalBoundaryTraits_2.
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

Member Enumeration Documentation

◆ Operation_id

template<typename BaseTraits>
enum CGAL::Arr_counting_traits_2::Operation_id
Enumerator
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 
DO_INTERSECT_2_OP 
INTERSECT_2_OP 
ARE_MERGEABLE_2_OP 
MERGE_2_OP 
CONSTRUCT_2_OPPOSITE_2_OP 
CONSTRUCT_POINT_2_OP 
CONSTRUCT_POINT_2_XY_OP 
CONSTRUCT_X_MONOTONE_CURVE_2_OP 
CONSTRUCT_CURVE_2_OP 
COMPARE_ENDPOINTS_XY_2_OP 
APPROXIMATE_2_COORD_OP 
APPROXIMATE_2_POINT_OP 
APPROXIMATE_2_CURVE_OP 
APPROXIMATE_2_BOUNDED_CURVE_OP 
PARAMETER_SPACE_IN_X_2_CURVE_END_OP 
PARAMETER_SPACE_IN_X_2_POINT_OP 
IS_ON_X_IDENTIFICATION_2_POINT_OP 
IS_ON_X_IDENTIFICATION_2_CURVE_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 

Constructor & Destructor Documentation

◆ Arr_counting_traits_2()

template<typename BaseTraits>
CGAL::Arr_counting_traits_2< BaseTraits >::Arr_counting_traits_2 ( std::shared_ptr< BaseTraits > traits)

constructs from a shared pointer.

Parameters
[in]traitsthe taits being counted.