diff --git a/.gitattributes b/.gitattributes index 901b1668074..0483dcce7c1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -452,7 +452,6 @@ Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.gif -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.pdf -text svneol=unset#application/pdf Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_algebraic_segment_traits.tex -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex -text -Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/arr_do_intersect.tex -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/arr_zone.tex -text Arrangement_on_surface_2/doc_tex/Sweep_line_2/fig/Curve_intersections_2.png -text @@ -653,11 +652,10 @@ Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/conics/vertex.pt -te Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/conics/vertex.xcv -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/conics/xcurves -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/empty.zero -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_at_limit -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_near_limit -text +Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_x -text +Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_y -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_y_at_x -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_y_at_x_left -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_y_near_boundary -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/curves -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/intersect -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/is_vertical -text @@ -735,11 +733,8 @@ Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/polylines/split.xcv Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/polylines/vertex -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/polylines/vertex.pt -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/polylines/vertex.xcv -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_at_limit -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_near_limit -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_y_at_x -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_y_at_x_left -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_y_near_boundary -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/curves -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/intersect -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/is_vertical -text @@ -771,15 +766,14 @@ Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/segments/split.xcv - Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/segments/vertex -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/segments/vertex.pt -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/segments/xcurves -text +Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_x -text +Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_y -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare.pt -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare.xcv -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_near_boundary -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_on_boundary -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_y_at_x -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_y_at_x.pt -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_y_at_x.xcv -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_y_near_boundary -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/curves -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/intersect -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/is_vertical -text @@ -824,7 +818,6 @@ Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_do_equal.cpp -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_do_intersect.cpp -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_observer.cmd -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_observer.cpp -text -Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_adaptor.cpp -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_adaptor.h -text Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_zone.cpp -text @@ -1241,12 +1234,6 @@ Circular_kernel_2/benchmark/readme.doc -text svneol=unset#application/msword Circular_kernel_2/benchmark/readme.pdf -text svneol=unset#application/pdf Circular_kernel_2/benchmark/readme.sxw -text Circular_kernel_2/changes -text -Circular_kernel_2/demo/Circular_kernel_2/Qt3/README -text -Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/get_arc.jpeg -text svneol=unset#image/jpeg -Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/index.html svneol=native#text/html -Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/planar_map_icon.jpeg -text svneol=unset#image/jpeg -Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/sweeper.jpeg -text svneol=unset#image/jpeg -Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/trash.jpeg -text svneol=unset#image/jpeg Circular_kernel_2/doc_tex/Circular_kernel_2/fig/Boolean_operation.png -text Circular_kernel_2/doc_tex/Circular_kernel_2/fig/Boolean_operation_detail.png -text Circular_kernel_2/doc_tex/Circular_kernel_2_ref/GeomFunctorsCompute.tex -text @@ -1425,9 +1412,16 @@ Convex_decomposition_3/test/Convex_decomposition_3/star.nef3 -text Convex_hull_2/demo/Convex_hull_2/help/index.html svneol=native#text/html Convex_hull_2/doc_tex/Convex_hull_2/convex_hull.png -text Convex_hull_2/doc_tex/Convex_hull_2/saarhull.png -text svneol=unset#image/png +Convex_hull_3/benchmark/Convex_hull_3/compare_different_approach.cpp -text +Convex_hull_3/benchmark/Convex_hull_3/is_on_positive_side.cpp -text Convex_hull_3/demo/Convex_hull_3/CMakeLists.txt -text Convex_hull_3/doc_tex/Convex_hull_3/bunny.png -text Convex_hull_3/doc_tex/Convex_hull_3/bunny.wrl.gz -text +Convex_hull_3/doc_tex/Convex_hull_3/chull_bimba.png -text +Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3_to_polyhedron_3.tex -text +Convex_hull_3/examples/Convex_hull_3/incremental_hull_class_3.cpp -text +Convex_hull_3/include/CGAL/convex_hull_3_to_polyhedron_3.h -text +Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp -text Developers_manual/doc_tex/Developers_manual/fig/Cartesian_ipoint.gif -text svneol=unset#image/gif Developers_manual/doc_tex/Developers_manual/fig/Cartesian_orientation.png -text svneol=unset#image/png Developers_manual/doc_tex/Developers_manual/fig/Object.gif -text svneol=unset#image/gif @@ -2016,6 +2010,7 @@ Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/setup Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.0-with-g++-4.5.1_F14/setup -text Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14-strict-ansi/setup -text Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/setup -text +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/setup -text Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5-branch_CXX0X-F14/setup -text Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5-branch_Release-F14/setup -text Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-MATCHING-BUG-6/setup -text @@ -2042,6 +2037,8 @@ Maintenance/public_release/announcement/CGAL-3.7 -text Maintenance/public_release/announcement/CGAL-3.7-beta1 -text Maintenance/public_release/announcement/CGAL-3.8 -text Maintenance/public_release/announcement/CGAL-3.8-beta -text +Maintenance/public_release/announcement/CGAL-3.8.1 -text +Maintenance/public_release/announcement/CGAL-3.9 -text Maintenance/public_release/scripts/precompiled_demos_zips -text Maintenance/public_release/scripts/prepare_release -text Maintenance/release_building/BUGFIX_NUMBER -text @@ -3443,13 +3440,22 @@ Snap_rounding_2/doc_tex/Snap_rounding_2/sr1.pdf -text svneol=unset#application/p Snap_rounding_2/test/Snap_rounding_2/cgal_test eol=lf Snap_rounding_2/test/Snap_rounding_2/cgal_test_base -text Snap_rounding_2/test/Snap_rounding_2/cgal_test_with_cmake eol=lf +Spatial_searching/TODO.txt -text Spatial_searching/benchmark/Spatial_searching/Compare_ANN_STANN_CGAL.cpp -text Spatial_searching/demo/Spatial_searching/Qt3/help/index.html svneol=native#text/html Spatial_searching/doc_tex/Spatial_searching/Fig1.gif -text svneol=unset#image/gif Spatial_searching/doc_tex/Spatial_searching/windowQuery.png -text +Spatial_searching/doc_tex/Spatial_searching_ref/Distance_adapter.tex -text +Spatial_searching/doc_tex/Spatial_searching_ref/RangeSearchTraits.tex -text +Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_adapter.tex -text +Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp -text +Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp -text +Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp -text +Spatial_searching/include/CGAL/Search_traits_adapter.h -text Spatial_searching/include/CGAL/internal/K_neighbor_search.h -text Spatial_searching/include/CGAL/internal/bounded_priority_queue.h -text Spatial_searching/test/Spatial_searching/Compare_methods.cpp -text +Spatial_searching/test/Spatial_searching/Point_with_info.h -text Spatial_sorting/doc_tex/Spatial_sorting/fig/Hilbert-median.gif -text Spatial_sorting/doc_tex/Spatial_sorting/fig/Hilbert-median.pdf -text Spatial_sorting/doc_tex/Spatial_sorting/fig/Hilbert-middle.gif -text diff --git a/.gitignore b/.gitignore index 51c12070887..e92fc96d6f1 100644 --- a/.gitignore +++ b/.gitignore @@ -309,6 +309,16 @@ Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-6 Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/localtestscript Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/localtestscript-redo-results-collection Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/src +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/CGALConfig.cmake +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/CMakeCache.txt.backup +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/Makefile +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/config +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/include +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/localbuildscript +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/localtestscript +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/localtestscript-redo-results-collection +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/src Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5-branch_CXX0X-F14/CGALConfig.cmake Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5-branch_CXX0X-F14/CMakeCache.txt.backup Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5-branch_CXX0X-F14/Makefile @@ -349,6 +359,11 @@ Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-6 Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-ansi/localtestscript Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-ansi/localtestscript-redo-results-collection Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-ansi/src +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-m32/CGALConfig.cmake +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-m32/config +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-m32/include +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-m32/lib +Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14-m32/src Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14/CGALConfig.cmake Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14/CMakeCache.txt.backup Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_g++-4.5.1_F14/Makefile diff --git a/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d/PkgDescription.tex b/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d/PkgDescription.tex index 896b21c9aea..0b5636d94e8 100644 --- a/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d/PkgDescription.tex +++ b/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Algebraic Kernel \label{Pkg:AlgebraicKerneld}} -\ccPkgHowToCiteCgal{cgal:bht-ak-11} +\ccPkgHowToCiteCgal{cgal:bht-ak-11b} \ccPkgSummary{ Real solving of polynomials is a fundamental problem with a wide application range. This package is targeted to provide black-box implementations of state-of-the-art diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp index dbf9248f1a6..69840d9c32f 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp @@ -11,6 +11,7 @@ // // ============================================================================ +#include #include // Switches on/off tests for Sqrt-extension types diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp index 16c1cfcf4cc..bacd597afb7 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp @@ -11,6 +11,7 @@ // // ============================================================================ +#include #include // Switches on/off tests for Sqrt-extension types diff --git a/Apollonius_graph_2/doc_tex/Apollonius_graph_2/PkgDescription.tex b/Apollonius_graph_2/doc_tex/Apollonius_graph_2/PkgDescription.tex index 73c93da9077..c786519e8e5 100644 --- a/Apollonius_graph_2/doc_tex/Apollonius_graph_2/PkgDescription.tex +++ b/Apollonius_graph_2/doc_tex/Apollonius_graph_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Apollonius Graphs (Delaunay Graphs of Disks)\label{Pkg:ApolloniusGraph2}} -\ccPkgHowToCiteCgal{cgal:ky-ag2-11} +\ccPkgHowToCiteCgal{cgal:ky-ag2-11b} \ccPkgSummary{ Algorithms for computing the Apollonius graph in two dimensions. The Apollonius graph is the dual of the diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h index ad820cfed6d..3663ce93aa8 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/demo_tab.h @@ -1335,13 +1335,13 @@ public: x_real(first_x, xfirst2); y_real(first_y, yfirst2); - // double xmin, xmax, ymin, ymax; - // if (x < xfirst2) { xmin = x; xmax = xfirst2; } - // else { xmin = xfirst2; xmax = x; } - // if (y < yfirst2) { ymin = y; ymax = yfirst2; } - // else { ymin = yfirst2; ymax = y; } - double distx = xfirst2 - x; - double disty = yfirst2 - y; + double xmin, xmax, ymin, ymax, distx, disty; + if (x < xfirst2) { xmin = x; xmax = xfirst2; } + else { xmin = xfirst2; xmax = x; } + if (y < yfirst2) { ymin = y; ymax = yfirst2; } + else { ymin = yfirst2; ymax = y; } + distx = xfirst2 - x; + disty = yfirst2 - y; move_center(distx, disty); on_first = FALSE; } diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_ack.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_ack.tex index fe7306d6b85..88a436d5f29 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_ack.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_ack.tex @@ -29,8 +29,3 @@ concept related to unbounded curves. Version~3.7 introduced a geometry-traits class that handles planar algebraic curves of arbitrary degree. It was developed by Eric Berberich and Michael Kerber. - -Version~3.9 introduced a new geometry-traits class that handles -rational arcs. It was developed by Oren Salzman and Michael Hemmer. -It replaced an old traits, which handled the same family of -curves, developed by Ron Wein. diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_intro.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_intro.tex index c56c9f6e9b9..a141dc094a5 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_intro.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_intro.tex @@ -87,7 +87,7 @@ on the \dcel\ data structure see~\cite[Chapter~2]{bkos-cgaa-00}. \end{ccTexOnly} \begin{ccHtmlOnly}

- Arrangement of segments + Arrangement of sgements
\end{ccHtmlOnly} \caption{An arrangement of interior-disjoint line segments with some @@ -106,22 +106,6 @@ hole is comprised of two edges. $f_1$ also contains two isolated vertices $u_1$ and $u_2$ in its interior.\label{arr_fig:seg_dcel}} \end{figure} -The $x$-monotone curves of an arrangement are embedded in an -rectangular two-dimensional area called the parameter -space.\footnote{The term parameter space stems from a major - extension the arrangement package is going through to support - arrangements embedded on certain two-dimensional parametric - surfaces in three-dimensions (or higher).} The parameter space is -defined as $X \times Y$, where $X$ and $Y$ are open, half-open, or -closed intervals with endpoints in the compactified real line -$\mathbb{R} \cup \{-\infty,+\infty\}$. Let $b_l$, $b_r$, $b_b$, and -$b_t$ denote the endpoints of $X$ and $Y$, respectively. We -typically refer to these values as the left, right, bottom, and top -sides of the boundary of the parameter space. If the parameter space -is, for example, the entire compactified plane, which is currently -the only option supported by the package, $b_l = b_b = -\infty$ and -$b_r = b_t = +\infty$. - The rest of this chapter is organized as follows: In Section~\ref{arr_sec:arr_class} we review in detail the interface of the \ccc{Arrangement_2} class-template, which is the central diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_traits.tex index 8694cf39f5a..9002b72b746 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_traits.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_traits.tex @@ -9,7 +9,6 @@ mention throughout the chapter that there are different levels of requirements from the traits class, namely the traits class can model different concept refinement-levels. -%-------------------------------------------------- \subsection{The Hierarchy of Traits-Class Concepts \label{arr_sssec:tr_concepts}} %-------------------------------------------------- @@ -22,65 +21,93 @@ A model of the basic concept, \ccc{ArrangementBasicTraits_2}, needs to define the types \ccc{Point_2} and \ccc{X_monotone_curve_2}, where objects of the first type are the geometric mapping of arrangement vertices, and objects of the -latter type are the geometric mapping of edges. Such a model has to -support in addition the following set of operations: -\begin{description} -\item[\ccc{Compare_x_2}:] Compares the $x$-coordinates of two points. - % -\item[\ccc{Compare_xy_2}:] Compares two points lexicographically, by - their $x$-coordinates and then (in case of equality) by their - $y$-coordinates. - % -\item[\ccc{Construct_min_vertex_2},\ccc{Construct_max_vertex_2}:] - Returns the left endpoint (similarly, the right endpoint) of - an $x$-monotone curve. - % -\item[\ccc{Compare_y_at_x_2}:] Given an $x$-monotone curve $c$ and a - point $p$ that lies in its $x$-range, this predicate determines - whether $p$ lies below, above or on $c$. - % -\item[\ccc{Compare_y_at_x_right_2}:] - Given two $x$-monotone curves $c_1$ and $c_2$ that share a common - left endpoint $p$, this predicate determines whether $c_1$ lies - above or under $c_2$ immediately to the right of $p$, or whether the - two curves coincide there. -\item[\ccc{Equal_2}:] Checks two points and two curves for equality - (two curves are equal if their graph is the same). - % -\item[\ccc{Is_vertical_2}:] - Determines whether an $x$-monotone curve is vertical. -\end{description} +latter type are the geometric mapping of edges. In addition, it has to +support the following set of predicates: +\begin{itemize} +\item Compare the $x$-coordinates of two points $p$ and $q$. +% +\item Compare two points $p$ and $q$ lexicographically, by their +$x$-coordinates and then (in case of equality) by their +$y$-coordinates. +% +\item Return the left endpoint (similarly, the right endpoint) of +an $x$-monotone curve $c$. +% +\item Given an $x$-monotone curve $c$ and a point $p$ that lies in its +$x$-range, determine whether $p$ lies below, above or on $c$. +% +\item Given two $x$-monotone curves $c_1$ and $c_2$ that share a +common left endpoint $p$, determine whether $c_1$ lies above or under +$c_2$ immediately to the right of $p$, or whether the two curves coincide +there. +\item Check two curves for equality (two curves are equal if their +graph is the same). +\end{itemize} +This basic set of predicates is sufficient for constructing +arrangements of bounded $x$-monotone curves and points that +are pairwise disjoint in their interiors and for answering +point-location queries and vertical ray-shooting queries. +In order to support unbounded curves we add the following +predicates, involving curve-ends that coincide with the imaginary +boundaries of the arrangement. We say that such curves have +{\em boundary conditions} in $x$ or in $y$: +\begin{itemize} +\item +Determine if the left end (similarly, the right end) of an +$x$-monotone curve $c$ has a boundary condition in $x$. Namely, +we say that its boundary condition is \ccc{MINUS_INFINITY} if +it lies at $x = -\infty$, \ccc{PLUS_INFINITY} if it lies at +$x = +\infty$, and \ccc{NO_BOUNDARY} otherwise. + +Similarly, we need a predicate for determining whether a given +curve-end (the left end or the right end of a given $x$-monotone +curve) has a boundary condition in $y$, namely whether it lies +at $y = \pm\infty$. Note that we can construct the left endpoint +(or the right endpoint) of $c$ only if the corresponding curve-end +is bounded (i.e., has no boundary conditions in $x$ or in $y$). +% +\item +Given two $x$-monotone curve $c_1$ and $c_2$, both defined at $x = +-\infty$, determine whether $c_1$ lies above or under $c_2$ at $x = +-\infty$ (similarly, at $x = \infty$). +% +\item +Compare the $x$-position of an unbounded curve-end with a +finite $x$-coordinate and an infinite $y$-coordinate with a +vertical line that passes through a given query point. +% +\item +Compare the $x$-position of two unbounded curve-ends with finite +$x$-coordinates and infinite $y$-coordinates. +\end{itemize} Each model of the concept \ccc{ArrangementBasicTraits_2} -needs to define a tag named \ccc{Has_left_category}. It determines +needs to define a tag named \ccc{Has_boundary_category}, +which should be either \ccc{Tag_true} or \ccc{Tag_false}. +In the latter case, the tag marks the fact that the traits +class does not support unbounded curves (for example, the +\ccc{Arr_segment_traits_2} class we have encountered in the +previous sections), and it does not have to provide the +predicates listed above. + +An additional tag, named \ccc{Has_left_category}, determines whether the traits class supports the following predicate: -\begin{description} -\item[\ccc{Compare_y_at_x_left_2}:] - Given two $x$-monotone curves $c_1$ and $c_2$ that share a common - right endpoint $p$, this predicate determines whether $c_1$ lies - above or under $c_2$ immediately to the left of $p$, or whether the - two curves coincide there. -\end{description} +\begin{itemize} +\item +Given two $x$-monotone curves $c_1$ and $c_2$ that share a common +right endpoint $p$, determine whether $c_1$ lies above or under +$c_2$ immediately to the left of $p$, or whether the two curves +coincide there. +\end{itemize} This predicate is optional, as it can be answered using the other traits-class primitives, and we wish to alleviate the need to implement an extra method that is not absolutely necessary. However, as implementing the predicate directly may prove to be more efficient, the traits-class -implementer may choose to provide it. +implementer may choose to provide it. As we will see, the +usage of tags makes it easier to implement new traits +classes and allows for more flexibility in their design. -The basic set of predicates is sufficient for constructing -arrangements of $x$-monotone curves that do not reach or approach the -boundary of the parameter space. The nature of the input curves, i.e., -whether some of them are expected to reach or approach the left, right, -bottom, or top side of the boundary of the parameter space, must be -conveyed by the traits class. This is done through the definition of -four additional nested types, namely \ccc{Left_side_category}, -\ccc{Right_side_category}, \ccc{Bottom_side_category}, and -\ccc{Top_side_category}. Each of those types must be convertible to -the type \ccc{Arr_oblivious_side_tag} for the class to be a model of -the concept \ccc{ArrangementBasicTraits_2}. - -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \subsubsection{The Landmarks Concept \label{arr_sssec:tr_lanmarks_concept}} %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -91,54 +118,49 @@ instantiated with a model of the refined \ccc{ArrangementLandmarkTraits_2} traits concept. A model of this concept must define a fixed precision number type (typically \ccc{double}) and support the additional operations: -\begin{description} -\item[\ccc{Approximate_2}:] - Given a point \ccc{p}, approximate the $x$ and $y$-coordinates - of \ccc{p} using the fixed precision number type. We use this - operation for approximate computations---there are certain - operations in the search for the location of the point that need not - be exact and we can perform them faster than other operations. +\begin{itemize} +\item Given a point \ccc{p}, approximate the $x$ and $y$-coordinates +of \ccc{p} using the fixed precision number type. We use this operation +for approximate computations --- there are certain operations in the +search for the location of the point that need not be exact and we can +perform them faster than other operations. % -\item[\ccc{Construct_x_monotone_curve_2}:] Given two points $p_1$ and - $p_2$, this predicate constructs an $x$-monotone curve connecting - $p_1$ and $p_2$. -\end{description} +\item Given two points $p_1$ and $p_2$, construct an $x$-monotone +curve connecting $p_1$ and $p_2$. +\end{itemize} -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\subsubsection{Supporting Intersecting $x$-Monotone Curves +\subsubsection{Supporting Interesecting $x$-Monotone Curves \label{arr_sssec:tr_xmon_concept}} %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A traits class that models the \ccc{ArrangementXMonotoneTraits_2} concept, which refines the \ccc{ArrangementBasicTraits_2} concept, has to support the following functions: -\begin{description} -\item[\ccc{Intersection_2}:] - Computes all intersection points and overlapping sections of - two given $x$-monotone curves. If possible, computes also the - multiplicity of each intersection point.\footnote{If the two - curves intersect at a point $p$ but have different tangents, $p$ - is of multiplicity 1. If the tangents are also equal but the their - curvatures are not the same, $p$ is of multiplicity 2, etc.} - Knowing the multiplicity of an intersection point is not required, - but it can speed up the arrangement construction. +\begin{itemize} +\item Compute all intersection points and overlapping sections of +two given $x$-monotone curves. If possible, compute also the +multiplicity of each intersection point.\footnote{If the two +curves intersect at a point $p$ but have different tangents, $p$ +is of multiplicity 1. If the tangents are also equal but the their +curvatures are not the same, $p$ is of multiplicity 2, etc.} +Knowing the multiplicity of an intersection point is not required, +but it can speed up the arrangement construction. % -\item[\ccc{Split_2}:] Splits an $x$-monotone curve $c$ into two subcurves - at a point $p$ lying in the interior of $c$. +\item Split an $x$-monotone curve $c$ into two subcurves at a point +$p$ lying in the interior of $c$. % -\item[\ccc{Are_mergeable_2}:] Given two $x$-monotone curve $c_1$ and - $c_2$ that share a common endpoint, this predicate determines - whether $c_1$ and $c_2$ are \emph{mergeable}, that is, whether they - can be merged to form a single continuous $x$-monotone curve of the - type supported by the traits class. +\item Given two $x$-monotone curve $c_1$ and $c_2$ that share a +common endpoint, determine whether $c_1$ and $c_2$ are {\em +mergeable}, that is, whether they can be merged to form a +single continuous $x$-monotone curve of the type supported by the +traits class. % -\item[\ccc{Merge_2}:] Merges two mergeable $x$-monotone curves. -\end{description} +\item Merge two mergeable $x$-monotone curve $c_1$ and $c_2$. +\end{itemize} Using a model of the \ccc{ArrangementXMonotoneTraits_2}, it is possible to construct arrangements of sets of $x$-monotone curves (and points) that may intersect one another. -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \subsubsection{Supporting Arbitrary Curves \label{arr_sssec:tr_full_concept}} %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -146,215 +168,37 @@ possible to construct arrangements of sets of $x$-monotone curves The concept \ccc{ArrangementTraits_2} refines the \ccc{ArrangementXMonotoneTraits_2} concept by adding the notion of a general, not necessarily $x$-monotone (and not necessarily -continuous) curve. A model of this concept must define the -\ccc{Curve_2} type and support the subdivision of a curve into a -set of continuous $x$-monotone curves and isolated points using -the predicate \ccc{Make_x_monotone_2}. For example, the curve -$C:\ (x^2 + y^2)(x^2 + y^2 - 1) = 0$ is the unit circle (the loci -of all points for which $x^2 + y^2 = 1$) with the origin $(0,0)$ -as a singular point in its interior. $C$ should therefore be -divided into two circular arcs (the upper part and the lower part -of the unit circle) and a single isolated point. +connected) curve. A model of this concept must define the +\ccc{Curve_2} type and support the division of a curve into a +set of continuous $x$-monotone curves and isolated points. For +example, the curve $C:\ (x^2 + y^2)(x^2 + y^2 - 1) = 0$ is the +unit circle (the loci of all points for which $x^2 + y^2 = 1$) +with the origin $(0,0)$ as a singular point in its interior. $C$ +should therefore be divided into two circular arcs (the upper +part and the lower part of the unit circle) and a single isolated +point. Note that the refined model \ccc{ArrangementTraits_2} is required -only when using the free \ccc{insert()} functions (see -Section~\ref{arr_sec:gl_funcs}), which accept a \ccc{Curve_2} object -in the incremental version, or a range of \ccc{Curve_2} objects in the -aggregated version. In all other cases it is sufficient to use a model -of the \ccc{ArrangementXMonotoneTraits_2} concept. - -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -\subsubsection{Supporting Unbounded Curves} -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -% -An arrangement that supports unbounded $x$-monotone curves maintains -an implicit bounding rectangle in the \dcel{} structure; see -Section~\ref{arr_ssec:unb_rep}. The unbounded ends of vertical rays, -vertical lines, and curves with vertical asymptotes are represented -by vertices that lie on the bottom or top sides of this bounding -rectangle. These vertices are not associated with points, but are -associated with (finite) $x$-coordinates. The unbounded ends of all -other curves are represented by vertices that lie on the left or -right sides of this bounding rectangle. These vertices are not -associated with points either. Edges connect these vertices and the -four vertices that represents the corners of this bounding rectangle -to form the rectangle. - -Several predicates are required to handle $x$-monotone curves that -approach infinity and thus approach the boundary of the parameter -space. These predicates are sufficient to handle not only curves -embedded in an unbounded parameter space, but also curves embedded -in a bounded parameter space with open boundaries. Let $b_l$ and -$b_r$ denote the $x$-coordinates of the left and right boundaries of -the parameter space, respectively. Let $b_b$ and $b_t$ denote the -$y$-coordinates of the bottom and top boundaries of the parameter -space, respectively. Recall that currently the general code of the -arrangement only supports the case where the parameter space is the -entire compactified plane, thus $b_l = b_b = -\infty$ and -$b_r = b_t = +\infty$. Nonetheless, when the parameter space is -bounded, it is the exact geometric embedding of the implicit bounding -rectangle. In the following we assume that an $x$ monotone -curve $C$ can be considered as a parametric curve $C(t) = (X(t),Y(t))$ -defined over a closed, open, or half open interval with endpoints~$0$ -and~$1$. - -%% The additional requirements are organized in four different concepts, -%% one for each side. Models of the concept associated with the bottom -%% and top sides can only handle curves with finite $x$-coordinates. -%% Curves with negative infinite and positive infinite $x$-coordinates -%% are handled by models of concepts associated with the left and right -%% sides, respectively. We defer the introducing of the four individual -%% concepts to a later release to avoid clutter. Instead, we introduce -%% the single concept \ccc{ArrangementOpenBoundaryTraits_2}, which -%% combines all the four concepts. The combined concept refines the -%% concept \ccc{ArrangementBasicTraits_2}. The arrangement template -%% instantiated with a traits class that models this combined concept -%% can handle curves that are unbounded in any direction. -Models of the concept \ccc{ArrangementOpenBoundaryTraits_2} handle -curves that approach the boundary of the parameter space. This concept -refines the concept \ccc{ArrangementBasicTraits_2}. The arrangement -template instantiated with a traits class that models this concept -can handle curves that are unbounded in any direction. If some curves -inserted into an arrangement object are expected to be unbounded, namely, -there exists $d \in \{0,1\}$ such that -$\lim_{t \rightarrow d}X(t) = \pm\infty$ or -$\lim_{t \rightarrow d}y(t) = \pm\infty$ -holds for at least one input curve $C(t) = (X(t),Y(t))$, the arrangement -template must be instantiated with a model of the -\ccc{ArrangementOpenBoundaryTraits} concept.\footnote{We - intend to enhance the arrangement template to handle curves confined - to a bounded yet open parameter space. A curve that reaches the - boundary of the parameter space in this case is bounded and open.} - -All the four types \ccc{Left_side_category}, -\ccc{Right_side_category}, \ccc{Bottom_side_category}, and -\ccc{Top_side_category} nested in a model of the concept -\ccc{ArrangementOpenBoundaryTraits} must be convertible to -\ccc{Arr_open_side_tag}.\footnote{The tags - \ccc{Arr_oblivious_side_tag} and \ccc{Arr_open_side_tag} are only - two out of a larger number of options for the side categories - included in major extension the code is going through.} -For example, the \ccc{Arr_rational_arc_traits_2} traits-model supports -unbounded curves; see Section~\ref{arr_ssec:tr_ratfunc}. Thus, all -four nested types are defined as \ccc{Arr_open_side_tag}. -Adversely, all four types nested in the \ccc{Arr_segment_traits_2} -traits-model (see Section~\ref{arr_ssec:tr_segs}) are defined as -\ccc{Arr_oblivious_side_tag}, as segments are always -bounded.\footnote{We intend to introduce more concepts that require - only a subset of the categories to be convertible to - \ccc{Arr_open_side_tag}.} - -A model of the concept \ccc{ArrangementOpenBoundaryTraits_2} must provide -the additional predicates listed below. -$x$-coordinates and $y$-coordinates are differently handled. This -asymmetry is brought on by the various algorithms applied to -arrangements, the input and output arguments of which are $x$-monotone -curves. Indeed, all curves maintained by any arrangement are -continuous weakly $x$-monotone curves. A non $x$-monotone curve is -divided into $x$-monotone sub curves (and perhaps points) before it -is inserted into an arrangement. This asymmetry is also reflected in -the additional predicates listed below. -%% Notice that curves that reach -%% the left or right boundary sides are handled by the two predicates -%% \ccc{Parameter_space_in_x_2} and \ccc{Compare_y_near_boundary_2}, -%% while the handling of curves that reach the bottom or top boundary -%% sides is performed by the three predicates -%% \ccc{Parameter_space_in_y_2}, \ccc{Compare_x_at_limit_2}, and -%% \ccc{Compare_x_near_limit_2}. - -\begin{description} -\item[\ccc{Parameter_space_in_x_2}:] - Given a parametric $x$-monotone curve $C(t) = (X(t),Y(t))$ and an - enumerator that specifies either the minimum end or the maximum end - of the curve, and thus maps to a parameter value $d \in \{0,1\}$, - this predicate determines the location of the curve end along the - $x$-dimension. Formally, the predicate determines whether - $\lim_{t \rightarrow d} X(t)$ evaluates to $b_l$, $b_r$, or a value - in between. - % -\item[\ccc{Compare_y_near_boundary_2}:] - Given two $x$-monotone curves $C_1$ and $C_2$ and an enumerator $i$ - that specifies either the minimum ends or the maximum ends of the - two curves, this predicate compares the $y$-coordinates of the - curves near their respective ends. That is, the predicate compares - the $y$-coordinates of the vertical projection of a point $p$ onto - $C_1$ and onto $C_2$. If the enumerator $i$ specifies the minimum - ends, the curves must approach the left boundary-side. In this case - $p$ is located far to the left, such that the result is invariant - under a translation of $p$ farther to the left. If $i$ specifies the - maximum ends, the curves must approach the right boundary-side. In - that case $p$ is located far to the right in a similar manner. - % -\item[\ccc{Parameter_space_in_y_2}:] - Given a parametric $x$-monotone curve $C(t) = (X(t),Y(t))$ and an - enumerator that specifies either the minimum end or the maximum end - of the curve, and thus maps to a parameter value $d \in \{0,1\}$, - this predicate determines the location of the curve end along the - $y$-dimension. Formally, the predicate determines whether - $\lim_{t \rightarrow d} Y(t)$ evaluates to $b_b$, $b_t$, or a value - in between. - % -\item[\ccc{Compare_x_at_limit_2}:] - Two versions of this predicate are provided: - (i) Given a point $p$, a parametric $x$-monotone curve - $C(t) = (X(t),Y(t))$, and an enumerator that specifies either the - minimum end or the maximum end of the curve, and thus maps to a - parameter value $d \in \{0,1\}$, this predicate compares the - $x$-coordinate of $p$ and $\lim_{t \rightarrow d} X(t)$. If the - parameter space is unbounded, a precondition assures that $C$ - has a vertical asymptote at its $d$-end; that is - $\lim_{t \rightarrow d} X(t)$ is finite. - (ii) Given two parametric $x$-monotone curves - $C_1(t) = (X_1(t),Y_1(t))$ and $C_2(t) = (X_2(t),Y_2(t))$ and two - enumerators that specify either the minimum end or the maximum - end of each curve, and thus map to parameter values - $d_1\in \{0,1\}$ and $d_2 \in \{0,1\}$ for $C_1$ and for $C_2$, - respectively, this predicate compares - $\lim_{t \rightarrow d_1} X_1(t)$ and $\lim_{t \rightarrow d_2} X_2(t)$. - If the parameter space is unbounded, a precondition assures that - $C_1$ and $C_2$ have vertical asymptote at their respective ends; - that is $\lim_{t \rightarrow d_1} X_1(t)$ and - $\lim_{t \rightarrow d_2} X_2(t)$ are finite. -% -\item[\ccc{Compare_x_near_limit_2}:] - Given two $x$-monotone curves $C_1$ and $C_2$ and an enumerator $i$ - that specifies either the minimum ends or the maximum ends of the - two curves, this predicate compares the $x$-coordinates of the - curves near their respective ends. That is, the predicate compares - the $x$-coordinates of the horizontal projection of a point $p$ - onto $C_1$ and onto $C_2$. If the parameter space is unbounded, a - precondition assures that $C_1$ and $C_2$ have vertical asymptote - at their respective ends. Furthermore, both curves approach the - same boundary-side, either the bottom or the top, at their - respective ends. If both curves approach the bottom boundary-side, - $p$ is located far to the bottom, such that the result is invariant - under a translation of $p$ farther to the bottom. If both curves - approach the top boundary-side, $p$ is located far to the top in a - similar manner. Another precondition assures that the - $x$-coordinates of the limits of the curves at their respective - ends are equal. That is, the predicate \ccc{Compare_x_at_limit_2} - applied to $C_1$, $C_2$, and $i$ evaluates to \ccc{EQUAL}. -\end{description} +only when using the free \ccc{insert()} and +\ccc{insert()} functions (see Section~\ref{arr_sec:gl_funcs}), +which accept a \ccc{Curve_2} object in the incremental version, +or a range of \ccc{Curve_2} objects in the aggregated version. +In all other cases it is sufficient to use a model of the +\ccc{ArrangementXMonotoneTraits_2} concept. In the rest of this section we review the traits classes included in the public distribution of \cgal, that handle line -segments, polylines, conic arcs, rational functions, and arcs of -B\'{e}zier and algebraic curves. -The last subsection overviews +segments, polylines and conic arcs. The last subsection overviews decorators for geometric traits classes distributed with \cgal, which extend other geometric traits-class by attaching auxiliary data with the geometric objects. -%-------------------------------------------------------------- \subsection{Traits Classes for Line Segments and Linear Objects \label{arr_ssec:tr_segs}} %-------------------------------------------------------------- -The \ccc{Arr_segment_traits_2} class used so far in most -example programs in this chapter is a model of the concepts -\ccc{ArrangementTraits_2}, \ccc{ArrangementLandmarkTraits_2}, -and \ccc{ArrangementDirectionalXMonotoneTraits_2}; the later -enables Boolean set operations. It is parameterized by a +The \ccc{Arr_segment_traits_2} class used so far +in most example programs in this chapter is parameterized by a geometric kernel and uses the \ccc{Kernel::Point_2} type as it point type. However, neither the \ccc{Curve_2} nor the \ccc{X_monotone_curve_2} types are identical to the @@ -460,13 +304,11 @@ data is stored with the line segments. The class \ccc{Arr_non_caching_segment_traits_2} inherits from \ccc{Arr_non_caching_segment_basic_traits_2} and -extends it to be a model of the concepts \ccc{ArrangementTraits_2}, -\ccc{ArrangementLandmarkTraits_2},and -\ccc{ArrangementDirectionalXMonotoneTraits_2}. It may thus be used to -construct arrangement of intersecting line segments, but as explained -above, for efficiency reasons it is recommended to use it only when -the arrangement is very sparse and contains hardly any intersection -points. +extends it to be a model of the \ccc{ArrangementTraits_2} concept. +It may thus be used to construct arrangement of intersecting line +segments, but as explained above, for efficiency reasons it is +recommended to use it only when the arrangement is very sparse and +contains hardly any intersection points. In the following example we read an input file containing a set of line segments that are pairwise disjoint in their interior. As the @@ -494,9 +336,8 @@ from a \ccc{Kernel::Segment_2} object. Just like the default segment-traits class, the linear-traits class also use caching techniques to speed up its predicates and constructions. -%------------------------------------------------------------------ \subsection{The Polyline-Traits Class\label{arr_ssec:tr_polylines}} -%------------------------------------------------------------------ +%------------------------------------- The \ccc{Arr_polyline_traits_2} class can be used to maintain arrangements of polylines (a.k.a. poly-segments), @@ -557,9 +398,7 @@ polylines: \ccIncludeExampleCode{Arrangement_on_surface_2/polylines.cpp} -%-------------------------------------------------------------- -\subsection{A Traits Class for Circular Arcs and Line Segments - \label{arr_ssec:tr_circ_seg}} +\subsection{A Traits Class for Circular Arcs and Line Segments\label{arr_ssec:tr_circ_seg}} %-------------------------------------------------------------- Circles and circular arcs are the simplest form of non-linear curves. @@ -585,14 +424,9 @@ of dilated polygons. The \ccc{Arr_circle_segment_traits_2} class-template is designed for efficient handling of arrangements of circular arcs and line segments. -It is a model of the concepts \ccc{ArrangementTraits_2} and -\ccc{ArrangementDirectionalXMonotoneTraits_2}; the later enables -Boolean set operations. Note that it is not a model of -\ccc{ArrangementLandmarkTraits_2} concept, so it is impossible to -use the landmark point-location strategy. The traits class template -is parameterized by a geometric kernel, and can handle arrangements of +It is parameterized by a geometric kernel, and can handle arrangements of segments of \ccc{Kernel::Circle_2} objects (full circles are also supported) -or of \ccc{Kernel::Line_2} objects---namely circular arcs and line segments. +or of \ccc{Kernel::Line_2} objects --- namely circular arcs and line segments. It is important to observe that the nested \ccc{Point_2} type defined by the traits class, whose coordinates are typically algebraic numbers of degree 2, is {\em not} the same as the \ccc{Kernel::Point_2} type, which is capable of @@ -668,9 +502,8 @@ purposes, are based on different concepts, and posses different characteristics. You are encouraged to experiment with both, compare their performance, and use the most suitable for your case. -%------------------------------------------------------------------ \subsection{A Traits Class for Conic Arcs\label{arr_ssec:tr_conic}} -%------------------------------------------------------------------ +%----------------------------------------- A {\em conic curve} is an algebraic curve of degree 2. Namely, it is the locus of all points $(x,y)$ satisfying the equation $C:\ r @@ -759,7 +592,7 @@ computations on the number types it defines. \end{itemize} The \ccc{Arr_conic_traits_2} models the \ccc{ArrangementTraits_2} and -\ccc{ArrangementLandmarkTraits_2} concepts. (It supports +the \ccc{ArrangementLandmarkTraits_2} concepts. (It supports the landmark point-location strategy). Its \ccc{Point_2} type is derived from \ccc{AlgKernel::Point_2}, while the \ccc{Curve_2} type represents a bounded, not necessarily $x$-monotone, conic arc. @@ -777,7 +610,6 @@ special cases, such as circular arcs or line segments. The also support basic access functions such as \ccc{source()}, \ccc{target()} and \ccc{orientation()}. -%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \subsubsection{Examples for Arrangements of Conics} %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -826,91 +658,53 @@ multiplicity $1$: \ccIncludeExampleCode{Arrangement_on_surface_2/conic_multiplicities.cpp} -%--------------------------------------------------------- \subsection{A Traits Class for Arcs of Rational Functions\label{arr_ssec:tr_ratfunc}} %--------------------------------------------------------- -The traits class -\ccc{Arr_rational_function_traits_2} handles -bounded and unbounded arcs of rational functions, referred to as -\emph{rational arcs} (in particular, such an arc may correspond to the -entire graph of a rational function), and enables the construction and -maintenance of arrangements of such arcs. Rational functions, and -polynomial functions in particular, are not only interesting in their -own right, they are also very useful for approximating or -interpolating more complicated curves; see, +A {\em rational function} is given by the equation $y = +\frac{P(x)}{Q(x)}$, where $P$ and $Q$ are polynomials of arbitrary +degrees. In particular, if $Q(x) = 1$, then the function is a +simple polynomial function. A bounded {\em rational arc} is +defined by the graph of a rational function over some interval +$[x_{\rm min}, x_{\rm max}]$, where $Q$ does not have any real +roots in this interval (Thus, the arc does not contain any poles). +Rational functions, and polynomial functions in particular, are +not only interesting in their own right, they are also very useful +for approximating or interpolating more complicated curves; see, e.g.,~\cite[Chapter~3]{cgal:ptvf-nrcpp-02}. -\ccc{Arr_rational_function_traits_2} is a model -of the concepts \ccc{ArrangementTraits_2}, -\ccc{ArrangementOpenBoundaryTraits_2}, and -\ccc{ArrangementDirectionalXMonotoneTraits_2}; the later enables -Boolean set operations. Note that it is not a model of -\ccc{ArrangementLandmarkTraits_2} concept, so it is impossible to use -the landmark point-location strategy with this traits class. -%\footnote{This requires a relaxation of \ccc{ArrangementLandmarkTraits_2}, -%which will be submitted separately.} +The computations with rational arcs are guaranteed to be robust and +exact, assuming that the coefficient of the polynomials $P$ and $Q$ +are rational numbers. The $x$-values that determine the interval +over which the arc is defined can however be arbitrary algebraic +numbers. -A rational function $y = \frac{P(x)}{Q(x)}$ is defined by two -polynomials $P$ and $Q$ of arbitrary degrees. If $Q(x) = 1$ then -the function is a simple polynomial function. Usually the domain is -$\R$ but the function may also be restricted to a bounded interval -$[x_{\rm min}, x_{\rm max}]$ or defined over a ray -$(-\infty, x_{\rm max}]$ or $[x_{\rm min}, \infty)$. Rational -functions are represented by the nested type \ccc{Curve_2}. -A rational arc is always $x$-monotone in the mathematical -sense. However, it is not necessarily continuous, as it may have -singularities. An arc that has singularities must -be split into continuous portions before being inserted into the -arrangement. Arbitrary rational functions are represented by the -nested type \ccc{Curve_2} and continuous portions of rational -functions are represented by the nested type -\ccc{X_monotone_curve_2}. Constructors for both types are provided by -the traits. A \ccc{Curve_2} may be split up into several -\ccc{X_monotone_curve_2} using \ccc{Make_x_monotone_2}. +Using the \ccc{Arr_rational_arc_traits_2} class +template it is possible to construct and maintain arrangement of +rational arcs. The template parameters are very similar to the +ones used by the \ccc{Arr_conic_traits_2} class template; see +the previous section. However, no rational kernel is needed. Also +in this case it is recommended to use the +\ccc{CORE_algebraic_number_traits} class, with a kernel instantiated +with the \ccc{Algebraic} type defined by this class. -Using the \ccc{Arr_rational_function_traits_2} -class template it is possible to construct and maintain arrangement -of rational arcs. The template parameter of the traits must be a model -of the concept \ccc{AlgebraicKernel_d_1}. A rational function is -represented as the quotient of two polynomials $P$ and $Q$ of type -\ccc{AlgebraicKernel_d_1::Polynomial_1} and an $x$-interval over which -the polynomials are defined. The type of the polynomial coefficients, -namely \ccc{AlgebraicKernel_d_1::Coefficient}, cannot be algebraic. -Moreover, it is recommended that this type is not made rational either, -since using rational, as opposed to integral, coefficients does not -extend the range of the rational arcs and is typically less efficient. -The type of the interval bounds, namely -\ccc{AlgebraicKernel_d_1::Bound}, however, can be algebraic. A point is -represented by a rational function and its $x$-coordinate, which is of -type \ccc{AlgebraicKernel_d_1::Algebraic_real_1}. Note that an explicit -representation of the $y$-coordinate is only computed upon request, as -it can be a rather costly operation. +The \ccc{Arr_rational_arc_traits_2} is a model of the +\ccc{ArrangementTraits_2} concept (but not of the +\ccc{ArrangementLandmarkTraits_2} concept, so it is not possible +to use the landmark point-location strategy for arrangements of +rational arcs). Its \ccc{Point_2} type is derived from +\ccc{AlgKernel::Point_2}, while the \ccc{Curve_2} and +\ccc{X_monotone_curve_2} types refer to the same class (note that +a rational arc is always $x$-monotone). The traits class also +defines the \ccc{Rat_vector} type, representing a vector of +rational coefficients, (whose type is \ccc{NtTraits::Rational}). A +rational arc can be constructed from a single vector of +coefficients, specifying the polynomial $P$ alone (and $Q(x) = +1$), or from two vectors of coefficients, specifying both $P$ and +$Q$. -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 curves using only the constructor objects provided by -member functions of the traits class. -%This is also the reason why IO is not handled via the usual stream operators. -Moreover, a curve must only be used by the traits class object that -was used to construct it. The 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 on -demand. - -The curve constructors have an additional advantage. They conveniently -enable the provision of two polynomials that define a rational arc -using rational coefficients. For example, let $P$ and $Q$ denote two -polynomials with integral coefficients that define a rational arc at -interest, and let $P'$ and $Q'$ denote two polynomials with rational -coefficients that define the same rational arc; that is, the quotients -$P/Q$ and $P'/Q'$ are identical. You can construct the rational arc -providing the coefficients of $P'$ and $Q'$ to the constructor. In this -case the constructor normalizes the coefficients and stores the desired -polynomials $P$ and $Q$. - -\begin{figure}[h] -\begin{ccTexOnly} +\begin{figure}[t] +\begin{ccTexOnly} \begin{center} \includegraphics{Arrangement_on_surface_2/fig/ex_16} \end{center} @@ -929,11 +723,9 @@ arrangement of rational arcs depicted in Figure~\ref{arr_fig:ex_16}. Note the usage of the two constructors, for polynomial arcs and for rational arcs: -\pagebreak[3] - \ccIncludeExampleCode{Arrangement_on_surface_2/rational_functions.cpp} -\begin{figure}[h] +\begin{figure}[t] \begin{ccTexOnly} \begin{center} \includegraphics{Arrangement_on_surface_2/fig/ex_unb_rat} @@ -950,8 +742,8 @@ constructed in \end{figure} The following example demonstrates the construction of an -arrangement of six rational arcs---four unbounded arcs and two -bounded ones---as depicted in Figure~\ref{arr_fig:ex_unb_rat}. Note +arrangement of six rational arcs --- four unbounded arcs and two +bounded ones --- as depicted in Figure~\ref{arr_fig:ex_unb1}. Note the usage of the constructors of an entire rational function and of an infinite ``ray'' of such a function. Also observe that the hyperbolas $y = \pm\frac{1}{x}$ and $y = \pm\frac{1}{2x}$ never intersect, although @@ -960,9 +752,8 @@ unbounded faces are created between them: \ccIncludeExampleCode{Arrangement_on_surface_2/unbounded_rational_functions.cpp} -%---------------------------------------------------------------------------- \subsection{A Traits Class for Planar B\'ezier Curves\label{arr_ssec:tr_bez}} -%---------------------------------------------------------------------------- +%--------------------------------------------------------- A planar {\em B\'ezier curve} $B$ is a parametric curve defined by a sequence of {\em control points} $p_0, \ldots, p_n$ as follows: @@ -1004,7 +795,7 @@ See the Reference Manual for the exact interface of the \ccc{Point_2}, The \ccc{Arr_Bezier_curve_traits_2} is a model of the \ccc{ArrangementTraits_2} concept (but not of the -\ccc{ArrangementLandmarkTraits_2} concept, so it is impossible +\ccc{ArrangementLandmarkTraits_2} concept, so it is not possible to use the landmark point-location strategy for arrangements of rational arcs). @@ -1033,10 +824,9 @@ Figure~\ref{arr_fig:ex_bez}. \ccIncludeExampleCode{Arrangement_on_surface_2/Bezier_curves.cpp} -%------------------------------------------------------------------------- -\subsection{A Traits Class for Planar Algebraic Curves of Arbitrary Degree - \label{arr_ssec:tr_alg}} -%------------------------------------------------------------------------- +\subsection{A Traits Class for Planar Algebraic Curves +of Arbitrary Degree\label{arr_ssec:tr_alg}} +%--------------------------------------------------------- An algebraic curve $C$ in the plane is defined as the (real) zero locus of a polynomial $f(x,y)$ in two variables. The curve is uniquely defined @@ -1061,7 +851,7 @@ we support unbounded curves, vertical curves or segments, and isolated points. The \ccc{Arr_algebraic_segment_traits_2} class template is a model of the \ccc{ArrangementTraits_2} concept (but not of the -\ccc{ArrangementLandmarkTraits_2} concept, so it is impossible +\ccc{ArrangementLandmarkTraits_2} concept, so it is not possible to use the landmark point-location strategy for arrangements of algebraic curves). The template argument \ccc{Coefficient} determines @@ -1157,7 +947,7 @@ its $x$-range contains no critical point in its interior. \end{ccTexOnly} \begin{ccHtmlOnly}

- The algebraic curves + The braic curves
\end{ccHtmlOnly} \caption{The critical $x$-coordinates of an algebraic curve (dashed lines), @@ -1212,9 +1002,8 @@ Figure~\ref{arr_fig:ex_alg_segments}. \ccIncludeExampleCode{Arrangement_on_surface_2/algebraic_segments.cpp} -%----------------------------------------------------------- \subsection{Traits-Class Decorators\label{arr_ssec:meta_tr}} -%----------------------------------------------------------- +%----------------------------------- Geometric traits-class decorators allow you to attach auxiliary data to curves and to points. The data is automatically manipulated @@ -1291,7 +1080,6 @@ between two $x$-monotone curves $c_1$ and $c_2$ with associated data sets $S_1$ and $S_2$, respectively, the overlapping subcurve is associated with the consolidated set $S_1 \cup S_2$. -%~~~~~~~~~~~~~~~~~~~~~~~ \subsubsection{Examples} %~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_unbounded.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_unbounded.tex index fc7cbcfc1c8..d4ef0d03deb 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_unbounded.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_unbounded.tex @@ -11,7 +11,7 @@ lines and rays. %-------------------------------------------- Consider the arrangement induced by the two lines $y = x$ and -$y = -x$. These two lines intersect at the origin, such that the +$y = -x$. These two line intersect at the origin, such that the arrangement contains a single vertex $v = (0,0)$, with four infinite rays emanating from it. Each ray corresponds to an arrangement edge, and these edges subdivide the plane into four unbounded faces. @@ -151,11 +151,11 @@ Halfedges are drawn as thin arrows. The vertices $v_1, \ldots, v_8$ lie at infinity, and are not associated with valid points. The halfedges that connect them are fictitious, and are not associated with concrete curves. The face denoted $f_0$ (lightly shaded) -is the fictitious ``unbounded face'' which lies outside the bounding +is the fictitious ``unbounded face'' which lies outside the imaginary rectangle (dashed) that bounds the actual arrangement. The four fictitious vertices $v_{\rm bl}, v_{\rm tl}, v_{\rm br}$ and -$v_{\rm tr}$ represent the four corners of the bounding -rectangle.\label{arr_fig:unb_dcel}} +$v_{\rm tr}$ represent the four corners of the imaginary bounding +rectangle..\label{arr_fig:unb_dcel}} \end{figure} Given a set $\calC$ of unbounded curves, a simple approach for @@ -167,7 +167,7 @@ $\calC$. This process would result in a set $\calC$ of bounded curves straightforward to compute the arrangement induced by this set. However, we would like to operate directly on the unbounded curves without having to preprocess them. Therefore, we use an implicit -bounding rectangle embedded in the \dcel{} structure. +bounding rectangle embedded in the \dcel\ structure. Figure~\ref{arr_fig:unb_dcel} shows the arrangement of four lines that subdivide the plane into eight unbounded faces and two bounded ones. Notice that in this case the unbounded faces have outer @@ -179,57 +179,57 @@ infinity, and the halfedges connecting them are \emph{fictitious}, and represent portions of the bounding rectangle. Note that the outer CCBs of the unbounded faces contain fictitious halfedges. The twins of these halfedges form together one connected component that corresponds to -the entire bounding rectangle, which forms a single hole in a face -$f_0$. We say that $f_0$ is \emph{fictitious}, as it does -not correspond to a real two-dimensional cell of the arrangement. +the entire imaginary rectangle, which forms a single hole in a face +$\tilde{f}$. We say that $\tilde{f}$ is \emph{fictitious}, as it does +not corresponds to a real two-dimensional cell of the arrangement. Observe that there are four extra vertices at infinity that do not lie on any curve; they are denoted as $v_{\rm bl}, v_{\rm tl}, v_{\rm br}$, and $v_{\rm tr}$, and represent the bottom-left, top-left, bottom-right, and top-right corners of the bounding rectangle, respectively. Similarly, there are fictitious halfedges that lie on -the top, the bottom, the left, or the right edge of the bounding -rectangle. When the arrangement is empty, there are exactly +the top, the bottom, the left, or the right edge of the imaginary +bounding rectangle. When the arrangement is empty, there are exactly four pairs of fictitious halfedges, that divide the plane into two -faces, namely a fictitious face lying outside of the bounding -rectangle and a single unbounded face bounded by the bounding rectangle. +faces, namely a fictitious face lying outside of the imaginary bounding +rectangle and a single unbounded face bounded by the imaginary +bounding rectangle. Summarizing the above, there are four types of arrangement vertices, -which differ from one another by their location with respect to the -bounding bounding rectangle: +which differ from one another by their location on the imaginary +bounding rectangle: \begin{enumerate} -\item\label{type-normal} - A vertex, associated with a point in $\real^2$ whose - coordinates are bounded. Such a vertex always lies inside the - bounding rectangle. -\item\label{type-unbounded} - A vertex that represents an unbounded end of an $x$-monotone curve - that is defined at $x = -\infty$ or at $x = \infty$. In case of - a horizontal line or a curve with a horizontal asymptote, the - $y$-coordinate of the curve end may be finite (see for example the - vertices $v_2$ and $v_7$ in Figure~\ref{arr_fig:unb_dcel}), but in - general the curve end also goes to $y = \pm\infty$ (see for instance - the vertices $v_1$, $v_3$, $v_6$ and $v_8$ in - Figure~\ref{arr_fig:unb_dcel}). For our convenience, we will always - take a ``tall'' enough bounding rectangle and treat such vertices as - lying on either the left or right rectangle edges (that is, if a curve - is defined at $x = -\infty$, its left end will be represented by - a vertex on the left edge of the bounding rectangle, and if it is - defined at $x = \infty$, its right end will be represented by a - vertex of the right edge). -\item\label{type-unbounded-vertical} - A vertex that represent the unbounded end of a vertical line or of a - curve with a vertical asymptote (finite $x$-coordinate and an - unbounded $y$-coordinate). Such a vertex always lies on one of the - horizontal edges of the bounding rectangle (either the bottom one if - $y = -\infty$, or the top one if $y = \infty$). The vertices $v_4$ - and $v_5$ in Figure~\ref{arr_fig:unb_dcel} are of this type. -\item\label{type-fictitious} - The fictitious vertices that represent the four corners of the - bounding bounding rectangle. +\item +A ``normal'' vertex, associated with a point in $\real^2$ whose +coordinates are bounded. Such a vertex always lies inside the +bounding rectangle. +\item +A vertex that represent an unbounded end of an $x$-monotone curve +that is defined at $x = -\infty$ or at $x = \infty$. In case of +a horizontal line or a curve with a horizontal asymptote, the +$y$-coordinate of the curve end may be finite (see for example the +vertices $v_2$ and $v_7$ in Figure~\ref{arr_fig:unb_dcel}), but in +general the curve end also goes to $y = \pm\infty$ (see for instance +the vertices $v_1$, $v_3$, $v_6$ and $v_8$ in +Figure~\ref{arr_fig:unb_dcel}). For our convenience, we will always +take a ``tall'' enough bounding rectangle and treat such vertices as +lying on either the left or right rectangle edges (that is, if a curve +is defined at $x = -\infty$, its left end will be represented by +a vertex on the left edge of the bounding rectangle, and if it is +defined at $x = \infty$, its right end will be represented by a +vertex of the right edge). +\item +A vertex that represent the unbounded end of a vertical line or of a +curve with a vertical asymptote (finite $x$-coordinate and an +unbounded $y$-coordinate). Such a vertex always lies on one of the +horizontal edges of the bounding rectangle (either the bottom one if +$y = -\infty$, or the top one if $y = \infty$). The vertices $v_4$ +and $v_5$ in Figure~\ref{arr_fig:unb_dcel} are of this type. +\item +The fictitious vertices that represent the four corners of the +imaginary bounding rectangle. \end{enumerate} -A vertex (at infinity) of Type~\ref{type-unbounded} or -Type~\ref{type-unbounded-vertical} above always has +A vertex at infinity of types 1--3 above always has three incident edges: one concrete edge that is associated with an unbounded portion of an $x$-monotone curve, and two fictitious edges connecting the vertex to its neighboring vertices at infinity. @@ -243,48 +243,44 @@ following methods, in addition to the ones listed in Section~\ref{arr_ssec:traverse}: \begin{itemize} \item - The \ccc{Vertex} class provides three-valued predicates - \ccc{parameter_space_in_x()} and \ccc{parameter_space_in_y()}, which - return the location of the geometric embedding of the vertex in the - parameter space. In particular, the former returns - \ccc{ARR_LEFT_BOUNDARY}, \ccc{ARR_INTERIOR}, or - \ccc{ARR_RIGHT_BOUNDARY}, and the latter returns - \ccc{ARR_BOTTOM_BOUNDARY}, \ccc{ARR_INTERIOR}, or - \ccc{ARR_TOP_BOUNDARY}. As the package currently supports only the - case where the parameter space is the compactified plane, the former - returns \ccc{ARR_INTERIOR} if the $x$-coordinate associated with the - vertex is finite, \ccc{ARR_LEFT_BOUNDARY} if it is $-\infty$, and - \ccc{ARR_RIGHT_BOUNDARY} if it is $\infty$. The latter returns - \ccc{ARR_INTERIOR} if the $y$-coordinate associated with the vertex - is finite, \ccc{ARR_BOTTOM_BOUNDARY} if it is $-\infty$, and - \ccc{ARR_TOP_BOUNDARY} if it is $\infty$. The Boolean predicate - \ccc{is_at_open_boundary()} is also provided. You can access the - point associated with a vertex only if it is not a vertex at an open - boundary (recall that a vertex at an open boundary is not associated - with a \ccc{Point_2} object). +The \ccc{Vertex} type provides the three-valued predicates +\ccc{parameter_space_in_x()} and \ccc{parameter_space_in_y()}. +The former returns \ccc{ARR_INTERIOR} if the point associated with the +vertex has a finite $x$-coordinate, \ccc{ARR_LEFT_BOUNDARY} +if the vertex lies on the left boundary of the parameter space, and +\ccc{ARR_RIGHT_BOUNDARY} if the vertex lies on the right boundary of +the parameter space. Similarly, \ccc{parameter_space_in_y()} returns +\ccc{ARR_INTERIOR}, \ccc{ARR_BOTTOM_BOUNDARY}, or +\ccc{ARR_TOP_BOUNDARY} depending on whether the point associated with +the vertex has a finite $y$-coordinate, lies on the bottom boundary of +the parameter space, or lies on the top boundary. The Boolean predicate +\ccc{is_at_open_boundary()} is also supported. It checks whether the +vertex lies at infinity. You can access the point associated with a +vertex only if it does not lie at infinity (recall that a vertex at +infinity is not associated with a \ccc{Point_2} object). % \item - The nested \ccc{Halfedge} class provides the Boolean predicate - \ccc{is_fictitious()}. The $x$-monotone curve associated with - a halfedge can be accessed by the \ccc{curve()} method only if the - halfedge is not fictitious. +The nested \ccc{Halfedge} class provides the Boolean predicate +\ccc{is_fictitious()}. The $x$-monotone curve associated with +a halfedge can be accessed by the \ccc{curve()} method only if the +halfedge is not fictitious. % \item - The nested \ccc{Face} class provides the Boolean predicate - \ccc{f.is_fictitious()}. The method \ccc{outer_ccb()} has the - precondition that the face is not fictitious. Note that non-fictitious - unbounded faces always have valid CCBs (although this CCB may - comprise only fictitious halfedge in case the arrangement contains - only bounded curves). +The nested \ccc{Face} class provides the Boolean predicate +\ccc{f.is_fictitious()}. The method \ccc{outer_ccb()} has the +precondition that the face is not fictitious. Note that valid +unbounded faces always have valid CCBs (although this CCB may +comprise only fictitious halfedge in case the arrangement contains +only bounded curves). \end{itemize} The method \ccc{arr.number_of_edges()} does not count the number of fictitious edges, (which is always \ccc{arr.number_of_vertices_at_infinity() + 4}), and the iterators returned by \ccc{arr.edges_begin()} and \ccc{arr.edges_end()} specify -a range of non-fictitious edges. Similarly, \ccc{arr.number_of_faces()} -does not count the fictitious face. However, the -\ccc{Ccb_halfedge_circulator} of the outer boundary of an +a range of valid edges. Similarly, \ccc{arr.number_of_faces()} does not +count the fictitious face. +However, the \ccc{Ccb_halfedge_circulator} of the outer boundary of an unbounded face or the \ccc{Halfegde_around_vertex_circulator} of a vertex at infinity do traverse fictitious halfedges. For example, it is possible to traverse the outer boundaries of the unbounded arrangement edges diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/main.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/main.tex index 39889031e40..bf385621cf7 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/main.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/main.tex @@ -9,7 +9,7 @@ \label{chapterArrangement_on_surface_2} \ccChapterRelease{\ArrangementOnSurfaceRev. \ \ArrangementOnSurfaceDate} -\ccChapterAuthor{Ron Wein, Efi Fogel, Baruch Zukerman, Dan Halperin, Eric Berberich, and Oren Zalzman} +\ccChapterAuthor{Ron Wein, Efi Fogel, Baruch Zukerman, Dan Halperin, and Eric Berberich} \input{Arrangement_on_surface_2/PkgDescription.tex} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_basic_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_basic_traits.tex index 33c98b3c232..6bbbdfc8ac9 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_basic_traits.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_basic_traits.tex @@ -18,18 +18,23 @@ continuous $x$-monotone curves (a vertical segment is also considered to be to be pairwise disjoint in their interiors, so they do not intersect except at their endpoints. -The \ccc{X_monotone_curve_2} curves of an arrangement are confined to an -iso-rectangular area called the parameter space. The iso-rectangule can -be unbounded, open, or closed. The set of predicates provided by a model -the concept \ccRefName{} is sufficient for constructing arrangements of -$x$-monotone curves that do not reach or approach the boundary of the -parameter space. The nature of the input curves, whether they are -expected to reach or approach the left, right, bottom, or top side of the -boundary of the parameter space, are conveyed through the definition of -four additional nested types, namely \ccc{Left_side_category}, -\ccc{Right_side_category}, \ccc{Bottom_side_category}, and -\ccc{Top_side_category}. Each such type must be convertible to the type -\ccc{Arr_oblivious_side_tag}. +The $x$-monotone curves may be {\em unbounded}, namely they may have unbounded +ends that lie at infinity, or {\em bounded}, in which case their have finite +endpoints are representable as \ccc{Point_2} objects. An $x$-monotone curve +may also have one unbounded end and one finite endpoint (e.g. a ray). +If unbounded curves are supported, the requirements from the traits class +are extended a bit, as described below. In particular, the traits class needs +to support comparisons at infinity, where we interpret comparisons at infinity +as follows: Suppose we wish to compare the $y$-position of the hyperbolas +$y_1 = \frac{1}{x}$ and $y_2 = \frac{2}{x}$ at $x = \infty$; than since there +exists $x_0$ such that for each finite $x > x_0$ we have $y_2(x) > y_1(x)$ +(in our case we can take $x_0 = 0$), we say that $y_2$ is {\em above} $y_1$ at +infinity. Similarly, when comparing the $x$-positions of the vertical line +$x = 0$ and the $xy$-minimal end of parabola $y = \frac{1}{x}$ for $x > 0$ +(which has a vertical asymptote at $x = 0$), we define that the line lies to +the {\em left} of the hyperbola. Namely, comparing curves at their unbounded +ends should return the comparison result \ccc{EQUAL} only if the curves +overlap. \ccRefines{DefaultConstructible, CopyConstructible, Assignable} @@ -46,14 +51,18 @@ four additional nested types, namely \ccc{Left_side_category}, {indicates whether the nested functor \ccc{Compare_at_x_left_2} is provided.} -\ccNestedType{Left_side_category} - {Must be convertible to \ccc{Arr_oblivious_side_tag}.} -\ccNestedType{Bottom_side_category} - {Must be convertible to \ccc{Arr_oblivious_side_tag}.} -\ccNestedType{Top_side_category} - {Must be convertible to \ccc{Arr_oblivious_side_tag}.} -\ccNestedType{Right_side_category} - {Must be convertible to \ccc{Arr_oblivious_side_tag}.} +\ccNestedType{Arr_left_side_category} + {indicates the type of the left boundary-side. Must be either + \ccc{Arr_oblivious_side_tag} or \ccc{Arr_open_side_tag}.} +\ccNestedType{Arr_bottom_side_category} + {indicates the type of the bottom boundary-side. Must be either + \ccc{Arr_oblivious_side_tag} or \ccc{Arr_open_side_tag}.} +\ccNestedType{Arr_top_side_category} + {indicates the type of the top boundary-side. Must be either + \ccc{Arr_oblivious_side_tag} or \ccc{Arr_open_side_tag}.} +\ccNestedType{Arr_right_side_category} + {indicates the type of the right boundary-side. Must be either + \ccc{Arr_oblivious_side_tag} or \ccc{Arr_open_side_tag}.} \ccHeading{Functor Types} % ======================= @@ -63,6 +72,16 @@ four additional nested types, namely \ccc{Left_side_category}, \ccGlue \ccNestedType{Compare_xy_2}{models the concept \ccc{ArrTraits::CompareXy_2}.} \ccGlue +\ccNestedType{Parameter_space_in_x_2} + {models the concept \ccc{ArrTraits::ParameterSpaceInX_2}. + Required only if the traits class supports unbounded curves + (the \ccc{Has_boundary_category} category is defined as \ccc{Tag_true}).} +\ccGlue +\ccNestedType{Parameter_space_in_y_2} + {models the concept \ccc{ArrTraits::ParameterSpaceInY_2}. + Required only if the traits class supports unbounded curves + (the \ccc{Has_boundary_category} category is defined as \ccc{Tag_true}).} +\ccGlue \ccNestedType{Construct_min_vertex_2} {models the concept \ccc{ArrTraits::ConstructMinVertex_2}.} \ccGlue @@ -72,17 +91,30 @@ four additional nested types, namely \ccc{Left_side_category}, \ccNestedType{Is_vertical_2}{models the concept \ccc{ArrTraits::IsVertical_2}.} \ccGlue \ccNestedType{Compare_y_at_x_2} - {models the concept \ccc{ArrTraits::CompareYAtX_2}.} + {models the concept \ccc{ArrTraits::CompareYAtX_2}. + If the traits class supports unbounded curves (i.e., the + \ccc{Has_boundary_category} category is defined as \ccc{Tag_true}), then + the type models the concept \ccc{ArrTraits::CompareYNearBoundary_2}.} \ccGlue \ccNestedType{Compare_y_at_x_left_2} {models the concept \ccc{ArrTraits::CompareYAtXLeft_2}. - Required only if the \ccc{Has_left_category} category is convertible to + Required only if the \ccc{Has_left_category} category is defined as \ccc{Tag_true}.} \ccGlue \ccNestedType{Compare_y_at_x_right_2} {models the concept \ccc{ArrTraits::CompareYAtXRight_2}.} \ccGlue \ccNestedType{Equal_2}{models the concept \ccc{ArrTraits::Equal_2}.} +\ccGlue +\ccNestedType{compare_x_near_boundary_2} + {models the concept \ccc{ArrTraits::CompareXNearBoundary_2}. + Required only if the traits class supports unbounded curves + (the \ccc{Has_boundary_category} category is defined as \ccc{Tag_true}).} +\ccGlue +\ccNestedType{compare_y_near_boundary_2} + {models the concept \ccc{ArrTraits::CompareYNearBoundary_2}. + Required only if the traits class supports unbounded curves + (the \ccc{Has_boundary_category} category is defined as \ccc{Tag_true}).} % \ccCreation \ccCreationVariable{traits} @@ -109,6 +141,14 @@ four additional nested types, namely \ccc{Left_side_category}, \ccMethod{Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const;} {} \ccGlue \ccMethod{Equal_2 equal_2_object() const;} {} +\ccGlue +\ccMethod{Parameter_space_in_x_2 parameter_space_in_x_2_object() const;} {} +\ccGlue +\ccMethod{Parameter_space_in_y_2 parameter_space_in_y_2_object() const;} {} +\ccGlue +\ccMethod{Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const;} {} +\ccGlue +\ccMethod{Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const;} {} \ccHasModels % ========== @@ -167,7 +207,7 @@ Represents a planar (weakly) $x$-monotone curve. % ================= \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::CompareX_2} -\ccRefines{AdaptableBinaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Compare_x_2} @@ -183,7 +223,7 @@ Represents a planar (weakly) $x$-monotone curve. % ================== \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::CompareXy_2} -\ccRefines{AdaptableBinaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Compare_xy_2} @@ -199,7 +239,7 @@ Represents a planar (weakly) $x$-monotone curve. % =========================== \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::ConstructMinVertex_2} -\ccRefines{AdaptableUnaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Construct_min_vertex_2} @@ -213,7 +253,7 @@ Represents a planar (weakly) $x$-monotone curve. % =========================== \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::ConstructMaxVertex_2} -\ccRefines{AdaptableUnaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Construct_max_vertex_2} @@ -227,7 +267,7 @@ Represents a planar (weakly) $x$-monotone curve. % =================== \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::IsVertical_2} -\ccRefines{AdaptableUnaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Is_vertical_2} @@ -241,7 +281,7 @@ Represents a planar (weakly) $x$-monotone curve. % ==================== \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::CompareYAtX_2} -\ccRefines{AdaptableBinaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Compare_y_at_x_2} @@ -258,7 +298,7 @@ Represents a planar (weakly) $x$-monotone curve. % ======================== \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::CompareYAtXLeft_2} -\ccRefines{AdaptableTernaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Compare_y_at_x_left_2} @@ -279,7 +319,7 @@ Represents a planar (weakly) $x$-monotone curve. % ========================= \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::CompareYAtXRight_2} -\ccRefines{AdaptableTernaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Compare_y_at_x_right_2} @@ -300,7 +340,7 @@ Represents a planar (weakly) $x$-monotone curve. % ============== \ccRefPageBegin \begin{ccRefConcept}{ArrTraits::Equal_2} -\ccRefines{AdaptableBinaryFunction} +\ccRefines{Functor} \ccHasModels\ccc{ArrangementBasicTraits_2::Equal_2} @@ -315,3 +355,91 @@ Represents a planar (weakly) $x$-monotone curve. geometrically equivalent (have the same graph).} \end{ccRefConcept} \ccRefPageEnd + +%%%%%%%% ParameterSpaceInX_2 +% ========================== +\ccRefPageBegin +\begin{ccRefConcept}{ArrTraits::ParameterSpaceInX_2} +\ccRefines{Functor} + +\ccHasModels\ccc{ArrangementBasicTraits_2::Parameter_space_in_x_2} + +\ccCreationVariable{fo} +\ccMethod{Arr_parameter_space operator()(ArrTraits::X_monotone_curve_2 xc, + Arr_curve_end ce);} + {determines the placement of the $x$-coordinate of the minimal end or + maximal end of \ccc{xc} in the parameter space, that is, + \ccc{ARR_LEFT_BOUNDARY}, \ccc{ARR_INTERIOR}, or \ccc{ARR_RIGHT_BOUNDARY}.} +\end{ccRefConcept} +\ccRefPageEnd + +%%%%%%%% ParameterSpaceInY_2 +% ========================== +\ccRefPageBegin +\begin{ccRefConcept}{ArrTraits::ParameterSpaceInY_2} +\ccRefines{Functor} + +\ccHasModels\ccc{ArrangementBasicTraits_2::Parameter_space_in_y_2} + +\ccCreationVariable{fo} +\ccMethod{Arr_parameter_space operator()(ArrTraits::X_monotone_curve_2 xc, + Arr_curve_end ce);} + {determines the placement of the $y$-coordinate of the minimal end or + maximal end of \ccc{xc} in the parameter space, that is, + \ccc{ARR_BOTTOM_BOUNDARY}, \ccc{ARR_INTERIOR}, or \ccc{ARR_TOP_BOUNDARY}.} +\end{ccRefConcept} +\ccRefPageEnd + +%%%%%%%% CompareXNearBoundary_2 +% ============================= +\ccRefPageBegin +\begin{ccRefConcept}{ArrTraits::CompareXNearBoundary_2} +\ccRefines\ccc{ArrTraits::CompareX_2} + +\ccHasModels\ccc{ArrangementBasicTraits_2::Compare_x_near_boundary_2} + +\ccCreationVariable{fo} +\ccMethod{Comparison_result operator()(ArrTraits::Point_2 p, + ArrTraits::X_monotone_curve_2 xc, + Arr_curve_end ce);} + {returns \ccc{SMALLER}, \ccc{EQUAL}, or \ccc{LARGER} according + to the $x$-ordering of a vertical line passing through the point + \ccc{p} and an unbounded end of the curve \ccc{xc}. The relevant end + is the minimal end, if \ccc{ce} is \ccc{MIN_END} and the maximal + end if \ccc{ce} is \ccc{MAX_END}. + \ccPrecond{the curve end has a bounded $x$-coordinate and an + unbounded $y$-coordinate. Namely \ccc{xc} is vertical or has a + vertical asymptote.}} +\ccGlue +\ccMethod{Comparison_result operator()(ArrTraits::X_monotone_curve_2 xc1, + Arr_curve_end ce1, + ArrTraits::X_monotone_curve_2 xc2, + Arr_curve_end ce2);} + {returns \ccc{SMALLER}, \ccc{EQUAL}, or \ccc{LARGER} + according to the $x$-ordering of the unbounded curve ends of + \ccc{xc1} and \ccc{xc2}. + \ccPrecond{the curve ends have a bounded $x$-coordinate and an + unbounded $y$-coordinate. Namely each of \ccc{xc1} and \ccc{xc2} is + vertical or has a vertical asymptote.}} +\end{ccRefConcept} +\ccRefPageEnd + +%%%%%%%% CompareYNearBoundary_2 +% ============================= +\ccRefPageBegin +\begin{ccRefConcept}{ArrTraits::CompareYNearBoundary_2} +\ccRefines\ccc{CompareYAtX_2} + +\ccHasModels\ccc{ArrangementBasicTraits_2::Compare_y_near_boundary_2} + +\ccCreationVariable{fo} +\ccMethod{Comparison_result operator()(ArrTraits::X_monotone_curve_2 xc1, + ArrTraits::X_monotone_curve_2 xc2, + Arr_curve_end ce);} + {returns \ccc{SMALLER, EQUAL} or \ccc{LARGER} according to the + $y$-ordering of the two curves \ccc{xc1} and \ccc{xc2} at $x = -\infty$ + (if \ccc{ce} is \ccc{MIN_END}) or at $x = \infty$ (if \ccc{ce} is + \ccc{MAX_END}), with the precondition that both curves have unbounded + minimal (or maximal) ends that lie at $x = \pm\infty$.} +\end{ccRefConcept} +\ccRefPageEnd diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_conic_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_conic_traits.tex index bda7e8478c6..ed14e1ccaa1 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_conic_traits.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_conic_traits.tex @@ -12,7 +12,7 @@ \ccDefinition %============ -The class \ccRefName{} is a model of the \ccc{ArrangementTraits_2} concept +The class \ccRefName\ is a model of the \ccc{ArrangementTraits_2} concept and can be used to construct and maintain arrangements of bounded segments of algebraic curves of degree $2$ at most, also known as {\sl conic curves}. diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_curve_end.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_curve_end.tex index 7ce721d103d..6a5c9bdb814 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_curve_end.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_curve_end.tex @@ -1,17 +1,10 @@ \begin{ccRefEnum}{Arr_curve_end} - \ccDefinition - The enumeration \ccRefName{} is used to indicate one of the two ends - of an $x$-monotone curve. It is used by models of the - \ccc{ArrangementOpenBoundaryTraits_2} concept. - - \ccInclude{CGAL/Arr_enums.h} +\ccInclude{CGAL/Arr_enums.h} - \ccGlobalEnum{enum Arr_curve_end { ARR_MIN_END, ARR_MAX_END }; } - \ccRefLabel{ARR_MIN_END} - \ccRefLabel{ARR_MAX_END} - \ccHtmlCrossLink{ARR_MIN_END} - \ccHtmlCrossLink{ARR_MAX_END} +\ccGlobalEnum{enum Arr_curve_end { ARR_MIN_END, ARR_MAX_END }; } +\ccRefLabel{ARR_MIN_END} +\ccRefLabel{ARR_MAX_END} +\ccHtmlCrossLink{ARR_MIN_END} +\ccHtmlCrossLink{ARR_MAX_END} - \ccSeeAlso - \ccc{ArrangementOpenBoundaryTraits_2} \end{ccRefEnum} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex index cfd70f1e9d6..be263ed0fa4 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex @@ -1,19 +1,13 @@ \begin{ccRefEnum}{Arr_halfedge_direction} - \ccDefinition - The enumeration \ccRefName{} is defined by - \ccc{CGAL::Arrangement_2::Halfedge} to specify - the direction of the halfedge. +\ccInclude{CGAL/Arr_enums.h} - \ccInclude{CGAL/Arr_enums.h} +\ccGlobalEnum{ +enum Arr_halfedge_direction { ARR_LEFT_TO_RIGHT = -1, + ARR_RIGHT_TO_LEFT = 1 }; } - \ccGlobalEnum{ - enum Arr_halfedge_direction { ARR_LEFT_TO_RIGHT, ARR_RIGHT_TO_LEFT }; } +\ccRefLabel{ARR_LEFT_TO_RIGHT} +\ccRefLabel{ARR_RIGHT_TO_LEFT} +\ccHtmlCrossLink{ARR_LEFT_TO_RIGHT} +\ccHtmlCrossLink{ARR_RIGHT_TO_LEFT} - \ccRefLabel{ARR_LEFT_TO_RIGHT} - \ccRefLabel{ARR_RIGHT_TO_LEFT} - \ccHtmlCrossLink{ARR_LEFT_TO_RIGHT} - \ccHtmlCrossLink{ARR_RIGHT_TO_LEFT} - - \ccSeeAlso - \ccc{CGAL::Arrangement_2::Halfedge} \end{ccRefEnum} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_non_caching_segment_basic_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_non_caching_segment_basic_traits.tex index 036edd11dbe..465c889e8fe 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_non_caching_segment_basic_traits.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_non_caching_segment_basic_traits.tex @@ -12,7 +12,7 @@ \ccDefinition -The traits class \ccRefName{} is a model of the \ccc{ArrangementTraits_2} +The traits class \ccRefName\ is a model of the \ccc{ArrangementTraits_2} concept that allow the construction and maintenance of arrangements of sets of pairwise interior-disjoint line segments. It is templated with a \cgal-Kernel model, and it is derived from it. This traits class is a diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_oblivious_side_tag.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_oblivious_side_tag.tex index db7c14bdc93..3b6232b2616 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_oblivious_side_tag.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_oblivious_side_tag.tex @@ -13,17 +13,18 @@ \ccDefinition %============ -The categories \ccc{Left_side_category}, \ccc{Right_side_category}, -\ccc{Bottom_side_category}, and \ccc{Top_side_category}, -nested in any model of the \ccc{ArrangementBasicTraits_2}, must be -convertible to \ccRefName. \ccRefName{} is an empty construct used -for dispatching functions based on type of curves that induce the -arrangement. +\ccRefName{} is an empty construct used for dispatching functions based on +type of curves that induce the arrangement. If all curves are expected not +to approach the left, right, bottom, or top sides of the boundary of the +parameter space, the categories \ccc{Arr_left_side_category}, +\ccc{Arr_right_side_category}, \ccc{Arr_bottom_side_category}, and +\ccc{Arr_top_side_category}, nested in any model of the +\ccc{ArrangementBasicTraits_2}, must be defined as \ccRefName{}, respectively. \ccInclude{CGAL/Arr_tags.h} \ccSeeAlso - \ccc{Arr_open_side_tag}\lcTex{(\ccRefPage{CGAL::Arr_open_side_tag})}\\ + \ccc{Arr_open_side_tag}\lcTex{(\ccRefPage{Arr_open_side_tag})}\\ \ccc{ArrangementBasicTraits_2}\lcTex{(\ccRefPage{ArrangementBasicTraits_2})} \end{ccRefClass} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_open_boundary_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_open_boundary_traits.tex deleted file mode 100644 index d575eb0f69d..00000000000 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_open_boundary_traits.tex +++ /dev/null @@ -1,366 +0,0 @@ -% Reference manual page: ArrangementTraits.tex -% Package: Arrangement_2 - -\ccRefPageBegin -\begin{ccRefConcept}{ArrangementOpenBoundaryTraits_2} - -\ccDefinition -% =========== -Several predicates are required to handle $x$-monotone curves that -approach infinity and thus approach the boundary of the parameter -space. These predicates are sufficient to handle not only curves -embedded in an unbounded parameter space, but also curves embedded -in a bounded parameter space with open boundaries. Models of the -concept \ccRefName{} handle curves that approach the boundary of a -parameter space. This concept refines the concept -\ccc{ArrangementBasicTraits_2}. The arrangement template -instantiated with a traits class that models this concept can handle -$x$-monotone curves that are unbounded in any direction. The concept -\ccRefName{}, nontheless, also supports planar $x$-monotone curves -that reach the boundary of an open yet bounded parameter space. - -An $x$-monotone curve may be \emph{closed}, in which case its endpoints -are representable as \ccc{Point_2} objects, or \emph{open} at the -boundary of the parameter space. It can have one open end and one -closed end (e.g., a ray). The nature of the $x$-monotone curves, -whether they are expected to be closed or not at any one of the four -boundary-sides, is conveyed through the definition of the four nested -types \ccc{Left_side_category}, \ccc{Right_side_category}, -\ccc{Bottom_side_category}, and \ccc{Top_side_category}. If some curves -handled by a model of the concept \ccRefName{} are expected to be open -on the left, the nested type \ccc{Left_side_category} must be convertible -to \ccc{Arr_open_side_tag}. Similarly, if some curves handled by the -concept are expected to be open on the right, open at the bottom, or -open at the top, the corresponding nested type must be convertible to -\ccc{Arr_open_side_tag}. A model of the concept \ccRefName{} must have -all the four categories convertible to -\ccc{Arr_open_side_tag}.\footnote{We intend to introduce more concepts -that require only a subset of the categories to be convertible to -\ccc{Arr_open_side_tag}.} In this case the \dcel{} of the arrangement -instantiated with the model is initialized with an implicit bounding -rectangle. When the parameter space is bounded, it is the exact -geometric embedding of the implicit bounding rectangle. - -%% An arrangement that supports unbounded $x$-monotone curves maintains -%% an implicit bounding rectangle embedded in the \dcel{} structure. - -\ccRefines -\ccc{ArrangementBasicTraits_2} - -%% \ccTypes -%% % ====== -%% \ccNestedType{Curve_2}{models the concept \ccc{ArrTraits::Curve_2}.} - -\ccHeading{Categories} -% ============== -\ccNestedType{Left_side_category} - {Must be convertible to either \ccc{Arr_oblivious_side_tag} or - \ccc{Arr_open_side_tag}.} -\ccNestedType{Bottom_side_category} - {Must be convertible to either \ccc{Arr_oblivious_side_tag} or - \ccc{Arr_open_side_tag}.} -\ccNestedType{Top_side_category} - {Must be convertible to either \ccc{Arr_oblivious_side_tag} or - \ccc{Arr_open_side_tag}.} -\ccNestedType{Right_side_category} - {Must be convertible to either \ccc{Arr_oblivious_side_tag} or - \ccc{Arr_open_side_tag}.} - -\ccHeading{Functor Types} -% ======================= -\ccThree{Parameter_space_in_x_2}{}{\hspace*{14cm}} -\ccThreeToTwo -\ccNestedType{Parameter_space_in_x_2}% - {models the concept \ccc{ArrTraits::ParameterSpaceInX_2}. - Required only if the traits class supports unbounded curves that - approach the left or the right sides (the \ccc{Left_side_category} - or the \ccc{Right_side_category} categories are convertible to - \ccc{Arr_open_side_tag}).} - -\ccThree{Compare_y_near_boundary_2}{}{\hspace*{14cm}} -\ccThreeToTwo -\ccNestedType{Compare_y_near_boundary_2}% - {models the concept \ccc{ArrTraits::CompareYNearBoundary_2}. - Required only if the traits class supports unbounded curves that - approach the left or the right sides (the \ccc{Left_side_category} - or the \ccc{Right_side_category} categories are convertible to - \ccc{Arr_open_side_tag}).} - -\ccThree{Parameter_space_in_y_2}{}{\hspace*{14cm}} -\ccThreeToTwo -\ccNestedType{Parameter_space_in_y_2}% - {models the concept \ccc{ArrTraits::ParameterSpaceInY_2}. - Required only if the traits class supports unbounded curves that - approach the bottom or the top sides (the \ccc{Bottom_side_category} - or the \ccc{Top_side_category} categories are convertible to - \ccc{Arr_open_side_tag}).} - -\ccThree{Compare_x_at_limit_2}{}{\hspace*{14cm}} -\ccThreeToTwo -\ccNestedType{Compare_x_at_limit_2}% - {models the concept \ccc{ArrTraits::CompareXAtLimit_2}. - Required only if the traits class supports unbounded curves that - approach the bottom or the top sides (the \ccc{Bottom_side_category} - or the \ccc{Top_side_category} categories are convertible to - \ccc{Arr_open_side_tag}).} - -\ccThree{Compare_x_near_limit_2}{}{\hspace*{14cm}} -\ccThreeToTwo -\ccNestedType{Compare_x_near_limit_2}% - {models the concept \ccc{ArrTraits::CompareXNearLimit_2}. - Required only if the traits class supports unbounded curves that - approach the bottom or the top sides (the \ccc{Bottom_side_category} - or the \ccc{Top_side_category} categories are convertible to - \ccc{Arr_open_side_tag}).} - -\ccCreationVariable{traits} -% \ccCreation -% =========== - -\ccHeading{Accessing Functor Objects} -% =================================== -\ccMethod{Parameter_space_in_x_2 parameter_space_in_x_2_object() const;} {} -\ccMethod{Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const;} {} -\ccMethod{Parameter_space_in_y_2 parameter_space_in_y_2_object() const;} {} -\ccMethod{Compare_x_at_limit_2 compare_x_at_limit_2_object() const;} {} -\ccMethod{Compare_x_near_limit_2 compare_x_near_limit_2_object() const;} {} - -\ccHasModels -% ========== -\ccc{CGAL::Arr_linear_traits_2}\\ -\ccc{CGAL::Arr_rational_arc_traits_2}\\ -\ccc{CGAL::Arr_algebraic_segment_traits_2}\\ -\ccc{CGAL::Arr_curve_data_traits_2}\\ -\ccc{CGAL::Arr_consolidated_curve_data_traits_2} - -\ccSeeAlso -% ======== -\ccc{ArrangementBasicTraits_2}\lcTex{ - (\ccRefPage{ArrangementBasicTraits_2})}\\ -\ccc{ArrangementXMonotoneTraits_2}\lcTex{ - (\ccRefPage{ArrangementXMonotoneTraits_2})}\\ -\ccc{ArrangementLandmarkTraits_2}\lcTex{ - (\ccRefPage{ArrangementLandmarkTraits_2})}\\ -\ccc{ArrangementTraits_2}\lcTex{ - (\ccRefPage{ArrangementTraits_2})} - -\end{ccRefConcept} -\ccRefPageEnd - -%%%%%%%% Functors %%%%%%%% -% ======================== - -%%%%%%%% ParameterSpaceInX_2 -% ========================== -\ccRefPageBegin -\begin{ccRefConcept}{ArrTraits::ParameterSpaceInX_2} -\ccRefines{AdaptableBinaryFunction} - -\ccHasModels\ccc{ArrangementOpenBoundaryTraits_2::Parameter_space_in_x_2} - -\ccCreationVariable{fo} - -\ccMethod{Arr_parameter_space operator()(const ArrTraits::X_monotone_curve_2& xcv, - Arr_curve_end ce);}{% - - Given an $x$-monotone curve \ccc{xcv} and an enumeration \ccc{ce} - that specifies either the minimum or the maximum end of the curve, - determines the location of the curve end along the $x$-dimension. - The variable \ccc{xcv} identifies the parametric curve - $C(t) = (X(t),Y(t))$ defined over an open or half-open interval with - endpoints~$0$ and~$1$. The enumeration \ccc{ce} identifies an open - end $d \in \{0,1\}$ of $C$. Formally, determines whether - $\lim_{t \rightarrow d} X(t)$ evaluates to $b_l$, $b_r$, or a value - in between, where $b_l$ and $b_r$ are the $x$-coordinates of the - left and right boundaries of the parameter space, respectively. - Returns \ccc{ARR_LEFT_BOUNDARY}, \ccc{ARR_RIGHT_BOUNDARY}, or - \ccc{ARR_INTERIOR}, accordingly. - \ccPrecond{If \ccc{ArrTraits::Left_side_category} is not convertible to - \ccc{Arr_open_side_tag} then \ccc{ce} $\neq$ \ccc{ARR_MIN_END}.} - \ccPrecond{If \ccc{ArrTraits::Right_side_category} is not convertible to - \ccc{Arr_open_side_tag} then \ccc{ce} $\neq$ \ccc{ARR_MAX_END}.} - \ccPostcond{If \ccc{ce} = \ccc{ARR_MIN_END} then the result is either - \ccc{ARR_LEFT_BOUNDARY} or \ccc{ARR_INTERIOR}.} - \ccPostcond{If \ccc{ce} = \ccc{ARR_MAX_END} then the result is either - \ccc{ARR_RIGHT_BOUNDARY} or \ccc{ARR_INTERIOR}.}} -\end{ccRefConcept} -\ccRefPageEnd - -%%%%%%%% CompareYNearBoundary_2 -% ============================= -\ccRefPageBegin -\begin{ccRefConcept}{ArrTraits::CompareYNearBoundary_2} - -\ccRefines{AdaptableTernaryFunction} - -\ccHasModels\ccc{ArrangementOpenBoundaryTraits_2::Compare_y_near_boundary_2} - -\ccCreationVariable{fo} - -\ccMethod{Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1, - const ArrTraits::X_monotone_curve_2& xcv2, - Arr_curve_end ce);}{% - Given two $x$-monotone curves \ccc{xcv1} and \ccc{xcv2} and an - enumeration \ccc{ce} that specifies either the minimum or the maximum - ends of the curves, compares the $y$-coordinate of the curves near - their respective ends. Returns \ccc{SMALLER}, \ccc{EQUAL}, or - \ccc{LARGER} accordingly. More precisely, compares the - $y$-coordinates of the vertical projection of a point $p$ onto - \ccc{xcv1} and \ccc{xcv2}. If \ccc{ce} is \ccc{ARR_MIN_END}, the - predicate \ccc{Parameter_space_in_x_2} evaluates to - \ccc{ARR_LEFT_BOUNDARY} when applied to \ccc{xcv1} and \ccc{ce} and - when applied to \ccc{xcv2} and \ccc{ce}. In this case $p$ is - located far to the left, such that the result is invariant under - a translation of $p$ farther to the left. If \ccc{ce} is - \ccc{ARR_MAX_END}, the predicate \ccc{Parameter_space_in_x_2} - evaluates to \ccc{ARR_RIGHT_BOUNDARY} when applied to \ccc{xcv1} and - \ccc{ce} and when applied to \ccc{xcv2} and \ccc{ce}. In that case - $p$ is located far to the right in a similar manner. - \ccPrecond{If \ccc{ArrTraits::Left_side_category} is not convertible to - \ccc{Arr_open_side_tag} then \ccc{ce} $\neq$ \ccc{ARR_MIN_END}.} - \ccPrecond{If \ccc{ArrTraits::Right_side_category} is not convertible to - \ccc{Arr_open_side_tag} then \ccc{ce} $\neq$ \ccc{ARR_MAX_END}.} - \ccPrecond{% - \ccc{parameter_space_in_x_2}(\ccc{xcv2}, \ccc{ce}) = - \ccc{parameter_space_in_x_2}(\ccc{xcv1}, \ccc{ce}).} - \ccPrecond{\ccc{parameter_space_in_x_2}(\ccc{xcv1}, \ccc{ce}) $\neq$ - \ccc{ARR_INTERIOR}.} - \ccPrecond{If \ccc{parameter_space_in_x_2}(\ccc{xcv1}, \ccc{ce}) = - \ccc{ARR_LEFT_BOUNDARY} then \ccc{ce} = \ccc{ARR_MIN_END}.} - \ccPrecond{If \ccc{parameter_space_in_x_2}(\ccc{xcv1}, \ccc{ce}) = - \ccc{ARR_RIGHT_BOUNDARY} then \ccc{ce} = \ccc{ARR_MAX_END}.}} -\end{ccRefConcept} -\ccRefPageEnd - -%%%%%%%% ParameterSpaceInY_2 -% ========================== -\ccRefPageBegin -\begin{ccRefConcept}{ArrTraits::ParameterSpaceInY_2} -\ccRefines{AdaptableBinaryFunction} - -\ccHasModels\ccc{ArrangementOpenBoundaryTraits_2::Parameter_space_in_y_2} - -\ccCreationVariable{fo} - -\ccMethod{Arr_parameter_space operator()(const ArrTraits::X_monotone_curve_2& xcv, - Arr_curve_end ce);}{% - Given an $x$-monotone curve \ccc{xcv} and an enumeration \ccc{ce} - that specifies either the minimum or the maximum end of the curve, - determines the location of the curve end along the $y$-dimension. - The variable \ccc{xcv} identifies the parametric curve - $C(t) = (X(t),Y(t))$ defined over an open or half-open interval with - endpoints~$0$ and~$1$. The enumeration \ccc{ce} identifies an open - end $d \in \{0,1\}$ of $C$. Formally, determines whether - $\lim_{t \rightarrow d} Y(t)$ evaluates to $b_b$, $b_t$, or a value - in between, where $b_b$ and $b_t$ are the $y$-coordinates of the - bottom and top boundaries of the parameter space, respectively. - Returns \ccc{ARR_BOTTOM_BOUNDARY}, \ccc{ARR_TOP_BOUNDARY}, or - \ccc{ARR_INTERIOR}, accordingly. - \ccPostcond{If \ccc{ArrTraits::Bottom_side_category} is not convertible to - \ccc{Arr_open_side_tag} then the result is not \ccc{ARR_BOTTOM_BOUNDARY}.} - \ccPostcond{If \ccc{ArrTraits::Top_side_category} is not convertible to - \ccc{Arr_open_side_tag} then the result is not \ccc{ARR_TOP_BOUNDARY}.}} -\end{ccRefConcept} -\ccRefPageEnd - -%%%%%%%% CompareXAtLimit_2 -% ================================ -\ccRefPageBegin -\begin{ccRefConcept}{ArrTraits::CompareXAtLimit_2} -\ccRefines{AdaptableFunctor} - -\ccHasModels\ccc{ArrangementOpenBoundaryTraits_2::Compare_x_at_limit_2} - -\ccCreationVariable{fo} - -\ccMethod{Comparison_result operator()(const ArrTraits::Point_2& p, - const ArrTraits::X_monotone_curve_2& xcv, - Arr_curve_end ce);}{% - Given a point \ccc{p}, an $x$-monotone curve \ccc{xcv}, and an - enumeration \ccc{ce} that specifies either the minimum or the - maximum end of the curve where the curve has a vertical asymptote, - compares the $x$-coordinate of \ccc{p} and the $x$-coordinate of the - limit of the curve at its specificed end. The variable \ccc{xcv} - identifies the parametric curve $C(t) = (X(t),Y(t))$ defined over an - open or half-open interval with endpoints~$0$ and~$1$. The - enumeration \ccc{ce} identifies an open end $d \in \{0,1\}$ of $C$. - Formally, compares the $x$-coordinate of \ccc{p} and - $\lim_{t \rightarrow d} X(t)$. Returns \ccc{SMALLER}, \ccc{EQUAL}, or - \ccc{LARGER} accordingly. - \ccPrecond{\ccc{parameter_space_in_y_2}(\ccc{xcv}, \ccc{ce}) $\neq$ - \ccc{ARR_INTERIOR}.} - \ccPrecond{If the parameter space is unbounded, $C$ has a vertical - asymptote at its $d$-end; that is, - \ccc{parameter_space_in_x_2}(\ccc{xcv}, \ccc{ce}) = \ccc{ARR_INTERIOR}.}} -% -\ccMethod{Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1, - Arr_curve_end ce1, - const ArrTraits::X_monotone_curve_2& xcv2, - Arr_curve_end ce2);}{% - Given two $x$-monotone curves \ccc{xcv1} and \ccc{xcv2} and two - indices \ccc{ce1} and \ccc{ce2} that specify either the minimum - or the maximum ends of \ccc{xcv1} and \ccc{xcv2}, respectively, - where the curves have vertical asymptotes, compares the - $x$-coordinates of the limits of the curves at their specificed - ends. The variables \ccc{xcv1} and \ccc{xcv2} identify the - parametric curves $C_1(t) = (X_1(t),Y_1(t))$ and - $C_2(t) = (X_2(t),Y_2(t))$, respectively, defined over open or - half-open intervals with endpoints~$0$ and~$1$. The indices - \ccc{ce1} and \ccc{ce2} identify open ends $d_1 \in \{0,1\}$ and - $d_2 \in \{0,1\}$ of $C_1$ and $C_2$, respectively. Formally, - compares $\lim_{t \rightarrow d_1} X_1(t)$ and - $\lim_{t \rightarrow d_2} X_2(t)$. Returns \ccc{SMALLER}, \ccc{EQUAL}, - or \ccc{LARGER} accordingly. - \ccPrecond{% - \ccc{parameter_space_in_y_2}(\ccc{xcv1}, \ccc{ce1}) $\neq$ - \ccc{ARR_INTERIOR}.} - \ccPrecond{% - \ccc{parameter_space_in_y_2}(\ccc{xcv2}, \ccc{ce2}) $\neq$ - \ccc{ARR_INTERIOR}.} - \ccPrecond{If the parameter space is unbounded, $C_1$ has a vertical - asymptote at its respective end; that is,\\ - \ccc{parameter_space_in_x_2}(\ccc{xcv1}, \ccc{ce1}) = - \ccc{ARR_INTERIOR}.} - \ccPrecond{If the parameter space is unbounded, $C_2$ has a vertical - asymptote at its respective end; that is,\\ - \ccc{parameter_space_in_x_2}(\ccc{xcv2}, \ccc{ce2}) = - \ccc{ARR_INTERIOR}.}} -\end{ccRefConcept} -\ccRefPageEnd - -%%%%%%%% CompareXNearLimit_2 -% ============================= -\ccRefPageBegin -\begin{ccRefConcept}{ArrTraits::CompareXNearLimit_2} -\ccRefines{AdaptableTernaryFunction} - -\ccHasModels\ccc{ArrangementOpenBoundaryTraits_2::Compare_x_near_limit_2} - -\ccCreationVariable{fo} - -\ccMethod{Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1, - const ArrTraits::X_monotone_curve_2& xcv2, - Arr_curve_end ce);}{% - Given two $x$-monotone curves \ccc{xcv1} and \ccc{xcv2} and an - enumeration \ccc{ce} that specifies either the minimum ends or the - maximum ends of the curves where the curves have a vertical - asymptote, compares the $x$-coordinate of the curves near their - respective ends. Returns \ccc{SMALLER}, \ccc{EQUAL}, or \ccc{LARGER} - accordingly. More precisely, compares the $x$-coordinates of the - horizontal projection of a point $p$ onto \ccc{xcv1} and \ccc{xcv2}. - If \ccc{xcv1} and \ccc{xcv2} approach the bottom boundary-side, $p$ - is located far to the bottom, such that the result is invariant - under a translation of $p$ farther to the bottom. If \ccc{xcv1} - and \ccc{xcv2} approach the top boundary-side, $p$ is located far - to the top in a similar manner. - \ccPrecond{The $x$-coordinates of the limits of the curves at their - respective ends are equal. That is,\\ - \ccc{compare_x_at_limit_2}(\ccc{xcv1}, \ccc{xcv2}, \ccc{ce}) = - \ccc{EQUAL}.} - \ccPrecond{% - \ccc{parameter_space_in_y_2}(\ccc{xcv1}, \ccc{ce}) = - \ccc{parameter_space_in_y_2}(\ccc{xcv2}, \ccc{ce}).} - \ccPrecond{\ccc{parameter_space_in_y_2}(\ccc{xcv1}, \ccc{ce}) $\neq$ - \ccc{ARR_INTERIOR}.}} -\end{ccRefConcept} -\ccRefPageEnd diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_open_side_tag.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_open_side_tag.tex index f0846cec200..18482493cd2 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_open_side_tag.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_open_side_tag.tex @@ -13,23 +13,20 @@ \ccDefinition %============ -All the four types \ccc{Left_side_category}, -\ccc{Right_side_category}, \ccc{Bottom_side_category}, -and \ccc{Top_side_category} nested in any model of the -concept \ccc{ArrangementOpenBoundaryTraits} must be convertible -to \ccRefName, which derives from \ccc{Arr_oblivious_side_tag}. It -implies that some curves are expected to approach the left, right, -bottom, or top sides of the open boundary of the parameter -space. \ccRefName{} is an empty construct used for dispatching -functions based on type of curves that induce the arrangement. +\ccRefName{} is an empty construct used for dispatching functions based on +type of curves that induce the arrangement. If some curves are expected to +approach the left, right, bottom, or top sides of the boundary of the +parameter space, the categories \ccc{Arr_left_side_category}, +\ccc{Arr_right_side_category}, \ccc{Arr_bottom_side_category}, and +\ccc{Arr_top_side_category}, nested in any model of the +\ccc{ArrangementBasicTraits_2}, must be defined as \ccRefName{}, respectively. \ccInclude{CGAL/Arr_tags.h} \ccSeeAlso - \ccc{Arr_oblivious_side_tag}\lcTex{(\ccRefPage{CGAL::Arr_oblivious_side_tag})}\\ - \ccc{ArrangementOpenBoundaryTraits_2}% - \lcTex{(\ccRefPage{ArrangementOpenBoundaryTraits_2})} - + \ccc{Arr_oblivious_side_tag}\lcTex{(\ccRefPage{Arr_oblivious_side_tag})}\\ + \ccc{ArrangementBasicTraits_2}\lcTex{(\ccRefPage{ArrangementBasicTraits_2})} + \end{ccRefClass} \ccRefPageEnd diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_arc_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_arc_traits.tex new file mode 100644 index 00000000000..f640674d7de --- /dev/null +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_arc_traits.tex @@ -0,0 +1,232 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Arr_rational_arc_traits.tex +% +------------------------------------------------------------------------+ +% | +% | Package: Arrangement_2 +% | +% +------------------------------------------------------------------------+ + +\ccRefPageBegin +\begin{ccRefClass}{Arr_rational_arc_traits_2} + +\ccDefinition +%============ + +The traits class \ccRefName\ is a model of the \ccc{ArrangementTraits_2} +concept. It handles bounded or unbounded segments of rational functions, +referred to as {\sl rational arcs} (in particular, a rational arc may +correspond to the entire graph of a rational function), and enables the +construction and maintenance of arrangements of such arcs. Rational +functions, and polynomial functions in particular, are not only interesting +in their own right, they are also very useful for approximating or +interpolating more complicated curves. + +A rational function $y = \frac{P(x)}{Q(x)}$ +is defined by two polynomials $P$ and $Q$ of arbitrary degrees. In +particular, if $Q(x) = 1$ then the function is a simple polynomial +function. A bounded rational arc is defined by the graph of a rational +function over some internal $[x_{\rm min}, x_{\rm max}]$, where $Q$ +does not have any real roots in this interval (thus the arc does not +contain any poles). However, our traits class is also capable of +representing functions defined over an unbounded $x$-range, namely +a ``ray'' defined on $(-\infty, x_{\rm max}]$ or on $[x_{\rm min}, \infty)$, +or an entire function defined for all real $x$ values. Note that a +rational arc is unbounded even if it is defined over some bounded interval, +yet $Q$ has zeros in this interval. + +In our representation, all polynomial coefficients (the coefficients of $P$ +and $Q$) must be rational numbers. This guarantees that the +$x$-coordinates of all arrangement vertices (in particular, those +representing intersection points) can be represented as roots of +polynomials with integer coefficients --- namely, algebraic numbers. +The $y$-coordinates can be obtained by simple arithmetic operations on +the $x$-coordinates, hence they are also algebraic numbers. + +We therefore require separate representations of the curve coefficients and +the point coordinates. The \ccc{NtTraits} should be instantiated with a class +that defines nested \ccc{Integer}, \ccc{Rational} and \ccc{Algebraic} number +types and supports various operations on them, yielding certified computation +results (for example, in can convert rational numbers to algebraic numbers +and can compute roots of polynomials with integer coefficients). +The \ccc{AlgKernel} template-parameter should be a geometric kernel templated +with the \ccc{NtTraits::Algebraic} number-type. It is recommended to +instantiate the \ccc{CORE_algebraic_number_traits} class as the \ccc{NtTraits} +parameter, with \ccc{Cartesian} instantiating the kernel. +The number types in this case are provided by the {\sc core} library, with its +ability to exactly represent simple algebraic numbers. + +The traits class defined its point type to be \ccc{AlgKernel::Point_2}, +and defines a curve type (and an identical $x$-monotone curve type, as +a rational arc is always $x$-monotone by definition) as detailed below. + +\ccInclude{CGAL/Arr_rational_arc_traits_2.h} + +\ccIsModel + \ccc{ArrangementTraits_2} + +\subsection*{Class + Arr\_rational\_arc\_traits\_2$<$AlgKernel,NtTraits$>$::Curve\_2} +%======================================================================== + +The \ccc{Curve_2} class nested within the rational-arc traits is used +to represent rational arcs and support their construction from a +single polynomial and an $x$-definition range or from a pair of polynomials +and an $x$-definition range. The copy and default constructor as well as the +assignment operator are provided for rational arcs. In addition, an +\ccc{operator<<} for the arcs is defined for standard output streams. + +\begin{ccClass}{Arr_rational_arc_traits_2::Curve_2} +%====================================================================== + +\ccTypes +%------- + +\ccNestedType{Rat_vector}{A vector of rational numbers (equivalent to + \ccc{std::vector} -\ccCreationVariable{traits} - -\ccDefinition -%============ - -The traits class \ccRefName{} is a model of the \ccc{ArrangementTraits_2} -concept. It handles bounded and unbounded arcs of rational functions, -referred to as {\sl rational arcs} (in particular, such an arc may -correspond to the entire graph of a rational function), and enables the -construction and maintenance of arrangements of such arcs. -%Rational functions, and polynomial functions in particular, are not only -%interesting in their own right, they are also very useful for approximating or -%interpolating more complex curves. - -A rational function $y = \frac{P(x)}{Q(x)}$ is defined by two polynomials -$P$ and $Q$ of arbitrary degrees. -If $Q(x) = 1$ then the function is a simple polynomial function. -Usually the domain is $\R$ but the function may also be -restricted to a bounded interval $[x_{\rm min}, x_{\rm max}]$ -or defined over a ray $(-\infty, x_{\rm max}]$ or over $[x_{\rm min}, \infty)$. -Rational functions are represented by the nested type \ccc{Curve_2}. -Note that a rational function may be not continuous since roots of $Q$ induce -vertical asymptotes, which would contradict the notion of an $x$-monotone curve -as it is introduced by the \ccc{ArrangementTraits_2} concept. -Thus, continuous portions of rational functions are represented by the nested -type \ccc{X_monotone_curve_2}, which is different from \ccc{Curve_2}. -Constructors for both classes are provided by the traits. -A \ccc{Curve_2} may be split up into several \ccc{X_monotone_curve_2} -using \ccc{Make_x_monotone_2}. - -%If $Q(x) = 1$ then the function is a simple polynomial -%function. A bounded rational arc is defined by the graph of a rational -%function over some internal $[x_{\rm min}, x_{\rm max}]$, where $Q$ -%does not have any real roots in this interval (thus the arc does not -%contain any vertical asymptotes). Our traits class is also capable of -%representing functions defined over an unbounded $x$-range, namely -%a ``ray'' defined over $(-\infty, x_{\rm max}]$ or over $[x_{\rm min}, \infty)$, -%or a function defined over the entire real $x$-range. Note that a -%rational arc may be unbounded even if it is defined over some bounded interval. -%In these cases $Q$ has zeros in this interval. That is, the user is able to construct -%rational arcs of type \ccc{Curve_2}, which may contain vertical asymptotes. -%These may be split up further into \ccc{X_monotone_curve_2} using -%\ccc{Make_x_monotone_2}. - -The template parameter of the traits must be a model of the -concept \ccc{AlgebraicKernel_d_1}. -A rational function is then represented by two polynomials $P$ and $Q$ of type -\ccc{AlgebraicKernel_d_1::Polynomial_1}. -A point is represented by a rational function and its $x$-coordinate, which is -of type \ccc{AlgebraicKernel_d_1::Algebraic_real_1}. -Note that an explicit representation of the $y$-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. -%This is also the reason why IO is not handled via the usual stream operators. -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. - -\ccInclude{CGAL/Arr_rational_function_traits_2.h} - -\ccIsModel - \ccc{ArrangementTraits_2}\\ -% \ccc{ArrangementLandmarkTraits_2}\\ %% not a model of this concept since construction of segment is not easy - \ccc{ArrangementDirectionalXMonotoneTraits_2}\\ - \ccc{ArrangementOpenBoundaryTraits_2} - -\ccTypes -\ccThree{}{xxxxxxxxxxxxxxxxxxxxxx}{x} -\ccTypedef{typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Coefficient Coefficient;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Bound Bound;}{} - -%\ccTypedef{typedef AlgebraicKernel_d_1::Bound Approximate_number_type;}{}\ccGlue -%\ccNestedType{Approximate_2}{ -%A model of \ccc{ArrangementLandmarkTraits_2::Approximate_2}}\ccGlue -%\ccMethod{Approximate_2 approximate_2_object() const;}{Returns an instance of \ccc{Construct_curve_2}.} - -\ccCreation -% ========= -\ccConstructor{Arr_rational_function_traits_2(const Algebraic_kernel_d_1* kernel);} - {constructs an empty traits that uses the kernel pointed by \ccc{kernel} - for performing algebraic operations.} - -\ccOperations -% =========== -\ccThree{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{xxxxxxx}{} -\ccMethod{Construct_curve_2 construct_curve_2_object() const;} - {Returns an instance of \ccc{Construct_curve_2}.}\ccGlue -%\ccMethod{Curve_importer_2 curve_importer_2_object() const;}{Returns an instance of \ccc{Curve_importer_2}.}\ccGlue -%\ccMethod{Curve_exporter_2 curve_exporter_2_object() const;}{Returns an instance of \ccc{Curve_exporter_2}.}\ccGlue -\ccMethod{Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const;} - {Returns an instance of \ccc{Construct_x_monotone_curve_2}.}\ccGlue -%\ccMethod{X_monotone_curve_importer_2 x_monotone_curve_importer_2_object() const;}{Returns an instance of \ccc{X_monotone_curve_importer_2}.}\ccGlue -%\ccMethod{X_monotone_curve_exporter_2 x_monotone_curve_exporter_2_object() const;}{Returns an instance of \ccc{X_monotone_curve_exporter_2}.}\ccGlue - -\ccMethod{void cleanup_cache() const;} - {Deletes all curves from the cache that exist only there.} -\ccMethod{const Algebraic_kernel_d_1* algebraic_kernel_d_1() const;} - {Returns a pointer to the used algerbaic kernel object.} - -\subsection*{Class Arr\_rational\_function\_traits\_2$<$AlgebraicKernel\_d\_1$>$::Curve\_2} -\begin{ccClass}{Arr_rational_function_traits_2::Curve_2} -\ccCreationVariable{curve} - -The \ccc{Curve_2} class nested within the traits is used -to represent rational functions which may be restricted to a certain x-range. - -\ccIsModel - -\ccc{ArrTraits::Curve_2} - -\ccTypes \ccThree{}{xxxxxxxxxxxxxxxxxxxxxx}{x} -\ccTypedef{typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;}{} - -\ccOperations -\ccThree{xxxxxxxxxxxxxxxxxxxx}{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} -\ccTwo {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} - - -\ccMethod{const Polynomial_1& numerator () const;} - {returns the numerator of the supporting rational function.} - -\ccMethod{const Polynomial_1& denominator () const;} - {returns the denominator of the supporting rational function.} - -\ccMethod{bool is_continuous() const;} - {returns whether \ccVar\ is continuous, namely whether it does not - contains any vertical asymptotes in its interior.} - -\ccMethod{Arr_parameter_space left_parameter_space_in_x () const;} - {returns whether the $x$-coordinate of \ccVar's left end is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{Arr_parameter_space right_parameter_space_in_x () const;} - {returns whether the $x$-coordinate of \ccVar's right end is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{Algebraic_real_1 left_x() const;} - {returns the $x$-coordinate of the left end. - \ccPrecond{left\_boundary\_in\_x()==ARR\_INTERIOR}} -\ccGlue -\ccMethod{Algebraic_real_1 right_x() const;} - {returns the $x$-coordinate of the right end. - \ccPrecond{right\_boundary\_in\_x()==ARR\_INTERIOR}} -\end{ccClass} - -\subsection*{Class Arr\_rational\_function\_traits\_2$<$AlgebraicKernel\_d\_1$>$::X\_monotone\_curve\_2} - -The \ccc{X_monotone_curve_2} class nested within the traits is used -to represent $x$-monotone parts of rational functions. In particular, such an $x$-monotone curve -may not contain a vertical asymptote in its interior $x$-range. - -\begin{ccClass}{Arr_rational_function_traits_2::X_monotone_curve_2} -\ccCreationVariable{xcurve} - -\ccIsModel -\ccc{ArrTraits::XMonotoneCurve_2} - -\ccTypes \ccThree{}{xxxxxxxxxxxxxxxxxxxxxx}{x} -\ccTypedef{typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;}{}\ccGlue -\ccTypedef{typedef Arr_rational_function_traits_2::Point_2 Point_2;}{} - -\ccOperations -\ccThree{xxxxxxxxxxxxxxxxxxxx}{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} -\ccTwo {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} - - -\ccMethod{const Polynomial_1& numerator () const;} - {returns the numerator of the supporting rational function.} - -\ccMethod{const Polynomial_1& denominator () const;} - {returns the denominator of the supporting rational function.} - - -% ======== source -\ccMethod{Arr_parameter_space source_parameter_space_in_x () const;} - {returns whether the $x$-coordinate of the source is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{Arr_parameter_space source_parameter_space_in_y () const;} - {returns whether the $y$-coordinate of the source is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{const Point_2& source() const;} - {returns the source point of the arc. - \ccPrecond{Both the $x$- and $y$-coordinates of the source point is - finite.}} -\ccGlue -\ccMethod{Algebraic_real_1 source_x() const;} - {returns the $x$-coordinate of the source point. - \ccPrecond{The $x$-coordinate of the source point is finite.}} -%\ccGlue -%\ccMethod{Algebraic_real_1 source_y() const;} -% {returns the $y$-coordinate of the source point. -% \ccPrecond{The $y$-coordinate of the source point is finite.}} - - -% ======== target -\ccMethod{Arr_parameter_space target_parameter_space_in_x () const;} - {returns whether the $x$-coordinate of the target is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{Arr_parameter_space target_parameter_space_in_y () const;} - {returns whether the $y$-coordinate of the target is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{const Point_2& target() const;} - {returns the target point of the arc. - \ccPrecond{Both the $x$- and $y$-coordinates of the target point is - finite.}} -\ccGlue -\ccMethod{Algebraic_real_1 target_x() const;} - {returns the $x$-coordinate of the target point. - \ccPrecond{The $x$-coordinate of the target point is finite.}} -%\ccGlue -%\ccMethod{Algebraic_real_1 target_y() const;} -% {returns the $y$-coordinate of the target point. -% \ccPrecond{The $y$-coordinate of the target point is finite.}} - - -% ======== left -\ccMethod{Arr_parameter_space left_parameter_space_in_x () const;} - {returns whether the $x$-coordinate of the left curve end is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{Arr_parameter_space left_parameter_space_in_y () const;} - {returns whether the $y$-coordinate of the left curve end is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{const Point_2& left() const;} - {returns the left point of the arc. - \ccPrecond{Both the $x$- and $y$-coordinates of the left point is finite.}} -\ccGlue -\ccMethod{Algebraic_real_1 left_x() const;} - {returns the $x$-coordinate of the left point. - \ccPrecond{The $x$-coordinate of the left point is finite.}} -%\ccGlue -%\ccMethod{Algebraic_real_1 left_y() const;} -% {returns the $y$-coordinate of the left point. -% \ccPrecond{The $y$-coordinate of the left point is finite.}} - - -% ======== right -\ccMethod{Arr_parameter_space right_parameter_space_in_x () const;} - {returns whether the $x$-coordinate of the right curve end is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{Arr_parameter_space right_parameter_space_in_y () const;} - {returns whether the $y$-coordinate of the right curve end is finite or - whether it is $\pm\infty$.} -\ccGlue -\ccMethod{const Point_2& right() const;} - {returns the right point of the arc. - \ccPrecond{Both the $x$- and $y$-coordinates of The right point is - finite.}} -\ccGlue -\ccMethod{Algebraic_real_1 right_x() const;} - {returns the $x$-coordinate of the right point. - \ccPrecond{The $x$-coordinate of the right point is finite.}} -%\ccGlue -%\ccMethod{Algebraic_real_1 right_y() const;} -% {returns the $y$-coordinate of the right point. -% \ccPrecond{The right point is finite in $y$.}} - -\ccMethod{bool is_left_to_right () const;} - {returns whether the curve is oriented from left to right.} -\end{ccClass} - -\subsection*{Class Arr\_rational\_function\_traits\_2$<$AlgebraicKernel\_d\_1$>$::Point\_2} -\begin{ccClass}{Arr_rational_function_traits_2::Point_2} -\ccCreationVariable{point} - -\ccIsModel -\ccc{ArrTraits::Point_2} - -\ccTypes \ccThree{}{xxxxxxxxxxxxxxxxxxxxxx}{x} -\ccTypedef{typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Bound Bound;}{} - -\ccOperations -\ccThree{xxxxxxxxxxxxxxxxxxxxxxxxx}{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} -\ccTwo {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} - -\ccMethod{Polynomial_1 numerator () const;} - {returns the numerator of the supporting rational function.} - -\ccMethod{Polynomial_1 denominator () const;} - {returns the denominator of the supporting rational function.} - -\ccMethod{std::pair to_double() const;} - {returns double-approximations of the x- and y-coordinates.} - -\ccMethod{Algebraic_real_1 x() const;} - {returns the $x$-coordinate of the point.} -\ccThree{xxxxxxxxxxxxxxxxxxxxxxxx}{xxxxx}{} - -\ccMethod{Algebraic_real_1 y() const;} - {obtains the y-coordinates of the point. {\bf Attention:} As described above, - points are not stored by their y-coordinate in \ccc{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.} - -\ccMethod{std::pair approximate_absolute_x(int a) const;} - {Computes a pair $p$ approximating the $x$-coordinate with - respect to the given absolute precision $a$. - \ccPostcond{$p.first \leq x \leq p.second $} - \ccPostcond{$p.second - p.first \leq 2^{-a} $}} - -\ccMethod{std::pair approximate_absolute_y(int a) const;} - {Computes a pair $p$ approximating the $y$-coordinate with - respect to the given absolute precision $a$. - \ccPostcond{$p.first \leq y \leq p.second $} - \ccPostcond{$p.second - p.first \leq 2^{-a} $}} - -\ccMethod{std::pair approximate_relative_x(int r) const;} - {Computes a pair $p$ approximating the $x$-coordinate with - respect to the given relative precision $r$. - \ccPostcond{$p.first \leq x \leq p.second $} - \ccPostcond{$p.second - p.first \leq 2^{-r}|x| $}} - -\ccMethod{std::pair approximate_relative_y(int r) const;} - {Computes a pair $p$ approximating the $y$-coordinate with - respect to the given relative precision $r$. - \ccPostcond{$p.first \leq y \leq p.second $} - \ccPostcond{$p.second - p.first \leq 2^{-r}|y| $}} - -\end{ccClass} -\subsection*{Class Arr\_rational\_function\_traits\_2$<$AlgebraicKernel\_d\_1$>$::Construct\_curve\_2} -\begin{ccClass}{Arr_rational_function_traits_2::Construct_curve_2} -\ccCreationVariable{construct} - -Functor to construct a \ccc{Curve_2}. To enable caching the class is not -default constructible and must be obtained via the function -\ccc{construct_curve_2_object()}, which is a member of the traits. - -\ccIsModel -\ccc{Assignable}\\ -\ccc{CopyConstructible}\\ -\ccc{AdaptableBinaryFunction}\\ -\ccc{AdaptableUnaryFunction} - -\ccTypes \ccThree{}{xxxxxxxxxxxxxxxxxxxxxx}{x} -\ccTypedef{typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;}{}\ccGlue -\ccTypedef{typedef Arr_rational_function_traits_2::Curve_2 result_type;}{} - -\ccTypedef{typedef Polynomial_1 argument_type;}{}\ccGlue -\ccTypedef{typedef Polynomial_1 first_argument_type;}{}\ccGlue -\ccTypedef{typedef Polynomial_1 second_argument_type;}{} - -\ccOperations -\ccThree{xxxxxxxxxxx}{xxxxx}{} -\ccTwo {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} - -% Operators that accept polynomials: -\ccMethod{Curve_2 operator()(Polynomial_1 P) const;} - {Constructs a curve representing the polynomial function $y = P(x)$.}\ccGlue -\ccMethod{Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& x, bool right) const;} - {Constructs a curve representing the polynomial function $y = P(x)$. - The function is defined over the interval $[x,+\infty)$ if $right$ is true - and $(-\infty,x]$ otherwise.}\ccGlue -\ccMethod{Curve_2 operator()(Polynomial_1 P, const Algebraic_real_1& lower, const Algebraic_real_1& upper) const;} - {Constructs a curve representing the polynomial function $y = P(x)$. - The function is defined over the interval $[lower,upper]$.}\ccGlue -\ccMethod{Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q) const;} - {Constructs a curve representing the rational function $y = P(x)/Q(x)$.}\ccGlue -\ccMethod{Curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, const Algebraic_real_1& x, bool right) const;} - {Constructs a curve representing the rational function $y = P(x)/Q(x)$. - The function is defined over the interval $I=[x,+\infty)$ if $right$ is - true and $I=(-\infty,x]$ otherwise.}\ccGlue -\ccMethod{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 rational function $y = P(x)/Q(x)$. - The function is defined over the interval $I=[lower,upper]$.} - -% Operators that accept polynomial coefficients: -\ccMethod{template -Curve_2 operator()(InputIterator begin, InputIterator end) const;} - {Constructs a curve representing the polynomial function $y = P(x)$, where - the coefficients of $P$ are given in the range \ccc{[begin,end)}.}\ccGlue -\ccMethod{template -Curve_2 operator()(InputIterator begin, InputIterator end, - const Algebraic_real_1& x, bool right) const;} - {Constructs a curve representing the polynomial function $y = P(x)$, where - the coefficients of $P$ are given in the range \ccc{[begin,end)}. The - function is defined over the interval $[x,+\infty)$ if $right$ is true - and $(-\infty,x]$ otherwise.}\ccGlue -\ccMethod{template -Curve_2 operator()(InputIterator begin, InputIterator end, - const Algebraic_real_1& lower, - const Algebraic_real_1& upper) const;} - {Constructs a curve representing the polynomial function $y = P(x)$, where - the coefficients of $P$ are given in the range \ccc{[begin,end)}. The - function is defined over the interval $[lower,upper]$.}\ccGlue -\ccMethod{template -Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom) const;} - {Constructs a curve representing the rational function $y = P(x)/Q(x)$, - where the coefficients of $P$ and $Q$ are given in the ranges - \ccc{[begin_numer,end_numer)} and \ccc{[begin_denom,end_denom)}, - respectively.}\ccGlue -\ccMethod{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 $y = P(x)/Q(x)$, - where the coefficients of $P$ and $Q$ are given in the ranges - \ccc{[begin_numer,end_numer)} and \ccc{[begin_denom,end_denom)}, - respectively. The function is defined over the interval $I=[x,+\infty)$ - if $right$ is true and $I=(-\infty,x]$ otherwise.}\ccGlue -\ccMethod{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;} - {Constructs a curve representing the rational function $y = P(x)/Q(x)$, - where the coefficients of $P$ and $Q$ are given in the ranges - \ccc{[begin_numer,end_numer)} and \ccc{[begin_denom,end_denom)}, - respectively. The function is defined over the interval $I=[lower,upper]$.} - -\end{ccClass} - -\subsection*{Class Arr\_rational\_function\_traits\_2$<$AlgebraicKernel\_d\_1$>$::Construct\_x\_monotone\_curve\_2} -\begin{ccClass}{Arr_rational_function_traits_2::Construct_x_monotone_curve_2} - -Functor to construct a \ccc{X_monotone_curve_2}. To enable caching the class -is not default constructible and must be obtained via the function -\ccc{construct_x_monotone_curve_2_object()}, which is a member of the traits. - -\ccCreationVariable{construct} -\ccIsModel -\ccc{Assignable}\\ -\ccc{CopyConstructible}\\ -\ccc{AdaptableBinaryFunction}\\ -\ccc{AdaptableUnaryFunction} - -\ccTypes \ccThree{}{xxxxxxxxxxxxxxxxxxxxxx}{x} -\ccTypedef{typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1;}{}\ccGlue -\ccTypedef{typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1;}{}\ccGlue -\ccTypedef{typedef Arr_rational_function_traits_2::X_monotone_curve_2 result_type;}{}\ccGlue -\ccTypedef{typedef Polynomial_1 argument_type;}{}\ccGlue -\ccTypedef{typedef Polynomial_1 first_argument_type;}{}\ccGlue -\ccTypedef{typedef Polynomial_1 second_argument_type;}{} - -\ccOperations -\ccThree{xxxxxxxxxxxxxxxxxxxx}{xx}{} -\ccTwo {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{} - -% Operators that accept polynomials: -\ccMethod{X_monotone_curve_2 operator()(Polynomial_1 P) const;} - {Constructs an $x$-monotone curve supported by the polynomial function - $y = P(x)$.}\ccGlue -\ccMethod{X_monotone_curve_2 operator()(Polynomial_1 P, - const Algebraic_real_1& x, - bool right) const;} - {Constructs an $x$-monotone curve supported by the polynomial function - $y = P(x)$. The function is defined over the interval $[x,+\infty)$ if - $right$ is true and $(-\infty,x]$ otherwise.}\ccGlue -\ccMethod{X_monotone_curve_2 operator()(Polynomial_1 P, - const Algebraic_real_1& lower, - const Algebraic_real_1& upper); const} - {Constructs an $x$-monotone curve supported by the polynomial function - $y = P(x)$. The function is defined over the interval $[lower,upper]$.}\ccGlue -\ccMethod{X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q); const} - {Constructs an $x$-monotone curve supported by the rational function - $y = P(x)/Q(x)$. - \ccPrecond{$Q$ has no real roots.}}\ccGlue -\ccMethod{X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, - const Algebraic_real_1& x, - bool right); const} - {Constructs an $x$-monotone curve supported by the rational function - $y = P(x)/Q(x)$. The function is defined over the interval $I=[x,+\infty)$ - if $right$ is true and $I=(-\infty,x]$ otherwise. - \ccPrecond{$Q$ has no real roots in the interior of $I$.}}\ccGlue -\ccMethod{X_monotone_curve_2 operator()(Polynomial_1 P, Polynomial_1 Q, - const Algebraic_real_1& lower, - const Algebraic_real_1& upper); const -} - {Constructs an $x$-monotone curve supported by the rational function - $y = P(x)/Q(x)$. The function is defined over the interval $I=[lower,upper]$. - \ccPrecond{$Q$ has no real roots in the interior of $I$.}} - -% Operators that accept polynomial coefficients: -\ccMethod{template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end) const;} - {Constructs an $x$-monotone curve supported by the polynomial function - $y = P(x)$, where the coefficients of $P$ are given in the range - \ccc{[begin,end)}.}\ccGlue -\ccMethod{template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, - const Algebraic_real_1& x, bool right) const;} - {Constructs an $x$-monotone curve supported by the polynomial function - $y = P(x)$, where the coefficients of $P$ are given in the range - \ccc{[begin,end)}. The function is defined over the interval $[x,+\infty)$ - if $right$ is true and $(-\infty,x]$ otherwise.}\ccGlue -\ccMethod{template -X_monotone_curve_2 operator()(InputIterator begin, InputIterator end - const Algebraic_real_1& lower, - const Algebraic_real_1& upper); const} - {Constructs an $x$-monotone curve supported by the polynomial function - $y = P(x)$, where the coefficients of $P$ are given in the range - \ccc{[begin,end)}. The function is defined over the interval - $[lower,upper]$.}\ccGlue -\ccMethod{template -X_monotone_curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom); const} - {Constructs an $x$-monotone curve supported by the rational function - $y = P(x)/Q(x)$, where the coefficients of $P$ and $Q$ are given in the - ranges \ccc{[begin_numer,end_numer)} and \ccc{[begin_denom,end_denom)}, - respectively. - \ccPrecond{$Q$ has no real roots.}}\ccGlue -\ccMethod{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 $x$-monotone curve supported by the rational function - $y = P(x)/Q(x)$, where the coefficients of $P$ and $Q$ are given in the - ranges \ccc{[begin_numer,end_numer)} and \ccc{[begin_denom,end_denom)}, - respectively. The function is defined over the interval $I=[x,+\infty)$ - if $right$ is true and $I=(-\infty,x]$ otherwise. - \ccPrecond{$Q$ has no real roots in the interior of $I$.}}\ccGlue -\ccMethod{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 -} - {Constructs an $x$-monotone curve supported by the rational function - $y = P(x)/Q(x)$, where the coefficients of $P$ and $Q$ are given in the - ranges \ccc{[begin_numer,end_numer)} and \ccc{[begin_denom,end_denom)}, - respectively. The function is defined over the interval $I=[lower,upper]$. - \ccPrecond{$Q$ has no real roots in the interior of $I$.}} - -\end{ccClass} - -%\subsection*{Class Arr\_rational\_function\_traits\_2$<$AlgebraicKernel\_d\_1$>$::Importer} -%\begin{ccClass}{Arr_rational_function_traits_2::Importer} -%\ccCreationVariable{import} - -%Functor to import a \ccc{Curve_2} or \ccc{X_monotone_curve_2} from a stream. -%To enable caching the class is not default constructible and must be obtained -%via the function \ccc{Importer_object()}, which is a member of the traits. - -%\ccIsModel -%\ccc{Assignable}\\ -%\ccc{CopyConstructible} - -%\ccTypes -%\ccThree{}{xxxxxxxxxxxxxxxx}{x} -%\ccTypedef{typedef Arr_rational_function_traits_2::Curve_2 Curve_2;}{}\ccGlue -%\ccTypedef{typedef Arr_rational_function_traits_2::X_monotone_curve_2 X_monotone_curve_2;}{} - -%\ccOperations -%\ccThree{xxxxxxxxxxxxx}{}{xxxxxxxxxxxxxxxxxxxxxxxxxxx} -%\ccMethod{ -% std::istream& operator() ( -% std::istream& is, const Curve_2& curve);} -%{ -% Imports a \ccc{Curve_2} from the given input stream. -%} -%\ccMethod{ -% std::istream& operator() ( -% std::istream& is, const X_monotone_curve_2& curve);} -%{ -% Imports an \ccc{X_monotone_curve_2} from the given input stream. -%} - -%\end{ccClass} - -%\subsection*{Class Arr\_rational\_function\_traits\_2$<$AlgebraicKernel\_d\_1$>$::Exporter} -%\begin{ccClass}{Arr_rational_function_traits_2::Exporter} -%\ccCreationVariable{export} - -%Functor to export a \ccc{Curve_2} or \ccc{X_monotone_curve_2} to a stream. - -%\ccIsModel -%\ccc{Assignable}\\ -%\ccc{CopyConstructible} - -%\ccTypes -%\ccThree{}{xxxxxxxxxxxxxxxx}{x} -%\ccTypedef{typedef Arr_rational_function_traits_2::Curve_2 Curve_2;}{}\ccGlue -%\ccTypedef{typedef Arr_rational_function_traits_2::X_monotone_curve_2 X_monotone_curve_2;}{} - -%\ccOperations -%\ccThree{xxxxxxxxxxxxx}{}{xxxxxxxxxxxxxxxxxxxxxxxxxxx} -%\ccMethod{ -% std::ostream& operator() ( -% std::ostream& os, -% const Curve_2& curve);} -%{ -% Exports a \ccc{Curve_2} -% into the given output stream. -%} - -%\ccMethod{ -% std::ostream& operator() ( -% std::ostream& os, -% const X_monotone_curve_2& curve);} -%{ -% Exports an \ccc{X_monotone_curve_2} -% into the given output stream. -%} -% -%\end{ccClass} - -\end{ccRefClass} -\ccRefPageEnd - - diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex index fbdfe854b97..5ae61071158 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex @@ -2,7 +2,7 @@ \RCSdefDate{\ArrangementOnSurfaceRefDate}{$Date$} \ccRefChapter{2D Arrangements\label{chapterArrangement_on_surface_2_ref}} \ccChapterRelease{\ArrangementOnSurfaceRefRev. \ \ArrangementOnSurfaceRefDate} -\ccChapterAuthor{Ron Wein, Efi Fogel, Baruch Zukerman, Dan Halperin, Eric Berberich, and Oren Zalzman} +\ccChapterAuthor{Ron Wein, Efi Fogel, Baruch Zukerman, Dan Halperin, and Eric Berberich} % =============================================================== %\section*{Introduction} @@ -25,6 +25,7 @@ implemented as peripheral classes or as free (global) functions. \subsection*{Enumerations} \ccRefIdfierPage{CGAL::Arr_parameter_space}\\ +\ccRefIdfierPage{CGAL::Arr_boundary_type}\\ \ccRefIdfierPage{CGAL::Arr_curve_end}\\ \ccRefIdfierPage{CGAL::Arr_halfedge_direction} @@ -47,7 +48,6 @@ implemented as peripheral classes or as free (global) functions. \ccRefConceptPage{ArrangementLandmarkTraits_2}\\ \ccRefConceptPage{ArrangementXMonotoneTraits_2}\\ \ccRefConceptPage{ArrangementTraits_2}\\ -\ccRefConceptPage{ArrangementOpenBoundaryTraits_2}\\ ~\\ \ccRefConceptPage{ArrangementInputFormatter}\\ \ccRefConceptPage{ArrangementOutputFormatter} \\ @@ -76,8 +76,7 @@ implemented as peripheral classes or as free (global) functions. \ccRefConceptPage{ArrTraits::Equal_2}\\ \ccRefConceptPage{ArrTraits::ParameterSpaceInX_2}\\ \ccRefConceptPage{ArrTraits::ParameterSpaceInY_2}\\ -\ccRefConceptPage{ArrTraits::CompareXAtLimit_2}\\ -\ccRefConceptPage{ArrTraits::CompareXNearLimit_2}\\ +\ccRefConceptPage{ArrTraits::CompareXNearBoundary_2}\\ \ccRefConceptPage{ArrTraits::CompareYNearBoundary_2}\\ % \ccRefConceptPage{ArrTraits::IsOnXIdentification_2}\\ % \ccRefConceptPage{ArrTraits::IsOnYIdentification_2}\\ @@ -116,7 +115,7 @@ implemented as peripheral classes or as free (global) functions. \ccRefIdfierPage{CGAL::Arr_circular_arc_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_circular_line_arc_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_conic_traits_2}\\ -\ccRefIdfierPage{CGAL::Arr_rational_function_traits_2}\\ +\ccRefIdfierPage{CGAL::Arr_rational_arc_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_Bezier_curve_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_algebraic_segment_traits_2}\\ \ccRefIdfierPage{CGAL::Arr_curve_data_traits_2}\\ @@ -132,14 +131,6 @@ implemented as peripheral classes or as free (global) functions. \ccRefIdfierPage{CGAL::Arr_trapezoid_ric_point_location}\\ \ccRefIdfierPage{CGAL::Arr_landmarks_point_location} -\subsection*{Tags} - -\ccRefIdfierPage{CGAL::Arr_oblivious_side_tag}\\ -\ccRefIdfierPage{CGAL::Arr_open_side_tag} -% \ccRefIdfierPage{CGAL::Arr_closed_side_tag}\\ -% \ccRefIdfierPage{CGAL::Arr_contracted_side_tag}\\ -% \ccRefIdfierPage{CGAL::Arr_identified_side_tag} - \subsection*{Functions} \ccRefIdfierPage{CGAL::is_valid}\\ diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex index 5b46db53339..f9cd1e8124d 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex @@ -43,6 +43,7 @@ \input{Arrangement_on_surface_2_ref/Arr_extended_vertex.tex} \input{Arrangement_on_surface_2_ref/Arr_extended_halfedge.tex} \input{Arrangement_on_surface_2_ref/Arr_extended_face.tex} +\input{Arrangement_on_surface_2_ref/Arr_boundary_type.tex} \input{Arrangement_on_surface_2_ref/Arr_curve_end.tex} \input{Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex} \input{Arrangement_on_surface_2_ref/Arr_basic_traits.tex} @@ -57,7 +58,7 @@ \input{Arrangement_on_surface_2_ref/Arr_circle_segment_traits.tex} \input{Arrangement_on_surface_2_ref/Arr_circular_arc_traits.tex} \input{Arrangement_on_surface_2_ref/Arr_conic_traits.tex} -\input{Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex} +\input{Arrangement_on_surface_2_ref/Arr_rational_arc_traits.tex} \input{Arrangement_on_surface_2_ref/Arr_Bezier_traits.tex} \input{Arrangement_on_surface_2_ref/Arr_algebraic_segment_traits.tex} \input{Arrangement_on_surface_2_ref/Arr_mrg_data_traits.tex} @@ -76,7 +77,6 @@ \input{Arrangement_on_surface_2_ref/arr_locate.tex} \input{Arrangement_on_surface_2_ref/arr_vert_decomp.tex} \input{Arrangement_on_surface_2_ref/Arr_observer.tex} -\input{Arrangement_on_surface_2_ref/Arr_open_boundary_traits.tex} \input{Arrangement_on_surface_2_ref/Arr_with_history_2.tex} \input{Arrangement_on_surface_2_ref/Arr_parameter_space.tex} \input{Arrangement_on_surface_2_ref/arr_with_hist_remove.tex} diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp index f254838bd5b..1f0812047f9 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp @@ -9,7 +9,11 @@ #include #include -typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +// instead of +//typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +// workaround for VC++ +struct Kernel : public CGAL::Exact_predicates_exact_constructions_kernel {}; + typedef Kernel::FT Number_type; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions.cpp index 8257f8036d7..addb05debad 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions.cpp @@ -1,80 +1,75 @@ //! \file examples/Arrangement_2/ex_rational_functions.cpp // Constructing an arrangement of arcs of rational functions. - #include #ifndef CGAL_USE_CORE #include int main () { - std::cout << "Sorry, this example needs CORE ..." << std::endl; - return 0; + std::cout << "Sorry, this example needs CORE ..." << std::endl; + return (0); } - #else -#include // NT -#include // Algebraic Kernel -#include // Traits -#include // Arrangement +#include +#include +#include +#include -typedef CORE::BigInt Number_type; -typedef CGAL::Algebraic_kernel_d_1 AK1; -typedef CGAL::Arr_rational_function_traits_2 Traits_2; - -typedef Traits_2::Polynomial_1 Polynomial_1; -typedef Traits_2::Algebraic_real_1 Alg_real_1; - -typedef CGAL::Arrangement_2 Arrangement_2; +typedef CGAL::CORE_algebraic_number_traits Nt_traits; +typedef Nt_traits::Rational Rational; +typedef Nt_traits::Algebraic Algebraic; +typedef CGAL::Cartesian Alg_kernel; +typedef CGAL::Arr_rational_arc_traits_2 Traits_2; +typedef Traits_2::Point_2 Point_2; +typedef Traits_2::Curve_2 Rational_arc_2; +typedef Traits_2::Rat_vector Rat_vector; +typedef std::list Rat_arcs_list; +typedef CGAL::Arrangement_2 Arrangement_2; int main () { - CGAL::set_pretty_mode(std::cout); // for nice printouts. - - // create a polynomial representing x .-) - Polynomial_1 x = CGAL::shift(Polynomial_1(1),1); - - // Traits class object - Traits_2 traits; - Traits_2::Construct_x_monotone_curve_2 construct_arc - = traits.construct_x_monotone_curve_2_object(); - - // container storing all arcs - std::vector arcs; - // Create an arc supported by the polynomial y = x^4 - 6x^2 + 8, // defined over the interval [-2.1, 2.1]: - Polynomial_1 P1 = x*x*x*x - 6*x*x + 8; - Alg_real_1 l(Traits_2::Algebraic_kernel_d_1::Bound(-2.1)); - Alg_real_1 r(Traits_2::Algebraic_kernel_d_1::Bound(2.1)); - arcs.push_back(construct_arc(P1, l, r)); + Rat_vector P1(5); + P1[4] = 1; P1[3] = 0; P1[2] = -6; P1[1] = 0; P1[0] = 8; + + Rational_arc_2 a1 (P1, Algebraic(-2.1), Algebraic(2.1)); // Create an arc supported by the function y = x / (1 + x^2), // defined over the interval [-3, 3]: - Polynomial_1 P2 = x; - Polynomial_1 Q2 = 1+x*x; - - arcs.push_back(construct_arc(P2, Q2, Alg_real_1(-3), Alg_real_1(3))); - + Rat_vector P2(2); + P2[1] = 1; P2[0] = 0; + + Rat_vector Q2(3); + Q2[2] = 1; Q2[1] = 0; Q2[0] = 1; + + Rational_arc_2 a2 (P2, Q2, Algebraic(-3), Algebraic(3)); + // Create an arc supported by the parbola y = 8 - x^2, // defined over the interval [-2, 3]: - Polynomial_1 P3 = 8 - x*x; - arcs.push_back(construct_arc(P3, Alg_real_1(-2), Alg_real_1(3))); - + Rat_vector P3(5); + P3[2] = -1; P3[1] = 0; P3[0] = 8; + + Rational_arc_2 a3 (P3, Algebraic(-2), Algebraic(3)); + // Create an arc supported by the line y = -2x, // defined over the interval [-3, 0]: - Polynomial_1 P4 = -2*x; - arcs.push_back(construct_arc(P4, Alg_real_1(-3), Alg_real_1(0))); - + Rat_vector P4(2); + P4[1] = -2; P4[0] = 0; + + Rational_arc_2 a4 (P4, Algebraic(-3), Algebraic(0)); + // Construct the arrangement of the four arcs. + Arrangement_2 arr; + std::list arcs; - // Print the arcs. - for (unsigned int i(0); i < arcs.size(); ++i) - std::cout << arcs[i]< - -#ifndef CGAL_USE_CORE -#include -int main () -{ - std::cout << "Sorry, this example needs CORE ..." << std::endl; - return 0; -} - -#else - -#include // Integer -#include // Rational -#include // Algebraic Kernel -#include // Traits -#include // Arrangement - -typedef CORE::BigInt Integer; -typedef CORE::BigRat Rational; -typedef CGAL::Algebraic_kernel_d_1 AK1; -typedef CGAL::Arr_rational_function_traits_2 Traits_2; - -typedef std::vector Rat_vec; -typedef Traits_2::Algebraic_real_1 Alg_real_1; - -typedef CGAL::Arrangement_2 Arrangement_2; - -int main () -{ - CGAL::set_pretty_mode(std::cout); // for nice printouts. - - // Traits class object - Traits_2 traits; - Traits_2::Construct_x_monotone_curve_2 construct_arc - = traits.construct_x_monotone_curve_2_object(); - - // container storing all arcs - std::vector arcs; - - // Create an arc supported by the function y = 0.1x^4 - 0.6x^2 + 0.8 / 0.1, - // defined over the interval [-2.1, 2.1]: - Rat_vec P1,Q1; - P1.push_back(Rational(8,10)); - P1.push_back(Rational(0)); - P1.push_back(Rational(-6,10)); - P1.push_back(Rational(0)); - P1.push_back(Rational(1,10)); - - Q1.push_back(Rational(1,10)); - - Alg_real_1 l(Traits_2::Algebraic_kernel_d_1::Bound(-2.1)); - Alg_real_1 r(Traits_2::Algebraic_kernel_d_1::Bound(2.1)); - arcs.push_back(construct_arc(P1.begin(), P1.end(), Q1.begin(), Q1.end(), l, r)); - - // Create an arc supported by the function y = 0.1x / (0.1 + 0.1x^2), - // defined over the interval [-3, 3]: - Rat_vec P2,Q2; - P2.push_back(Rational(0)); - P2.push_back(Rational(1,10)); - - Q2.push_back(Rational(1,10)); - Q2.push_back(Rational(0)); - Q2.push_back(Rational(1,10)); - - arcs.push_back(construct_arc(P2.begin(), P2.end(), Q2.begin(), Q2.end(), - Alg_real_1(-3), Alg_real_1(3))); - - // Create an arc supported by the parbola y = 0.8 - 0.1x^2 / 0.1, - // defined over the interval [-2, 3]: - Rat_vec P3,Q3; - P3.push_back(Rational(4,5)); - P3.push_back(Rational(0)); - P3.push_back(Rational(-1,10)); - - Q3.push_back(Rational(1,10)); - - arcs.push_back(construct_arc(P3.begin(), P3.end(), Q3.begin(), Q3.end(), - Alg_real_1(-2), Alg_real_1(3))); - - // Create an arc supported by the line y = -0.2x / 0.1, - // defined over the interval [-3, 0]: - Rat_vec P4,Q4; - P4.push_back(Rational(0)); - P4.push_back(Rational(-1,5)); - Q4.push_back(Rational(1,10)); - arcs.push_back(construct_arc(P4.begin(), P4.end(), Q4.begin(), Q4.end(), - Alg_real_1(-3), Alg_real_1(0))); - - // Print the arcs. - for (unsigned int i(0); i < arcs.size(); ++i) - std::cout << arcs[i]< // NT -#include // Algebraic Kernel -#include // Traits -#include // Arrangement +#include +#include +#include +#include -typedef CORE::BigInt Number_type; -typedef CGAL::Algebraic_kernel_d_1 AK1; -typedef CGAL::Arr_rational_function_traits_2 Traits_2; - -typedef Traits_2::Polynomial_1 Polynomial_1; -typedef Traits_2::Algebraic_real_1 Alg_real_1; - -typedef CGAL::Arrangement_2 Arrangement_2; +typedef CGAL::CORE_algebraic_number_traits Nt_traits; +typedef Nt_traits::Rational Rational; +typedef Nt_traits::Algebraic Algebraic; +typedef CGAL::Cartesian Alg_kernel; +typedef CGAL::Arr_rational_arc_traits_2 Traits_2; +typedef Traits_2::Point_2 Point_2; +typedef Traits_2::Curve_2 Rational_arc_2; +typedef Traits_2::Rat_vector Rat_vector; +typedef std::list Rat_arcs_list; +typedef CGAL::Arrangement_2 Arrangement_2; int main () { - CGAL::set_pretty_mode(std::cout); // for nice printouts. - - // Traits class object - AK1 ak1; - Traits_2 traits(&ak1); - - // constructor for rational functions - Traits_2::Construct_curve_2 construct = traits.construct_curve_2_object(); - - // a polynomial representing x .-) - Polynomial_1 x = CGAL::shift(Polynomial_1(1),1); - - // container storing all arcs - std::vector arcs; + std::list arcs; - // Create the rational functions (y = 1 / x), and (y = -1 / x). - Polynomial_1 P1(1); - Polynomial_1 minusP1(-P1); - Polynomial_1 Q1 = x; - arcs.push_back(construct(P1, Q1)); - arcs.push_back(construct(minusP1, Q1)); + Rat_vector P1(1); + P1[0] = 1; + + Rat_vector Q1(2); + Q1[1] = 1; Q1[0] = 0; + + arcs.push_back (Rational_arc_2 (P1, Q1)); + + P1[0] = -1; + arcs.push_back (Rational_arc_2 (P1, Q1)); // Create a bounded segments of the parabolas (y = -4*x^2 + 3) and // (y = 4*x^2 - 3), defined over [-sqrt(3)/2, sqrt(3)/2]. - Polynomial_1 P2 = -4*x*x+3; - Polynomial_1 minusP2 = -P2; - std::vector > roots; + const Algebraic half_sqrt3 = CORE::sqrt(Algebraic(3)) / 2; + Rat_vector P2(3); + P2[2] = -4; P2[1] = 0; P2[0] = 3; - // [-sqrt(3)/2, sqrt(3)/2] - traits.algebraic_kernel_d_1()->solve_1_object()(P2, std::back_inserter(roots)); - arcs.push_back(construct(P2, roots[0].first, roots[1].first)); - arcs.push_back(construct(minusP2, roots[0].first, roots[1].first)); + arcs.push_back (Rational_arc_2 (P2, -half_sqrt3, half_sqrt3)); + + P2[2] = 4; P2[0] = -3; + arcs.push_back (Rational_arc_2 (P2, -half_sqrt3, half_sqrt3)); // Create the rational function (y = 1 / 2*x) for x > 0, and the // rational function (y = -1 / 2*x) for x < 0. - Polynomial_1 P3(1); - Polynomial_1 minusP3(-P3); - Polynomial_1 Q3 = 2*x; - arcs.push_back(construct(P3, Q3, Alg_real_1(0), true)); - arcs.push_back(construct(minusP3, Q3, Alg_real_1(0), false)); + Rat_vector P3(1); + P3[0] = 1; + + Rat_vector Q3(2); + Q3[1] = 2; Q3[0] = 0; + + arcs.push_back (Rational_arc_2 (P3, Q3, Algebraic(0), true)); + + P3[0] = -1; + arcs.push_back (Rational_arc_2 (P3, Q3, Algebraic(0), false)); // Construct the arrangement of the six arcs. - //Arrangement_2 arr(&traits); - Arrangement_2 arr; - insert(arr, arcs.begin(), arcs.end()); + Arrangement_2 arr; + + insert (arr, arcs.begin(), arcs.end()); // Print the arrangement size. std::cout << "The arrangement size:" << std::endl - << " V = " << arr.number_of_vertices() - << " (plus " << arr.number_of_vertices_at_infinity() - << " at infinity)" - << ", E = " << arr.number_of_edges() - << ", F = " << arr.number_of_faces() - << " (" << arr.number_of_unbounded_faces() << " unbounded)" - << std::endl << std::endl; + << " V = " << arr.number_of_vertices() + << " (plus " << arr.number_of_vertices_at_infinity() + << " at infinity)" + << ", E = " << arr.number_of_edges() + << ", F = " << arr.number_of_faces() + << " (" << arr.number_of_unbounded_faces() << " unbounded)" + << std::endl << std::endl; return 0; } 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 bd62bb16fb0..a3715104974 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -78,10 +78,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; // Traits-class types: typedef _Bezier_curve_2 Self; + // TODO remove adaptor as top-traits might be instantiated by Aos_2 itself typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; - //!@} + + typedef Arr_bounded_planar_topology_traits_2 + Self; ///! \name The side tags //@{ - typedef typename Traits_adaptor_2::Left_side_category Left_side_category; - typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_adaptor_2::Top_side_category Top_side_category; - typedef typename Traits_adaptor_2::Right_side_category Right_side_category; + // are inherited from the geometry traits + typedef typename Traits_adaptor_2::Arr_left_side_category + Arr_left_side_category; + typedef typename Traits_adaptor_2::Arr_bottom_side_category + Arr_bottom_side_category; + typedef typename Traits_adaptor_2::Arr_top_side_category + Arr_top_side_category; + typedef typename Traits_adaptor_2::Arr_right_side_category + Arr_right_side_category; BOOST_MPL_ASSERT - ((boost::is_same< Left_side_category, Arr_oblivious_side_tag >)); + ((boost::is_same< Arr_left_side_category, Arr_oblivious_side_tag >)); BOOST_MPL_ASSERT - ((boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >)); + ((boost::is_same< Arr_bottom_side_category, Arr_oblivious_side_tag >)); BOOST_MPL_ASSERT - ((boost::is_same< Top_side_category, Arr_oblivious_side_tag >)); + ((boost::is_same< Arr_top_side_category, Arr_oblivious_side_tag >)); BOOST_MPL_ASSERT - ((boost::is_same< Right_side_category, Arr_oblivious_side_tag >)); + ((boost::is_same< Arr_right_side_category, Arr_oblivious_side_tag >)); //@} /*! \struct @@ -206,7 +211,7 @@ private: /// \name Auxiliary type definitions. //@{ - typedef Arrangement_on_surface_2 Arr; + typedef Arrangement_on_surface_2 Arr; // Type definition for the constuction sweep-line visitor. typedef Arr_construction_subcurve CSubcurve; 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 4ebe902f307..0163b8c09bd 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -58,10 +58,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; protected: 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 d2dfc69dc06..1a73bba0c26 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2003,2004,2005,2006,2007,2008,2009,2010,2011 INRIA Sophia-Antipolis (France). +// Copyright (c) 2003-2006 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -113,10 +113,10 @@ public: typedef CGAL::Tag_false Has_merge_category; typedef CGAL::Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; Arr_circular_arc_traits_2(const CircularKernel &k = CircularKernel()) : ck(k) {} 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 3a9364c1424..0403278487b 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2003,2004,2005,2006,2007,2008,2009,2010,2011 INRIA Sophia-Antipolis (France). +// Copyright (c) 2003-2006 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -533,10 +533,10 @@ namespace CGAL { typedef CGAL::Tag_false Has_merge_category; typedef CGAL::Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; typedef internal_Argt_traits::Not_X_Monotone Not_X_Monotone; 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 3a216f962ae..7a49edcb062 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -73,10 +73,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; // Traits objects: typedef _Conic_arc_2 Curve_2; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h index b49b33056d7..c51f6be662c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -82,14 +82,14 @@ public: // Base_traits_2 is Arr_curve_data_traits that already completes // incomplete tags - typedef typename Base_traits_2::Left_side_category - Left_side_category; - typedef typename Base_traits_2::Bottom_side_category - Bottom_side_category; - typedef typename Base_traits_2::Top_side_category - Top_side_category; - typedef typename Base_traits_2::Right_side_category - Right_side_category; + typedef typename Base_traits_2::Arr_left_side_category + Arr_left_side_category; + typedef typename Base_traits_2::Arr_bottom_side_category + Arr_bottom_side_category; + typedef typename Base_traits_2::Arr_top_side_category + Arr_top_side_category; + typedef typename Base_traits_2::Arr_right_side_category + Arr_right_side_category; }; } //namespace CGAL 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 20bb1b76f63..2ee3f5dcc4c 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -31,7 +31,6 @@ #include #include -#include namespace CGAL { @@ -63,23 +62,19 @@ public: PARAMETER_SPACE_IN_X_CURVE_END_OP, PARAMETER_SPACE_IN_X_POINT_OP, PARAMETER_SPACE_IN_X_CURVE_OP, + COMPARE_Y_NEAR_BOUNDARY_OP, + COMPARE_Y_ON_BOUNDARY_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_Y_CURVE_END_OP, PARAMETER_SPACE_IN_Y_POINT_OP, PARAMETER_SPACE_IN_Y_CURVE_OP, + COMPARE_X_NEAR_BOUNDARY_POINT_CURVE_END_OP, + COMPARE_X_NEAR_BOUNDARY_CURVE_ENDS_OP, + COMPARE_X_ON_BOUNDARY_OP, IS_ON_Y_IDENTIFICATION_POINT_OP, IS_ON_Y_IDENTIFICATION_CURVE_OP, - COMPARE_X_AT_LIMIT_POINT_CURVE_END_OP, - COMPARE_X_AT_LIMIT_CURVE_ENDS_OP, - COMPARE_X_NEAR_LIMIT_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, NUMBER_OF_OPERATIONS }; @@ -167,18 +162,11 @@ public: unsigned int count_parameter_space_in_x_point() const { return m_counters[PARAMETER_SPACE_IN_X_POINT_OP]; } - unsigned int count_is_on_x_identification_point() const - { return m_counters[IS_ON_X_IDENTIFICATION_POINT_OP]; } - - unsigned int count_is_on_x_identification_curve() const - { return m_counters[IS_ON_X_IDENTIFICATION_CURVE_OP]; } - - unsigned int count_compare_y_on_boundary() const - { return m_counters[COMPARE_Y_ON_BOUNDARY_OP]; } - unsigned int count_compare_y_near_boundary() const { return m_counters[COMPARE_Y_NEAR_BOUNDARY_OP]; } + unsigned int count_compare_y_on_boundary() const + { return m_counters[COMPARE_Y_ON_BOUNDARY_OP]; } // bottom-top @@ -191,32 +179,14 @@ public: unsigned int count_parameter_space_in_y_point() const { return m_counters[PARAMETER_SPACE_IN_Y_POINT_OP]; } - unsigned int count_is_on_y_identification_point() const - { return m_counters[IS_ON_Y_IDENTIFICATION_POINT_OP]; } + unsigned int count_compare_x_near_boundary_point_curve_end() const + { return m_counters[COMPARE_X_NEAR_BOUNDARY_POINT_CURVE_END_OP]; } - unsigned int count_is_on_y_identification_curve() const - { return m_counters[IS_ON_Y_IDENTIFICATION_CURVE_OP]; } - - unsigned int count_compare_x_at_limit_point_curve_end() const - { return m_counters[COMPARE_X_AT_LIMIT_POINT_CURVE_END_OP]; } - - unsigned int count_compare_x_at_limit_curve_ends() const - { return m_counters[COMPARE_X_AT_LIMIT_CURVE_ENDS_OP]; } - - unsigned int count_compare_x_near_limit() const - { return m_counters[COMPARE_X_NEAR_LIMIT_OP]; } - - unsigned int count_compare_x_on_boundary_points() const - { return m_counters[COMPARE_X_ON_BOUNDARY_POINTS_OP]; } - - unsigned int count_compare_x_on_boundary_point_curve_end() const - { return m_counters[COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP]; } - - unsigned int count_compare_x_on_boundary_curve_ends() const - { return m_counters[COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP]; } - - unsigned int count_compare_x_near_boundary() const - { return m_counters[COMPARE_X_NEAR_BOUNDARY_OP]; } + unsigned int count_compare_x_near_boundary_curve_ends() const + { return m_counters[COMPARE_X_NEAR_BOUNDARY_CURVE_ENDS_OP]; } + + unsigned int count_compare_x_on_boundary() const + { return m_counters[COMPARE_X_ON_BOUNDARY_OP]; } /// \name Types and functors inherited from the base //@{ @@ -226,14 +196,14 @@ public: typedef typename Base::Has_merge_category Has_merge_category; typedef typename Base::Has_do_intersect_category 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; + typedef typename internal::Arr_complete_left_side_tag< Base >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Base >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Base >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Base >::Tag + Arr_right_side_category; typedef typename Base::Point_2 Point_2; typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; @@ -567,32 +537,24 @@ public: }; - /*! A functor that determines whether a point or a curve lies on an identification in x. + /*! A functor that compares the y-coordinates of curve ends near the + * boundary of the parameter space. */ - class Is_on_x_identification_2 { + class Compare_y_near_boundary_2 { private: - typename Base::Is_on_x_identificiation_2 m_object; - mutable unsigned int & m_counter1; - mutable unsigned int & m_counter2; + typename Base::Compare_y_near_boundary_2 m_object; + unsigned int & m_counter; public: /*! Construct */ - Is_on_x_identification_2(const Base * base, - unsigned int & counter1, - unsigned int & counter2) : - m_object(base->is_on_x_identificiation_2_object()), - m_counter1(counter1), - m_counter2(counter2) {} + Compare_y_near_boundary_2(const Base * base, unsigned int & counter) : + m_object(base->compare_y_near_boundary_2_object()), m_counter(counter) {} /*! Operate */ - Arr_parameter_space operator()(const Point_2 & p) const - { ++m_counter1; return m_object(p); } - - - /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2 & xc) const - { ++m_counter2; return m_object(xc); } - + Comparison_result operator()(const X_monotone_curve_2 & xc1, + const X_monotone_curve_2 & xc2, + Arr_curve_end ce) const + { ++m_counter; return m_object(xc1, xc2, ce); } }; /*! A functor that compares the y-coordinate of two given points @@ -616,28 +578,11 @@ public: { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that compares the y-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_y_near_boundary_2 { - private: - typename Base::Compare_y_near_boundary_2 m_object; - unsigned int & m_counter; - - public: - /*! Construct */ - Compare_y_near_boundary_2(const Base * base, unsigned int & counter) : - m_object(base->compare_y_near_boundary_2_object()), m_counter(counter) {} - - /*! Operate */ - Comparison_result operator()(const X_monotone_curve_2 & xc1, - const X_monotone_curve_2 & xc2, - Arr_curve_end ce) const - { ++m_counter; return m_object(xc1, xc2, ce); } - }; - + // TODO Is_on_x_identification_2 + // bottom-top + /*! A functor that determines whether an endpoint of an x-monotone arc lies * on a boundary of the parameter space along the y axis. */ @@ -674,49 +619,21 @@ public: }; - /*! A functor that determines whether a point or a curve lies on an identification in x. - */ - class Is_on_y_identification_2 { - private: - typename Base::Is_on_y_identificiation_2 m_object; - mutable unsigned int & m_counter1; - mutable unsigned int & m_counter2; - - public: - /*! Construct */ - Is_on_y_identification_2(const Base * base, - unsigned int & counter1, - unsigned int & counter2) : - m_object(base->is_on_y_identificiation_2_object()), - m_counter1(counter1), - m_counter2(counter2) {} - - /*! Operate */ - Arr_parameter_space operator()(const Point_2 & p) const - { ++m_counter1; return m_object(p); } - - - /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2 & xc) const - { ++m_counter2; return m_object(xc); } - - }; - - /*! A functor that compares the x-limits of curve ends on the + /*! A functor that compares the x-coordinates of curve ends near the * boundary of the parameter space. */ - class Compare_x_at_limit_2 { + class Compare_x_near_boundary_2 { private: - typename Base::Compare_x_at_limit_2 m_object; + typename Base::Compare_x_near_boundary_2 m_object; unsigned int & m_counter1; unsigned int & m_counter2; public: /*! Construct */ - Compare_x_at_limit_2(const Base * base, + Compare_x_near_boundary_2(const Base * base, unsigned int & counter1, unsigned int & counter2) : - m_object(base->compare_x_at_limit_2_object()), + m_object(base->compare_x_near_boundary_2_object()), m_counter1(counter1), m_counter2(counter2) {} @@ -735,88 +652,29 @@ public: }; - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_x_near_limit_2 { - private: - typename Base::Compare_x_near_limit_2 m_object; - unsigned int & m_counter; - - public: - /*! Construct */ - Compare_x_near_limit_2(const Base * base, - unsigned int & counter) : - m_object(base->compare_x_near_limit_2_object()), - m_counter(counter) {} - - - /*! Operate */ - Comparison_result operator()(const X_monotone_curve_2 & xc1, - const X_monotone_curve_2 & xc2, - Arr_curve_end ce) const - { ++m_counter; return m_object(xc1, xc2, ce); } - }; - /*! A functor that compares the x-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; - unsigned int & m_counter1; - unsigned int & m_counter2; - unsigned int & m_counter3; + unsigned int & m_counter; public: /*! Construct */ - Compare_x_on_boundary_2(const Base * base, - unsigned int & counter1, unsigned int & counter2, unsigned int & counter3 ) : + Compare_x_on_boundary_2(const Base * base, unsigned int & counter) : m_object(base->compare_x_on_boundary_2_object()), - m_counter1(counter1), - m_counter2(counter2), - m_counter3(counter3) + m_counter(counter) {} /*! Operate */ Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const - { ++m_counter1; return m_object(p1, p2); } - - /*! Operate */ - 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 */ - Comparison_result operator()(const X_monotone_curve_2 & xcv1, Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, Arr_curve_end ce2) const - { ++m_counter3; return m_object(xcv1, ce1, xcv2, ce2); } - + { ++m_counter; return m_object(p1, p2); } }; - /*! A functor that compares the x-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; - unsigned int & m_counter; - public: - /*! Construct */ - Compare_x_near_boundary_2(const Base * base, - unsigned int & counter) : - m_object(base->compare_x_near_boundary_2_object()), - m_counter(counter) {} - - - /*! Operate */ - Comparison_result operator()(const X_monotone_curve_2 & xc1, - const X_monotone_curve_2 & xc2, - Arr_curve_end ce) const - { ++m_counter; return m_object(xc1, xc2, ce); } - }; + // TODO Is_on_y_identification_2 //@} @@ -886,20 +744,6 @@ public: ); } - 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] - ); - } - - 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_near_boundary_2 compare_near_boundary_2_object() const - { return Compare_y_near_boundary_2(this, m_counters[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( @@ -910,30 +754,6 @@ public: ); } - 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] - ); - } - - Compare_x_at_limit_2 compare_x_at_limit_2_object() const - { return Compare_x_at_limit_2(this, - m_counters[COMPARE_X_AT_LIMIT_POINT_CURVE_END_OP], - m_counters[COMPARE_X_AT_LIMIT_CURVE_ENDS_OP]); } - - Compare_x_near_limit_2 compare_x_near_limit_2_object() const - { return Compare_x_near_limit_2(this, m_counters[COMPARE_X_NEAR_LIMIT_OP]); } - - 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_near_boundary_2 compare_x_near_boundary_2_object() const - { return Compare_x_near_boundary_2(this, m_counters[COMPARE_X_NEAR_BOUNDARY_OP]); } //@} @@ -1008,14 +828,10 @@ Out_stream & operator<<(Out_stream & os, << 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 + << "# of COMPARE_Y_ON_BOUNDARY operation = " + << traits.count_compare_y_on_boundary() << std::endl // bottom-top << "# of PARAMETER_SPACE_IN_Y curve-end operation = " << traits.count_parameter_space_in_y_curve_end() << std::endl @@ -1023,24 +839,12 @@ Out_stream & operator<<(Out_stream & os, << 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_AT_LIMIT point/curve-end operation = " - << traits.count_compare_x_at_limit_point_curve_end() << std::endl - << "# of COMPARE_X_AT_LIMIT curve-ends operation = " - << traits.count_compare_x_at_limit_curve_ends() << std::endl - << "# of COMPARE_X_NEAR_LIMIT operation = " - << traits.count_compare_x_near_limit() << 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 + << "# of COMPARE_X_NEAR_BOUNDARY point/curve-end operation = " + << traits.count_compare_x_near_boundary_point_curve_end() << std::endl + << "# of COMPARE_X_NEAR_BOUNDARY curve-ends operation = " + << traits.count_compare_x_near_boundary_curve_ends() << std::endl + << "# of COMPARE_X_ON_BOUNDARY operation = " + << traits.count_compare_x_on_boundary() << std::endl << "total # = " << sum << std::endl << "# of traits constructed = " << Traits::increment(false) 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 e98084cb6ba..6528997ca64 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -68,14 +68,14 @@ public: typedef typename Base_traits_2::Has_do_intersect_category Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Base_traits_2 >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Base_traits_2 >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Base_traits_2 >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Base_traits_2 >::Category - Right_side_category; + typedef typename internal::Arr_complete_left_side_tag< Base_traits_2 >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Base_traits_2 >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Base_traits_2 >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Base_traits_2 >::Tag + Arr_right_side_category; // Representation of a curve with an addtional data field: typedef _Curve_data_ex Curve_2; 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 e6032e46a7d..d6b50db7c00 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h index 111080acda5..394c78605b8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h index 7d7198b0b57..56df7f2d817 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_enums.h b/Arrangement_on_surface_2/include/CGAL/Arr_enums.h index 03ac8462027..662df268ac4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_enums.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_enums.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 75e9374a29c..516ab738b8e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_extended_rational_arc_traits_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_extended_rational_arc_traits_d_1.h deleted file mode 100644 index 9d87b07b9ab..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_extended_rational_arc_traits_d_1.h +++ /dev/null @@ -1,1791 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -//TODO: somehow use the fact the the x-value is the same in all comparisons - -#ifndef CGAL_ARR_VERTICAL_SEGMENT_TRAITS -#define CGAL_ARR_VERTICAL_SEGMENT_TRAITS - -#include -#include -#include -#include - -#include -#include "boost/variant.hpp" - -#include - -namespace CGAL { - -# define Is_line(ver) \ - (((((ver)).max_parameter_space() == ARR_TOP_BOUNDARY ) && ((ver).min_parameter_space() == ARR_BOTTOM_BOUNDARY) )) - -# define Is_ray(ver) \ - ((((ver).max_parameter_space() == ARR_TOP_BOUNDARY) && ((ver).min_parameter_space() == ARR_INTERIOR ))|| \ - (((ver).max_parameter_space() == ARR_INTERIOR ) && ((ver).min_parameter_space() == ARR_BOTTOM_BOUNDARY )) ) - -# define Is_segment(ver) \ - ( ((ver).max_parameter_space() == ARR_INTERIOR ) && ((ver).min_parameter_space() == ARR_INTERIOR) ) - -# define Max_bounded(ver) \ - ( ((ver).max_parameter_space() == ARR_TOP_BOUNDARY ) ? false : true ) - -# define Min_bounded(ver) \ - ( ((ver).min_parameter_space() == ARR_BOTTOM_BOUNDARY ) ? false : true ) - - -template -class Arr_traits_with_vertical_segments -{ -public: - typedef Traits_ Traits; - typedef Arr_traits_with_vertical_segments Self; - - typedef typename Traits::Algebraic_kernel_d_1 Algebraic_kernel_d_1; - - typedef typename Traits::Point_2 Point_2; - typedef typename Traits::Multiplicity Multiplicity; - typedef typename Traits::Algebraic_real_1 Algebraic_real_1; - typedef typename Traits::Rat_vector Rat_vector; - typedef typename Traits::Coefficient Coefficient; - - typedef typename Traits::Integer Integer; - typedef typename Traits::Rational Rational; - typedef typename Traits::Polynomial_1 Polynomial_1; - typedef typename Traits::Rational_function Rational_function; - - - typedef typename Traits::X_monotone_curve_2 Non_vertical_x_curve_2; - typedef typename Traits::Curve_2 Non_vertical_curve_2; - typedef typename Traits::Vertical_segment Vertical_segment; - - typedef Arr_vertical_rational_arc::Rational_arc_with_ver_d_1 - X_monotone_curve_2; - typedef Arr_vertical_rational_arc::Rational_arc_with_ver_d_1 - Curve_2; - - //Category tags: - typedef Tag_true Has_left_category; - typedef Tag_true Has_merge_category; - typedef Tag_true Has_do_intersect_category; - - typedef Arr_open_side_tag Left_side_category; - typedef Arr_open_side_tag Top_side_category; - typedef Arr_open_side_tag Bottom_side_category; - typedef Arr_open_side_tag Right_side_category; -public: - typedef std::vector Object_vector; -private: - mutable Traits _traits; -public: - const Algebraic_kernel_d_1* algebraic_kernel_d_1() const {return _traits.algebraic_kernel_d_1();} - -public: - //------------ - //Constructors - //------------ - - //--------------------- - // Default constructor. - Arr_traits_with_vertical_segments () - {} - - class Construct_point_2 - { - private: - Traits& _traits; - public: - Construct_point_2 (Traits& traits) :_traits(traits) {} - Point_2 operator() (const Rational_function& rational_function, - const Algebraic_real_1& x_coordinate) - { - return _traits.construct_point_2_object()(rational_function,x_coordinate); - } - Point_2 operator() (const Rational& x,const Rational& y) - { - return _traits.construct_point_2_object()(x,y); - } - Point_2 operator() (const Algebraic_real_1& x,const Rational& y) - { - return _traits.construct_point_2_object()(x,y); - } - }; //Construct_point_2 - - Construct_point_2 construct_point_2_object() const {return Construct_point_2(_traits);} - - class Construct_vertical_x_curve_2 - { - private: - Traits& _traits; - public: - Construct_vertical_x_curve_2(Traits& traits) - :_traits(traits) - {} - - X_monotone_curve_2 operator() (const Point_2& p1,const Point_2& p2) const - { - return _traits.construct_vertical_segment_object() (p1,p2); - } - X_monotone_curve_2 operator() (const Point_2& p) const - { - return _traits.construct_vertical_segment_object() (p); - } - X_monotone_curve_2 operator() (const Point_2& p, bool is_directed_up) const - { - return _traits.construct_vertical_segment_object() (p,is_directed_up); - } - }; //Construct_vertical_x_curve_2 - - Construct_vertical_x_curve_2 construct_vertical_x_curve_2_object () const - { - return Construct_vertical_x_curve_2(_traits); - } - - class Construct_vertical_curve_2 - { - private: - Traits& _traits; - public: - Construct_vertical_curve_2 (Traits& traits) - :_traits(traits) - {} - Curve_2 operator() (const Point_2& p1,const Point_2& p2) const - { - return _traits.construct_vertical_segment_object()(p1,p2); - } - Curve_2 operator() (const Point_2& p) const - { - return _traits.construct_vertical_segment_object()(p); - } - Curve_2 operator() (const Point_2& p, bool is_directed_up) const - { - return _traits.construct_vertical_segment_object()(p,is_directed_up); - } - - }; //Construct_vertical_curve_2 - - Construct_vertical_curve_2 construct_vertical_curve_2_object () const - { - return Construct_vertical_curve_2(_traits); - } - - class Construct_curve_2 - { - private: - typedef typename Traits::Algebraic_real_1 Algebraic_real_1; - Traits& _traits; - public: - Construct_curve_2 (Traits& traits) - :_traits(traits) - {} - template - Curve_2 operator() (InputIterator begin, InputIterator end) const - { - return _traits.construct_curve_2_object()(begin,end); - } - template - Curve_2 operator() (InputIterator begin, InputIterator end,const Algebraic_real_1& x_s, bool dir_right) const - { - return _traits.construct_curve_2_object()(begin,end,x_s,dir_right); - } - template - Curve_2 operator() (InputIterator begin, InputIterator end, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t) const - { - return _traits.construct_curve_2_object()(begin,end,x_s,x_t); - } - template - Curve_2 operator() (InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom) const - { - return _traits.construct_curve_2_object()(begin_numer, end_numer,begin_denom,end_denom); - } - template - Curve_2 operator() (InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom, - const Algebraic_real_1& x_s, bool dir_right) const - { - return _traits.construct_curve_2_object()(begin_numer, end_numer,begin_denom,end_denom,x_s,dir_right); - } - template - Curve_2 operator() (InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t) const - { - return _traits.construct_curve_2_object()(begin_numer, end_numer,begin_denom,end_denom,x_s,x_t); - } - }; //Construct_rational_curve_2 - - Construct_curve_2 construct_curve_2_object () const - { - return Construct_curve_2(_traits); - } - class Construct_x_monotone_curve_2 - { - private: - typedef typename Traits::Algebraic_real_1 Algebraic_real_1; - Traits& _traits; - public: - Construct_x_monotone_curve_2 (Traits& traits) - :_traits(traits) - {} - template - X_monotone_curve_2 operator() (InputIterator begin, InputIterator end) const - { - return _traits.construct_x_monotone_curve_2_object()(begin,end); - } - template - X_monotone_curve_2 operator() ( InputIterator begin, InputIterator end, - const Algebraic_real_1& x_s, bool dir_right) const - { - return _traits.construct_x_monotone_curve_2_object()(begin,end,x_s,dir_right); - } - template - X_monotone_curve_2 operator() (InputIterator begin, InputIterator end, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t) const - { - return _traits.construct_x_monotone_curve_2_object()(begin,end,x_s,x_t); - } - template - X_monotone_curve_2 operator() ( InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom) const - { - return _traits.construct_x_monotone_curve_2_object()(begin_numer, end_numer,begin_denom,end_denom); - } - template - X_monotone_curve_2 operator() ( InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom, - const Algebraic_real_1& x_s, bool dir_right) const - { - return _traits.construct_x_monotone_curve_2_object()(begin_numer, end_numer,begin_denom,end_denom,x_s,dir_right); - } - template - X_monotone_curve_2 operator() ( InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t) const - { - return _traits.construct_x_monotone_curve_2_object()(begin_numer, end_numer,begin_denom,end_denom,x_s,x_t); - } - }; //Construct_rational_x_curve_2 - - Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object () const - { - return Construct_x_monotone_curve_2(_traits); - } - //------------------------ - //Functor definitions. - //------------------------ - - //--------------------------------------------------------------- - //A functor that compares the x-coordinates of two points - class Compare_x_2 - { - private: - Traits& _traits; - public: - Compare_x_2(Traits& traits) : _traits(traits) {} - /*! - * Compare the x-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). - */ - Comparison_result operator() (const Point_2 & p1, const Point_2 & p2) const - { - return _traits.compare_x_2_object()(p1,p2); - } - }; - - /*! Obtain a Compare_x_2 functor object. */ - Compare_x_2 compare_x_2_object () const - { - return Compare_x_2(_traits); - } - - /*! A functor that compares two points lexigoraphically: by x, then by y. */ - class Compare_xy_2 - { - private: - Traits& _traits; - public: - Compare_xy_2 (Traits& traits) : _traits(traits) {} - Comparison_result operator() (const Point_2& p1, const Point_2& p2) const - { - return _traits.compare_xy_2_object() (p1,p2); - } - }; - - /*! Obtain a Compare_xy_2 functor object. */ - Compare_xy_2 compare_xy_2_object () const - { - return Compare_xy_2(_traits); - } - - /*! A functor that obtains the left endpoint of a curve. */ - class Construct_min_vertex_2 - { - private: - Traits& _traits; - public: - Construct_min_vertex_2(Traits& traits) : _traits(traits) {} - /*! - * Get the left endpoint of the x-monotone curve (segment). - * \param cv The curve. - * \return The left endpoint. - */ - const Point_2& operator() (const X_monotone_curve_2 & cv) const - { - return (boost::apply_visitor(Construct_min_vertex_2_visitor(_traits),cv.variant())); - } - private: - class Construct_min_vertex_2_visitor - : public boost::static_visitor - { - private: - Traits& _traits; - public: - Construct_min_vertex_2_visitor(Traits& traits) :_traits(traits) {} - const Point_2& operator() (const Non_vertical_x_curve_2 & cv) const - { - return _traits.construct_min_vertex_2_object()(cv); - } - const Point_2& operator() (const Vertical_segment & cv) const - { - return (cv.min()); - } - }; //Construct_min_vertex_2_visitor - }; //Construct_min_vertex_2 - - /*! Obtain a Construct_min_vertex_2 functor object. */ - Construct_min_vertex_2 construct_min_vertex_2_object () const - { - return Construct_min_vertex_2(_traits); - } - - /*! A functor that obtains the right endpoint of a curve. */ - class Construct_max_vertex_2 - { - private: - Traits& _traits; - public: - Construct_max_vertex_2 (Traits& traits) : _traits(traits) {} - const Point_2& operator() (const X_monotone_curve_2 & cv) const - { - return (boost::apply_visitor(Construct_max_vertex_2_visitor(_traits),cv.variant())); - } - private: - class Construct_max_vertex_2_visitor - : public boost::static_visitor - { - private: - Traits& _traits; - public: - Construct_max_vertex_2_visitor(Traits& traits) : _traits(traits) {} - const Point_2& operator() (const Non_vertical_x_curve_2 & cv) const - { - return _traits.construct_max_vertex_2_object()(cv); - } - const Point_2& operator() (const Vertical_segment & cv) const - { - return (cv.max()); - } - }; //Construct_max_vertex_2_visitor - }; //Construct_max_vertex_2 - - /*! Obtain a Construct_max_vertex_2 functor object. */ - Construct_max_vertex_2 construct_max_vertex_2_object () const - { - return Construct_max_vertex_2(_traits); - } - - /*! A functor that checks whether a given curve is vertical. */ - class Is_vertical_2 - { - private: - Traits& _traits; - public: - Is_vertical_2(Traits& traits) : _traits(traits) {} - bool operator() (const X_monotone_curve_2& cv) const - { - return (boost::apply_visitor(Is_vertical_2_visitor(_traits),cv.variant())); - } - private: - class Is_vertical_2_visitor - : public boost::static_visitor - { - private: - Traits& _traits; - public: - Is_vertical_2_visitor(Traits& traits) : _traits(traits) {} - bool operator() (const Non_vertical_x_curve_2 & cv) const - { - return _traits.is_vertical_2_object()(cv); - } - bool operator() (const Vertical_segment & cv) const - { - return true; - } - }; //Is_vertical_2_visitor - - }; //Is_vertical_2 - - /*! Obtain an Is_vertical_2 functor object. */ - Is_vertical_2 is_vertical_2_object () const - { - return Is_vertical_2(_traits); - } - - /*! A functor that compares the y-coordinates of a point and a curve at - * the point x-coordinate. - */ - class Compare_y_at_x_2 - { - private: - Traits& _traits; - public: - Compare_y_at_x_2(Traits& traits) : _traits(traits) {} - /*! - * 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. - */ - //Compare_y_at_x_2() {} - Comparison_result operator() (const Point_2& p, - const X_monotone_curve_2& cv) const - { - return (boost::apply_visitor(Compare_y_at_x_2_visitor(_traits,p),cv.variant())); - } - private: - class Compare_y_at_x_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Compare_y_at_x_2_visitor(Traits& traits,const Point_2& p) : _traits(traits),_p(p), Base() {} - Comparison_result operator() (const Non_vertical_x_curve_2 & cv) const - { - return _traits.compare_y_at_x_2_object() (_p,cv); - } - Comparison_result operator() (const Vertical_segment & cv) const - { - CGAL_precondition(_traits.compare_x_2_object()(_p,cv.max()) == CGAL::EQUAL); - - typename Traits::Compare_xy_2 compare_xy_2 = _traits.compare_xy_2_object(); - - if (Is_line(cv)) - return CGAL::EQUAL; - if ((Max_bounded(cv)) && (!Min_bounded(cv)) ) - return (compare_xy_2 (_p,cv.max()) == LARGER) ? LARGER : EQUAL; - if ((!Max_bounded(cv)) && (Min_bounded(cv)) ) - return (compare_xy_2 (_p,cv.min()) == SMALLER) ? SMALLER : EQUAL; - //line is a segment - Comparison_result cr_t = compare_xy_2(_p,cv.max()); - Comparison_result cr_b = compare_xy_2(_p,cv.min()); - return (cr_t == LARGER) ? LARGER : - (cr_b == SMALLER) ? SMALLER : - EQUAL; - } - private: - Traits& _traits; - Point_2 _p; - - }; //Compare_y_at_x_2_visitor - }; //Compare_y_at_x_2 - - //*! 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(_traits); - } - - class Compare_y_at_x_left_2 - { - private: - Traits& _traits; - public: - Compare_y_at_x_left_2(Traits& traits) : _traits(traits) {} - Comparison_result operator() (const X_monotone_curve_2& cv1,const X_monotone_curve_2& cv2, - const Point_2& p) const - { - return (boost::apply_visitor(Compare_y_at_x_left_2_visitor(_traits,p),cv1.variant(),cv2.variant())); - } - private: - class Compare_y_at_x_left_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Compare_y_at_x_left_2_visitor(Traits& traits,const Point_2& p) - : _traits(traits), _p(p), Base() {} - Comparison_result operator() (const Non_vertical_x_curve_2 & cv1, - const Non_vertical_x_curve_2 & cv2) const - { - return _traits.compare_y_at_x_left_2_object() (cv1,cv2,_p); - } - Comparison_result operator() (const Vertical_segment & cv1, - const Non_vertical_x_curve_2 & cv2) const - { - assert(false); - return CGAL::SMALLER; - } - Comparison_result operator() (const Non_vertical_x_curve_2& cv1, - const Vertical_segment & cv2) const - { - assert(false); - return CGAL::LARGER; - } - Comparison_result operator() (const Vertical_segment & cv1, - const Vertical_segment & cv2) const - { - return CGAL::EQUAL; - } - private: - Traits& _traits; - Point_2 _p; - - }; //Compare_y_at_x_left_2_visitor - }; //Compare_y_at_x_left_2 - - Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const {return Compare_y_at_x_left_2(_traits);} - /*! A functor that compares compares the y-coordinates of two curves - * immediately to the left of their intersection point. - */ - - /*! A functor that checks whether two points and two curves are identical. */ - class Equal_2 - { - private: - Traits& _traits; - public: - /*! - * Check 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. - */ - Equal_2 (Traits& traits) :_traits(traits) {} - bool operator() ( const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { - return (boost::apply_visitor(Equal_2_visitor(_traits),cv1.variant(),cv2.variant())); - } - - /*! - * Check 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. - */ - bool operator() (const Point_2& p1, const Point_2& p2) const - { - if (&p1 == &p2) - return (true); - return _traits.equal_2_object() (p1,p2); - - } - private: - class Equal_2_visitor - : public boost::static_visitor - { - private: - typedef boost::static_visitor Base; - Traits& _traits; - public: - Equal_2_visitor(Traits& traits) : _traits(traits), Base() {} - bool operator() (const Non_vertical_x_curve_2& cv1, - const Non_vertical_x_curve_2& cv2) const - { - return _traits.equal_2_object() (cv1,cv2); - } - bool operator() (const Non_vertical_x_curve_2& cv1, - const Vertical_segment & cv2) const - { - return false; - } - bool operator() (const Vertical_segment & cv1, - const Non_vertical_x_curve_2& cv2) const - { - return false; - } - bool operator() (const Vertical_segment & cv1, - const Vertical_segment & cv2) const - { - if (&cv1 == &cv2) - return (true); - - if (CGAL::compare(cv1.x(),cv2.x()) != CGAL::EQUAL) - return false; - - if (Is_line(cv1) && Is_line(cv2)) - return true; - - if (Is_segment(cv1) && Is_segment(cv2)) - return (_traits.equal_2_object() (cv1.min(),cv2.min()) && - _traits.equal_2_object() (cv1.max(),cv2.max()) ); - - if (Max_bounded(cv1) && Max_bounded(cv2)) - return (_traits.equal_2_object() (cv1.max(),cv2.max() )); - - if (Min_bounded(cv1) && Min_bounded(cv2)) - return (_traits.equal_2_object() (cv1.min(),cv2.min() )); - - return false; - } - }; //Equal_2_visitor - }; //Equal_2 - - /*! Obtain an Equal_2 functor object. */ - Equal_2 equal_2_object () const - { - return Equal_2(_traits); - } - - /*! A functor that divides a curve into continues (x-monotone) curves. */ - class Make_x_monotone_2 - { - private: - Traits& _traits; - public: - Make_x_monotone_2(Traits& traits) : _traits(traits) {} - template - OutputIterator operator() (const Curve_2& cv, OutputIterator oi) const - { - Object_vector res (boost::apply_visitor(Make_x_monotone_2_visitor(_traits),cv.variant())); - re_cast_object_vector(res,oi); - return (oi); - } - private: - class Make_x_monotone_2_visitor - : public boost::static_visitor < Object_vector > - { - private: - typedef boost::static_visitor Base; - Traits& _traits; - public: - Make_x_monotone_2_visitor(Traits& traits) : _traits(traits), Base() {} - Object_vector operator() (const Non_vertical_curve_2& cv) const - { - Object_vector vec; - _traits.make_x_monotone_2_object() (cv,std::back_inserter(vec)); - return vec; - } - Object_vector operator() (const Vertical_segment & cv) const - { - Object_vector vec; - vec.push_back(make_object (Vertical_segment(cv))); - return vec; - } - }; //Make_x_monotone_2_visitor - - }; //Make_x_monotone_2 - - /*! Obtain a Make_x_monotone_2 functor object. */ - Make_x_monotone_2 make_x_monotone_2_object () const - { - return Make_x_monotone_2(_traits); - } - - /*! A functor that splits a curve at a point. */ - class Split_2 - { - private: - typedef std::pair Res_type; - Traits& _traits; - public: - Split_2 (Traits& traits) : _traits(traits) {} - /*! - * Split 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). - * \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 - { - Res_type res = boost::apply_visitor(Split_2_visitor(_traits,p),cv.variant()); - c1 = res.first; - c2 = res.second; - } - private: - class Split_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Split_2_visitor(Traits& traits,const Point_2 & p) - : _traits(traits),_p(p), Base() {} - Res_type operator() (const Non_vertical_x_curve_2& cv) const - { - Non_vertical_x_curve_2 _c1,_c2; - _traits.split_2_object() (cv,_p,_c1,_c2); - return Res_type(_c1,_c2); - } - Res_type operator() (const Vertical_segment & cv) const - { - typename Traits::Construct_vertical_segment - construct_vertical_segment = _traits.construct_vertical_segment_object(); - Vertical_segment _c1,_c2; - if (Is_line(cv)) - { - _c1 = construct_vertical_segment(_p,false); - _c2 = construct_vertical_segment(_p,true); - } - else if (Is_segment(cv)) - { - _c1 = construct_vertical_segment(cv.min(),_p); - _c2 = construct_vertical_segment(_p,cv.max()); - } - else if (Max_bounded(cv)) //min unbounded - { - _c1 = construct_vertical_segment(_p,false); - _c2 = construct_vertical_segment(_p,cv.max()); - } - else //min_bounded && max unbounded - { - _c1 = construct_vertical_segment(cv.min(),_p); - _c2 = construct_vertical_segment(_p,true); - } - return Res_type(_c1,_c2); - } - private: - Traits& _traits; - Point_2 _p; - }; //Split_2_visitor - }; //Split_2 - - /*! Obtain a Split_2 functor object. */ - Split_2 split_2_object () const - { - return Split_2(_traits); - } - - /*! A functor that computes intersections between two curves. */ - class Intersect_2 - { - private: - Traits& _traits; - public: - /*! - * Find 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. - * \param cv2 The second curve. - * \param oi The output iterator. - * \return The past-the-end iterator. - */ - Intersect_2 (Traits& traits) : _traits(traits) {} - template - OutputIterator operator() ( const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - OutputIterator oi) const - { - Object_vector res (boost::apply_visitor(Intersect_2_visitor(_traits),cv1.variant(),cv2.variant())); - re_cast_object_vector(res,oi); - return (oi); - } - private: - class Intersect_2_visitor - : public boost::static_visitor - { - private: - typedef boost::static_visitor Base; - Traits& _traits; - public: - Intersect_2_visitor(Traits& traits) - : _traits(traits), Base() {} - - //intersection of two Non_vertical_x_curve_2 - Object_vector operator() (const Non_vertical_x_curve_2& cv1, - const Non_vertical_x_curve_2& cv2) const - { - Object_vector vec; - _traits.intersect_2_object() (cv1,cv2,std::back_inserter(vec)); - return vec; - } - //intersection of a Non_vertical_x_curve_2 and a Vertical_segment - Object_vector operator() (const Vertical_segment& cv1, - const Non_vertical_x_curve_2& cv2) const - { - Object_vector vec; - _traits.intersect_2_object() (cv2,cv1,std::back_inserter(vec)); - return vec; - } - //intersection of a Non_vertical_x_curve_2 and a Vertical_segment - Object_vector operator() (const Non_vertical_x_curve_2& cv1, - const Vertical_segment& cv2) const - { - Object_vector vec; - _traits.intersect_2_object() (cv1,cv2,std::back_inserter(vec)); - return vec; - } - //intersection of two Vertical_segment - Object_vector operator() (const Vertical_segment& cv1, - const Vertical_segment& cv2) const - { - Object_vector vec; - CGAL::Object object; - if (cv1.has_same_x(cv2) == false) - return vec; - if (Is_line(cv1)) - object = make_object(Vertical_segment(cv2)); - else if (Is_line(cv2)) - object = make_object(Vertical_segment(cv1)); - - if (object.empty() == false) - { - vec.push_back(object); - return vec; - } - - if (Is_ray(cv1)) - { - if (Is_ray(cv2)) - vec = intersect_ray_ray (cv1,cv2); - else //cv2 is a segment - vec = intersect_ray_segment(cv1,cv2); - } - //cv1 is a segment - else if (Is_ray(cv2)) - { - vec = intersect_ray_segment(cv2,cv1); - } - //cv1 & cv2 are segments - else - vec = intersect_segment_segment(cv1,cv2); - - return vec; - } - private: - //returns the intersection of a curve with a vertical line defined at p - //CGAL::Object wraps a pair - //post return_value.second = 1 - Object_vector intersect_ray_ray ( const Vertical_segment& ray1, - const Vertical_segment& ray2) const - { - typename Traits::Compare_xy_2 - compare_xy_2 = _traits.compare_xy_2_object(); - typename Traits::Construct_vertical_segment - construct_vertical_segment = _traits.construct_vertical_segment_object(); - - CGAL_precondition (Is_ray(ray1)); - CGAL_precondition (Is_ray(ray2)); - - Object_vector vec; - CGAL::Object object; - - - if (Min_bounded(ray1) && Min_bounded(ray2)) - { - //both are directed up, take the larger minimum vertex - Comparison_result cr = compare_xy_2(ray1.min(),ray2.min()); - object = (cr == LARGER) ? make_object (construct_vertical_segment(ray1.min(),true)): - make_object (construct_vertical_segment(ray2.min(),true)) ; - } - else if (Min_bounded(ray1) && Max_bounded(ray2)) - { - //ray1 is directed up, ray2 is directed down - //either theu have no intersection or an intersecting segment or an intersection point - Comparison_result cr = compare_xy_2 (ray1.min(),ray2.max()); - if (cr == CGAL::LARGER) - return vec; - else if (cr == CGAL::EQUAL) - object = make_object (std::pair (ray1.min(),0)); - else //(cr == CGAL::SMALLER) - object = make_object (construct_vertical_segment(ray1.min(),ray2.max())); - } - else if (Max_bounded(ray1) && Min_bounded(ray2)) - { - //ray1 is directed down, ray2 is directed up - //either theu have no intersection or an intersecting segment - Comparison_result cr = compare_xy_2 (ray1.min(),ray2.max()); - if (cr == CGAL::SMALLER) - return vec; - else if (cr == CGAL::EQUAL) - object = make_object (std::pair (ray1.min(),0)); - else - object = make_object (construct_vertical_segment(ray1.max(),ray2.min())); - } - else - { - //both are directed down, take the smaller maximum vertex - Comparison_result cr = compare_xy_2 (ray1.max(),ray2.max()); - object = (cr == SMALLER) ? make_object (construct_vertical_segment(ray1.max(),false)): - make_object (construct_vertical_segment(ray2.max(),false)) ; - } - vec.push_back(object); - return vec; - } - Object_vector intersect_ray_segment(const Vertical_segment& ray, - const Vertical_segment& seg) const - { - CGAL_precondition (Is_ray(ray)); - CGAL_precondition (Is_segment(seg)); - - typename Traits::Compare_xy_2 - compare_xy_2 = _traits.compare_xy_2_object(); - typename Traits::Construct_vertical_segment - construct_vertical_segment = _traits.construct_vertical_segment_object(); - - Object_vector vec; - CGAL::Object object; - - if (Min_bounded(ray)) - { - //ray is directed up - Comparison_result cr = compare_xy_2 (ray.min(),seg.min()); - if (cr != LARGER) - object = make_object (seg); - else - { - cr = compare_xy_2 (ray.min(),seg.max()); - if (cr == LARGER) - return vec; - else if (cr == CGAL::EQUAL) - object = make_object (std::pair (ray.min(),0)); - else - object = make_object (construct_vertical_segment(ray.min(),seg.max())); - } - } - else - { - //ray is directed down - Comparison_result cr = compare_xy_2 (ray.max(),seg.max()); - if (cr != SMALLER) - object = make_object (seg); - else - { - cr = compare_xy_2 (ray.max(),seg.min()); - if (cr == SMALLER) - return vec; - else if (cr == CGAL::EQUAL) - object = make_object (std::pair (ray.max(),0)); - else - object = make_object (construct_vertical_segment(ray.min(),seg.max())); - } - } - vec.push_back(object); - return vec; - } - - Object_vector intersect_segment_segment(const Vertical_segment& seg1, - const Vertical_segment& seg2) const - { - CGAL_precondition (Is_segment(seg1)); - CGAL_precondition (Is_segment(seg2)); - - typename Traits::Compare_xy_2 - compare_xy_2 = _traits.compare_xy_2_object(); - typename Traits::Construct_vertical_segment - construct_vertical_segment = _traits.construct_vertical_segment_object(); - - Object_vector vec; - CGAL::Object object; - - Comparison_result cr = compare_xy_2 (seg1.max(),seg2.min()); - if (cr == CGAL::SMALLER) - return vec; - - cr = typename compare_xy_2 (seg1.min(),seg2.max()); - if (cr == CGAL::LARGER) - return vec; - - Comparison_result cr1 = compare_xy_2 (seg1.min(),seg2.min()); - Comparison_result cr2 = compare_xy_2 (seg1.max(),seg2.max()); - - if ( (cr1 == CGAL::LARGER ) && - (cr2 == CGAL::LARGER ) ) - object = make_object (construct_vertical_segment(seg1.min(),seg2.max())); - else if ( (cr1 == CGAL::LARGER ) && - (cr2 == CGAL::SMALLER ) ) - object = make_object (construct_vertical_segment(seg1.min(),seg1.max())); - else if ( (cr1 == CGAL::SMALLER) && - (cr2 == CGAL::LARGER ) ) - object = make_object (construct_vertical_segment(seg2.min(),seg2.max())); - else //SMALLER,SMALLER - object = make_object (construct_vertical_segment(seg2.min(),seg1.max())); - - vec.push_back(object); - return vec; - } - }; //Intersect_2_visitor - }; //Intersect_2 - - /*! Obtain an Intersect_2 functor object. */ - Intersect_2 intersect_2_object () const - { - return Intersect_2(_traits); - } - - /*! A functor that tests whether two curves can be merged. */ - class Are_mergeable_2 - { - private: - Traits& _traits; - public: - /*! - * Check 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 - * by the same line and share a common endpoint; (false) otherwise. - */ - Are_mergeable_2 (Traits& traits) : _traits(traits) {} - bool operator() ( const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { - return (boost::apply_visitor(Are_mergeable_2_visitor(_traits),cv1.variant(),cv2.variant())); - } - private: - class Are_mergeable_2_visitor - : public boost::static_visitor - { - private: - typedef boost::static_visitor Base; - Traits& _traits; - public: - Are_mergeable_2_visitor(Traits& traits) - : _traits(traits), Base() {} - bool operator() ( const Non_vertical_x_curve_2& cv1, - const Non_vertical_x_curve_2& cv2) const - { - return _traits.are_mergeable_2_object() (cv1,cv2); - } - bool operator() ( const Vertical_segment& cv1, - const Non_vertical_x_curve_2& cv2) const - { - return false; - } - bool operator() ( const Non_vertical_x_curve_2& cv1, - const Vertical_segment& cv2) const - { - return false; - } - bool operator() ( const Vertical_segment& cv1, - const Vertical_segment& cv2) const - { - bool res = false; - //try to merge at common maximum - if ((Max_bounded(cv1)) && (Max_bounded(cv2))) - { - if (_traits.equal_2_object()(cv1.max(),cv2.max())) - return true; - } - //try to merge at common minimum - if ((Min_bounded(cv1)) && (Min_bounded(cv2))) - { - if (_traits.equal_2_object()(cv1.min(),cv2.min())) - return true; - } - //try to merge at minimum and maximum - if ((Max_bounded(cv1)) && (Min_bounded(cv2))) - { - res = (_traits.equal_2_object()(cv1.max(),cv2.min())); - } - if ((Min_bounded(cv1)) && (Max_bounded(cv2))) - { - res = (res || (_traits.equal_2_object()(cv1.min(),cv2.max()))); - } - return res; - } - }; //Are_mergeable_2_visitor - }; //Are_mergeable_2 - - /*! Obtain an Are_mergeable_2 functor object. */ - Are_mergeable_2 are_mergeable_2_object () const - { - return Are_mergeable_2(_traits); - } - - /*! A functor that merges two curves into one. */ - class Merge_2 - { - private: - Traits& _traits; - public: - /*! - * Merge 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. - * \pre The two curves are mergeable, that is they are supported by the - * same conic curve and share a common endpoint. - */ - Merge_2 (Traits& traits) : _traits(traits) {} - void operator() ( const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - X_monotone_curve_2& c) const - { - c = boost::apply_visitor(Merge_2_visitor(_traits),cv1.variant(),cv2.variant()); - return; - } - private: - class Merge_2_visitor - : public boost::static_visitor - { - private: - typedef boost::static_visitor Base; - Traits& _traits; - public: - Merge_2_visitor(Traits& traits) : _traits(traits), Base() {} - X_monotone_curve_2 operator() (const Non_vertical_x_curve_2& cv1,const Non_vertical_x_curve_2& cv2) const - { - CGAL_precondition(_traits.are_mergeable_2_object()(cv1,cv2)); - Non_vertical_x_curve_2 _c; - _traits.merge_2_object()(cv1,cv2,_c); - return _c; - } - X_monotone_curve_2 operator() (const Non_vertical_x_curve_2& cv1,const Vertical_segment& cv2) const - { - CGAL_precondition(false); - return X_monotone_curve_2(); - } - X_monotone_curve_2 operator() (const Vertical_segment& cv1,const Non_vertical_x_curve_2& cv2) const - { - CGAL_precondition(false); - return X_monotone_curve_2(); - } - X_monotone_curve_2 operator() (const Vertical_segment& cv1,const Vertical_segment& cv2) const - { - typename Traits::Construct_vertical_segment - construct_vertical_segment = _traits.construct_vertical_segment_object(); - - typename Traits::Compare_xy_2 - compare_xy_2 = _traits.compare_xy_2_object(); - - Vertical_segment _c; - if ((Max_bounded(cv1)) && - (Max_bounded(cv2)) && - (compare_xy_2(cv1.max() , cv2.max()) == CGAL::EQUAL)) - { - //merge at cv1.max() and cv2.max() - if ((Min_bounded(cv1) == false) || (Min_bounded(cv2) == false)) - _c = construct_vertical_segment(cv1.max(),false); //vertical ray towards -oo from common max - //construct vertical ray with common max and minimal min - bool get_cv1_min = (compare_xy_2(cv1.min(),cv2.min()) == CGAL::SMALLER); - _c = construct_vertical_segment(cv1.max(), get_cv1_min ? cv1.min() : cv2.min()); - return _c; - } - - if ((Min_bounded(cv1)) && - (Min_bounded(cv2)) && - (compare_xy_2(cv1.min() , cv2.min()) == CGAL::EQUAL)) - { - //merge at cv1.min() and cv2.min() - if ((Max_bounded(cv1) == false) || (Max_bounded(cv2) == false)) - _c = construct_vertical_segment(cv1.min(),true); //vertical ray towards oo from common min - //construct vertical ray with common min and maximal max - bool get_cv1_max = (compare_xy_2(cv1.max(),cv2.max()) == CGAL::LARGER); - _c = construct_vertical_segment(cv1.min(), get_cv1_max ? cv1.max() : cv2.max()); - return _c; - } - - if ((Max_bounded(cv1)) && - (Min_bounded(cv2)) && - (compare_xy_2(cv1.max() , cv2.min()) == CGAL::EQUAL)) - { - //merge at cv1.max() and cv2.min - if ((Min_bounded(cv1) == false) && (Max_bounded(cv2) == false)) - _c = construct_vertical_segment(cv1.max()); //vertical line at max.x - else if ((Min_bounded(cv1) == true) && (Max_bounded(cv2) == false)) - _c = construct_vertical_segment(cv1.min(),true); //vertical ray towards +oo from cv1.min - else if ((Min_bounded(cv1) == false) && (Max_bounded(cv2) == true)) - _c = construct_vertical_segment(cv2.max(),false); //vertical ray towards -oo from cv2.max - else - _c = construct_vertical_segment(cv1.min(), cv2.max()); - return _c; - } - else - { - //merge at cv1.min() and cv2.max - if ((Max_bounded(cv1) == false) && (Min_bounded(cv2) == false)) - _c = construct_vertical_segment(cv1.max()); //vertical line at max.x - else if ((Max_bounded(cv1) == true) && (Min_bounded(cv2) == false)) - _c = construct_vertical_segment(cv1.max(),false); //vertical ray towards -oo from cv1.max - else if ((Max_bounded(cv1) == false) && (Min_bounded(cv2) == true)) - _c = construct_vertical_segment(cv2.min(),true); //vertical ray towards +oo from cv2.min - else _c = construct_vertical_segment(cv2.min(), cv1.max()); - return _c; - } - CGAL_postcondition(false); - return X_monotone_curve_2(); - } - }; //Merge_2_visitor - }; //Merge_2 - - /*! Obtain a Merge_2 functor object. */ - Merge_2 merge_2_object () const - { - return Merge_2(_traits); - } - - //@} - - /// \name Functor definitions to handle boundaries - //@{ - - /*! A function object that obtains the parameter space of a geometric - * entity along the x-axis - */ - class Parameter_space_in_x_2 - { - private: - Traits& _traits; - public: - Parameter_space_in_x_2(Traits& traits) :_traits(traits) {}; - /*! Obtains the parameter space at the end of a line along the x-axis */ - Arr_parameter_space operator()( const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - return (boost::apply_visitor(Parameter_space_in_x_2_visitor(_traits,ce),xcv.variant())); - } - - /*! Obtains the parameter space at a point along the x-axis. - * \param p the point. - * \return the parameter space at p. - */ - /*Arr_parameter_space operator()(const Point_2 p) const - { - return Traits_2::Parameter_space_in_x_2(p); - }*/ - private: - class Parameter_space_in_x_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Parameter_space_in_x_2_visitor(Traits& traits,Arr_curve_end ce) - :_traits(traits), _ce(ce), Base() {} - Arr_parameter_space operator()(const Non_vertical_x_curve_2& xcv ) const - { - return _traits.parameter_space_in_x_2_object()(xcv,_ce); - } - Arr_parameter_space operator()(const Vertical_segment& xcv) const - { - return ARR_INTERIOR; - } - - private: - Traits& _traits; - Arr_curve_end _ce; - }; //Parameter_space_in_x_2_visitor - }; //Parameter_space_in_x_2 - - /*! 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(_traits); - } - - /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis - */ - class Parameter_space_in_y_2 - { - private: - Traits& _traits; - public: - Parameter_space_in_y_2 (Traits& traits) :_traits(traits) {}; - /*! 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. - * If the line coincides with the identification arc, it is assumed to - * be smaller than any other object. - * \param xcv the line - * \param ce the line end indicator: - * ARR_MIN_END - the minimal end of xc or - * ARR_MAX_END - the maximal end of xc - * \return the parameter space at the ce end of the line xcv. - * ARR_BOTTOM_BOUNDARY - the line approaches the south pole at the line - * left end. - * ARR_INTERIOR - the line does not approache a contraction point. - * ARR_TOP_BOUNDARY - the line approaches the north pole at the line - * right end. - */ - Arr_parameter_space operator()( const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - return (boost::apply_visitor(Parameter_space_in_y_2_visitor(_traits,ce),xcv.variant())); - } - - /*! Obtains the parameter space at a point along the y-axis. - * \param p the point. - * \return the parameter space at p. - */ - //Arr_parameter_space operator()(const Point_2 ) const - //{ - // return ARR_INTERIOR; - //} - - private: - class Parameter_space_in_y_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Parameter_space_in_y_2_visitor(Traits& traits,Arr_curve_end ce) - :_traits(traits),_ce(ce), Base() {} - Arr_parameter_space operator()(const Non_vertical_x_curve_2& xcv ) const - { - return _traits.parameter_space_in_y_2_object()(xcv,_ce); - } - Arr_parameter_space operator()(const Vertical_segment& xcv) const - { - if (_ce == ARR_MIN_END) - return xcv.min_parameter_space(); - else //ce == ARR_MAX_END - return xcv.max_parameter_space(); - } - private: - Traits& _traits; - Arr_curve_end _ce; - }; //Parameter_space_in_x_2_visitor - - }; //Parameter_space_in_y_2 - - /*! 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(_traits); } - - class Compare_y_at_x_right_2 - { - private: - Traits& _traits; - public: - /* 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. - * \param p The intersection point. - * \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. - */ - Compare_y_at_x_right_2 (Traits& traits) : _traits(traits) {} - Comparison_result operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - const Point_2& p) const - { - return (boost::apply_visitor(Compare_y_at_x_right_2_visitor(_traits,p),cv1.variant(),cv2.variant())); - } - private: - class Compare_y_at_x_right_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Compare_y_at_x_right_2_visitor(Traits& traits,const Point_2& p) - : _traits(traits), _p(p), Base() {} - Comparison_result operator() (const Non_vertical_x_curve_2& cv1, - const Non_vertical_x_curve_2& cv2) const - { - return _traits.compare_y_at_x_right_2_object() (cv1,cv2,_p); - } - Comparison_result operator() (const Non_vertical_x_curve_2& cv1, - const Vertical_segment & cv2) const - { - return CGAL::SMALLER; - } - Comparison_result operator() (const Vertical_segment & cv1, - const Non_vertical_x_curve_2& cv2) const - { - return CGAL::LARGER; - } - Comparison_result operator() (const Vertical_segment & cv1, - const Vertical_segment & cv2) const - { - return CGAL::EQUAL; //test bug fix - } - private: - Traits& _traits; - Point_2 _p; - - }; //Compare_y_at_x_right_2_visitor - }; //Compare_y_at_x_right_2 - - /*! Obtain a Compare_y_at_x_right_2functor object. */ - Compare_y_at_x_right_2 compare_y_at_x_right_2_object () const - { - return Compare_y_at_x_right_2(_traits); - } - class Compare_x_near_limit_2 - { - private: - Traits& _traits; - public: - Compare_x_near_limit_2 (Traits& traits) : _traits(traits) {} - Comparison_result operator()( const X_monotone_curve_2& xcv1, - const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - return (boost::apply_visitor(Compare_x_near_limit_2_visitor(_traits,ce),xcv1.variant(),xcv2.variant())); - } - private: - class Compare_x_near_limit_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Compare_x_near_limit_2_visitor(Traits& traits,Arr_curve_end ce) - :_traits(traits), _ce(ce), Base() {} - Comparison_result operator()(const Non_vertical_x_curve_2& xcv1,const Non_vertical_x_curve_2& xcv2 ) const - { - return _traits.compare_x_near_limit_2_object()(xcv1,xcv2,_ce); - } - Comparison_result operator()(const Non_vertical_x_curve_2& xcv1,const Vertical_segment& xcv2 ) const - { - if (_ce == ARR_MIN_END) - { - CGAL_precondition (xcv2.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - return CGAL::LARGER; - } - else //_ce2 == ARR_MAX_END - { - CGAL_precondition (xcv2.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - return CGAL::SMALLER; - } - - return _traits.compare_x_at_limit_2_object()(xcv2.max(),xcv1,_ce); - } - Comparison_result operator()(const Vertical_segment& xcv1,const Non_vertical_x_curve_2& xcv2 ) const - { - if (_ce == ARR_MIN_END) - { - CGAL_precondition (xcv1.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - return CGAL::SMALLER; - } - else //_ce1 == ARR_MAX_END - { - CGAL_precondition (xcv1.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - return CGAL::LARGER; - } - } - Comparison_result operator()(const Vertical_segment& xcv1,const Vertical_segment& xcv2 ) const - { - if (_ce == ARR_MIN_END) - CGAL_precondition (xcv1.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - else //_ce1 == ARR_MAX_END - CGAL_precondition (xcv1.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - - if (_ce == ARR_MIN_END) - CGAL_precondition (xcv2.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - else //_ce2 == ARR_MAX_END - CGAL_precondition (xcv2.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - - return _traits.compare_x_2_object() (xcv1.min(),xcv2.min()); - } - - private: - Traits& _traits; - Arr_curve_end _ce; - }; //Compare_x_near_limit_2_visitor - }; //Compare_x_near_limit_2 - - Compare_x_near_limit_2 compare_x_near_limit_2_object() const - { - return Compare_x_near_limit_2(_traits); - } - - class Compare_x_at_limit_2 - { - private: - Traits& _traits; - public: - Compare_x_at_limit_2 (Traits& traits) :_traits(traits) {} - Comparison_result operator()( const Point_2 & p, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - return (boost::apply_visitor(Compare_x_at_limit_2_visitor_1(_traits,ce,p),xcv.variant())); - } - Comparison_result operator()( const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2) const - { - return (boost::apply_visitor(Compare_x_at_limit_2_visitor_2(_traits,ce1,ce2),xcv1.variant(),xcv2.variant())); - } - private: - class Compare_x_at_limit_2_visitor_1 - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Compare_x_at_limit_2_visitor_1(Traits& traits,Arr_curve_end ce,const Point_2 & p) - :_traits(traits), _ce(ce), _p(p), Base() {} - Comparison_result operator()(const Non_vertical_x_curve_2& xcv ) const - { - return _traits.compare_x_at_limit_2_object()(_p,xcv,_ce); - } - Comparison_result operator()(const Vertical_segment& xcv) const - { - if (_ce == ARR_MIN_END) - CGAL_precondition (xcv.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - else //_ce == ARR_MAX_END - CGAL_precondition (xcv.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - return _traits.compare_x_2_object()(_p,xcv.min()); - } - private: - Traits& _traits; - Point_2 _p; - Arr_curve_end _ce; - }; //Compare_x_at_limit_2_visitor_1 - - class Compare_x_at_limit_2_visitor_2 - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Compare_x_at_limit_2_visitor_2(Traits& traits,Arr_curve_end ce1,Arr_curve_end ce2) - :_traits(traits), _ce1(ce1), _ce2(ce2), Base() {} - Comparison_result operator()(const Non_vertical_x_curve_2& xcv1,const Non_vertical_x_curve_2& xcv2 ) const - { - return _traits.compare_x_at_limit_2_object()(xcv1,_ce1,xcv2,_ce2); - } - Comparison_result operator()(const Non_vertical_x_curve_2& xcv1,const Vertical_segment& xcv2 ) const - { - if (_ce2 == ARR_MIN_END) - CGAL_precondition (xcv2.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - else //_ce2 == ARR_MAX_END - CGAL_precondition (xcv2.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - - return _traits.compare_x_at_limit_2_object()(xcv2.max(),xcv1,_ce1); - } - Comparison_result operator()(const Vertical_segment& xcv1,const Non_vertical_x_curve_2& xcv2 ) const - { - if (_ce1 == ARR_MIN_END) - CGAL_precondition (xcv1.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - else //_ce1 == ARR_MAX_END - CGAL_precondition (xcv1.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - - return _traits.compare_x_at_limit_2_object()(xcv1.max(),xcv2,_ce2); - } - Comparison_result operator()(const Vertical_segment& xcv1,const Vertical_segment& xcv2 ) const - { - if (_ce1 == ARR_MIN_END) - CGAL_precondition (xcv1.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - else //_ce1 == ARR_MAX_END - CGAL_precondition (xcv1.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - - if (_ce2 == ARR_MIN_END) - CGAL_precondition (xcv2.min_parameter_space() == CGAL::ARR_BOTTOM_BOUNDARY); - else //_ce2 == ARR_MAX_END - CGAL_precondition (xcv2.max_parameter_space() == CGAL::ARR_TOP_BOUNDARY); - - return _traits.compare_x_2_object() (xcv1.min(),xcv2.min()); - } - private: - Traits& _traits; - Arr_curve_end _ce1,_ce2; - }; //Compare_x_at_limit_2_visitor_2 - }; //Compare_x_at_limit_2 - - /*! Obtain a Compare_x_at_limit_2 function object */ - Compare_x_at_limit_2 compare_x_at_limit_2_object() const - { return Compare_x_at_limit_2(_traits); } - /*! A function object that compares the y-coordinates of arc ends near the - * boundary of the parameter space. - */ - class Compare_y_near_boundary_2 - { - private: - Traits& _traits; - public: - /*! Compare 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. - * \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 - * boundary or on the right boundary of the parameter space. - */ - Compare_y_near_boundary_2 (Traits& traits) :_traits(traits) {} - Comparison_result operator()( const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return (boost::apply_visitor(Compare_y_near_boundary_2_visitor(_traits,ce),xcv1.variant(),xcv2.variant())); - } - private: - class Compare_y_near_boundary_2_visitor - : public boost::static_visitor - { - public: - typedef boost::static_visitor Base; - Compare_y_near_boundary_2_visitor(Traits& traits,Arr_curve_end ce) - :_traits(traits), _ce(ce), Base() {} - Comparison_result operator()(const Non_vertical_x_curve_2& xcv1,const Non_vertical_x_curve_2& xcv2 ) const - { - return _traits.compare_y_near_boundary_2_object()(xcv1,xcv2,_ce); - } - Comparison_result operator()(const Non_vertical_x_curve_2& xcv1,const Vertical_segment& xcv2 ) const - { - //a vertical curve is not on the boundary at x = +-oo - CGAL_precondition (false); - return Comparison_result(); - } - Comparison_result operator()(const Vertical_segment& xcv1,const Non_vertical_x_curve_2& xcv2 ) const - { - //a vertical curve is not on the boundary at x = +-oo - CGAL_precondition (false); - return Comparison_result(); - } - Comparison_result operator()(const Vertical_segment& xcv1,const Vertical_segment& xcv2 ) const - { - //a vertical curve is not on the boundary at x = +-oo - CGAL_precondition (false); - return Comparison_result(); - } - private: - Traits& _traits; - Arr_curve_end _ce; - }; //Compare_y_near_boundary_2_visitor - }; - - /*! 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(_traits); } - //@} - - /// \name Functor definitions for the Boolean set-operation traits. - //@{ - class Compare_endpoints_xy_2 - { - public: - - /*! - * Compare 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; - * LARGER if the curve is directed left. - */ - Comparison_result operator() (const X_monotone_curve_2& cv) - { - return (boost::apply_visitor(Compare_endpoints_xy_2_visitor(),cv.variant())); - } - private: - class Compare_endpoints_xy_2_visitor - : public boost::static_visitor - { - public: - Comparison_result operator()(const Non_vertical_x_curve_2& xcv ) const - { - return _traits.construct_opposite_2_object()(xcv); - } - Comparison_result operator()(const Vertical_segment& xcv) const - { - return (SMALLER); - } - }; //Compare_endpoints_xy_2_visitor - }; //Compare_endpoints_xy_2 - - /*! 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: - X_monotone_curve_2 operator() (const X_monotone_curve_2& cv) const - { - return (boost::apply_visitor(Construct_opposite_2_visitor(),cv.variant())); - } - private: - class Construct_opposite_2_visitor - : public boost::static_visitor - { - public: - X_monotone_curve_2 operator()(const Non_vertical_x_curve_2& xcv ) const - { - return _traits.construct_opposite_2_object()(xcv); - } - X_monotone_curve_2 operator()(const Vertical_segment& xcv) const - { - CGAL_precondition (false); - return Vertical_segment(); - } - }; //Construct_opposite_2_visitor - - }; // Construct_opposite_2 - - Construct_opposite_2 construct_opposite_2_object() const - { - return Construct_opposite_2(); - } -public: - template - static void re_cast_object_vector(const Object_vector& vec,OutputIterator& oi) - { - for (Object_vector::const_iterator it = vec.begin() ; it != vec.end(); ++it) - { - X_monotone_curve_2 curr; - CGAL::Object obj = *it; - - Point_2 p; - std::pair ip; - Non_vertical_x_curve_2 xc; - Vertical_segment xv; - - if (assign(p, obj)) - { - curr = p; - *oi = make_object (curr); - } - else if (assign (xc,obj)) - { - curr = xc; - *oi = make_object (curr); - } - else if (assign (xv,obj)) - { - curr = xv; - *oi = make_object (curr); - } - else if (assign(ip, obj)) - { - *oi = make_object (ip); - } - else - CGAL_precondition(false); - - ++oi; - } - return; - } -}; - -} //namespace CGAL { - - -#endif //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H 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 00cd53d8cb1..151d3bd1194 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_face_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_face_map.h index 686f5290358..da394d194c3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_face_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_face_map.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 1d7b030d8f4..97c1431a1c9 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -312,7 +312,7 @@ public: #endif // CGAL_ARR_GEODESIC_ARC_ON_SPHERE_PARTITION_TRAITS_2_H -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 66a0d8acf8d..bc433c102fa 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -67,10 +67,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_identified_side_tag Left_side_category; - typedef Arr_contracted_side_tag Bottom_side_category; - typedef Arr_contracted_side_tag Top_side_category; - typedef Arr_identified_side_tag Right_side_category; + typedef Arr_identified_side_tag Arr_left_side_category; + typedef Arr_contracted_side_tag Arr_bottom_side_category; + typedef Arr_contracted_side_tag Arr_top_side_category; + typedef Arr_identified_side_tag Arr_right_side_category; /*! Default constructor */ Arr_geodesic_arc_on_sphere_traits_2(){} @@ -86,7 +86,7 @@ protected: /*! Obtain the possitive (north) pole * \return the possitive (north) pole */ - inline static const Direction_3& pos_pole() + inline static const Direction_3 & pos_pole() { static const Direction_3 d(0, 0, 1); return d; @@ -95,7 +95,7 @@ protected: /*! Obtain the negative (south) pole * \return the negative (south) pole */ - inline static const Direction_3& neg_pole() + inline static const Direction_3 & neg_pole() { static const Direction_3 d(0, 0, -1); return d; @@ -106,7 +106,7 @@ protected: * (x = -infinity). * \return the intersection of the identification arc and the xy plane. */ - inline static const Direction_2& identification_xy() + inline static const Direction_2 & identification_xy() { #if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0) static const Direction_2 d(-1, 0); @@ -125,7 +125,7 @@ protected: * (y = infinity). * \return the normal of the plane that contains the identification arc. */ - inline static const Direction_3& identification_normal() + inline static const Direction_3 & identification_normal() { #if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0) static const Direction_3 d(0, 1, 0); @@ -142,7 +142,7 @@ protected: /*! Obtain the 2D direction directed along the negative x axis * \return the direction directed at x = -infinity */ - inline static const Direction_2& neg_x_2() + inline static const Direction_2 & neg_x_2() { static const Direction_2 d(-1, 0); return d; @@ -151,7 +151,7 @@ protected: /*! Obtain the 2D direction directed along the negative y axis * \return the direction directed at y = -infinity */ - inline static const Direction_2& neg_y_2() + inline static const Direction_2 & neg_y_2() { static const Direction_2 d(0, -1); return d; @@ -175,27 +175,27 @@ protected: */ inline static Sign z_sign(Direction_3 d) { return CGAL::sign(d.dz()); } - typedef Direction_2 (*Project)(const Direction_3& d) ; + 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 */ - inline static Direction_2 project_xy(const Direction_3& d) + 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 */ - inline static Direction_2 project_yz(const Direction_3& d) + 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 */ - inline static Direction_2 project_xz(const Direction_3& d) + inline static Direction_2 project_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 @@ -203,7 +203,7 @@ protected: * \param normal the direction of the plane. * \param dir the direction. */ - inline Oriented_side oriented_side(const Direction_3& normal, + inline Oriented_side oriented_side(const Direction_3 & normal, const Direction_3 dir) const { FT dot = normal.vector() * dir.vector(); @@ -215,8 +215,8 @@ protected: * \param d2 the second direction. * \return the relative orientation of d1 and d2. */ - static inline Orientation orientation(const Direction_2& d1, - const Direction_2& d2) + static inline Orientation orientation(const Direction_2 & d1, + const Direction_2 & d2) { Kernel kernel; return kernel.orientation_2_object()(d1.vector(), d2.vector()); @@ -229,7 +229,7 @@ protected: * \return true if dir is contained in plane; false otherwise. * \pre the plane contains the origin. */ - inline bool has_on(const Direction_3& normal, const Direction_3& dir) const + inline bool has_on(const Direction_3 & normal, const Direction_3 & dir) const { FT dot = normal.vector() * dir.vector(); return CGAL::sign(dot) == ZERO; @@ -243,8 +243,8 @@ public: * EQUAL - v(d1) = v(d2); * LARGER - v(d1) > v(d2). */ - inline Comparison_result compare_y(const Direction_3& d1, - const Direction_3& d2) const + inline Comparison_result compare_y(const Direction_3 & d1, + const Direction_3 & d2) const { Vector_3 v1 = d1.vector(); Vector_3 v2 = d2.vector(); @@ -278,12 +278,12 @@ public: * EQUAL - u(d1) = u(d2); * LARGER - u(d1) > u(d2). */ - inline Comparison_result compare_x(const Direction_2& d1, - const Direction_2& d2) const + inline Comparison_result compare_x(const Direction_2 & d1, + const Direction_2 & d2) const { - const Kernel* kernel = this; + const Kernel * kernel = this; if (kernel->equal_2_object()(d1, d2)) return EQUAL; - const Direction_2& d = identification_xy(); + const Direction_2 & d = identification_xy(); return (kernel->counterclockwise_in_between_2_object()(d, d1, d2)) ? LARGER : SMALLER; } @@ -297,8 +297,8 @@ public: * \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 + inline Comparison_result compare_x(const Direction_3 & d1, + const Direction_3 & d2) const { // Compare the projections onto the xy plane: Direction_2 d1_2 = project_xy(d1); @@ -317,8 +317,8 @@ public: * \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 + inline Comparison_result compare_xy(const Direction_3 & d1, + const Direction_3 & d2) const { Comparison_result res = compare_x(d1, d2); if (res == EQUAL) return compare_y(d1, d2); @@ -342,12 +342,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_x_2(const Traits* traits) : m_traits(traits) {} + Compare_x_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -361,7 +361,7 @@ public: * \pre p1 does not lie on the boundary. * \pre p2 does not lie on the boundary. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const + Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const { CGAL_precondition(p1.is_no_boundary()); CGAL_precondition(p2.is_no_boundary()); @@ -381,12 +381,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_xy_2(const Traits* traits) : m_traits(traits) {} + Compare_xy_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -402,7 +402,7 @@ public: * \pre p1 does not lie on the boundary. * \pre p2 does not lie on the boundary. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const + Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const { CGAL_precondition(p1.is_no_boundary()); CGAL_precondition(p2.is_no_boundary()); @@ -421,7 +421,7 @@ public: * \param xc the arc. * \return the left endpoint. */ - const Point_2& operator()(const X_monotone_curve_2& xc) const + const Point_2 & operator()(const X_monotone_curve_2 & xc) const { return xc.left(); } }; @@ -436,7 +436,7 @@ public: * \param xc the arc. * \return the right endpoint. */ - const Point_2& operator()(const X_monotone_curve_2& xc) const + const Point_2 & operator()(const X_monotone_curve_2 & xc) const { return xc.right(); } }; @@ -452,7 +452,7 @@ public: * \return true if the curve is a vertical spherical_arc; false otherwise. * \pre the arc is not degenerate (consists of a single point) */ - bool operator()(const X_monotone_curve_2& xc) const + bool operator()(const X_monotone_curve_2 & xc) const { CGAL_precondition(!xc.is_degenerate()); return xc.is_vertical(); @@ -470,12 +470,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_y_at_x_2(const Traits* traits) : m_traits(traits) {} + Compare_y_at_x_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -489,8 +489,8 @@ public: * \pre p is not a construction point. * \pre p is in the x-range of xc. */ - Comparison_result operator()(const Point_2& p, - const X_monotone_curve_2& xc) const + Comparison_result operator()(const Point_2 & p, + const X_monotone_curve_2 & xc) const { CGAL_precondition(!p.is_min_boundary() && !p.is_max_boundary()); CGAL_precondition(xc.is_in_x_range(p)); @@ -530,12 +530,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_y_at_x_left_2(const Traits* traits) : m_traits(traits) {} + Compare_y_at_x_left_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -551,9 +551,9 @@ public: * defined (lexicographically) to its left. * \pre the arcs are not degenerate */ - Comparison_result operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2, - const Point_2& p) const + Comparison_result operator()(const X_monotone_curve_2 & xc1, + const X_monotone_curve_2 & xc2, + const Point_2 & p) const { CGAL_precondition(!xc1.is_degenerate()); CGAL_precondition(!xc2.is_degenerate()); @@ -568,8 +568,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. - const Point_2& l1 = xc1.left(); - const Point_2& l2 = xc2.left(); + const Point_2 & l1 = xc1.left(); + const Point_2 & l2 = xc2.left(); if (!l1.is_no_boundary()) { // use l2 and xc1: Oriented_side os = m_traits->oriented_side(xc1.normal(), l2); @@ -616,12 +616,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_y_at_x_right_2(const Traits* traits) : m_traits(traits) {} + Compare_y_at_x_right_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -637,8 +637,8 @@ public: * defined to its right (lexicographically). * \pre the arcs are not degenerate */ - Comparison_result operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2, + Comparison_result operator()(const X_monotone_curve_2 & xc1, + const X_monotone_curve_2 & xc2, const Point_2 &) const { CGAL_precondition(!xc1.is_degenerate()); @@ -655,8 +655,8 @@ public: // Non of the arcs is verticel. Thus, non of the endpoints coincide with // a pole. // Compare the y-coord. at the x-coord of the most left right-endpoint. - const Point_2& r1 = xc1.right(); - const Point_2& r2 = xc2.right(); + const Point_2 & r1 = xc1.right(); + const Point_2 & r2 = xc2.right(); if (!r1.is_no_boundary()) { // use r2 and xc1: Oriented_side os = m_traits->oriented_side(xc1.normal(), r2); @@ -702,12 +702,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Equal_2(const Traits* traits) : m_traits(traits) {} + Equal_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -718,10 +718,10 @@ public: * \param xc2 the second curve. * \return true if the two curves are the same; false otherwise. */ - bool operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2) const + bool operator()(const X_monotone_curve_2 & xc1, + const X_monotone_curve_2 & xc2) const { - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; typename Kernel::Equal_3 equal_3 = kernel->equal_3_object(); if (xc1.is_full() || xc2.is_full()) { return (xc1.is_full() && xc2.is_full() && @@ -737,9 +737,9 @@ public: * \param p2 the second point. * \return true if the two point are the same; false otherwise. */ - bool operator()(const Point_2& p1, const Point_2& p2) const + bool operator()(const Point_2 & p1, const Point_2 & p2) const { - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; return kernel->equal_3_object()(p1, p2); } }; @@ -774,7 +774,7 @@ public: * the left at the arc right end. * \pre xcv does not coincide with the vertical identification arc. */ - Arr_parameter_space operator()(const X_monotone_curve_2& xcv, + Arr_parameter_space operator()(const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { if (xcv.is_vertical()) { @@ -830,7 +830,7 @@ public: * right end. * There are no horizontal identification arcs! */ - Arr_parameter_space operator()(const X_monotone_curve_2& xcv, + Arr_parameter_space operator()(const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { return (ce == ARR_MIN_END) ? @@ -856,28 +856,27 @@ public: 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 + /*! A functor that compares the x-coordinates of arc ends near the * boundary of the parameter space. */ - class Compare_x_on_boundary_2 { + class Compare_x_near_boundary_2 { protected: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_x_on_boundary_2(const Traits* traits) : m_traits(traits) {} + Compare_x_near_boundary_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; public: - /*! Compare the x-limit of a direction with the x-coordinate of an - * arc end on the boundary. - * \param point the point direction. + /*! Compare the x-coordinate of a direction with the x-coordinate of an + * arc end near the boundary. + * \param p the point direction. * \param xcv the arc, the endpoint of which is compared. * \param ce the arc-end indicator - * ARR_MIN_END - the minimal end of xc or @@ -887,30 +886,40 @@ 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 arc xcv lies on a pole (implying ce is vertical). + * \pre the ce end of the arc xcv lies on a boundary. * \pre xcv does not coincide with the vertical identification curve. */ - Comparison_result operator()(const Point_2& point, - const X_monotone_curve_2& xcv, + Comparison_result operator()(const Point_2 & point, + const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { CGAL_precondition(point.is_no_boundary()); CGAL_precondition_code - (const Point_2& p2 = (ce == ARR_MIN_END) ? xcv.left() : xcv.right();); + (const Point_2 & p2 = (ce == ARR_MIN_END) ? xcv.left() : xcv.right();); CGAL_precondition(!p2.is_no_boundary()); - CGAL_precondition(xcv.is_vertical()); - CGAL_precondition(!xcv.is_on_boundary()); + if (xcv.is_vertical()) { + CGAL_precondition(!xcv.is_on_boundary()); - // 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: - Direction_3 normal = xcv.normal(); - Direction_2 q = (xcv.is_directed_right()) ? - Direction_2(-(normal.dy()), normal.dx()) : - Direction_2(normal.dy(), -(normal.dx())); - Direction_2 p = Traits::project_xy(point); - return m_traits->compare_x(p, q); + /* The following is replaced by the precondition above. + * If xc coincides with the discontinuity arc, all its points are + * assumed to be smaller than non-boundary points: + * if (xcv.is_on_boundary()) return LARGER; + */ + + // 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: + Direction_3 normal = xcv.normal(); + Direction_2 q = (xcv.is_directed_right()) ? + Direction_2(-(normal.dy()), normal.dx()) : + Direction_2(normal.dy(), -(normal.dx())); + Direction_2 p = Traits::project_xy(point); + return m_traits->compare_x(p, q); + } + + // xcv is not a vertical sphercial_arc: + return (ce == ARR_MIN_END) ? LARGER : SMALLER; } /*! Compare the x-coordinates of 2 arc ends near the boundary of the @@ -927,117 +936,64 @@ public: * 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 arc xcv1 lies on a pole (implying ce1 is - * vertical). - * \pre the ce2 end of the arc xcv2 lies on a pole (implying ce2 is - * vertical). + * \pre the ce1 end of the arc xcv1 lies on a boundary. + * \pre the ce2 end of the arc xcv2 lies on a boundary. * \pre xcv1 does not coincide with the vertical identification curve. * \pre xcv2 does not coincide with the vertical identification curve. */ - Comparison_result operator()(const X_monotone_curve_2& xcv1, + Comparison_result operator()(const X_monotone_curve_2 & xcv1, Arr_curve_end ce1, - const X_monotone_curve_2& xcv2, + const X_monotone_curve_2 & xcv2, Arr_curve_end ce2) const { CGAL_precondition_code - (const Point_2& p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right();); + (const Point_2 & p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right();); CGAL_precondition(!p1.is_no_boundary()); CGAL_precondition_code - (const Point_2& p2 = (ce2 == ARR_MIN_END) ? xcv2.left() : xcv2.right();); + (const Point_2 & p2 = (ce2 == ARR_MIN_END) ? xcv2.left() : xcv2.right();); CGAL_precondition(!p2.is_no_boundary()); - CGAL_precondition(xcv1.is_vertical()); - CGAL_precondition(xcv2.is_vertical()); + if (xcv1.is_vertical() && xcv2.is_vertical()) { + CGAL_precondition(!xcv1.is_on_boundary()); + CGAL_precondition(!xcv2.is_on_boundary()); - CGAL_precondition(!xcv1.is_on_boundary()); - CGAL_precondition(!xcv2.is_on_boundary()); - - // Non of the arcs coincide with the discontinuity arc: - // Obtain the directions contained in the underlying planes, which are - // also on the xy-plane: - Direction_3 normal1 = xcv1.normal(); - Direction_2 p = (xcv1.is_directed_right()) ? - Direction_2(-(normal1.dy()), normal1.dx()) : - Direction_2(normal1.dy(), -(normal1.dx())); - Direction_3 normal2 = xcv2.normal(); - Direction_2 q = (xcv2.is_directed_right()) ? - Direction_2(-(normal2.dy()), normal2.dx()) : - Direction_2(normal2.dy(), -(normal2.dx())); - return m_traits->compare_x(p, q); - } - - /*! Compare the x-coordinate of two given points that lie on the - * horizontal identification arc. - * \param p1 the first point. - * \param p2 the second point. - * There is no horizontal identification arc! - */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - CGAL_error_msg("There is no horizontal identification arc!"); - return SMALLER; - } - }; - - /*! 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 - * boundary of the parameter space. - */ - class Compare_x_near_boundary_2 { - protected: - typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; - - /*! The traits (in case it has state) */ - const Traits* m_traits; - - /*! Constructor - * \param traits the traits (in case it has state) - */ - Compare_x_near_boundary_2(const Traits* traits) : m_traits(traits) {} - - friend class Arr_geodesic_arc_on_sphere_traits_2; - - public: - - /*! Compare the x-coordinates of 2 arc ends near the boundary of the - * parameter space. - * \param xcv1 the first arc. - * \param xcv2 the second arc. - * \param ce the curve end indicator - - * ARR_MIN_END - the minimal end of curves or - * ARR_MAX_END - the maximal end of curves. - * \return the second comparison result: - * SMALLER - x(xcv1, ce) < x(xcv2, ce); - * EQUAL - x(xcv1, ce) = x(xcv2, ce); - * LARGER - x(xcv1, ce) > x(xcv2, ce). - * \pre the ce end of the arc xcv1 lies on a pole. - * \pre the ce end of the arc xcv2 lies on a pole. - * \pre the the $x$-coordinates of xcv1 and xcv2 at their ce end are - * equal (implying that the curves overlap). - * \pre xcv1 does not coincide with the vertical identification curve. - * \pre xcv2 does not coincide with the vertical identification curve. - */ - Comparison_result operator()(const X_monotone_curve_2& xcv1, - const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - CGAL_precondition_code - (const Point_2& p1 = (ce == ARR_MIN_END) ? xcv1.left() : xcv1.right();); - CGAL_precondition(!p1.is_no_boundary()); - CGAL_precondition_code - (const Point_2& p2 = (ce == ARR_MIN_END) ? xcv2.left() : xcv2.right();); - CGAL_precondition(!p2.is_no_boundary()); - - CGAL_precondition(xcv1.is_vertical()); - CGAL_precondition(xcv2.is_vertical()); - CGAL_precondition(!xcv1.is_on_boundary()); - CGAL_precondition(!xcv2.is_on_boundary()); - - return EQUAL; + /* The following is replaced by the code above + * if (xcv1.is_on_boundary() && xcv2.is_on_boundary()) return EQUAL; + * if (xcv1.is_on_boundary()) return SMALLER; + * if (xcv2.is_on_boundary()) return LARGER; + */ + + // Non of the arcs coincide with the discontinuity arc: + // Obtain the directions contained in the underlying planes, which are + // also on the xy-plane: + Direction_3 normal1 = xcv1.normal(); + Direction_2 p = (xcv1.is_directed_right()) ? + Direction_2(-(normal1.dy()), normal1.dx()) : + Direction_2(normal1.dy(), -(normal1.dx())); + Direction_3 normal2 = xcv2.normal(); + Direction_2 q = (xcv2.is_directed_right()) ? + Direction_2(-(normal2.dy()), normal2.dx()) : + Direction_2(normal2.dy(), -(normal2.dx())); + return m_traits->compare_x(p, q); + } + if (xcv1.is_vertical()) { + CGAL_precondition(!xcv1.is_on_boundary()); + /* The following is replaced by the code above + * if (xcv1.is_on_boundary()) return SMALLER; + */ + return (ce2 == ARR_MAX_END) ? SMALLER : LARGER; + } + if (xcv2.is_vertical()) { + CGAL_precondition(!xcv2.is_on_boundary()); + /* The following is replaced by the code above + * if (xcv2.is_on_boundary()) return LARGER; + */ + return (ce1 == ARR_MAX_END) ? LARGER : SMALLER; + } + // Non of the arcs are vertical: + if (ce1 == ce2) return EQUAL; + if (ce1 == ARR_MIN_END) return SMALLER; + return LARGER; } }; @@ -1054,12 +1010,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_y_near_boundary_2(const Traits* traits) : m_traits(traits) {} + Compare_y_near_boundary_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1071,21 +1027,20 @@ public: * \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 - * boundary or on the right boundary of the parameter space (implying - * that they cannot be vertical). + * boundary or on the right boundary of the parameter space. * There is no horizontal identification curve! */ - Comparison_result operator()(const X_monotone_curve_2& xcv1, - const X_monotone_curve_2& xcv2, + Comparison_result operator()(const X_monotone_curve_2 & xcv1, + const X_monotone_curve_2 & xcv2, Arr_curve_end ce) const { CGAL_precondition(!xcv1.is_degenerate()); CGAL_precondition(!xcv2.is_degenerate()); - const Point_2& l1 = xcv1.left(); - const Point_2& r1 = xcv1.right(); - const Point_2& l2 = xcv2.left(); - const Point_2& r2 = xcv2.right(); + const Point_2 & l1 = xcv1.left(); + const Point_2 & r1 = xcv1.right(); + const Point_2 & l2 = xcv2.left(); + const Point_2 & r2 = xcv2.right(); // If xcv1 is vertical, xcv1 coincides with the discontinuity arc: if (xcv1.is_vertical()) { @@ -1198,7 +1153,7 @@ public: * \return a Boolean indicating whether p lies on the horizontal * identification arc. */ - bool operator()(const Point_2& p) const + bool operator()(const Point_2 & p) const { CGAL_error_msg("There is no horizontal identification arc!"); return false; @@ -1210,7 +1165,7 @@ public: * \return a Boolean indicating whether xcv coincides with the horizontal * identification arc. */ - bool operator()(const X_monotone_curve_2& xcv) const + bool operator()(const X_monotone_curve_2 & xcv) const { CGAL_error_msg("There is no horizontal identification arc!"); return false; @@ -1229,12 +1184,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Is_on_y_identification_2(const Traits* traits) : m_traits(traits) {} + Is_on_y_identification_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1244,7 +1199,7 @@ public: * \return a Boolean indicating whether p lies on the vertical * identification arc. */ - bool operator()(const Point_2& p) const { return p.is_mid_boundary(); } + bool operator()(const Point_2 & p) const { return p.is_mid_boundary(); } /*! Determine whether an arc coincides with the vertical identification * arc. @@ -1252,7 +1207,7 @@ public: * \return a Boolean indicating whether xcv coincides with the vertical * identification arc. */ - bool operator()(const X_monotone_curve_2& xcv) const + bool operator()(const X_monotone_curve_2 & xcv) const { return xcv.is_on_boundary(); } }; @@ -1260,6 +1215,29 @@ public: Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(this); } + /*! A functor that compares the x-coordinate of two given points + * that lie on the horizontal identification arc. + * The parameter space does not contain a horizontal identification arc. + */ + class Compare_x_on_boundary_2 { + public: + /*! Compare the x-coordinate of two given points that lie on the + * horizontal identification arc. + * \param p1 the first point. + * \param p2 the second point. + * There is no horizontal identification arc! + */ + Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const + { + CGAL_error_msg("There is no horizontal identification arc!"); + return SMALLER; + } + }; + + /*! 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. */ @@ -1268,12 +1246,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Compare_y_on_boundary_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; @@ -1288,7 +1266,7 @@ public: * \pre p1 lies on the vertical identification arc. * \pre p2 lies on the vertical identification arc. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const + Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const { CGAL_precondition(!p1.is_no_boundary()); CGAL_precondition(!p2.is_no_boundary()); @@ -1312,12 +1290,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Make_x_monotone_2(const Traits* traits) : m_traits(traits) {} + Make_x_monotone_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1332,7 +1310,7 @@ public: * \return the past-the-end iterator. */ template - OutputIterator operator()(const Curve_2& c, OutputIterator oi) const + OutputIterator operator()(const Curve_2 & c, OutputIterator oi) const { if (c.is_degenerate()) { // The spherical_arc is a degenerate point - wrap it with an object: @@ -1343,7 +1321,7 @@ public: if (c.is_x_monotone()) { // The spherical arc is monotone - wrap it with an object: // *oi++ = make_object(X_monotone_curve_2(c)); - const X_monotone_curve_2* xc = &c; + const X_monotone_curve_2 * xc = &c; *oi++ = make_object(*xc); return oi; } @@ -1352,8 +1330,8 @@ public: // The spherical arc is full if (c.is_vertical()) { // The arc is vertical => divide it into 2 half arcs; - const Direction_3& np = m_traits->neg_pole(); - const Direction_3& pp = m_traits->pos_pole(); + const Direction_3 & np = m_traits->neg_pole(); + const Direction_3 & pp = m_traits->pos_pole(); X_monotone_curve_2 xc1(np, pp, c.normal(), true, true); X_monotone_curve_2 xc2(pp, np, c.normal(), true, false); *oi++ = make_object(xc1); @@ -1380,16 +1358,16 @@ public: return oi; } - const Point_2& source = c.source(); - const Point_2& target = c.target(); - const Direction_3& normal = c.normal(); + const Point_2 & source = c.source(); + const Point_2 & target = c.target(); + const Direction_3 & normal = c.normal(); if (c.is_vertical()) { /* If one of the endpoints coincide with a pole, divide the arc at * the opposite pole: */ - const Direction_3& np = m_traits->neg_pole(); - const Direction_3& pp = m_traits->pos_pole(); + const Direction_3 & np = m_traits->neg_pole(); + const Direction_3 & pp = m_traits->pos_pole(); if (source.is_min_boundary() || target.is_min_boundary()) { X_monotone_curve_2 xc1(source, pp, normal, true, true); X_monotone_curve_2 xc2(pp, target, normal, true, false); @@ -1420,7 +1398,7 @@ public: } bool ccw = ((plane_is_positive && s_is_positive) || (!plane_is_positive && !s_is_positive)); - const Point_2& pole1 = (ccw) ? pp : np; + const Point_2 & pole1 = (ccw) ? pp : np; X_monotone_curve_2 xc1(source, pole1, normal, true, ccw); *oi++ = make_object(xc1); if (s_is_positive != t_is_positive) { @@ -1430,7 +1408,7 @@ public: return oi; } // Construct 2 more arcs: - const Point_2& pole2 = (ccw) ? np : pp; + const Point_2 & pole2 = (ccw) ? np : pp; X_monotone_curve_2 xc2(pole1, pole2, normal, true, !ccw); *oi++ = make_object(xc2); X_monotone_curve_2 xc3(pole2, target, normal, true, ccw); @@ -1444,7 +1422,7 @@ public: Direction_3(-(normal.dz()), 0, normal.dx()) : Direction_3(normal.dz(), 0, -(normal.dx())); #else - const Direction_2& xy = Traits::identification_xy(); + const Direction_2 & xy = Traits::identification_xy(); FT x = xy.dx(); FT y = xy.dy(); FT z((xy.dx() * normal.dx() + xy.dy() * normal.dy()) / -(normal.dz())); @@ -1453,8 +1431,8 @@ public: Point_2 p(dp, Point_2::MID_BOUNDARY_LOC); Direction_2 s = Traits::project_xy(source); Direction_2 t = Traits::project_xy(target); - const Direction_2& d = Traits::identification_xy(); - const Kernel* kernel = m_traits; + const Direction_2 & d = Traits::identification_xy(); + const Kernel * kernel = m_traits; bool directed_right = kernel->counterclockwise_in_between_2_object()(d, s, t); @@ -1476,12 +1454,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Split_2(const Traits* traits) : m_traits(traits) {} + Split_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1496,13 +1474,13 @@ public: * \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 + void operator()(const X_monotone_curve_2 & xc, const Point_2 & p, + X_monotone_curve_2 & xc1, X_monotone_curve_2 & xc2) const { CGAL_precondition(!xc.is_degenerate()); - const Point_2& source = xc.source(); - const Point_2& target = xc.target(); - CGAL_precondition_code(const Kernel* kernel = m_traits); + const Point_2 & source = xc.source(); + const Point_2 & target = xc.target(); + CGAL_precondition_code(const Kernel * kernel = m_traits); CGAL_precondition_code (typename Kernel::Equal_3 equal_3 = kernel->equal_3_object()); CGAL_precondition(!equal_3(p, source)); @@ -1544,20 +1522,20 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Clockwise_in_between_2(const Traits* traits) : m_traits(traits) {} + Clockwise_in_between_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; public: - bool operator()(const Direction_2& d, - const Direction_2& d1, const Direction_2& d2) const + bool operator()(const Direction_2 & d, + const Direction_2 & d1, const Direction_2 & d2) const { - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; return kernel->counterclockwise_in_between_2_object()(d, d2, d1); } }; @@ -1583,19 +1561,19 @@ public: * \param oi - the output iterator */ template - OutputIterator compute_intersection(const Point_2& l1_3, + OutputIterator compute_intersection(const Point_2 & l1_3, const Point_2 r1_3, - const Point_2& l2_3, + const Point_2 & l2_3, const Point_2 r2_3, - const Direction_3& normal, + const Direction_3 & normal, bool vertical, - const Direction_2& start, - const In_between& in_between, + const Direction_2 & start, + const In_between & in_between, Project project, OutputIterator oi) const { typedef std::pair Point_2_pair; - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; typename Kernel::Equal_2 equal = kernel->equal_2_object(); Direction_2 l1 = project(l1_3); @@ -1604,7 +1582,7 @@ public: Direction_2 r2 = project(r2_3); if (equal(l1, l2)) { - const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3; + const Point_2 & trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3; X_monotone_curve_2 xc(l1_3, trg, normal, vertical, true); *oi++ = make_object(xc); return oi; @@ -1622,7 +1600,7 @@ public: *oi++ = make_object(Point_2_pair(r1_3, 1)); return oi; } - const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3; + const Point_2 & trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3; X_monotone_curve_2 xc(l2_3, trg, normal, vertical, true); *oi++ = make_object(xc); return oi; @@ -1636,7 +1614,7 @@ public: *oi++ = make_object(Point_2_pair(r2_3, 1)); return oi; } - const Point_2& trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3; + const Point_2 & trg = (in_between(r1, l2, r2)) ? r1_3 : r2_3; X_monotone_curve_2 xc(l1_3, trg, normal, vertical, true); *oi++ = make_object(xc); return oi; @@ -1648,14 +1626,14 @@ public: * \return true iff point pierces xc. * \pre point lies in the underlying plane of xc. */ - bool is_in_between(const Point_2& point, - const X_monotone_curve_2& xc) const + bool is_in_between(const Point_2 & point, + const X_monotone_curve_2 & xc) const { - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; CGAL_precondition(m_traits->has_on(xc.normal(), point)); - const Point_2& left = xc.left(); - const Point_2& right = xc.right(); + const Point_2 & left = xc.left(); + const Point_2 & right = xc.right(); // Handle the poles: if (point.is_max_boundary()) return (right.is_max_boundary()); @@ -1702,12 +1680,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Intersect_2(const Traits* traits) : m_traits(traits) {} + Intersect_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1722,8 +1700,8 @@ public: * \pre xc1 and xc2 are not degenerate */ template - OutputIterator operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2, + OutputIterator operator()(const X_monotone_curve_2 & xc1, + const X_monotone_curve_2 & xc2, OutputIterator oi) const { CGAL_precondition(!xc1.is_degenerate()); @@ -1738,11 +1716,11 @@ public: typedef typename Kernel::Equal_3 Equal_3; typedef std::pair Point_2_pair; - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; Equal_3 equal_3 = kernel->equal_3_object(); - const Direction_3& normal1 = xc1.normal(); - const Direction_3& normal2 = xc2.normal(); + const Direction_3 & normal1 = xc1.normal(); + const Direction_3 & normal2 = xc2.normal(); Direction_3 opposite_normal1 = kernel->construct_opposite_direction_3_object()(normal1); @@ -1783,7 +1761,7 @@ public: * it onto the xy plane. If the projection coincide with the negative * x, project onto the zx plane. Otherwise project onto the yz plane. */ - const Point_2& point = + const Point_2 & point = xc1.left().is_min_boundary() ? xc1.right() : xc1.left(); CGAL::Sign xsign = Traits::x_sign(normal1); @@ -1851,12 +1829,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Are_mergeable_2(const Traits* traits) : m_traits(traits) {} + Are_mergeable_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1869,8 +1847,8 @@ public: * 1. they are supported by the same plane, and * 2. share a common endpoint that is not on the identification arc */ - bool operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2) const + bool operator()(const X_monotone_curve_2 & xc1, + const X_monotone_curve_2 & xc2) const { //! \todo temporary: return false; @@ -1878,7 +1856,7 @@ public: if (xc1.is_empty() || xc2.is_empty()) return true; if (xc1.is_full() && xc2.is_full()) return false; - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; typename Kernel::Equal_3 equal = kernel->equal_3_object(); if (xc1.is_degenerate() && xc2.is_degenerate()) @@ -1888,8 +1866,8 @@ public: if (xc2.is_full() && xc1.is_degenerate()) return xc2.has_on(xc1.left()); - const Direction_3& normal1 = xc1.normal(); - const Direction_3& normal2 = xc2.normal(); + const Direction_3 & normal1 = xc1.normal(); + const Direction_3 & normal2 = xc2.normal(); Direction_3 opposite_normal1 = kernel->construct_opposite_direction_3_object()(normal1); if (!equal(normal1, normal2) && !equal(opposite_normal1, normal2)) @@ -1920,12 +1898,12 @@ public: typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) */ - Merge_2(const Traits* traits) : m_traits(traits) {} + Merge_2(const Traits * traits) : m_traits(traits) {} friend class Arr_geodesic_arc_on_sphere_traits_2; @@ -1938,9 +1916,9 @@ public: * same plane or oposite planes and share a common endpoint that is * not on the discontinuity arc. */ - void operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2, - X_monotone_curve_2& xc) const + void operator()(const X_monotone_curve_2 & xc1, + const X_monotone_curve_2 & xc2, + X_monotone_curve_2 & xc) const { CGAL_precondition (m_traits->are_mergeable_2_object()(xc1, xc2) == true); @@ -1954,7 +1932,7 @@ public: return; } - const Kernel* kernel = m_traits; + const Kernel * kernel = m_traits; typename Kernel::Equal_3 equal = kernel->equal_3_object(); xc.set_is_degenerate(false); @@ -1966,7 +1944,7 @@ public: #if defined(CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED) bool eq2 = equal(xc1.left(), xc2.right()); if (eq1 && eq2) { - const Point_2& p = + const Point_2 & p = xc1.source().is_mid_boundary() ? xc1.source() : xc1.target(); xc.set_source(p); xc.set_target(p); @@ -2022,7 +2000,7 @@ public: * \return an approximation of p's x-coordinate (if i == 0), or an * approximation of p's y-coordinate (if i == 1). */ - Approximate_number_type operator()(const Point_2& p, int i) const + Approximate_number_type operator()(const Point_2 & p, int i) const { CGAL_precondition(i == 0 || i == 1); return (i == 0) ? CGAL::to_double(p.x()) : CGAL::to_double(p.y()); @@ -2041,7 +2019,7 @@ public: * \pre p and q must not be the same. * \return a spherical_arc connecting p and q. */ - X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q) const + X_monotone_curve_2 operator()(const Point_2 & p, const Point_2 & q) const { return X_monotone_curve_2(p, q); } }; @@ -2064,7 +2042,7 @@ public: * \return SMALLER if the curve is directed right; * LARGER if the curve is directed left. */ - Comparison_result operator()(const X_monotone_curve_2& xc) + Comparison_result operator()(const X_monotone_curve_2 & xc) { return (xc.is_directed_right()) ? SMALLER : LARGER; } }; @@ -2078,7 +2056,7 @@ public: * \param xc the curve. * \return the opposite curve. */ - X_monotone_curve_2 operator()(const X_monotone_curve_2& xc) + X_monotone_curve_2 operator()(const X_monotone_curve_2 & xc) { return xc.opposite(); } }; @@ -2090,7 +2068,7 @@ public: #if 0 /*! Inserter for the spherical_arc class used by the traits-class */ template - friend OutputStream& operator<<(OutputStream& os, const Point_2& p) + friend OutputStream & operator<<(OutputStream & os, const Point_2 & p) { CGAL::To_double todouble; os << static_cast(todouble(p.dx())) << ", " @@ -2101,8 +2079,8 @@ public: /*! Inserter for the spherical_arc class used by the traits-class */ template - friend OutputStream& operator<<(OutputStream& os, - const X_monotone_curve_2& xc) + friend OutputStream & operator<<(OutputStream & os, + const X_monotone_curve_2 & xc) { os << "(" << xc.left() << "), (" << xc.right() << ")"; return os; @@ -2110,7 +2088,7 @@ public: /*! Extractor for the spherical_arc class used by the traits-class */ template - friend InputStream& operator>>(InputStream& is, X_monotone_curve_2& arc) + friend InputStream & operator>>(InputStream & is, X_monotone_curve_2 & arc) { std::cerr << "Not implemented yet!" << std::endl; return is; @@ -2157,7 +2135,7 @@ public: {} /*! Constructor */ - Arr_extended_direction_3(const Direction_3& dir, Location_type location) : + Arr_extended_direction_3(const Direction_3 & dir, Location_type location) : Direction_3(dir), m_location(location) {} @@ -2167,20 +2145,20 @@ public: * \param y the y coordinate * \param z the z coordinate */ - Arr_extended_direction_3(const FT& x, const FT& y, const FT& z) : + Arr_extended_direction_3(const FT & x, const FT & y, const FT & z) : Direction_3(x, y, z) { init(Direction_3(x, y, z)); } /*! Constructor from a direction * \param dir the direction */ - Arr_extended_direction_3(const Direction_3& dir) : Direction_3(dir) + Arr_extended_direction_3(const Direction_3 & dir) : Direction_3(dir) { init(dir); } /*! Initialize from a direction * \param dir the direction */ - void init(const Direction_3& dir) + void init(const Direction_3 & dir) { #if (CGAL_IDENTIFICATION_XY == CGAL_X_MINUS_1_Y_0) if (y_sign(dir) != ZERO) { @@ -2203,20 +2181,20 @@ public: Direction_2 dir_xy = Traits::project_xy(dir); Kernel kernel; typename Kernel::Equal_2 equal_2 = kernel.equal_2_object(); - const Direction_2& xy = Traits::identification_xy(); + const Direction_2 & xy = Traits::identification_xy(); m_location = equal_2(dir_xy, xy) ? MID_BOUNDARY_LOC : NO_BOUNDARY_LOC; #endif } /*! Copy constructor */ - Arr_extended_direction_3(const Arr_extended_direction_3& ed) : + Arr_extended_direction_3(const Arr_extended_direction_3 & ed) : Direction_3(static_cast(ed)) { m_location = ed.discontinuity_type(); } /*! Assignment operator */ - Arr_extended_direction_3& operator=(const Arr_extended_direction_3& ed) + Arr_extended_direction_3 & operator=(const Arr_extended_direction_3 & ed) { *(static_cast(this)) = static_cast(ed); m_location = ed.discontinuity_type(); @@ -2291,8 +2269,8 @@ protected: * \param d1 the first direction. * \param d2 the second direction. */ - inline Direction_3 construct_normal_3(const Direction_3& d1, - const Direction_3& d2) const + inline Direction_3 construct_normal_3(const Direction_3 & d1, + const Direction_3 & d2) const { Kernel kernel; Vector_3 v = kernel.construct_cross_product_vector_3_object()(d1.vector(), @@ -2320,9 +2298,9 @@ public: * \param is_degenerate is the arc degenerate (single point)? */ Arr_x_monotone_geodesic_arc_on_sphere_3 - (const Arr_extended_direction_3& src, - const Arr_extended_direction_3& trg, - const Direction_3& normal, + (const Arr_extended_direction_3 & src, + const Arr_extended_direction_3 & trg, + const Direction_3 & normal, bool is_vertical, bool is_directed_right, bool is_full = false, bool is_degenerate = false, bool is_empty = false) : m_source(src), @@ -2339,7 +2317,7 @@ public: * \param other the other arc */ Arr_x_monotone_geodesic_arc_on_sphere_3 - (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) + (const Arr_x_monotone_geodesic_arc_on_sphere_3 & other) { m_source = other.m_source; m_target = other.m_target; @@ -2352,8 +2330,8 @@ public: } /*! Assignment operator */ - Arr_x_monotone_geodesic_arc_on_sphere_3& operator= - (const Arr_x_monotone_geodesic_arc_on_sphere_3& other) + Arr_x_monotone_geodesic_arc_on_sphere_3 & operator= + (const Arr_x_monotone_geodesic_arc_on_sphere_3 & other) { m_source = other.m_source; m_target = other.m_target; @@ -2381,8 +2359,8 @@ public: * \pre the source and target cannot be opposite of each other. */ Arr_x_monotone_geodesic_arc_on_sphere_3 - (const Arr_extended_direction_3& source, - const Arr_extended_direction_3& target) : + (const Arr_extended_direction_3 & source, + const Arr_extended_direction_3 & target) : m_source(source), m_target(target), m_is_full(false), @@ -2428,12 +2406,12 @@ public: Orientation orient = Traits::orientation(s, t); if (orient == COLLINEAR) { set_is_vertical(true); - const Direction_2& nx = Traits::neg_x_2(); + const Direction_2 & nx = Traits::neg_x_2(); if (Traits::orientation(nx, s) == COLLINEAR) { // Project onto xz plane: s = Traits::project_xz(source); t = Traits::project_xz(target); - const Direction_2& ny = Traits::neg_y_2(); + const Direction_2 & ny = Traits::neg_y_2(); Orientation orient1 = Traits::orientation(ny, s); CGAL_assertion_code(Orientation orient2 = Traits::orientation(ny, t)); CGAL_assertion(orient1 == orient2); @@ -2449,7 +2427,7 @@ public: // Project onto yz plane: s = Traits::project_yz(source); t = Traits::project_yz(target); - const Direction_2& ny = Traits::neg_y_2(); + const Direction_2 & ny = Traits::neg_y_2(); Orientation orient1 = Traits::orientation(ny, s); CGAL_assertion_code(Orientation orient2 = Traits::orientation(ny, t)); CGAL_assertion(orient1 == orient2); @@ -2475,7 +2453,7 @@ public: * \param plane the containing plane. * \pre the plane is not vertical */ - Arr_x_monotone_geodesic_arc_on_sphere_3(const Direction_3& normal) : + Arr_x_monotone_geodesic_arc_on_sphere_3(const Direction_3 & normal) : m_normal(normal), m_is_vertical(false), m_is_directed_right(z_sign(normal) == POSITIVE), @@ -2493,7 +2471,7 @@ public: Direction_3(-(normal.dz()), 0, normal.dx()) : Direction_3(normal.dz(), 0, -(normal.dx())); #else - const Direction_2& xy = Traits::identification_xy(); + const Direction_2 & xy = Traits::identification_xy(); FT x = xy.dx(); FT y = xy.dy(); FT z((xy.dx() * normal.dx() + xy.dy() * normal.dy()) / -(normal.dz())); @@ -2509,8 +2487,8 @@ public: * \pre the point lies on the open discontinuity arc */ Arr_x_monotone_geodesic_arc_on_sphere_3 - (const Arr_extended_direction_3& point, - const Direction_3& normal) : + (const Arr_extended_direction_3 & point, + const Direction_3 & normal) : m_source(point), m_target(point), m_normal(normal), @@ -2536,9 +2514,9 @@ public: * \pre Both endpoint lie on the given plane. */ Arr_x_monotone_geodesic_arc_on_sphere_3 - (const Arr_extended_direction_3& source, - const Arr_extended_direction_3& target, - const Direction_3& normal) : + (const Arr_extended_direction_3 & source, + const Arr_extended_direction_3 & target, + const Direction_3 & normal) : m_source(source), m_target(target), m_normal(normal), @@ -2598,17 +2576,17 @@ public: /*! Set the source endpoint direction. * \param p the endpoint to set. */ - void set_source(const Direction_3& p) { m_source = p; } + void set_source(const Direction_3 & p) { m_source = p; } /*! Set the target endpoint direction. * \param p the endpoint to set. */ - void set_target(const Direction_3& p) { m_target = p; } + void set_target(const Direction_3 & p) { m_target = p; } /*! Set the direction of the underlying plane. * \param normal the plane direction. */ - void normal(const Direction_3& normal) { m_normal = normal; } + void normal(const Direction_3 & normal) { m_normal = normal; } void set_is_vertical(bool flag) { m_is_vertical = flag; } void set_is_directed_right(bool flag) { m_is_directed_right = flag; } @@ -2617,20 +2595,20 @@ public: void set_is_empty(bool flag) { m_is_empty = flag; } /*! Obtain the source */ - const Arr_extended_direction_3& source() const { return m_source; } + const Arr_extended_direction_3 & source() const { return m_source; } /*! Obtain the target */ - const Arr_extended_direction_3& target() const { return m_target; } + const Arr_extended_direction_3 & target() const { return m_target; } /*! Obtain the normal to the containing plane */ - const Direction_3& normal() const { return m_normal; } + const Direction_3 & normal() const { return m_normal; } /*! Obtain the (lexicographically) left endpoint direction */ - const Arr_extended_direction_3& left() const + const Arr_extended_direction_3 & left() const { return (m_is_directed_right ? m_source : m_target); } /*! Obtain the (lexicographically) right endpoint */ - const Arr_extended_direction_3& right() const + const Arr_extended_direction_3 & right() const { return (m_is_directed_right ? m_target : m_source); } /*! Determines whether the curve is vertical */ @@ -2677,7 +2655,7 @@ public: #else typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; - const Direction_3& iden_normal = Traits::identification_normal(); + const Direction_3 & iden_normal = Traits::identification_normal(); const Direction_2 iden_normal_xy = Traits::project_xy(iden_normal); Direction_2 normal_xy = Traits::project_xy(m_normal); Kernel kernel; @@ -2698,7 +2676,7 @@ public: * false otherwise. * \pre point does not coincide with one of the poles */ - bool is_in_x_range(const Arr_extended_direction_3& point) const + bool is_in_x_range(const Arr_extended_direction_3 & point) const { typedef Arr_geodesic_arc_on_sphere_traits_2 Traits; @@ -2755,7 +2733,7 @@ public: * \return true if dir is contained in plane; false otherwise. * \pre the plane contains the origin. */ - inline bool has_on(const Direction_3& dir) const + inline bool has_on(const Direction_3 & dir) const { typename Kernel::FT dot = normal().vector() * dir.vector(); return CGAL::sign(dot) == ZERO; @@ -2799,7 +2777,7 @@ public: * \param other the other arc */ Arr_geodesic_arc_on_sphere_3 - (const Arr_geodesic_arc_on_sphere_3& other) : Base(other) + (const Arr_geodesic_arc_on_sphere_3 & other) : Base(other) { m_is_x_monotone = other.m_is_x_monotone; } @@ -2817,9 +2795,9 @@ public: * \pre plane contains src * \pre plane contains trg */ - Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& src, - const Arr_extended_direction_3& trg, - const Direction_3& normal, + Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3 & src, + const Arr_extended_direction_3 & trg, + const Direction_3 & normal, bool is_x_monotone, bool is_vertical, bool is_directed_right, bool is_full = false, @@ -2847,8 +2825,8 @@ public: * \pre the source and target cannot be equal. * \pre the source and target cannot be the opoosite of each other. */ - Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& source, - const Arr_extended_direction_3& target) + Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3 & source, + const Arr_extended_direction_3 & target) { this->set_source(source); this->set_target(target); @@ -2922,7 +2900,7 @@ public: Direction_2 t = Traits::project_xy(target); Orientation orient = Traits::orientation(s, t); - const Direction_2& d = Traits::identification_xy(); + const Direction_2 & d = Traits::identification_xy(); if (orient == LEFT_TURN) { this->set_is_directed_right(true); set_is_x_monotone(!kernel.counterclockwise_in_between_2_object()(d, s, t)); @@ -2943,9 +2921,9 @@ public: * \pre plane contain the origin * \pre Both endpoints lie on the given plane. */ - Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3& source, - const Arr_extended_direction_3& target, - const Direction_3& normal) + Arr_geodesic_arc_on_sphere_3(const Arr_extended_direction_3 & source, + const Arr_extended_direction_3 & target, + const Direction_3 & normal) { Kernel kernel; @@ -3034,7 +3012,7 @@ public: (xz_plane) ? Traits::project_xz : Traits::project_yz; Direction_2 s = project(source); Direction_2 t = project(target); - const Direction_2& ny = Traits::neg_y_2(); + const Direction_2 & ny = Traits::neg_y_2(); typename Kernel::Counterclockwise_in_between_2 ccib = kernel.counterclockwise_in_between_2_object(); set_is_x_monotone((plane_is_positive && !ccib(ny, s, t)) || @@ -3049,7 +3027,7 @@ public: // The arc is not vertical! this->set_is_vertical(false); this->set_is_directed_right(z_sign(normal) == POSITIVE); - const Direction_2& d = Traits::identification_xy(); + const Direction_2 & d = Traits::identification_xy(); Direction_2 s = Traits::project_xy(source); Direction_2 t = Traits::project_xy(target); typename Kernel::Counterclockwise_in_between_2 ccib = @@ -3062,7 +3040,7 @@ public: /*! Construct a full spherical_arc from a plane. * \param plane the containing plane. */ - Arr_geodesic_arc_on_sphere_3(const Direction_3& normal) + Arr_geodesic_arc_on_sphere_3(const Direction_3 & normal) { this->normal(normal); this->set_is_vertical(CGAL::sign(normal.dz()) == ZERO); @@ -3086,8 +3064,8 @@ public: /*! Inserter for the spherical_arc class used by the traits-class */ template -OutputStream& operator<<(OutputStream& os, - const Arr_extended_direction_3& ed) +OutputStream & operator<<(OutputStream & os, + const Arr_extended_direction_3 & ed) { CGAL::To_double todouble; #if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS) @@ -3114,8 +3092,8 @@ OutputStream& operator<<(OutputStream& os, /*! Inserter for the spherical_arc class used by the traits-class */ template OutputStream & -operator<<(OutputStream& os, - const Arr_x_monotone_geodesic_arc_on_sphere_3& arc) +operator<<(OutputStream & os, + const Arr_x_monotone_geodesic_arc_on_sphere_3 & arc) { #if defined(CGAL_ARR_GEODESIC_ARC_ON_SPHERE_DETAILS) os << "("; @@ -3133,8 +3111,8 @@ operator<<(OutputStream& os, /*! Extractor for the spherical_arc class used by the traits-class */ template InputStream & -operator>>(InputStream& is, - const Arr_x_monotone_geodesic_arc_on_sphere_3& arc) +operator>>(InputStream & is, + const Arr_x_monotone_geodesic_arc_on_sphere_3 & arc) { std::cerr << "Not implemented yet!" << std::endl; return is; 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 48e26411326..a55f3540c6d 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h index 272d216ac80..c1078f3bba7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 05df286edf3..da10d5c1f51 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 db685311d18..4c2aaf59779 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -151,6 +151,11 @@ public: p_polyY(NULL), p_normY(NULL) { + CGAL_precondition_code ( + Rat_kernel ker; + typename Rat_kernel::Equal_2 equal = ker.equal_2_object(); + ); + // Copy the control points and compute their bounding box. const int pts_size = std::distance (pts_begin, pts_end); double x, y; 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 9fcf0bb9c14..5579c5d2cc3 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 c7e3769b740..15449cca197 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -1345,29 +1345,26 @@ bool _Bezier_x_monotone_2::equals // Split the subcurve into two at a given split point. // template -void _Bezier_x_monotone_2:: -split(const Point_2& p, Self& c1, Self& c2) const +void _Bezier_x_monotone_2::split + (const Point_2& p, + Self& c1, Self& c2) const { - //this was added to handle the case where p is the endpoint of another - //Bezier curve and the curve is vertical + //this was added to handle the case where p is the endpoint of another Bezier curve + //and the curve is vertical if ( p.is_rational() && is_vertical() ){ Nt_traits nt_traits; - Rat_point_2 rp = (Rat_point_2) p; + Rat_point_2 rp=(Rat_point_2) p; std::list sols; - // typename std::list::iterator sol = sols.begin(); - Integer rpyn = nt_traits.numerator(rp.y()); - Polynomial poly_y = - nt_traits.scale(_curve.y_polynomial(), - nt_traits.denominator(rp.y())) - - nt_traits.construct_polynomial(&rpyn, 0); - nt_traits.compute_polynomial_roots(poly_y, 0, 1, std::back_inserter(sols)); - CGAL_assertion(sols.size() == 1); - p.add_originator(Originator(_curve, _xid,*sols.begin()) ); + typename std::list::iterator sol=sols.begin(); + Integer rpyn=nt_traits.numerator(rp.y()); + Polynomial poly_y=nt_traits.scale(_curve.y_polynomial(),nt_traits.denominator(rp.y())) - nt_traits.construct_polynomial(&rpyn,0); + nt_traits.compute_polynomial_roots (poly_y,0,1,std::back_inserter(sols)); + CGAL_assertion(sols.size()==1); + p.add_originator (Originator(_curve, _xid,*sols.begin()) ); } - CGAL_precondition(p.get_originator(_curve, _xid) != p.originators_end() || - p.is_rational()); + CGAL_precondition (p.get_originator (_curve, _xid) != p.originators_end() || p.is_rational()); // Duplicate the curve. c1 = c2 = *this; @@ -1383,6 +1380,8 @@ split(const Point_2& p, Self& c1, Self& c2) const c1._ps = p; c2._pt = p; } + + return; } // --------------------------------------------------------------------------- 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 6789e695d68..70f84fa62f4 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 0835f2b3e07..fa9dceadfd5 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h index 589a3cc89b6..3bd51349a0b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_intersections_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h index c644d604407..80378429325 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 b68a407e20e..17442a31411 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 904a14773b1..70e3155b87c 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Curve_data_aux.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Curve_data_aux.h index 95fea2d064d..49fe320f2a3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Curve_data_aux.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Curve_data_aux.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h index a104e507dde..4608b74e206 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Hyperbolic_arc_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h index 3d23fe76928..4cea30d8b75 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 c3a3ce5bb56..e869c93eae6 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 385e620e816..ac4b19d6f6d 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 fc4e0aabd67..82dee2cfa8d 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Segment_assertions.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Segment_assertions.h index bafe1325303..934e4226157 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Segment_assertions.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Segment_assertions.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h index 734536f89f4..8ce37d82458 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_great_circular_arc_on_cylinder_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_great_circular_arc_on_cylinder_traits_2.h index 54167bd198c..0dd277cae19 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_great_circular_arc_on_cylinder_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_great_circular_arc_on_cylinder_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -861,10 +861,10 @@ public: Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(); } - /*! A functor that compares the x-limits of arc ends on the + /*! A functor that compares the x-coordinates of arc ends near the * boundary of the parameter space. */ - class Compare_x_limit_on_boundary_2 { + class Compare_x_near_boundary_2 { protected: typedef Arr_great_circular_arc_on_cylinder_traits_2 Traits; @@ -874,13 +874,13 @@ public: /*! Constructor * \param traits the traits (in case it has state) */ - Compare_x_limit_on_boundary_2(const Traits * traits) : m_traits(traits) {} + Compare_x_near_boundary_2(const Traits * traits) : m_traits(traits) {} friend class Arr_great_circular_arc_on_cylinder_traits_2; public: - /*! Compare the x-coordinate of a direction with the x-limit of an - * arc end on the boundary. + /*! Compare the x-coordinate of a direction with the x-coordinate of an + * arc end near the boundary. * \param p the point direction. * \param xcv the arc, the endpoint of which is compared. * \param ce the arc-end indicator - @@ -898,8 +898,6 @@ public: const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { - // TODO implement (simplify) - CGAL_precondition(point.is_no_boundary()); CGAL_precondition_code (const Point_2 & p2 = (ce == ARR_MIN_END) ? xcv.left() : xcv.right();); @@ -933,7 +931,7 @@ public: return (ce == ARR_MIN_END) ? LARGER : SMALLER; } - /*! Compare the x-limits of 2 arc ends on the boundary of the + /*! Compare the x-coordinates of 2 arc ends near the boundary of the * parameter space. * \param xcv1 the first arc. * \param ce1 the first arc end indicator - @@ -957,115 +955,6 @@ public: const X_monotone_curve_2 & xcv2, Arr_curve_end ce2) const { - // TODO implement (simplify) - - CGAL_precondition_code - (const Point_2 & p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right();); - CGAL_precondition(!p1.is_no_boundary()); - CGAL_precondition_code - (const Point_2 & p2 = (ce2 == ARR_MIN_END) ? xcv2.left() : xcv2.right();); - CGAL_precondition(!p2.is_no_boundary()); - - if (xcv1.is_vertical() && xcv2.is_vertical()) { - CGAL_precondition(!xcv1.is_on_boundary()); - CGAL_precondition(!xcv2.is_on_boundary()); - - /* The following is replaced by the code above - * if (xcv1.is_on_boundary() && xcv2.is_on_boundary()) return EQUAL; - * if (xcv1.is_on_boundary()) return SMALLER; - * if (xcv2.is_on_boundary()) return LARGER; - */ - - // Non of the arcs coincide with the discontinuity arc: - // Obtain the directions contained in the underlying planes, which are - // also on the xy-plane: - Direction_3 normal1 = xcv1.plane().orthogonal_direction(); - Direction_2 p = (xcv1.is_directed_right()) ? - Direction_2(-(normal1.dy()), normal1.dx()) : - Direction_2(normal1.dy(), -(normal1.dx())); - Direction_3 normal2 = xcv2.plane().orthogonal_direction(); - Direction_2 q = (xcv2.is_directed_right()) ? - Direction_2(-(normal2.dy()), normal2.dx()) : - Direction_2(normal2.dy(), -(normal2.dx())); - - const Kernel * kernel = m_traits; - if (kernel->equal_2_object()(p, q)) return EQUAL; - const Direction_2 & nx = Traits::neg_x_2(); - return (kernel->counterclockwise_in_between_2_object()(nx, p, q)) ? - LARGER : SMALLER; - } - if (xcv1.is_vertical()) { - CGAL_precondition(!xcv1.is_on_boundary()); - /* The following is replaced by the code above - * if (xcv1.is_on_boundary()) return SMALLER; - */ - return (ce2 == ARR_MAX_END) ? SMALLER : LARGER; - } - if (xcv2.is_vertical()) { - CGAL_precondition(!xcv2.is_on_boundary()); - /* The following is replaced by the code above - * if (xcv2.is_on_boundary()) return LARGER; - */ - return (ce1 == ARR_MAX_END) ? LARGER : SMALLER; - } - // Non of the arcs are vertical: - if (ce1 == ce2) return EQUAL; - if (ce1 == ARR_MIN_END) return SMALLER; - return LARGER; - } - }; - - /*! Obtain a Compare_x_limit_on_boundary_2 function object */ - Compare_x_limit_on_boundary_2 compare_x_limit_on_boundary_2_object() const - { return Compare_x_limit_on_boundary_2(this); } - - - /*! A functor that compares the x-coordinates of arc ends near the - * boundary of the parameter space. - */ - class Compare_x_near_boundary_2 { - protected: - typedef Arr_great_circular_arc_on_cylinder_traits_2 Traits; - - /*! The traits (in case it has state) */ - const Traits * m_traits; - - /*! Constructor - * \param traits the traits (in case it has state) - */ - Compare_x_near_boundary_2(const Traits * traits) : m_traits(traits) {} - - friend class Arr_great_circular_arc_on_cylinder_traits_2; - - public: - - /*! Compare the x-coordinates of 2 arc ends near 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 - * 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. - * \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 arc xcv1 lies on a boundary. - * \pre the ce2 end of the arc xcv2 lies on a boundary. - * \pre xcv1 does not coincide with the vertical identification curve. - * \pre xcv2 does not coincide with the vertical identification curve. - */ - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - // TODO implement (simplify) - - Arr_curve_end ce1 = ce2 = ce; - CGAL_precondition_code (const Point_2 & p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right();); CGAL_precondition(!p1.is_no_boundary()); @@ -1126,143 +1015,7 @@ public: 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-limits of arc ends on the - * boundary of the parameter space. - */ - class Compare_y_limit_on_boundary_2 { - protected: - typedef Arr_great_circular_arc_on_cylinder_traits_2 Traits; - /*! The traits (in case it has state) */ - const Traits * m_traits; - - /*! Constructor - * \param traits the traits (in case it has state) - */ - Compare_y_limit_on_boundary_2(const Traits * traits) : m_traits(traits) {} - - friend class Arr_great_circular_arc_on_cylinder_traits_2; - - public: - /*! Compare the y-limits of 2 curves at their ends on 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 - * boundary or on the right boundary of the parameter space. - * There is no horizontal identification curve! - */ - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - CGAL_precondition(!xcv1.is_degenerate()); - CGAL_precondition(!xcv2.is_degenerate()); - - const Point_2 & l1 = xcv1.left(); - const Point_2 & r1 = xcv1.right(); - const Point_2 & l2 = xcv2.left(); - const Point_2 & r2 = xcv2.right(); - - // If xcv1 is vertical, xcv1 coincides with the discontinuity arc: - if (xcv1.is_vertical()) { - CGAL_precondition(!l1.is_no_boundary()); - CGAL_precondition(!r1.is_no_boundary()); - } - - // If xcv2 is vertical, xcv2 coincides with the discontinuity arc: - if (xcv2.is_vertical()) { - CGAL_precondition(!l2.is_no_boundary()); - CGAL_precondition(!r2.is_no_boundary()); - } - - if (ce == ARR_MIN_END) { - // Handle the south pole. It has the smallest y coords: - if (l1.is_min_boundary()) - return (l2.is_min_boundary()) ? EQUAL : SMALLER; - if (l2.is_min_boundary()) return LARGER; - - // None of xcv1 and xcv2 endpoints coincide with a pole: - Comparison_result cr = m_traits->compare_y(l1, l2); - if (cr != EQUAL) return cr; - - // If Both arcs are vertical, they overlap: - if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL; - if (xcv1.is_vertical()) return LARGER; - if (xcv2.is_vertical()) return SMALLER; - - // Non of the arcs is verticel. Thus, non of the endpoints coincide - // with a pole. - // Compare the y-coord. at the x-coord of the most left right-endpoint. - CGAL_assertion(r1.is_no_boundary()); - CGAL_assertion(r2.is_no_boundary()); - - if (m_traits->compare_xy(r1, r2) == LARGER) { - // use r2 and xcv1: - Oriented_side os = m_traits->oriented_side(xcv1.plane(), r2); - return (os == ON_ORIENTED_BOUNDARY) ? EQUAL : - (xcv1.is_directed_right()) ? - ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) : - ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER); - } - // use r1 and xcv2: - Oriented_side os = m_traits->oriented_side(xcv2.plane(), r1); - return (os == ON_ORIENTED_BOUNDARY) ? EQUAL : - (xcv2.is_directed_right()) ? - ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) : - ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER); - } - - // ce == ARR_MAX_END - - // Handle the north pole. It has the largest y coords: - if (r1.is_max_boundary()) return (r2.is_max_boundary()) ? EQUAL : LARGER; - if (r2.is_max_boundary()) return SMALLER; - - // None of xcv1 and xcv2 endpoints coincide with a pole: - Direction_2 r1_xy = Traits::project_xy(r1); - Comparison_result cr = m_traits->compare_y(r1, r2); - if (cr != EQUAL) return cr; - - // If Both arcs are vertical, they overlap: - if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL; - if (xcv1.is_vertical()) return LARGER; - if (xcv2.is_vertical()) return SMALLER; - - // Compare to the left: - Direction_2 p_r1 = Traits::project_xy(r1); - cr = m_traits->compare_y(r1, r2); - if (cr != EQUAL) return cr; - - // Non of the arcs 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. - CGAL_assertion(l1.is_no_boundary()); - CGAL_assertion(l2.is_no_boundary()); - - if (m_traits->compare_xy(l1, l2) == SMALLER) { - // use l2 and xcv1: - Oriented_side os = m_traits->oriented_side(xcv1.plane(), l2); - return (os == ON_ORIENTED_BOUNDARY) ? EQUAL : - (xcv1.is_directed_right()) ? - ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) : - ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER); - } - // use l1 and xcv2: - Oriented_side os = m_traits->oriented_side(xcv2.plane(), l1); - return (os == ON_ORIENTED_BOUNDARY) ? EQUAL : - (xcv2.is_directed_right()) ? - ((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) : - ((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER); - } - }; - - /*! Obtain a Compare_y_limit_on_boundary_2 function object */ - Compare_y_limit_on_boundary_2 compare_y_limit_on_boundary_2_object() const - { return Compare_y_limit_on_boundary_2(this); } - /*! A functor that compares the y-coordinates of arc ends near the * boundary of the parameter space. */ @@ -1399,7 +1152,7 @@ public: /*! 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); } - + /*! A functor that indicates whether a geometric object lies on the * horizontal identification arc. Since there is no such thing in the * parameter space, the operators immediately return false. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_hyperbolic_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_hyperbolic_arc_traits_2.h index 0c19631a9a3..4ba3859b5e6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_hyperbolic_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_hyperbolic_arc_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -53,10 +53,10 @@ public: typedef Tag_false Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h index ad41e0e92aa..760972ddab2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 d11bea6bba2..95b978e3b65 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2003,2004,2005,2006,2007,2008,2009,2010,2011 INRIA Sophia-Antipolis (France). +// Copyright (c) 2003-2006 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -62,10 +62,10 @@ public: typedef CGAL::Tag_false Has_merge_category; typedef CGAL::Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; Arr_line_arc_traits_2(const CircularKernel &k = CircularKernel()) : ck(k) {} 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 864ccfc0145..2fcc9731869 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -57,10 +57,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_open_side_tag Left_side_category; - typedef Arr_open_side_tag Bottom_side_category; - typedef Arr_open_side_tag Top_side_category; - typedef Arr_open_side_tag Right_side_category; + typedef Arr_open_side_tag Arr_left_side_category; + typedef Arr_open_side_tag Arr_bottom_side_category; + typedef Arr_open_side_tag Arr_top_side_category; + typedef Arr_open_side_tag Arr_right_side_category; typedef typename Kernel::Line_2 Line_2; typedef typename Kernel::Ray_2 Ray_2; @@ -747,7 +747,7 @@ public: typedef Arr_linear_traits_2 Traits; /*! The traits (in case it has state) */ - const Traits* m_traits; + const Traits * m_traits; /*! Constructor * \param traits the traits (in case it has state) @@ -1064,30 +1064,13 @@ public: 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 arc ends on the + /*! A function object that compares the x-coordinates of arc ends near the * boundary of the parameter space */ - class Compare_x_at_limit_2 { - protected: - typedef Arr_linear_traits_2 Traits; - - /*! The traits (in case it has state) */ - const Traits* m_traits; - - /*! Constructor - * \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, - * constructing it. - */ - Compare_x_at_limit_2(const Traits* traits) : m_traits(traits) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_linear_traits_2; - + class Compare_x_near_boundary_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 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. * \param ce the line-end indicator - @@ -1098,66 +1081,19 @@ 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. */ Comparison_result operator()(const Point_2 & p, const X_monotone_curve_2 & xcv, Arr_curve_end ) const { - CGAL_precondition(! xcv.is_degenerate()); - CGAL_precondition(xcv.is_vertical()); + CGAL_precondition (! xcv.is_degenerate()); + CGAL_precondition (xcv.is_vertical()); - const Kernel* kernel = m_traits; - return (kernel->compare_x_at_y_2_object()(p, xcv.supp_line())); + Kernel kernel; + 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. - * \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. - * \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. - * \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. - */ - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - Arr_curve_end /* ce1 */, - const X_monotone_curve_2 & xcv2, - Arr_curve_end /*! ce2 */) const - { - CGAL_precondition(! xcv1.is_degenerate()); - CGAL_precondition(! xcv2.is_degenerate()); - CGAL_precondition(xcv1.is_vertical()); - CGAL_precondition(xcv2.is_vertical()); - - const Kernel* kernel = m_traits; - const Point_2 p = kernel->construct_point_2_object()(ORIGIN); - return (kernel->compare_x_at_y_2_object()(p, xcv1.supp_line(), - xcv2.supp_line())); - } - }; - - /*! Obtain a Compare_x_at_limit_2 function object */ - Compare_x_at_limit_2 compare_x_at_limit_2_object() const - { return Compare_x_at_limit_2(this); } - - /*! A function object that compares the x-coordinates of arc ends near the - * boundary of the parameter space - */ - class Compare_x_near_limit_2 { - public: - /*! Compare the x-coordinates of 2 arcs ends near the boundary of the * parameter space at y = +/- oo. * \param xcv1 the first arc. @@ -1172,54 +1108,38 @@ public: * 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 the $x$-coordinates of xcv1 and xcv2 at their ce ends are - * equal, implying that the curves overlap! + * \pre the ce1 end of the line xcv1 lies on a boundary. + * \pre the ce2 end of the line xcv2 lies on a boundary. */ - 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 + Comparison_result operator()(const X_monotone_curve_2 & xcv1, + Arr_curve_end /* ce1 */, + const X_monotone_curve_2 & xcv2, + Arr_curve_end /*! ce2 */) const { - CGAL_precondition(! xcv1.is_degenerate()); - CGAL_precondition(! xcv2.is_degenerate()); - CGAL_precondition(xcv1.is_vertical()); - CGAL_precondition(xcv2.is_vertical()); - return EQUAL; + CGAL_precondition (! xcv1.is_degenerate()); + CGAL_precondition (! xcv2.is_degenerate()); + CGAL_precondition (xcv1.is_vertical()); + CGAL_precondition (xcv2.is_vertical()); + + Kernel kernel; + typename Kernel::Point_2 p = kernel.construct_point_2_object() (ORIGIN); + return (kernel.compare_x_at_y_2_object() (p, + xcv1.supp_line(), + xcv2.supp_line())); } }; - /*! Obtain a Compare_x_near_limit_2 function object */ - Compare_x_near_limit_2 compare_x_near_limit_2_object() const - { return Compare_x_near_limit_2(); } + /*! 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 y-coordinates of arc ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { - protected: - typedef Arr_linear_traits_2 Traits; - - /*! The traits (in case it has state) */ - const Traits* m_traits; - - /*! Constructor - * \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, - * constructing it. - */ - Compare_y_near_boundary_2(const Traits* traits) : m_traits(traits) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_linear_traits_2; - public: - /*! Compare the y-limits of 2 lines at their ends on the boundary + /*! Compare 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. @@ -1233,38 +1153,42 @@ public: Arr_curve_end ce) const { // Make sure both curves are defined at x = -oo (or at x = +oo). - CGAL_precondition(! xcv1.is_degenerate()); - CGAL_precondition(! xcv2.is_degenerate()); - CGAL_precondition((ce == ARR_MIN_END && - xcv1.left_infinite_in_x() == ARR_LEFT_BOUNDARY && - xcv2.left_infinite_in_x() == ARR_LEFT_BOUNDARY) || - (ce == ARR_MAX_END && - xcv1.right_infinite_in_x() == ARR_RIGHT_BOUNDARY && - xcv2.right_infinite_in_x() == ARR_RIGHT_BOUNDARY)); + CGAL_precondition (! xcv1.is_degenerate()); + CGAL_precondition (! xcv2.is_degenerate()); + CGAL_precondition ((ce == ARR_MIN_END && + xcv1.left_infinite_in_x() == ARR_LEFT_BOUNDARY && + xcv2.left_infinite_in_x() == ARR_LEFT_BOUNDARY) || + (ce == ARR_MAX_END && + xcv1.right_infinite_in_x() == ARR_RIGHT_BOUNDARY && + xcv2.right_infinite_in_x() == ARR_RIGHT_BOUNDARY)); // Compare the slopes of the two supporting lines. - const Kernel* kernel = m_traits; - const Comparison_result res_slopes = - kernel->compare_slope_2_object()(xcv1.supp_line(), xcv2.supp_line()); + Kernel kernel; + const Comparison_result res_slopes = + kernel.compare_slope_2_object() (xcv1.supp_line(), xcv2.supp_line()); 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 // at infinity. - const Point_2 p = kernel->construct_point_2_object()(ORIGIN); - return (kernel->compare_y_at_x_2_object()(p, xcv1.supp_line(), + typename Kernel::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: - return (ce == ARR_MIN_END) ? CGAL::opposite(res_slopes) : res_slopes; + if (ce == ARR_MIN_END) + // Flip the slope result if we compare at x = -oo: + return ((res_slopes == LARGER) ? SMALLER : LARGER); + + // If we compare at x = +oo, the slope result is what we need: + return (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); } + { return Compare_y_near_boundary_2(); } //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h index edad363f428..e3cecce5a1e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 731912e0c75..73de33279f0 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -69,10 +69,10 @@ public: typedef Tag_true Has_left_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; /*! Default Constructor */ Arr_non_caching_segment_basic_traits_2() @@ -136,6 +136,10 @@ public: Kernel kernel; // The two segments must be defined at q and also to its left. + CGAL_precondition_code( + Compare_y_at_x_2 compare_y_at_x = kernel.compare_y_at_x_2_object(); + ); + CGAL_precondition (Segment_assertions::_assert_is_point_on(p, cv1, Has_exact_division())&& Segment_assertions::_assert_is_point_on(p, cv2, Has_exact_division())); @@ -196,6 +200,10 @@ public: Kernel kernel; // The two segments must be defined at q and also to its right. + CGAL_precondition_code( + Compare_y_at_x_2 compare_y_at_x = kernel.compare_y_at_x_2_object(); + ); + CGAL_precondition (Segment_assertions::_assert_is_point_on(p, cv1, Has_exact_division())&& Segment_assertions::_assert_is_point_on(p, cv2, Has_exact_division())); 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 4ecab7f49b1..dbd683b9eb9 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -62,10 +62,10 @@ public: typedef typename Base::Has_left_category Has_left_category; typedef typename Base::Has_do_intersect_category Has_do_intersect_category; - typedef typename Base::Left_side_category Left_side_category; - typedef typename Base::Bottom_side_category Bottom_side_category; - typedef typename Base::Top_side_category Top_side_category; - typedef typename Base::Right_side_category Right_side_category; + typedef typename Base::Arr_left_side_category Arr_left_side_category; + typedef typename Base::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Base::Arr_top_side_category Arr_top_side_category; + typedef typename Base::Arr_right_side_category Arr_right_side_category; typedef typename Base::Point_2 Point_2; typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; @@ -168,6 +168,7 @@ public: // Make sure that p lies on the interior of the curve. CGAL_precondition_code ( Compare_xy_2 compare_xy = base.compare_xy_2_object(); + Compare_y_at_x_2 compare_y_at_x = base.compare_y_at_x_2_object(); ); Construct_min_vertex_2 min_vertex = base.construct_min_vertex_2_object(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h index 1240471da79..5e465972205 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay.h index e2c0a05157c..a3f8a71ef3d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2011 Max-Planck-Institute for Computer Science (Germany). +// Copyright (c) 2007 Max-Planck-Institute for Computer Science (Germany). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h index e1580b2282a..01d93c68b60 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 43445c61035..60c171af5f9 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -62,14 +62,14 @@ public: typedef typename Base_traits_2::Has_do_intersect_category Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Base_traits_2 >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Base_traits_2 >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Base_traits_2 >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Base_traits_2 >::Category - Right_side_category; + typedef typename internal::Arr_complete_left_side_tag< Base_traits_2 >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Base_traits_2 >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Base_traits_2 >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Base_traits_2 >::Tag + Arr_right_side_category; /* Overlay is implemented as sweep-line visitor. The sweep-line algorithm * never uses Compare_y_at_x_left_2, and it never performs merging of curves. @@ -577,86 +577,6 @@ public: return Parameter_space_in_x_2 (m_base_traits); } - - /*! A function object that determines whether an x-monotone curve or a - * point coincide with the vertical identification curve. - */ - class Is_on_x_identification_2 { - protected: - //! The base traits. - const Base_traits_2 *m_base; - - /*! Constructor. - * The constructor is declared private to allow only the functor - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Is_on_x_identification_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; - - public: - bool operator() (const Point_2 & p) const - { - return m_base->is_on_x_identification_2_object() (p.base()); - } - - bool operator() (const X_monotone_curve_2 & xcv) const - { - return m_base->is_on_x_identification_2_object() (xcv.base()); - } - }; - - /*! Obtain 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); - } - - /*! A functor that compares the y-coordinate of two given points - * that lie on the vertical identification curve. - */ - class Compare_y_on_boundary_2 { - protected: - //! The base traits. - const Base_traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - 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; - - public: - 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()); - } - Comparison_result operator() (const Point_2 & pt, - const X_monotone_curve_2& xcv, Arr_curve_end ce) const - { - return m_base->compare_x_on_boundary_2_object()(pt.base(), xcv.base(), ce); - } - Comparison_result operator() (const X_monotone_curve_2& xcv1, Arr_curve_end ce1, - const X_monotone_curve_2& xcv2, Arr_curve_end ce2) const - { - return m_base->compare_x_on_boundary_2_object()(xcv1.base(), ce1, xcv2.base(), ce2); - } - }; - - /*! 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_boundary_2(m_base_traits); - } - /*! A function object that compares the y-coordinates of curve ends near the * boundary of the parameter space */ @@ -695,6 +615,41 @@ public: return Compare_y_near_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_boundary_2 { + protected: + //! The base traits. + const Base_traits_2 * m_base; + + /*! Constructor. + * \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 + * obtaining function, which is a member of the nesting class, + * constructing it. + */ + 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; + + public: + 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()); + } + }; + + /*! 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_boundary_2(m_base_traits); + } + + // TODO Is_on_x_identification_2 + // bottom-top /*! A functor that determines whether an endpoint of an x-monotone arc lies @@ -740,46 +695,10 @@ public: return Parameter_space_in_y_2 (m_base_traits); } - /*! A function object that determines whether an x-monotone curve or a - * point coincide with the horizontal identification curve. - */ - class Is_on_y_identification_2 { - protected: - //! The base traits. - const Base_traits_2 *m_base; - - /*! Constructor. - * The constructor is declared private to allow only the functor - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Is_on_y_identification_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; - - public: - bool operator() (const Point_2 & p) const - { - return m_base->is_on_y_identification_2_object() (p.base()); - } - - bool operator() (const X_monotone_curve_2 & xcv) const - { - return m_base->is_on_y_identification_2_object() (xcv.base()); - } - }; - - /*! Obtain 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); - } - - /*! A functor that compares the x-limits of curve ends on the + /*! A functor that compares the x-coordinates of curve ends near the * boundary of the parameter space. */ - class Compare_x_at_limit_2 { + class Compare_x_near_boundary_2 { protected: //! The base traits. const Base_traits_2 * m_base; @@ -791,7 +710,7 @@ public: * obtaining function, which is a member of the nesting class, * constructing it. */ - Compare_x_at_limit_2(const Base_traits_2 * tr) : m_base(tr) {} + Compare_x_near_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; @@ -801,8 +720,8 @@ public: const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { - return m_base->compare_x_at_limit_2_object()(p.base(), - xcv.base(), ce); + return m_base->compare_x_near_boundary_2_object()(p.base(), + xcv.base(), ce); } Comparison_result operator()(const X_monotone_curve_2 & xcv1, @@ -810,52 +729,15 @@ public: const X_monotone_curve_2 & xcv2, Arr_curve_end ce2) const { - return m_base->compare_x_at_limit_2_object()(xcv1.base(), ce1, - xcv2.base(), ce2); + return m_base->compare_x_near_boundary_2_object()(xcv1.base(), ce1, + xcv2.base(), ce2); } }; - /*! Obtain a Compare_x_at_limit_2 function object. */ - Compare_x_at_limit_2 compare_x_at_limit_2_object () const + /*! Obtain a Compare_x_near_boundary_2 function object. */ + Compare_x_near_boundary_2 compare_x_near_boundary_2_object () const { - return Compare_x_at_limit_2(m_base_traits); - } - - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_x_near_limit_2 { - protected: - //! The base traits. - const Base_traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_near_limit_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; - - public: - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return m_base->compare_x_near_limit_2_object()(xcv1.base(), - xcv2.base(), - ce); - } - }; - - /*! Obtain a Compare_x_near_limit_2 function object. */ - Compare_x_near_limit_2 compare_x_near_limit_2_object () const - { - return Compare_x_near_limit_2(m_base_traits); + return Compare_x_near_boundary_2(m_base_traits); } /*! A functor that compares the x-coordinate of two given points @@ -891,42 +773,7 @@ public: return Compare_x_on_boundary_2(m_base_traits); } - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_x_near_boundary_2 { - protected: - //! The base traits. - const Base_traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_near_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; - - public: - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return m_base->compare_x_near_boundary_2_object()(xcv1.base(), - xcv2.base(), - ce); - } - }; - - /*! 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(m_base_traits); - } + // TODO Is_on_y_identification_2 }; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h index 84390edf6b6..704d556c713 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 1c5c55ef4e3..fbbbd5921a6 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 d161b559536..2c796e031e5 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h index 055f33d27ca..44dae141cfb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h index c98a2b02d39..06e5bdbb992 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_middle_edges_generator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 6fab7c972b7..f35e5f0e25f 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -131,8 +131,6 @@ public: */ struct Construct_coord_iterator { - typedef const ANT* result_type; - /*! Get an iterator for the approximate coordinates. */ const ANT* operator() (const NN_Point_2& nnp) const { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h index 8487a5bd71a..cd868c6a948 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h index 237c2fe7f3a..48fa9676cba 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_specified_points_generator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h index 6251b72b385..5701783b6e3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h index 5aad10a88be..a1d2eff2f07 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_naive_point_location_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h index 7bfff5456be..ce09edc2911 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -122,6 +122,10 @@ Object Arr_simple_point_location::_base_vertical_ray_shoot const Comparison_result curve_above_under = (shoot_up ? LARGER : SMALLER); // Go over all halfedges in the arrangement. + typename Traits_adaptor_2::Is_in_x_range_2 is_in_x_range = + geom_traits->is_in_x_range_2_object(); + typename Traits_adaptor_2::Compare_y_at_x_2 compare_y_at_x = + geom_traits->compare_y_at_x_2_object(); typename Traits_adaptor_2::Is_vertical_2 is_vertical = geom_traits->is_vertical_2_object(); typename Traits_adaptor_2::Compare_y_position_2 compare_y_position = @@ -130,6 +134,8 @@ Object Arr_simple_point_location::_base_vertical_ray_shoot geom_traits->compare_y_at_x_right_2_object(); typename Traits_adaptor_2::Compare_y_at_x_left_2 compare_y_at_x_left = geom_traits->compare_y_at_x_left_2_object(); + typename Traits_adaptor_2::Compare_xy_2 compare_xy = + geom_traits->compare_xy_2_object(); typename Dcel::Edge_const_iterator eit = top_traits->dcel().edges_begin(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h index 5c40e66867e..17ed77415bd 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h index 52a1e5c67c4..efebcd8f193 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h index 2881976bfca..059e24dd7a4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h index e060ef267a1..b5875ea95c2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h index b29435a6a6f..da3c8228274 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h index 85f292b79dc..d06cdd9f486 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_ninetuple.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_ninetuple.h index 8495b0f26cb..ca5679e7bad 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_ninetuple.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_ninetuple.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_predicates.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_predicates.h index 8ad5a0f49fe..c1bea74efdb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_predicates.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_predicates.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 ca7d0a94045..b91c7d020ed 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits_functions.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits_functions.h index 6c560cc193c..de0e522cf2c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits_functions.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits_functions.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h index 28be7eef046..d739f64629c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -1663,26 +1663,18 @@ public: return ar.find(left)->second; //return ar[left]; } - /*============================================== Trapezoidal_decomposition_2 public member functions ==============================================*/ public: - Trapezoidal_decomposition_2(bool rebuild = true) : + + Trapezoidal_decomposition_2(bool rebuild=true) : depth_threshold(CGAL_TD_DEFAULT_DEPTH_THRESHOLD), size_threshold(CGAL_TD_DEFAULT_SIZE_THRESHOLD) - { - init(); - set_needs_update(rebuild); - } - - Trapezoidal_decomposition_2(const double& depth_th, const double& size_th) : - depth_threshold(depth_th), size_threshold(size_th) - { - init(); - set_needs_update(rebuild); - } - + {init();set_needs_update(rebuild);} + Trapezoidal_decomposition_2(const double& depth_th,const double& size_th) : + depth_threshold(depth_th),size_threshold(size_th) + {init();set_needs_update(rebuild);} Trapezoidal_decomposition_2(const_Self_ref td) : needs_update_(td.needs_update_), number_of_curves_(td.number_of_curves_), diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h index 091c1df8d22..c95fc04702b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1999 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h index 53ffadba12a..bf3d5d3ed73 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 5838edb347c..d3a5cc07b20 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University(Israel). +// Copyright(c) 2005 Tel-Aviv University(Israel). // All rights reserved. // // This file is part of CGAL(www.cgal.org); you may redistribute it under @@ -43,10 +43,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; private: typedef Arr_polyline_traits_2 Self; 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 2889c7a4815..d3a5cc07b20 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University(Israel). +// Copyright(c) 2005 Tel-Aviv University(Israel). // All rights reserved. // // This file is part of CGAL(www.cgal.org); you may redistribute it under @@ -43,10 +43,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; private: typedef Arr_polyline_traits_2 Self; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h deleted file mode 100644 index 9e10f0453d8..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Algebraic_point_2.h +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_ALBERAIC_POINT_D_1_H -#define CGAL_ALBERAIC_POINT_D_1_H - -#include - -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -namespace CGAL { -namespace Arr_rational_arc { - -//------------------- -//Algebraic_point_2_rep -//------------------- -template -class Algebraic_point_2_rep : public Base_rational_arc_ds_1 -{ -public: - typedef AlgebraicKernelD_1 Algebraic_kernel_d_1; - typedef Base_rational_arc_ds_1 - Base; - - typedef CGAL::Arr_rational_arc::Rational_function - Rational_function; - typedef CGAL::Arr_rational_arc::Rational_function_pair - Rational_function_pair; - - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Algebraic_kernel_d_1::Bound Bound; - typedef typename Base::Integer Integer ; - typedef typename Base::Rational Rational ; - typedef typename Base::Polynomial_1 Polynomial_1; - - typedef typename Base::Root_multiplicity_vector Root_multiplicity_vector; - - typedef typename Get_arithmetic_kernel::Arithmetic_kernel - AK; - typedef typename AK::Bigfloat_interval BFI; - typedef Bigfloat_interval_traits BFI_traits; - typedef CGAL::Polynomial BFI_polynomial; - typedef CGAL::Polynomial_traits_d BFI_polynomial_traits; - - - typedef typename Base::FT_rat_1 FT_rat_1; - typedef typename Base::Polynomial_traits_1 Polynomial_traits_1; - - typedef CGAL::Arr_rational_arc::Cache - Cache; - -public: - Algebraic_point_2_rep(){} - Algebraic_point_2_rep(const Rational_function& rational_function, - const Algebraic_real_1& x_coordinate) : - _rational_function(rational_function), - _x_coordinate(x_coordinate) {} - - //assignment oparator - Algebraic_point_2_rep& operator=(const Algebraic_point_2_rep& other) - { - if (this != &other) // protect against invalid self-assignment - { - _rational_function = other._rational_function; - _x_coordinate = other._x_coordinate; - } - return *this; - } - - Comparison_result compare_xy_2(const Algebraic_point_2_rep& other, - const Cache& cache) const - { - Comparison_result comp = CGAL::compare(_x_coordinate, other.x()); - if (comp != EQUAL) - return comp; - if (_rational_function == other.rational_function()) - return EQUAL; - Rational_function_pair rat_func_pair = - cache.get_rational_pair(_rational_function, other.rational_function()); - return rat_func_pair.compare_f_g_at(_x_coordinate); - } - - Algebraic_real_1& x() - { - return _x_coordinate; - } - - const Algebraic_real_1& x() const - { - return _x_coordinate; - } - - const Rational_function& rational_function() const - { - return _rational_function; - } - - const Polynomial_1& numerator() const { return _rational_function.numer(); } - const Polynomial_1& denominator() const { return _rational_function.denom(); } - - //new functions... - Algebraic_real_1 y() const - { - typedef CGAL::Polynomial Polynomial_2; - //converting the defining polynomial of x and the rational function to - //bivariate polynomials - Polynomial_2 f(_algebraic_kernel.compute_polynomial_1_object()(_x_coordinate)); - - Polynomial_2 y(CGAL::shift(Polynomial_2(1),1)); - Polynomial_2 g(_rational_function.numer() - y * _rational_function.denom()); - - f=CGAL::swap(f, 0, 1); //swap x and y in the polynomial f - g=CGAL::swap(g, 0, 1); //swap x and y in the polynomial g - //compute the resultant in x (polynomial in y) - Polynomial_1 r(CGAL::resultant(f,g)); - - //solve for all roots of resultant - std::list roots; - _algebraic_kernel.solve_1_object()(r, false, std::back_inserter(roots)); - //isolate the right root - unsigned int initial_precision = 16; - int error_bound = 2; - - while (roots.size() > 1) - { - std::pair - y_bounds(this->approximate_absolute_y(error_bound,initial_precision)); - while (CGAL::compare(roots.front(),y_bounds.first) == SMALLER) - roots.pop_front(); - - while (CGAL::compare(y_bounds.second,roots.back()) == SMALLER) - roots.pop_back(); - - error_bound *= 2; - } - - CGAL_postcondition (roots.size() == 1); - return roots.front(); - } - std::pair to_double() const - { - double x = CGAL::to_double(_x_coordinate); - double numer_val = evaluate_at(_rational_function.numer(),x); - double denom_val = evaluate_at(_rational_function.denom(),x); - return std::make_pair(x,numer_val/denom_val); - } - std::pair approximate_absolute_x( int a) const - { - return _algebraic_kernel.approximate_absolute_1_object()(_x_coordinate,a); - } - std::pair approximate_absolute_y( int a) const - { - unsigned int precision = 16; - return approximate_absolute_y(a,precision); - } - std::pair approximate_relative_x( int r) const - { - return _algebraic_kernel.approximate_relative_1_object()(_x_coordinate,r); - } - std::pair approximate_relative_y( int r) const - { - // return zero if y is zero (the code below would not terminate) - // moreover approx relative is actually not well defined - if(_rational_function.sign_at(_x_coordinate)==CGAL::ZERO) - return std::make_pair(Bound(0),Bound(0)); - - - typename BFI_traits::Set_precision set_precision; - typename BFI_polynomial_traits::Evaluate evaluate; - long precision = 16; - Rational error_bound = CGAL::ipower(Rational(1,2),r); - while (true) - { - set_precision(precision); - BFI x_bfi(convert_to_bfi(_x_coordinate)); - - BFI_polynomial - numer_bfi(convert_to_bfi_extended(_rational_function.numer())); - BFI_polynomial - denom_bfi(convert_to_bfi_extended(_rational_function.denom())); - - BFI y_numer_bfi(evaluate(numer_bfi,x_bfi)); - BFI y_denom_bfi(evaluate(denom_bfi,x_bfi)); - - if (CGAL::zero_in(y_denom_bfi) == false) - { - BFI y_bfi(y_numer_bfi/y_denom_bfi); - if (CGAL::compare(CGAL::width(y_bfi), - Rational(CGAL::lower(CGAL::abs(y_bfi))) * error_bound ) - == SMALLER) - return std::make_pair(Bound(CGAL::lower(y_bfi)), - Bound(CGAL::upper(y_bfi))); - } - else precision*=2; - } - } - - std::ostream& print (std::ostream& os) const - { - std::pair double_p; - switch(::CGAL::get_mode(os)) - { - case ::CGAL::IO::PRETTY: - double_p = this->to_double(); - os <<"(" ; - os << double_p.first; - os <<" , " ; - os << double_p.second; - os << ")"; - break; - - case ::CGAL::IO::BINARY: - std::cerr << "BINARY format not yet implemented" << std::endl; - break; - - default: - // ASCII - os <<"x = " << _x_coordinate<<" "; - os <<"rational function = ( " ; - Base::print_polynomial(os, _rational_function.numer(), 'x'); - os << ") / ("; - Base::print_polynomial(os, _rational_function.denom(), 'x'); - os << ")"; - } - - return os; - } -private: - std::pair approximate_absolute_y( int a,unsigned int& precision ) const - { - typename BFI_traits::Set_precision set_precision; - typename BFI_polynomial_traits::Evaluate evaluate; - Rational error_bound = CGAL::ipower(Rational(1,2),a); - while (true) - { - set_precision(precision); - BFI x_bfi(convert_to_bfi(_x_coordinate)); - - BFI_polynomial numer_bfi(convert_to_bfi_extended(_rational_function.numer())); - BFI_polynomial denom_bfi(convert_to_bfi_extended(_rational_function.denom())); - - BFI y_numer_bfi(evaluate(numer_bfi,x_bfi)); - BFI y_denom_bfi(evaluate(denom_bfi,x_bfi)); - - if (CGAL::zero_in(y_denom_bfi) == false) - { - BFI y_bfi(y_numer_bfi/y_denom_bfi); - if (Bound(CGAL::width(y_bfi)) < error_bound ) - return std::make_pair(Bound(CGAL::lower(y_bfi)), - Bound(CGAL::upper(y_bfi)) ); - } - else precision*=2; - } - } - - template - static typename - CGAL::Coercion_traits:: - Arithmetic_kernel::Bigfloat_interval>::Type - convert_to_bfi_extended(const NTX& x) - { - typedef typename Get_arithmetic_kernel::Arithmetic_kernel AK; - typedef typename AK::Bigfloat_interval BFI; - typedef CGAL::Coercion_traits CT; - return typename CT::Cast()(x); - } - - double evaluate_at(const Polynomial_1& poly, const double x) const - { - double x_val = 1; - double ret_val(0); - for (int i(0); i <= poly.degree(); ++i) - { - ret_val = ret_val + x_val*CGAL::to_double(poly[i]); - x_val = x_val*x; - } - return ret_val; - } - -private: - Rational_function _rational_function; //supporting rational function - Algebraic_real_1 _x_coordinate; - - Algebraic_kernel_d_1 _algebraic_kernel; -}; - -template -class Algebraic_point_2 : - public Handle_with_policy > -{ - -public: - typedef Algebraic_kernel_ Algebraic_kernel_d_1; - typedef Handle_with_policy > - Base; - typedef Algebraic_point_2 Self; - typedef Algebraic_point_2_rep Rep; - typedef typename Rep::Rational Rational; - typedef typename Rep::Algebraic_real_1 Algebraic_real_1; - typedef typename Rep::Rational_function Rational_function; - typedef typename Rep::Bound Bound; - typedef typename Rep::Cache Cache; - typedef typename Rep::Polynomial_1 Polynomial_1; - -private: - static Self& get_default_instance() - { - static Algebraic_kernel_d_1 kernel; - static typename Rational_function::Polynomial_1 numer(0); - static typename Rational_function::Polynomial_1 denom(1); - static Rational_function rational_function(numer, denom, &kernel); - - static Algebraic_real_1 x_coordinate = - kernel.construct_algebraic_real_1_object()(Rational(0)); - - static Self default_instance(rational_function,x_coordinate); - - return default_instance; - - /*static Self x = Self(Rational(0),Rational(0),_cache); - return x; */ - } - -public: - explicit Algebraic_point_2(const Rational_function& rational_function, - const Algebraic_real_1& x_coordinate) : - Base(rational_function,x_coordinate) {} - - //used to solve VS bug... - Algebraic_point_2(const Self & p = get_default_instance()) : - Base(static_cast (p)) {} - - Comparison_result compare_xy_2(const Algebraic_point_2& other, - const Cache& cache) const - { - if (this->is_identical (other)) - return CGAL::EQUAL; - return this->ptr()->compare_xy_2(*other.ptr(), cache); - } - - const Polynomial_1& numerator() const { return this->ptr()->numerator(); } - const Polynomial_1& denominator() const { return this->ptr()->denominator(); } - - Algebraic_real_1& x() - { - if (this->is_shared()) - this->copy_on_write(); - return this->ptr()->x(); - } - - const Algebraic_real_1& x() const - { - return this->ptr()->x(); - } - - const Rational_function& rational_function() const - { - return this->ptr()->rational_function(); - } - - Algebraic_real_1 y() const - { - return this->ptr()->y(); - } - - std::pair to_double() const - { - return this->ptr()->to_double(); - } - - std::pair approximate_absolute_x( int a) const - { - return this->ptr()->approximate_absolute_x(a); - } - - std::pair approximate_absolute_y( int a) const - { - return this->ptr()->approximate_absolute_y(a); - } - - std::pair approximate_relative_x( int r) const - { - return this->ptr()->approximate_relative_x(r); - } - - std::pair approximate_relative_y( int r) const - { - return this->ptr()->approximate_relative_y(r); - } - - std::ostream& print(std::ostream& os) const - { - return this->ptr()->print(os); - } -}; //Algebraic_point_2 - - -template < typename Algebraic_kernel_> -std::ostream& operator<<(std::ostream& os, - const Algebraic_point_2 & p) -{ - return (p.print(os)); -} - -} //namespace Arr_rational_arc -} //namespace CGAL { - -#endif //CGAL_ALBERAIC_POINT_D_1_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h deleted file mode 100644 index 7c19aa47d78..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_BASE_RATIONAL_ARC_DS_D_1_H -#define CGAL_BASE_RATIONAL_ARC_DS_D_1_H - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -namespace CGAL { -namespace Arr_rational_arc { - -template -class Base_rational_arc_ds_1 -{ -public: - typedef Algebraic_kernel_ Algebraic_kernel; - typedef Base_rational_arc_ds_1 Self; - - //typedef typename Algebraic_kernel::Multiplicity_type Multiplicity; - typedef unsigned int Multiplicity; - typedef typename Algebraic_kernel::Coefficient Coefficient; - - typedef typename Get_arithmetic_kernel::Arithmetic_kernel - Arithmetic_kernel; - typedef typename Arithmetic_kernel::Rational Rational; - typedef typename Arithmetic_kernel::Integer Integer; - typedef typename Algebraic_kernel::Algebraic_real_1 Algebraic_real_1; - - typedef typename Algebraic_kernel::Polynomial_1 Polynomial_1; - typedef Polynomial_traits_d Polynomial_traits_1; - typedef Fraction_traits FT_rat_1; - typedef typename Algebraic_kernel::Solve_1 Solve_1; - typedef typename Algebraic_kernel::Bound Bound; - typedef Algebraic_structure_traits AT_poly; - - typedef Polynomial Poly_rat_1; - typedef Polynomial_traits_d PT_rat_1; - typedef Fraction_traits FT_poly_rat_1; - typedef std::vector Algebraic_vector; - typedef std::vector Multiplicity_vector; - typedef std::vector > - Root_multiplicity_vector; - - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - -public: - - //--------------------------------------------------------------------- - // Print a polynomial nicely. - - static std::ostream& print_polynomial(std::ostream& os, - const Polynomial_1& poly, - char var) - { - // Get the degree. - const int deg = CGAL::degree(poly); - - Integer coeff; - CGAL::Sign sgn; - int k; - - if (deg < 0) - { - os << '0'; - return (os); - } - - for (k = deg; k >= 0; k--) - { - //coeff = pt::Get_coefficient()(poly, k); - coeff = CGAL::get_coefficient(poly, k); - - if (k == deg) - os << coeff; - else if ((sgn = CGAL::sign (coeff)) == POSITIVE) - os << " + " << coeff; - else if (sgn == NEGATIVE) - os << " - " << -coeff; - else - continue; - - if (k > 1) - os << '*' << var << '^' << k; - else if (k == 1) - os << '*' << var; - } - - return (os); - } - -}; //Base_rational_arc_ds_1 - -} // namespace Arr_rational_arc -} //namespace CGAL { - -#endif //CGAL_BASE_RATIONAL_ARC_DS_D_1_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h deleted file mode 100644 index ef8f4ef4451..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_RATIONAL_ARC_CACHE -#define CGAL_RATIONAL_ARC_CACHE - -#include -#include -#include -#include - -namespace CGAL { -namespace Arr_rational_arc { - -//------------------- -//Cache -//------------------- -template -class Cache : public Base_rational_arc_ds_1 -{ -public: - typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; - typedef Base_rational_arc_ds_1 Base; - typedef Cache Self; - - typedef typename Base::Polynomial_1 Polynomial_1; - typedef typename Base::Rational Rational; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Base::Integer Integer ; - typedef typename Base::FT_rat_1 FT_rat_1; - typedef typename Base::Polynomial_traits_1 Polynomial_traits_1; - - typedef CGAL::Arr_rational_arc::Rational_function - Rational_function; - typedef CGAL::Arr_rational_arc::Rational_function_canonicalized_pair - Rational_function_canonicalized_pair; - typedef CGAL::Arr_rational_arc::Rational_function_pair - Rational_function_pair; - - typedef std::pair Rational_function_key; - class Less_compare_rational_function_key - { - public: - Comparison_result compare(const Rational_function_key& k1, - const Rational_function_key& k2) const - { - Comparison_result cr = - typename Polynomial_traits_1::Compare()(k1.first, k2.first); - if (cr != CGAL::EQUAL) - return (cr); - cr = typename Polynomial_traits_1::Compare()(k1.second, k2.second); - - return cr; - } - - bool operator()(const Rational_function_key& k1, - const Rational_function_key& k2) const - { - Comparison_result cr = compare(k1,k2); - return ((cr == CGAL::LARGER) ? true : false); - } - }; - - typedef typename std::map - Rational_function_map; - - typedef typename Rational_function::Id_type Rational_function_id_type; - typedef std::pair - Rational_function_canonicalized_pair_key; - - class Less_compare_rational_function_pair_key - { - public: - bool operator()(const Rational_function_canonicalized_pair_key& k1, - const Rational_function_canonicalized_pair_key& k2) const - { - return (k1 - Rational_function_canonicalized_pair_map; - -public: - Cache() : - _rat_func_map_watermark(128), _rat_pair_map_watermark(128), _ak_ptr(NULL){}; - - void initialize(Algebraic_kernel_d_1* ak_ptr) - { - _ak_ptr = ak_ptr; - } - void initialize(const Self& other, Algebraic_kernel_d_1* ak_ptr) - { - //copy kernel pointer - _ak_ptr = ak_ptr; - - //copy rational function map - typename Rational_function_map::const_iterator iter1; - for ( iter1 = other.rat_func_map().begin(); - iter1 != other.rat_func_map().end(); - ++iter1) - { - if (iter1->second.is_shared()) - { - Rational_function_key key = iter1->first; - //construct new instance - Rational_function f(iter1->second.numer(), iter1->second.denom(), - _ak_ptr); - _rat_func_map.insert(std::make_pair(key,f)); - } - } - - //copy rational function pair map - typename Rational_function_canonicalized_pair_map::const_iterator iter2; - for ( iter2 = other.rat_pair_map().begin(); - iter2 != other.rat_pair_map().end(); - ++iter2) - { - if (iter2->second.is_shared()) - { - Rational_function_canonicalized_pair_key key = iter2->first; - //construct new instance - Rational_function_canonicalized_pair p(iter2->second.f(), - iter2->second.g(), _ak_ptr); - _rat_pair_map.insert(std::make_pair(key,p)); - } - } - - } - const Rational_function_map& rat_func_map() const - { - return _rat_func_map; - } - - const Rational_function_canonicalized_pair_map& rat_pair_map() const - { - return _rat_pair_map; - } - - const Rational_function& get_rational_function(const Polynomial_1& numer, - const Polynomial_1& denom) const - { - CGAL_precondition (_ak_ptr != NULL); - Rational_function_key key = get_key(numer,denom); - - //look if element exists in cache already - typename Rational_function_map::iterator it = _rat_func_map.lower_bound(key); - - if(it != _rat_func_map.end() && !(_rat_func_map.key_comp()(key, it->first))) - { - return it->second; //iterator to a type - } - else //element does not exist, create it & insert to cache - { - //first check if to clean up cache - if (_rat_func_map.size() > _rat_func_map_watermark) - rat_func_map_clean_up(); - - //then insert the new element - Rational_function f(numer,denom,_ak_ptr); - typename Rational_function_map::iterator it2 = - _rat_func_map.insert(it,std::make_pair(key,f)); - return it2->second; - } - } - const Rational_function& get_rational_function( const Rational& rat) const - { - Integer numer,denom; - typename FT_rat_1::Decompose()(rat,numer,denom); - - Polynomial_1 numer_poly = - typename Polynomial_traits_1::Construct_polynomial()(numer); - Polynomial_1 denom_poly = - typename Polynomial_traits_1::Construct_polynomial()(denom); - - return get_rational_function (numer_poly,denom_poly); - } - - const Rational_function_pair get_rational_pair(const Rational_function& f, - const Rational_function& g) const - { - CGAL_precondition (_ak_ptr != NULL); - CGAL_precondition(!(f==g)); - Rational_function_canonicalized_pair_key key = get_key(f,g); - bool is_opposite = (f.id() < g.id()) ? false : true ; - - //look if element exists in cache already - typename Rational_function_canonicalized_pair_map::iterator it = - _rat_pair_map.lower_bound(key); - - if(it != _rat_pair_map.end() && !(_rat_pair_map.key_comp()(key, it->first))) - { - return (Rational_function_pair(it->second,is_opposite)); - } - else //element does not exist, - { - //first check if to clean up cache - if (_rat_pair_map.size() > _rat_pair_map_watermark) - rat_pair_map_clean_up(); - - //create it & insert to cache - Rational_function_canonicalized_pair p(f, g, _ak_ptr); - std::pair res = - _rat_pair_map.insert(std::make_pair(key,p)); - return (Rational_function_pair(res.first->second,is_opposite)); - } - } - - void cleanup() const - { - rat_pair_map_clean_up(); - rat_func_map_clean_up(); - } -private: - Rational_function_key get_key(const Polynomial_1& numer, - const Polynomial_1& denom) const - { - return Rational_function_key(numer, denom); - } - - Rational_function_key get_key(const Rational_function& f) const - { - return get_key(f.numer(), f.denom()); - } - - Rational_function_canonicalized_pair_key - get_key(const Rational_function& f, const Rational_function& g) const - { - return (f.id() < g.id()) ? - Rational_function_canonicalized_pair_key( f.id(),g.id() ): - Rational_function_canonicalized_pair_key( g.id(),f.id() ); - - } - - void rat_func_map_clean_up() const - { - - //find eraseable rational functions - std::vector eraseable; - typename Rational_function_map::iterator iter1; - for ( iter1 = _rat_func_map.begin(); - iter1 != _rat_func_map.end(); - ++iter1) - { - if (iter1->second.is_shared() == false) - eraseable.push_back(iter1->first); - } - - //erase functions - typename std::vector::iterator iter2; - for ( iter2 = eraseable.begin(); - iter2 != eraseable.end(); - ++iter2) - { - _rat_func_map.erase(*iter2); - } - - //re-set watermark - _rat_func_map_watermark = (std::max)( - 2*_rat_func_map.size(), - typename Rational_function_map::size_type(128)); - - return; - } - void rat_pair_map_clean_up() const - { - //find eraseable rational functions - std::vector eraseable; - typename Rational_function_canonicalized_pair_map::iterator iter1; - for ( iter1 = _rat_pair_map.begin(); - iter1 != _rat_pair_map.end(); - ++iter1) - { - if (iter1->second.is_shared() == false) - eraseable.push_back(iter1->first); - } - - //erase functions - typename std::vector::iterator iter2; - for ( iter2 = eraseable.begin(); - iter2 != eraseable.end(); - ++iter2) - { - _rat_pair_map.erase(*iter2); - } - - //re-set watermark - _rat_pair_map_watermark = - (std::max)(2*_rat_pair_map.size(), - typename Rational_function_canonicalized_pair_map::size_type(128)); - } - -private: - mutable Rational_function_map _rat_func_map; - mutable unsigned int _rat_func_map_watermark; - mutable Rational_function_canonicalized_pair_map _rat_pair_map; - mutable unsigned int _rat_pair_map_watermark; - mutable Algebraic_kernel_d_1* _ak_ptr; -}; //Cache - -} //namespace Arr_rational_arc -} //namespace CGAL { -#endif //CGAL_RATIONAL_ARC_CACHE diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h deleted file mode 100644 index 4cc3b0a5801..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ /dev/null @@ -1,2667 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_RATIONAL_ARC_D_1_H -#define CGAL_RATIONAL_ARC_D_1_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -namespace CGAL { -namespace Arr_rational_arc { - -//--------------------------------------------------------------------------// -// class Base_rational_arc_d_1 -//Representation of an segment of a rational function, given as: -// -// Numerator(x) -// y = ------------- x_l <= x <= x_r -// Denominator(x) -// -// where Numerator and Denominator are polynomial with integer (or rational) coefficients. -// The class is templated with two parameters: -// Algebraic_kernel: An algebraic kernel for the intersection points of the curves -// -// This class serves as the base for the classes: -// Rational_arc_d_1 (a general, not necessarily continuous arc) -// Continuous_rational_arc_d_1 (a continuous portion of a rational function). -//--------------------------------------------------------------------------// - -template -class Base_rational_arc_d_1 -{ -public: - typedef Algebraic_kernel_ Algebraic_kernel; - typedef Base_rational_arc_d_1 Self; - - typedef CGAL::Arr_rational_arc::Base_rational_arc_ds_1 - Base_rational_arc_ds_1; - typedef CGAL::Arr_rational_arc::Rational_function - Rational_function; - typedef CGAL::Arr_rational_arc::Rational_function_pair - Rational_function_pair; - typedef CGAL::Arr_rational_arc::Algebraic_point_2 - Algebraic_point_2; - typedef CGAL::Arr_rational_arc::Vertical_segment_d_1 - Vertical_segment_d_1; - typedef CGAL::Arr_rational_arc::Cache Cache; - - typedef typename Base_rational_arc_ds_1::Multiplicity Multiplicity; - typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; - typedef typename Base_rational_arc_ds_1::Coefficient Coefficient; - typedef typename Base_rational_arc_ds_1::Arithmetic_kernel - Arithmetic_kernel; - typedef typename Base_rational_arc_ds_1::Rational Rational; - typedef typename Base_rational_arc_ds_1::Integer Integer; - typedef typename Base_rational_arc_ds_1::Algebraic_real_1 Algebraic_real_1; - typedef typename Base_rational_arc_ds_1::Algebraic_vector Algebraic_vector; - typedef typename Base_rational_arc_ds_1::Multiplicity_vector - Multiplicity_vector; - - typedef std::vector Rat_vector; - - typedef Polynomial_traits_d Polynomial_traits_1; - typedef typename Base_rational_arc_ds_1::FT_rat_1 FT_rat_1; - typedef typename Base_rational_arc_ds_1::Solve_1 Solve_1; - typedef typename Algebraic_kernel::Bound Bound; - typedef Algebraic_structure_traits AT_poly; - - typedef Polynomial Poly_rat_1; - typedef Polynomial_traits_d PT_rat_1; - typedef Fraction_traits FT_poly_rat_1; - - typedef Algebraic_point_2 Point_2; - - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - -public: - const Rational_function& get_rational_function(const Polynomial_1& numerator, - const Polynomial_1& denominator, - const Cache& cache) const - { - return cache.get_rational_function(numerator, denominator); - } - const Rational_function& get_rational_function(const Rational& rat, - const Cache& cache) const - { - return cache.get_rational_function(rat); - } - const Rational_function_pair get_rational_pair(const Rational_function& f, - const Rational_function& g, - const Cache& cache) const - { - CGAL_precondition(f.id() != g.id()); - return cache.get_rational_pair(f, g); - } - -public: - //------------------------------ - //Base_rational_arc_d_1 members - //------------------------------ - enum - { - SRC_AT_X_MINUS_INFTY = 1, - SRC_AT_X_PLUS_INFTY = 2, - SRC_AT_Y_MINUS_INFTY = 4, - SRC_AT_Y_PLUS_INFTY = 8, - - SRC_INFO_BITS = SRC_AT_X_MINUS_INFTY + SRC_AT_X_PLUS_INFTY + - SRC_AT_Y_MINUS_INFTY + SRC_AT_Y_PLUS_INFTY, - - TRG_AT_X_MINUS_INFTY = 16, - TRG_AT_X_PLUS_INFTY = 32, - TRG_AT_Y_MINUS_INFTY = 64, - TRG_AT_Y_PLUS_INFTY = 128, - - TRG_INFO_BITS = TRG_AT_X_MINUS_INFTY + TRG_AT_X_PLUS_INFTY + - TRG_AT_Y_MINUS_INFTY + TRG_AT_Y_PLUS_INFTY, - - IS_DIRECTED_RIGHT = 256, - IS_CONTINUOUS = 512, - IS_VALID = 1024 - }; - - Rational_function _f; // The rational function - Algebraic_point_2 _ps; // The source point. - Algebraic_point_2 _pt; // The target point. - int _info; // A set of Boolean flags. - -public: - //------------ - //Constructors - //------------ - - //--------------------------------------------------------------------------- - //default constructor - Base_rational_arc_d_1() : - _info(0) - {} - - //--------------------------------------------------------------------------- - // Constructor of a whole polynomial curve defined by pcoeffs - the rational - // coefficients of the polynomial p(x). - - Base_rational_arc_d_1(const Polynomial_1& P, const Cache& cache) : - _info(0) - { - _init(P, Integer(1), cache); - } - - Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) : - _info(0) - { - // Set the numerator & denominator polynomials. - Polynomial_1 _numer; - Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(), - pcoeffs.end())); - Integer denom_int; - typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int); - - _init(_numer,denom_int,cache); - } - - void _init(const Polynomial_1& P,const Integer& Q_int,const Cache& cache) - { - CGAL_precondition(!CGAL::is_zero(Q_int)); - //set rational function - Polynomial_1 Q= typename Polynomial_traits_1::Construct_polynomial()(Q_int); - _f = get_rational_function(P, Q, cache); - - //Mark that the endpoints of the polynomial are unbounded - //(the source is at x = -oo and the target is at x = +oo). - _info = (_info | SRC_AT_X_MINUS_INFTY); - _info = (_info | TRG_AT_X_PLUS_INFTY); - _info = (_info | IS_DIRECTED_RIGHT); - - // Check whether the end points lie at y = -oo or at y = +oo. - const int deg_num(CGAL::degree(P)); - Integer lead_coeff(CGAL::leading_coefficient(Q)); - CGAL::Sign lead_sign(CGAL::sign(lead_coeff)); - - if (deg_num > 0) - { - // Check if the degree is even or odd and check the sign of the leading - // coefficient of the polynomial. - - CGAL_assertion(lead_sign != CGAL::ZERO); - - if (deg_num % 2 == 0) - { - // Polynomial of an even degree. - if (lead_sign == CGAL::NEGATIVE) - _info = (_info | SRC_AT_Y_MINUS_INFTY | TRG_AT_Y_MINUS_INFTY); - else - _info = (_info | SRC_AT_Y_PLUS_INFTY | TRG_AT_Y_PLUS_INFTY); - } - else - { - // Polynomial of an odd degree. - if (lead_sign == CGAL::NEGATIVE) - _info = (_info | SRC_AT_Y_PLUS_INFTY | TRG_AT_Y_MINUS_INFTY); - else - _info = (_info | SRC_AT_Y_MINUS_INFTY | TRG_AT_Y_PLUS_INFTY); - } - } - else - { - // In the case of a constant polynomial it is possible to set a finite - // y-coordinate for the source and target points. - //x coordinate is 0 although in practice is +-oo - _ps = Algebraic_point_2(_f,Algebraic_real_1()); - //x coordinate is 0 although in practice is +-oo - _pt = Algebraic_point_2(_f,Algebraic_real_1()); - } - - // Mark that the arc is continuous and valid. - _info = (_info | IS_CONTINUOUS); - _info = (_info | IS_VALID); - - } - - //--------------------------------------------------------------------------- - //Constructor of 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). - //param x_s The x-coordinate of the source point. - //param dir_right Is the ray directed to the right (to +oo) or to the left - //(to -oo). - - Base_rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s, - bool dir_right, const Cache& cache) : - _info(0) - { - _init(P, Polynomial_1(1), x_s, dir_right, cache); - } - - Base_rational_arc_d_1(const Rat_vector& pcoeffs,const Algebraic_real_1& x_s, - bool dir_right, const Cache& cache) : - _info(0) - { - // Set the numerator & denominator polynomials. - Polynomial_1 _numer; - Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(), - pcoeffs.end())); - Integer denom_int; - typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int); - - _init(_numer, denom_int, x_s, dir_right, cache); - } - - void _init(const Polynomial_1& P,const Integer& Q_int, - const Algebraic_real_1& x_s, bool dir_right,const Cache& cache) - { - CGAL_precondition(!CGAL::is_zero(Q_int)); - //set rational function - Polynomial_1 Q = typename Polynomial_traits_1::Construct_polynomial()(Q_int); - _f = get_rational_function(P,Q,cache); - - // Mark that the target points of the polynomial is unbounded. - if (dir_right) - { - _info = (_info | TRG_AT_X_PLUS_INFTY); - _info = (_info | IS_DIRECTED_RIGHT); - } - else - { - _info = (_info | TRG_AT_X_MINUS_INFTY); - } - - // Set the source point. - _ps=Algebraic_point_2(_f,x_s); - - // Check whether the target point lies at y = -oo or at y = +oo. - const int deg_num(CGAL::degree(P)); - Integer lead_coeff(CGAL::leading_coefficient(P)); - CGAL::Sign lead_sign(CGAL::sign(lead_coeff)); - - if (deg_num > 0) - { - //Check if the degree is even or odd and check the sign of the leading - // coefficient of the polynomial. - CGAL_assertion(lead_sign != CGAL::ZERO); - - if (dir_right) - { - // The target is at x= +oo, thus: - if (lead_sign == CGAL::POSITIVE) - _info = (_info | TRG_AT_Y_PLUS_INFTY); - else - _info = (_info | TRG_AT_Y_MINUS_INFTY); - } - else - { - // The target is at x= -oo, thus: - if ((deg_num % 2 == 0 && lead_sign == CGAL::POSITIVE) || - (deg_num % 2 == 1 && lead_sign == CGAL::NEGATIVE)) - _info = (_info | TRG_AT_Y_PLUS_INFTY); - else - _info = (_info | TRG_AT_Y_MINUS_INFTY); - } - } - else - { - // In the case of a constant polynomial it is possible to set a finite - // y-coordinate for the target point. - // x coordinate is 0 although in practice is +-oo - _pt = Algebraic_point_2(get_rational_function(P, Q, cache), - Algebraic_real_1()); - } - - // Mark that the arc is continuous and valid. - _info = (_info | IS_CONTINUOUS); - _info = (_info | IS_VALID); - } - - //--------------------------------------------------------------------------- - //Constructor of a polynomial arc, defined by y = p(x), x_min <= x <= x_max. - //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). - //param x_s The x-coordinate of the source point. - //param x_t The x-coordinate of the target point. - //precondition: The two x-coordinates must not be equal. - Base_rational_arc_d_1(const Polynomial_1& P, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t, - const Cache& cache): - _info(0) - { - _init(P,Integer(1), x_s, x_t, cache); - } - Base_rational_arc_d_1(const Rat_vector& pcoeffs, - const Algebraic_real_1& x_s,const Algebraic_real_1& x_t, - const Cache& cache): - _info(0) - { - // Set the numerator & denominator polynomials. - Polynomial_1 _numer; - Poly_rat_1 num_rat(typename PT_rat_1::Construct_polynomial()(pcoeffs.begin(), - pcoeffs.end())); - Integer denom_int; - typename FT_poly_rat_1::Decompose()(num_rat, _numer, denom_int); - - _init(_numer, denom_int, x_s, x_t, cache); - } - - void _init(const Polynomial_1& P,const Integer& Q_int, - const Algebraic_real_1& x_s,const Algebraic_real_1& x_t, - const Cache& cache) - { - CGAL_precondition(!CGAL::is_zero(Q_int)); - //set rational function - Polynomial_1 Q = typename Polynomial_traits_1::Construct_polynomial()(Q_int); - _f = get_rational_function(P, Q, cache); - - // Compare the x-coordinates and determine the direction. - Comparison_result x_res = CGAL::compare(x_s, x_t); - - CGAL_precondition(x_res != EQUAL); - - if (x_res == SMALLER) - _info = (_info | IS_DIRECTED_RIGHT); - - // Set the endpoints. - _ps=Algebraic_point_2(_f,x_s); - _pt=Algebraic_point_2(_f,x_t); - - // Mark that the arc is continuous and valid. - _info = (_info | IS_CONTINUOUS); - _info = (_info | IS_VALID); - return; - } - - //--------------------------------------------------------------------------- - //Constructor of 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). - Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q, - const Cache& cache) : - _info(0) - { - _init(P,Q,cache); - } - - Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Cache& cache) : - _info(0) - { - Polynomial_1 _numer; - Polynomial_1 _denom; - Poly_rat_1 numer_rat(typename - PT_rat_1::Construct_polynomial()(pcoeffs.begin(), - pcoeffs.end())); - Poly_rat_1 denom_rat(typename - PT_rat_1::Construct_polynomial()(qcoeffs.begin(), - qcoeffs.end())); - Integer denom_numer_int,denom_denom_int; - typename FT_poly_rat_1::Decompose()(numer_rat, _numer, denom_numer_int); - typename FT_poly_rat_1::Decompose()(denom_rat, _denom, denom_denom_int); - _numer *= denom_denom_int; - _denom *= denom_numer_int; - - _init(_numer,_denom,cache); - } - void _init(const Polynomial_1& _P, const Polynomial_1& _Q, const Cache& cache) - { - CGAL_precondition(!CGAL::is_zero(_Q)); - //set rational function - // Set the numerator & denominator polynomials. - - Polynomial_1 P; - Polynomial_1 Q; - _canonicalize(_P, _Q, P, Q); - - _f = get_rational_function(P, Q, cache); - - // Mark that the endpoints of the rational functions are unbounded (the - // source is at x = -oo and the target is at x = +oo). - _info = (_info | SRC_AT_X_MINUS_INFTY); - _info = (_info | TRG_AT_X_PLUS_INFTY); - _info = (_info | IS_DIRECTED_RIGHT); - - - // Analyze the bahaviour of the rational function at x = -oo (the source). - Algebraic_real_1 y0; - const Arr_parameter_space inf_s = _analyze_at_minus_infinity(P, Q, y0); - - if (inf_s == ARR_BOTTOM_BOUNDARY) - _info = (_info | SRC_AT_Y_MINUS_INFTY); - else if (inf_s == ARR_TOP_BOUNDARY) - _info = (_info | SRC_AT_Y_PLUS_INFTY); - else // if (inf_s == ARR_INTERIOR) - _ps = Algebraic_point_2(); //the point is a dummy - //Analyze the bahaviour of the rational function at x = +oo (the target). - const Arr_parameter_space inf_t = _analyze_at_plus_infinity(P, Q, y0); - - if (inf_t == ARR_BOTTOM_BOUNDARY) - _info = (_info | TRG_AT_Y_MINUS_INFTY); - else if (inf_t == ARR_TOP_BOUNDARY) - _info = (_info | TRG_AT_Y_PLUS_INFTY); - else // if (inf_t == ARR_INTERIOR) - _pt = Algebraic_point_2(); //the point is a dummy - - // Mark that the arc is valid. As it may have poles, we mark it - // as continuous only if the denominator has no roots. - _info = ( _info | ( this->_is_continuous() ? - (IS_CONTINUOUS | IS_VALID) : IS_VALID ) ); - } - - //--------------------------------------------------------------------------- - //Constructor of 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 the ray is directed to the left. - //param pcoeffs The rational coefficients of the polynomial p(x). - //param qcoeffs The rational coefficients of the polynomial q(x). - //param x_s The x-coordinate of the source point. - //param dir_right Is the ray directed to the right (to +oo) or to the left - //(to -oo). - Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q, - const Algebraic_real_1& x_s, bool dir_right, - const Cache& cache) : - _info(0) - { - _init(P, Q, x_s, dir_right, cache); - } - Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, bool dir_right, - const Cache& cache) : - _info(0) - { - // Set the numerator and denominator polynomials. - Polynomial_1 _numer; - Polynomial_1 _denom; - Poly_rat_1 numer_rat(typename - PT_rat_1::Construct_polynomial()(pcoeffs.begin(), - pcoeffs.end())); - Poly_rat_1 denom_rat(typename - PT_rat_1::Construct_polynomial()(qcoeffs.begin(), - qcoeffs.end())); - Integer denom_numer_int,denom_denom_int; - typename FT_poly_rat_1::Decompose()(numer_rat, _numer, denom_numer_int); - typename FT_poly_rat_1::Decompose()(denom_rat, _denom, denom_denom_int); - _numer *= denom_denom_int; - _denom *= denom_numer_int; - - _init(_numer,_denom, x_s, dir_right, cache); - } - - void _init(const Polynomial_1& _P, const Polynomial_1& _Q, - const Algebraic_real_1& x_s, bool dir_right, - const Cache& cache) - { - CGAL_precondition(!CGAL::is_zero(_Q)); - //set rational function - Polynomial_1 P; - Polynomial_1 Q; - _canonicalize(_P,_Q,P,Q); - _f = get_rational_function(P, Q, cache); - - // Mark that the target points of the polynomial is unbounded. - if (dir_right) - { - _info = (_info | TRG_AT_X_PLUS_INFTY); - _info = (_info | IS_DIRECTED_RIGHT); - } - else - { - _info = (_info | TRG_AT_X_MINUS_INFTY); - } - - - //The source point has a bounded x-coordinate. - _ps = Algebraic_point_2(_f, x_s); - //check if the source point lies next to a pole. - if (typename Algebraic_kernel::Sign_at_1()(Q, x_s) != CGAL::ZERO) - { - // We have a nomral endpoint. - //nothing to do.... - } - else - { - // The y-coodinate is unbounded, but we can set its sign. - std::pair signs = _analyze_near_pole(x_s); - const CGAL::Sign sign_s = (dir_right ? signs.second : signs.first); - - _info = (sign_s == CGAL::NEGATIVE) ? - (_info | SRC_AT_Y_MINUS_INFTY) : (_info | SRC_AT_Y_PLUS_INFTY); - } - - // Set the properties of the target. - Algebraic_real_1 y0; - Arr_parameter_space inf_t; - if (dir_right) - { - // The target point is at x = +oo. - inf_t=_analyze_at_plus_infinity(P, Q, y0); - } - else - { - // The target point is at x = -oo. - inf_t =_analyze_at_minus_infinity(P, Q, y0); - } - - if (inf_t == ARR_BOTTOM_BOUNDARY) - _info = (_info | TRG_AT_Y_MINUS_INFTY); - else if (inf_t == ARR_TOP_BOUNDARY) - _info = (_info | TRG_AT_Y_PLUS_INFTY); - else // if (inf_t == ARR_INTERIOR) - _pt = Algebraic_point_2( ); //the point is a dummy - - // Mark that the arc is valid. As it may have poles, we mark it - // as continuous only if the denominator has no roots. - _info = ( _info | ( this->_is_continuous() ? - (IS_CONTINUOUS | IS_VALID) : IS_VALID ) ); - } - //--------------------------------------------------------------------------- - //Constructor of a ray of a rational function, 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). - //param x_s The x-coordinate of the source point. - //param x_t The x-coordinate of the target point. - //precondition: The two x-coordinates must not be equal. - Base_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t, - const Cache& cache): - _info(0) - { - _init(P, Q, x_s, x_t, cache); - } - - Base_rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t, - const Cache& cache): - _info(0) - { - Polynomial_1 _numer; - Polynomial_1 _denom; - Poly_rat_1 numer_rat(typename - PT_rat_1::Construct_polynomial()(pcoeffs.begin(), - pcoeffs.end())); - Poly_rat_1 denom_rat(typename - PT_rat_1::Construct_polynomial()(qcoeffs.begin(), - qcoeffs.end())); - Integer denom_numer_int,denom_denom_int; - typename FT_poly_rat_1::Decompose()(numer_rat,_numer,denom_numer_int); - typename FT_poly_rat_1::Decompose()(denom_rat,_denom,denom_denom_int); - _numer *= denom_denom_int; - _denom *= denom_numer_int; - - _init(_numer,_denom,x_s,x_t,cache); - } - - void _init(const Polynomial_1& _P, const Polynomial_1& _Q, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t, - const Cache& cache) - { - CGAL_precondition(!CGAL::is_zero(_Q)); - //set rational function - Polynomial_1 P; - Polynomial_1 Q; - _canonicalize(_P, _Q, P, Q); - _f = get_rational_function(P, Q, cache); - - // Compare the x-coordinates and determine the direction. - Comparison_result x_res = CGAL::compare(x_s, x_t); - CGAL_precondition(x_res != EQUAL); - - if (x_res == SMALLER) - _info = (_info | IS_DIRECTED_RIGHT); - - //Set the source point and check if it lies next to a pole. - _ps = Algebraic_point_2(_f, x_s); - - //check if source point lies next to a pole. - if (typename Algebraic_kernel::Sign_at_1()(Q,x_s) != CGAL::ZERO) - { - // We have a nomral endpoint. - //nothing to do .. - } - else - { - // The y-coodinate is unbounded, but we can set its sign. - std::pair signs = _analyze_near_pole(x_s); - const CGAL::Sign sign_s = - ((_info & IS_DIRECTED_RIGHT) != 0) ? signs.second : signs.first; - - if (sign_s == CGAL::NEGATIVE) - _info = (_info | SRC_AT_Y_MINUS_INFTY); - else - _info = (_info | SRC_AT_Y_PLUS_INFTY); - } - - //Set the target point and check if it lies next to a pole. - _pt=Algebraic_point_2(_f,x_t); - - //check if target point lies next to a pole. - if (typename Algebraic_kernel::Sign_at_1()(Q,x_t) != CGAL::ZERO) - { - // We have a nomral endpoint. - //nothing to do .. - } - else - { - // The y-coodinate is unbounded, but we can set its sign. - std::pair signs = _analyze_near_pole(x_t); - const CGAL::Sign sign_t = - ((_info & IS_DIRECTED_RIGHT) != 0) ? signs.first : signs.second; - - if (sign_t == CGAL::NEGATIVE) - _info = (_info | TRG_AT_Y_MINUS_INFTY); - else - _info = (_info | TRG_AT_Y_PLUS_INFTY); - } - - //Mark that the arc is valid. As it may have poles, we mark it - //as continuous only if the denominator has no roots. - _info = ( _info | ( this->_is_continuous() ? - (IS_CONTINUOUS | IS_VALID) : IS_VALID ) ); - - } - - //----------------------------- - // Accessing the arc properties - //----------------------------- - - //----------------------------------------------------------------- - //Get the numerator polynomial of the underlying rational function. - const Polynomial_1& numerator() const - { - return(_f.numer()); - } - - //------------------------------------------------------------------ - //Get the denominator polynomial of the underlying rational function - const Polynomial_1& denominator() const - { - return(_f.denom()); - } - - //--------------------------------------------------------- - //Check if the x-coordinate of the source point is infinite - Arr_parameter_space source_parameter_space_in_x() const - { - return - ((_info & SRC_AT_X_MINUS_INFTY) != 0) ? ARR_LEFT_BOUNDARY : - ((_info & SRC_AT_X_PLUS_INFTY) != 0) ? ARR_RIGHT_BOUNDARY : - ARR_INTERIOR; - } - - //--------------------------------------------------------- - //Check if the y-coordinate of the source point is infinite - Arr_parameter_space source_parameter_space_in_y() const - { - return - ((_info & SRC_AT_Y_MINUS_INFTY) != 0) ? ARR_BOTTOM_BOUNDARY : - ((_info & SRC_AT_Y_PLUS_INFTY) != 0) ? ARR_TOP_BOUNDARY : - ARR_INTERIOR; - } - - //--------------------------------------------------------- - //Check if the x-coordinate of the target point is infinite - Arr_parameter_space target_boundary_in_x() const - { - return - ((_info & TRG_AT_X_MINUS_INFTY) != 0) ? ARR_LEFT_BOUNDARY : - ((_info & TRG_AT_X_PLUS_INFTY) != 0) ? ARR_RIGHT_BOUNDARY : - ARR_INTERIOR; - } - - //--------------------------------------------------------- - //Check if the y-coordinate of the target point is infinite - Arr_parameter_space target_boundary_in_y() const - { - return ((_info & TRG_AT_Y_MINUS_INFTY) != 0) ? ARR_BOTTOM_BOUNDARY : - ((_info & TRG_AT_Y_PLUS_INFTY) != 0) ? ARR_TOP_BOUNDARY : - ARR_INTERIOR; - } - - //-------------------- - //Get the source point - const Algebraic_point_2& source() const - { - CGAL_precondition((_info & IS_VALID) != 0 && - source_parameter_space_in_x() == ARR_INTERIOR && - source_parameter_space_in_y() == ARR_INTERIOR); - return (_ps); - } - - //---------------------------------------- - //Get the x-coordinate of the source point - Algebraic_real_1 source_x() const - { - CGAL_precondition((_info & IS_VALID) != 0 && - source_parameter_space_in_x() == ARR_INTERIOR); - return (_ps.x()); - } - - //---------------------------------------- - //Get the y-coordinate of the source point - //TODO: should we eliminate the function??? - //Algebraic source_y () const - //{ - // CGAL_precondition ((_info & IS_VALID) != 0 && - // source_parameter_space_in_y() == ARR_INTERIOR); - // return (_ps.y()); - //} - - //-------------------- - //Get the target point - const Algebraic_point_2& target() const - { - CGAL_precondition((_info & IS_VALID) != 0 && - target_boundary_in_x() == ARR_INTERIOR && - target_boundary_in_y() == ARR_INTERIOR); - return (_pt); - } - - //---------------------------------------- - //Get the x-coordinate of the target point - Algebraic_real_1 target_x() const - { - CGAL_precondition((_info & IS_VALID) != 0 && - target_boundary_in_x() == ARR_INTERIOR); - return (_pt.x()); - } - - //---------------------------------------- - //Get the y-coordinate of the target point - //TODO: should we eliminate the function??? - //Algebraic target_y () const - //{ - // CGAL_precondition ((_info & IS_VALID) != 0 && - // target_boundary_in_y() == ARR_INTERIOR); - // return (_pt.y()); - //} - - //------------------------------------------------------- - //Check if the x-coordinate of the left point is infinite - Arr_parameter_space left_parameter_space_in_x() const - { - return ((_info & IS_DIRECTED_RIGHT) != 0) ? - source_parameter_space_in_x() : target_boundary_in_x(); - } - - //------------------------------------------------------- - //Check if the y-coordinate of the left point is infinite - Arr_parameter_space left_parameter_space_in_y() const - { - return ((_info & IS_DIRECTED_RIGHT) != 0) ? - source_parameter_space_in_y() : target_boundary_in_y(); - } - //-------------------------------------------------------- - //Check if the x-coordinate of the right point is infinite - Arr_parameter_space right_parameter_space_in_x() const - { - return ((_info & IS_DIRECTED_RIGHT) != 0) ? - target_boundary_in_x() : source_parameter_space_in_x(); - } - - //-------------------------------------------------------- - //Check if the y-coordinate of the right point is infinite - Arr_parameter_space right_parameter_space_in_y() const - { - return ((_info & IS_DIRECTED_RIGHT) != 0) ? - target_boundary_in_y() : source_parameter_space_in_y(); - } - - //------------------------------------ - //Get the x_value of the left endpoint - const Algebraic_real_1& left_x() const - { - CGAL_precondition(left_parameter_space_in_x() == ARR_INTERIOR); - return ((_info & IS_DIRECTED_RIGHT) ? _ps.x() : _pt.x()); - } - - //------------------------------------ - //Get the x_value of the right endpoint - const Algebraic_real_1& right_x() const - { - CGAL_precondition((_info & IS_VALID) != 0 && - right_parameter_space_in_x() == ARR_INTERIOR ); - return ((_info & IS_DIRECTED_RIGHT) ? _pt.x() : _ps.x()); - } - //--------------------- - //Get the left endpoint - const Algebraic_point_2& left() const - { - CGAL_precondition(left_parameter_space_in_x() == ARR_INTERIOR && - left_parameter_space_in_y() == ARR_INTERIOR); - return ((_info & IS_DIRECTED_RIGHT) ? _ps : _pt); - } - - //---------------------- - //Get the right endpoint - const Algebraic_point_2& right() const - { - CGAL_precondition(right_parameter_space_in_x() == ARR_INTERIOR && - right_parameter_space_in_y() == ARR_INTERIOR); - return ((_info & IS_DIRECTED_RIGHT) ? _pt : _ps); - } - - //------------------------- - //Check if the arc is valid - bool is_valid() const - { - return ((_info & IS_VALID) != 0); - } - - //------------------------------ - //Check if the arc is continuous - bool is_continuous() const - { - return ((_info & IS_CONTINUOUS) != 0); - } - - //---------------------------------- - //Check if the arc is directed right - bool is_directed_right() const - { - return ((_info & IS_DIRECTED_RIGHT) != 0); - } - - //-------------- - //name Modifiers - //--------------- - - //-------------------------------- - //Mark the arc as being continuous - void set_continuous() - { - _info = (_info | IS_CONTINUOUS); - } - - //----------------------------- - //Mark the arc as being invalid - void set_invalid() - { - _info = (_info & ~IS_VALID); - } - -// bool is_intersecting(Self& arc) -// { -// Arr_parameter_space left_parameter_space = ( (left_parameter_space_in_x()!= ARR_INTERIOR) &&(arc.left_parameter_space_in_x() != ARR_INTERIOR) ) ? -// ARR_LEFT_BOUNDARY : -// ARR_INTERIOR; -// Arr_parameter_space right_parameter_space = ( (right_parameter_space_in_x()!= ARR_INTERIOR) &&(arc.right_parameter_space_in_x()!= ARR_INTERIOR) ) ? -// ARR_RIGHT_BOUNDARY : -// ARR_INTERIOR; -// Algebraic_real_1 left,right; -// if (left_parameter_space == ARR_INTERIOR) -// left = -// (left_parameter_space_in_x()!= ARR_INTERIOR) ? arc.left_x(): -// (arc.left_parameter_space_in_x()!= ARR_INTERIOR) ? left_x() : -// (arc.left_x() < left_x()) ? left_x() : -// arc.left_x(); -// if (right_parameter_space == ARR_INTERIOR) -// right = (right_parameter_space_in_x()!= ARR_INTERIOR) ? arc.right_x(): -// (arc.right_parameter_space_in_x()!= ARR_INTERIOR) ? right_x() : -// (arc.right_x() < right_x()) ? right_x() : -// arc.right_x(); -// if (left > right) -// return false; - -// //check if the base functions are equal -// if (_has_same_base (arc)) -// return true; -// Rational_function_pair rat_pair = get_rational_pair(get_rational_function(this->_numer,this->_denom), -// get_rational_function(arc._numer,arc._denom)); -// return rat_pair.is_intersecting_in_range(left_parameter_space,left,right_parameter_space,right); -// } - - //-------------------------------------------------------- - //Split 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. - //precondition x0 lies in the interior of the arc. - //return The sub-arc to the left of the pole. - - Self split_at_pole(const Algebraic_real_1& x0) - { - // Analyze the behaviour of the function near the given pole. - const std::pair signs = _analyze_near_pole(x0); - const CGAL::Sign sign_left = signs.first; - const CGAL::Sign sign_right = signs.second; - - // Create a fictitious point that represents the x-coordinate of the pole. - Algebraic_point_2 p0(_f, x0); - - // Make a copy of the current arc. - Self c1 = *this; - - // Split the arc, such that c1 lies to the left of the pole and (*this) - // to its right. - if ((_info & IS_DIRECTED_RIGHT) != 0) - { - c1._pt = p0; - c1._info = (c1._info & ~TRG_INFO_BITS); - if (sign_left == CGAL::NEGATIVE) - c1._info = (c1._info | TRG_AT_Y_MINUS_INFTY); - else - c1._info = (c1._info | TRG_AT_Y_PLUS_INFTY); - - this->_ps = p0; - this->_info = (this->_info & ~SRC_INFO_BITS); - if (sign_right == CGAL::NEGATIVE) - this->_info = (this->_info | SRC_AT_Y_MINUS_INFTY); - else - this->_info = (this->_info | SRC_AT_Y_PLUS_INFTY); - } - else - { - c1._ps = p0; - c1._info = (c1._info & ~SRC_INFO_BITS); - if (sign_left == CGAL::NEGATIVE) - c1._info = (c1._info | SRC_AT_Y_MINUS_INFTY); - else - c1._info = (c1._info | SRC_AT_Y_PLUS_INFTY); - - this->_pt = p0; - this->_info = (this->_info & ~TRG_INFO_BITS); - if (sign_right == CGAL::NEGATIVE) - this->_info = (this->_info | TRG_AT_Y_MINUS_INFTY); - else - this->_info = (this->_info | TRG_AT_Y_PLUS_INFTY); - } - - // Mark the sub-arc c1 as continuous. - c1._info = (c1._info | IS_CONTINUOUS); - - return (c1); - } - - //--------------- - //name Predicates - //--------------- - - - //--------------------------------------------------------------------------- - //Get the relative position of the point with respect to the rational arc. - //param p The query point. - //precondition: p is in the x-range of the arc. - // both p's supporting curve and the rational arc are continous - //return SMALLER if the point is below the arc; - // LARGER if the point is above the arc; - // EQUAL if p lies on the arc. - Comparison_result point_position(const Algebraic_point_2& p, - const Cache& cache) const - { - // Make sure that p is in the x-range of the arc and check whether it - // has the same x-coordinate as one of the endpoints. - CGAL_precondition(is_continuous()); - CGAL_precondition(_is_in_true_x_range(p.x())); - if (p.rational_function() == _f) - return EQUAL; - Rational_function_pair rat_pair(get_rational_pair(p.rational_function(), _f, - cache)); - return rat_pair.compare_f_g_at(p.x()); - } - //--------------------------------------------------------------------------- - //Compare the x-coordinate of a vertical asymptote of the arc - //(one of its ends) and the given point. - Comparison_result compare_end(Arr_curve_end ce, - const Algebraic_point_2& p) const - { - Algebraic_real_1 x0; - - if (ce == ARR_MIN_END) { - CGAL_assertion(left_parameter_space_in_x() == ARR_INTERIOR && - left_parameter_space_in_y() != ARR_INTERIOR); - if ((_info & IS_DIRECTED_RIGHT) != 0) - x0 = _ps.x(); - else - x0 = _pt.x(); - } - else - { - CGAL_assertion(right_parameter_space_in_x() == ARR_INTERIOR && - right_parameter_space_in_y() != ARR_INTERIOR); - if ((_info & IS_DIRECTED_RIGHT) != 0) - x0 = _pt.x(); - else - x0 = _ps.x(); - } - - // Compare the x-coordinates. - const Comparison_result res = CGAL::compare(x0, p.x()); - - if (res != EQUAL) - return (res); - - return ((ce == ARR_MIN_END) ? LARGER : SMALLER); - } - - //------------------------------------------------------------------ - //Compare the x-coordinate of a vertical asymptotes of the two arcs. - //approaching from the same direction - Comparison_result compare_near_end(const Self& arc, Arr_curve_end ce, - const Cache& cache) const - { - CGAL_precondition_code( - if (ce == ARR_MIN_END) - { - CGAL_precondition(this->left_parameter_space_in_y() != ARR_INTERIOR); - CGAL_precondition(arc.left_parameter_space_in_y() != ARR_INTERIOR); - CGAL_precondition(this->left_parameter_space_in_y() == - arc.left_parameter_space_in_y()); - } - else // (ce == ARR_MAX_END) - { - CGAL_precondition(this->right_parameter_space_in_y() != ARR_INTERIOR); - CGAL_precondition(arc.right_parameter_space_in_y() != ARR_INTERIOR); - CGAL_precondition(this->right_parameter_space_in_y() == - arc.right_parameter_space_in_y()); - } - ); - - // Get the x-coordinates of the vertical asymptote. - Algebraic_real_1 x((ce == ARR_MIN_END)? this->left_x() : this->right_x()); - CGAL_assertion(CGAL::compare(x, (ce == ARR_MIN_END)? - arc.left_x () : arc.right_x()) == EQUAL); - - //both arcs have vertical asymptotes and come from the same side of the - //x-axis compare value of functions close to the root on the correct side - if (_has_same_base(arc)) - return CGAL::EQUAL; - Rational_function_pair rat_pair = get_rational_pair(_f,arc._f,cache); - - CGAL::Comparison_result comp_f_g_y = - rat_pair.compare_f_g_at(x,ce == ARR_MAX_END ? - CGAL::NEGATIVE : CGAL::POSITIVE); - if (ce == ARR_MAX_END) - { - return (right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ? - comp_f_g_y : -comp_f_g_y; - } - else - { - return (left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ? - -comp_f_g_y : comp_f_g_y; - } - } - - //------------------------------------------------------------------ - //Compare 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 Cache& cache) const - { - // Get the x-coordinates of the first vertical asymptote. - Algebraic_real_1 x1; - - if (ind1 == ARR_MIN_END) - { - CGAL_assertion(left_parameter_space_in_x() == ARR_INTERIOR && - left_parameter_space_in_y() != ARR_INTERIOR); - if ((_info & IS_DIRECTED_RIGHT) != 0) - x1 = _ps.x(); - else - x1 = _pt.x(); - } - else - { - CGAL_assertion(right_parameter_space_in_x() == ARR_INTERIOR && - right_parameter_space_in_y() != ARR_INTERIOR); - if ((_info & IS_DIRECTED_RIGHT) != 0) - x1 = _pt.x(); - else - x1 = _ps.x(); - } - - // Get the x-coordinates of the second vertical asymptote. - Algebraic_real_1 x2; - - if (ind2 == ARR_MIN_END) - { - CGAL_assertion(arc.left_parameter_space_in_x() == ARR_INTERIOR && - arc.left_parameter_space_in_y() != ARR_INTERIOR); - if ((arc._info & IS_DIRECTED_RIGHT) != 0) - x2 = arc._ps.x(); - else - x2 = arc._pt.x(); - } - else - { - CGAL_assertion(arc.right_parameter_space_in_x() == ARR_INTERIOR && - arc.right_parameter_space_in_y() != ARR_INTERIOR); - if ((arc._info & IS_DIRECTED_RIGHT) != 0) - x2 = arc._pt.x(); - else - x2 = arc._ps.x(); - } - - // Compare the x-coordinates. In case they are not equal we are done. - const Comparison_result res = CGAL::compare(x1, x2); - - if (res != EQUAL) - return (res); - - // If the x-coordinates of the asymptote are equal, but one arc is - // defined to the left of the vertical asymptote and the other to its - // right, we can easily determine the comparison result. - if (ind1 == ARR_MAX_END && ind2 == ARR_MIN_END) - return (SMALLER); - else if (ind1 == ARR_MIN_END && ind2 == ARR_MAX_END) - return (LARGER); - - //both arcs have vertical asymptotes and come from the same side of the x-axis - //compare value of functions close to the root on the correct side - if (_has_same_base(arc)) - return CGAL::EQUAL; - Rational_function_pair rat_pair = get_rational_pair(_f,arc._f,cache); - - CGAL::Comparison_result comp_f_g_y = - rat_pair.compare_f_g_at(x1, ind1 == ARR_MAX_END ? - CGAL::NEGATIVE : CGAL::POSITIVE); - if( ind1 == ARR_MAX_END) - { - CGAL_postcondition(ind2 == ARR_MAX_END); - CGAL_postcondition(right_parameter_space_in_y() == - arc.right_parameter_space_in_y()); - return (right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ? - comp_f_g_y : -comp_f_g_y; - } - else - { - CGAL_postcondition(ind2 == ARR_MIN_END); - CGAL_postcondition(left_parameter_space_in_y() == - arc.left_parameter_space_in_y()); - return (left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) ? - -comp_f_g_y : comp_f_g_y; - } - } - - //------------------------------------------------------------------ - // Compare the slopes of the arc with another given arc - // at their given intersection point. - // param cv The given arc. - // param p The intersection point. - // param mult Output: The mutiplicity of the intersection point. - // return SMALLER if (*this) slope is less than cv's; - // EQUAL if the two slopes are equal; - // LARGER if (*this) slope is greater than cv's. - //Comparison_result compare_slopes (const Self& arc,const Algebraic_point_2& p,unsigned int& mult) const - // - // deleted!!! - - //------------------------------------------------------------------ - // Compare the two arcs at a given intersection point - // param arc The given arc - // param p The intersection point - // param to_left to check to the left or to the right of intersection point - // precondition: Both arcs intersect at p - // return SMALLER if (*this) lies below the other arc; - // EQUAL if the two supporting functions are equal; - // LARGER if (*this) lies above the other arc. - - Comparison_result compare_at_intersection(const Self& arc, - const Algebraic_point_2& p, - bool to_left, const Cache& cache) const - { - CGAL_precondition(this->point_position(p,cache) == CGAL::EQUAL && - arc.point_position(p,cache) == CGAL::EQUAL); - - //check if the base functions are equal - if (_has_same_base(arc)) - return CGAL::EQUAL; - - Rational_function_pair rat_pair = get_rational_pair(this->_f, arc._f,cache); - return rat_pair.compare_f_g_at(p.x(), - to_left ? CGAL::SMALLER : CGAL::LARGER); - } - - //------------------------------------------------------------------ - // Compare the two arcs at x = -oo. - // param arc The given arc - // precondition: Both arcs have a left end which is unbounded in x. - // return SMALLER if (*this) lies below the other arc; - // EQUAL if the two supporting functions are equal; - // LARGER if (*this) lies above the other arc. - - Comparison_result compare_at_minus_infinity(const Self& arc, - const Cache& cache) const - { - CGAL_precondition(left_parameter_space_in_x() == ARR_LEFT_BOUNDARY && - arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY); - - //check if the base functions are equal - if (_has_same_base(arc)) - return CGAL::EQUAL; - - Rational_function_pair rat_pair = - get_rational_pair(this->_f, arc._f, cache); - return rat_pair.compare_f_g_at(ARR_LEFT_BOUNDARY); - } - - //------------------------------------------------------------------ - //Compare 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; - // EQUAL if the two supporting functions are equal; - // LARGER if (*this) lies above the other arc. - - Comparison_result compare_at_plus_infinity(const Self& arc, - const Cache& cache) const - { - CGAL_precondition(right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY && - arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY); - - //check if the base functions are equal - if (_has_same_base(arc)) - return CGAL::EQUAL; - - Rational_function_pair rat_pair = get_rational_pair(this->_f, arc._f, cache); - return rat_pair.compare_f_g_at(ARR_RIGHT_BOUNDARY); - } - - //---------------------------------------------------------- - // Check 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. - bool equals(const Self& arc) const - { - // The two arc must have the same base rational function. - CGAL_precondition(is_valid()); - CGAL_precondition(arc.is_valid()); - if (! _has_same_base(arc)) - return false; - - // Check that the arc left endpoints are the same. - Arr_parameter_space inf1 = left_parameter_space_in_x(); - Arr_parameter_space inf2 = arc.left_parameter_space_in_x(); - - if (inf1 != inf2) - return false; - - if (inf1 == ARR_INTERIOR) - { - inf1 = left_parameter_space_in_y(); - inf2 = arc.left_parameter_space_in_y(); - - if (inf1 != inf2) - return false; - } - - if (inf1 == ARR_INTERIOR && - CGAL::compare(left().x(), arc.left().x()) != EQUAL) - { - return false; - } - - // Check that the arc right endpoints are the same. - inf1 = right_parameter_space_in_x(); - inf2 = arc.right_parameter_space_in_x(); - - if (inf1 != inf2) - return false; - - if (inf1 == ARR_INTERIOR) - { - inf1 = right_parameter_space_in_y(); - inf2 = arc.right_parameter_space_in_y(); - - if (inf1 != inf2) - return false; - } - - if (inf1 == ARR_INTERIOR && - CGAL::compare(right().x(), arc.right().x()) != EQUAL) - return false; - - // If we reached here, the two arc are equal: - return true; - } - - //---------------------------------------------------------- - //Check 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. - bool can_merge_with(const Self& arc) const - { - // In order to merge the two arcs, they should have the same base - // rational function. - CGAL_precondition(is_valid()); - CGAL_precondition(arc.is_valid()); - if (! _has_same_base(arc)) - return false; - - // Check if the left endpoint of one curve is the right endpoint of - // the other. - - return ((right_parameter_space_in_x() == ARR_INTERIOR && - right_parameter_space_in_y() == ARR_INTERIOR && - arc.left_parameter_space_in_x() == ARR_INTERIOR && - arc.left_parameter_space_in_y() == ARR_INTERIOR && - //CGAL::equal(right_x() ,arc.left_x() )) || - (right_x() == arc.left_x() )) || - (left_parameter_space_in_x() == ARR_INTERIOR && - left_parameter_space_in_y() == ARR_INTERIOR && - arc.right_parameter_space_in_x() == ARR_INTERIOR && - arc.right_parameter_space_in_y() == ARR_INTERIOR && - //CGAL::equal(left_x(), arc.right_x()))); - (left_x() == arc.right_x()))); - } - //------------------------------------ - //Constructions of points and curves - //------------------------------------ - - //------------------------------------ - // Flip the arc (swap its source and target). - // return The flipped arc. - Self flip() const - { - CGAL_precondition(is_valid()); - - // Create the flipped arc. - Self arc; - - arc._f = _f; - arc._ps = _pt; - arc._pt = _ps; - - // Manipulate the information bits. - int src_info = (_info & SRC_INFO_BITS); - int trg_info = (_info & TRG_INFO_BITS); - arc._info = (src_info << 4) | (trg_info >> 4) | IS_VALID; - - if ((_info & IS_DIRECTED_RIGHT) == 0) - arc._info = (arc._info | IS_DIRECTED_RIGHT); - - if ((_info & IS_CONTINUOUS) != 0) - arc._info = (arc._info | IS_CONTINUOUS); - - return (arc); - } - - //------------------------ - // Print the rational arc. - std::ostream& print(std::ostream& os) const - { - // Print y as a rational function of x. - os << "y = ("; - Base_rational_arc_ds_1::print_polynomial(os, this->numerator(), 'x'); - os << ") / ("; - Base_rational_arc_ds_1::print_polynomial(os, this->denominator(), 'x'); - os << ") on "; - - // Print the definition range. - Arr_parameter_space inf_x = source_parameter_space_in_x(); - if (inf_x == ARR_LEFT_BOUNDARY) - os << "(-oo"; - else if (inf_x == ARR_RIGHT_BOUNDARY) - os << "(+oo"; - else if (source_parameter_space_in_y() != ARR_INTERIOR) - os << '(' << CGAL::to_double(source_x()); - else - os << '[' << CGAL::to_double(source().x()); - - os << ", "; - - inf_x = target_boundary_in_x(); - if (inf_x == ARR_LEFT_BOUNDARY) - os << "-oo)"; - else if (inf_x == ARR_RIGHT_BOUNDARY) - os << "+oo)"; - else if (target_boundary_in_y() != ARR_INTERIOR) - os << CGAL::to_double(target_x()) << ')'; - else - os << CGAL::to_double(target().x()) << ']'; - - return (os); - } - -protected: - - - //------------------------------- - //Auxiliary (protected) functions. - //------------------------------- - - //-------------------------------------------------------------------------- - // Cannonicalize numerator and denominator such that: - // There are no common devisor - // If negative sign exists, it is in the numerator - void _canonicalize(const Polynomial_1& P,const Polynomial_1& Q, - Polynomial_1& P_new ,Polynomial_1& Q_new) - { - Polynomial_1 gcd = CGAL::gcd(P,Q); - if (gcd != 1) - { - P_new=CGAL::integral_division(P,gcd); - Q_new=CGAL::integral_division(Q,gcd); - } - else - { - P_new=P; - Q_new=Q; - } - - if (typename AT_poly::Unit_part()(Q_new) == -1) //leading coefficient sign - { - P_new*=-1; - Q_new*=-1; - } - return; - } - - //-------------------------------------------------------------------------- - // Check 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. - // param eq_trg Output: Is this value equal to the x-coordinate of the - // target point. - - bool _is_in_x_range(const Algebraic_real_1& x, bool& eq_src, - bool& eq_trg) const - { - Comparison_result res1; - - eq_src = eq_trg = false; - if ((_info & IS_DIRECTED_RIGHT) != 0) - { - // Compare to the left endpoint (the source in this case). - if ((_info & SRC_AT_X_MINUS_INFTY) != 0) - { - res1 = LARGER; - } - else - { - res1 = CGAL::compare(x, _ps.x()); - - if (res1 == SMALLER) - return false; - - if (res1 == EQUAL) - { - eq_src = true; - return true; - } - } - - // Compare to the right endpoint (the target in this case). - if ((_info & TRG_AT_X_PLUS_INFTY) != 0) - return true; - - const Comparison_result res2 = CGAL::compare(x, _pt.x()); - - if (res2 == LARGER) - return false; - - if (res2 == EQUAL) - eq_trg = true; - - return true; - } - - // Compare to the left endpoint (the target in this case). - if ((_info & TRG_AT_X_MINUS_INFTY) != 0) - { - res1 = LARGER; - } - else - { - res1 = CGAL::compare(x, _pt.x()); - - if (res1 == SMALLER) - return false; - - if (res1 == EQUAL) - { - eq_trg = true; - return true; - } - } - - // Compare to the right endpoint (the source in this case). - if ((_info & SRC_AT_X_PLUS_INFTY) != 0) - return true; - - const Comparison_result res2 = CGAL::compare(x, _ps.x()); - - if (res2 == LARGER) - return false; - - if (res2 == EQUAL) - eq_src = true; - - return true; - } - - //---------------------------------------------------------- - // Check 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_real_1& x) const - { - bool eq_src, eq_trg; - const bool is_in_x_range_closure = _is_in_x_range(x, eq_src, eq_trg); - - if (! is_in_x_range_closure) - return false; - - // Check if we have a vertical asymptote at the source point. - if (eq_src && (_info & (SRC_AT_Y_MINUS_INFTY | SRC_AT_Y_PLUS_INFTY)) != 0) - return false; - - // Check if we have a vertical asymptote at the target point. - if (eq_trg && (_info & (TRG_AT_Y_MINUS_INFTY | TRG_AT_Y_PLUS_INFTY)) != 0) - return false; - - // If we reached here, the value is in the true x-range of the arc. - return true; - } - - //------------------------------------------------------------------------ - // Check 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. - - bool _has_same_base(const Self& arc) const - { - return (this->_f == arc._f); - } - //bool operator == (const Self& arc) const - //{ - // if (this == &arc) - // return true; - // if ((_info ==arc._info) &&(_has_same_base(arc) )) - // { - // bool same_source(true); - // bool same_target(true); - // if ( (this->source_parameter_space_in_x () == ARR_INTERIOR) && - // (this->source_parameter_space_in_y () == ARR_INTERIOR) ) - // same_source = (this->source() == arc.source()); - // if ( (this->target_boundary_in_x () == ARR_INTERIOR) && - // (this->target_boundary_in_y () == ARR_INTERIOR) ) - // same_target = (this->target() == arc.target()); - // return (same_source && same_target); - // } - // return false; - //} - - //--------------------------------------------------------------------- - //Compute 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. - - Arr_parameter_space _analyze_at_minus_infinity(const Polynomial_1& P, - const Polynomial_1& Q, - Algebraic_real_1& y) const - { - // Get the degree of the polynomials. - const int deg_p(CGAL::degree(P)); - const int deg_q(CGAL::degree(Q)); - - if (deg_p <= 0 || deg_p <= deg_q) - { - // We have a zero polynomial or a zero asymptote. - y = 0; - return (ARR_INTERIOR); - } - // Get the leading coefficients. - Integer p_lead(CGAL::leading_coefficient(P)); - Integer q_lead(CGAL::leading_coefficient(Q)); - - if (deg_p == deg_q) - { - // We have a horizontal asymptote. - y = Algebraic_real_1(Rational(p_lead) / Rational(q_lead)); - return (ARR_INTERIOR); - } - - // We have a tendency to infinity. - const int def_diff = deg_p - deg_q; - - return (CGAL::sign(p_lead) == CGAL::sign (q_lead)) ? - ((def_diff % 2 == 0) ? ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY) : - ((def_diff % 2 == 0) ? ARR_BOTTOM_BOUNDARY : ARR_TOP_BOUNDARY); - } - - //--------------------------------------------------------------------- - //Compute 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. - - Arr_parameter_space _analyze_at_plus_infinity(const Polynomial_1& P, - const Polynomial_1& Q, - Algebraic_real_1& y) const - { - // Get the degree of the polynomials. - const int deg_p(CGAL::degree(P)); - const int deg_q(CGAL::degree(Q)); - - if (deg_p <= 0 || deg_p <= deg_q) - { - // We have a zero polynomial or a zero asymptote. - y = 0; - return (ARR_INTERIOR); - } - - // Get the leading coefficients. - Integer p_lead(CGAL::leading_coefficient(P)); - Integer q_lead(CGAL::leading_coefficient(Q)); - - if (deg_p == deg_q) - { - // We have a horizontal asymptote. - y = Algebraic_real_1(Rational(p_lead) / Rational(q_lead)); - return (ARR_INTERIOR); - } - - // We have a tendency to infinity. - return (CGAL::sign(p_lead) == CGAL::sign(q_lead)) ? - ARR_TOP_BOUNDARY : ARR_BOTTOM_BOUNDARY; - } - - //--------------------------------------------------------------------- - //Compute all zeros of the denominator polynomial that lie within the - // x-range of the arc - - template - OutputIterator _denominator_roots(OutputIterator oi, bool& root_at_ps, - bool& root_at_pt) const - { - root_at_ps = root_at_pt = false; - - if (CGAL::degree(this->denominator()) == 0) - return (oi); - - // Compute the roots of the denominator polynomial. - std::list q_roots; - bool eq_src, eq_trg; - typename std::list::const_iterator x_iter; - - //solve for roots without caring for multiplicity - //hence the usage of the bool var - - std::copy(_f.poles().begin(),_f.poles().end(),std::back_inserter (q_roots)); - - // Go over the roots and check whether they lie in the x-range of the arc. - for (x_iter = q_roots.begin(); x_iter != q_roots.end(); ++x_iter) - { - if (_is_in_x_range (*x_iter, eq_src, eq_trg)) - { - if (eq_src) - { - root_at_ps = true; - } - else if (eq_trg) - { - root_at_pt = true; - } - else - { - // The root lies in the interior of the arc. - *oi++ = *x_iter; - } - } - } - - return (oi); - } - - //--------------------------------------------------------------------- - // Check whether the arc is continuous. - bool _is_continuous() - { - // Compute the roots of the denominator polynomial, and make sure - // there are none in the range of definition. - std::list q_roots; - bool root_at_ps, root_at_pt; - - this->_denominator_roots(std::back_inserter(q_roots), - root_at_ps, root_at_pt); - - return (q_roots.empty()); - } - - //--------------------------------------------------------------------- - //Determine 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. - // return The signs to the left and to the right of x0. - std::pair - _analyze_near_pole(const Algebraic_real_1& x0) const - { - return std::make_pair( _f.sign_at(x0,CGAL::NEGATIVE), - _f.sign_at(x0,CGAL::POSITIVE)); - } - - //--------------------------------------------------------------------- - // Print a polynomial nicely. - - //std::ostream& _print_polynomial (std::ostream& os, - // const Polynomial_1& poly, - // char var) const - //{ - // // Get the degree. - // const int deg = CGAL::degree(poly); - // - // Integer coeff; - // CGAL::Sign sgn; - // int k; - - // if (deg < 0) - // { - // os << '0'; - // return (os); - // } - - // for (k = deg; k >= 0; k--) - // { - // //coeff = pt::Get_coefficient()(poly, k); - // coeff = CGAL::get_coefficient(poly, k); - // - // if (k == deg) - // os << coeff; - // else if ((sgn = CGAL::sign (coeff)) == POSITIVE) - // os << " + " << coeff; - // else if (sgn == NEGATIVE) - // os << " - " << -coeff; - // else - // continue; - // - // if (k > 1) - // os << '*' << var << '^' << k; - // else if (k == 1) - // os << '*' << var; - // } - - // return (os); - //} - -}; - -//------------------------------- -//! Exporter for rational arcs. -template -std::ostream& operator<<(std::ostream& os, - const Base_rational_arc_d_1 & arc) -{ - return (arc.print(os)); -} - -/*! \class Continuous_rational_arc_d_1 - * Representation of a continuous portion of a rational function. - */ -template -class Continuous_rational_arc_d_1: - public Base_rational_arc_d_1 -{ -public: - bool is_left_to_right() const - { return (this->_info && Base::IS_DIRECTED_RIGHT); } - -public: - typedef Algebraic_kernel_ Algebraic_kernel; - - typedef Continuous_rational_arc_d_1 Self; - typedef Base_rational_arc_d_1 Base; - - typedef typename Base::Integer Integer; - typedef typename Base::Rational Rational; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Base::Algebraic_point_2 Algebraic_point_2; - typedef typename Base::Polynomial_1 Polynomial_1; - typedef typename Base::Multiplicity Multiplicity; - typedef typename Base::Rational_function Rational_function; - typedef typename Base::Rational_function_pair Rational_function_pair; - typedef typename Base::Vertical_segment_d_1 Vertical_segment_d_1; - - typedef typename Base::Rat_vector Rat_vector; - typedef typename Base::Algebraic_vector Algebraic_vector; - typedef typename Base::Multiplicity_vector Multiplicity_vector; - - typedef typename Base::Cache Cache; - - typedef std::pair Intersection_point_2; - //typedef std::pair Intersection_point_2; - - - /// \name Constrcution methods. - //@{ - - /*! - * Default constructor. - */ - Continuous_rational_arc_d_1() : - Base() - {} - - /*! - * Constrcutor from a base arc. - */ - Continuous_rational_arc_d_1(const Base& arc) : - Base(arc) - { - CGAL_precondition(arc.is_continuous()); - } - - /*! - * Constructor of a whole polynomial curve. - * \param pcoeffs The rational coefficients of the polynomial p(x). - */ - Continuous_rational_arc_d_1(const Polynomial_1& P, const Cache& cache) : - Base(P, cache) - {} - - Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) : - Base(pcoeffs, cache) - {} - - /*! - * Constructor of 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). - * \param x_s The x-coordinate of the source point. - * \param dir_right Is the ray directed to the right (to +oo) - * or to the left (to -oo). - */ - Continuous_rational_arc_d_1(const Polynomial_1& P, - const Algebraic_real_1& x_s, - bool dir_right, const Cache& cache) : - Base(P, x_s, dir_right,cache) - {} - - Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, - const Algebraic_real_1& x_s, - bool dir_right, const Cache& cache) : - Base(pcoeffs, x_s, dir_right,cache) - {} - - - /*! - * Constructor of 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. - * \pre The two x-coordinates must not be equal. - */ - Continuous_rational_arc_d_1(const Polynomial_1& P, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t, const Cache& cache) : - Base(P, x_s, x_t,cache) - {} - - Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t, const Cache& cache) : - Base(pcoeffs, x_s, x_t,cache) - {} - - /*! - * Constructor of 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. - */ - Continuous_rational_arc_d_1(const Polynomial_1& P, const Polynomial_1& Q, - const Cache& cache) : - Base(P, Q,cache) - { - if (!this->_is_continuous()) - { - // Invalid arc, as it is not continuous. - this->set_invalid(); - } - } - - Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, - const Rat_vector& qcoeffs, const Cache& cache) : - Base(pcoeffs, qcoeffs,cache) - { - if (!this->_is_continuous()) - { - // Invalid arc, as it is not continuous. - this->set_invalid(); - } - } - - /*! - * Constructor of 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). - * \param qcoeffs The rational coefficients of the polynomial q(x). - * \param x_s The x-coordinate of the source point. - * \param dir_right Is the ray directed to the right (to +oo) - * or to the left (to -oo). - * \pre The denominator polynomial q(x) does not have any roots in the - * x-range of definition. - */ - Continuous_rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q, - const Algebraic_real_1& x_s, bool dir_right, - const Cache& cache) : - Base(P, Q, x_s, dir_right,cache) - { - if (!this->_is_continuous()) - { - // Invalid arc, as it is not continuous. - this->set_invalid(); - } - } - - Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, - const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, bool dir_right, - const Cache& cache) : - Base(pcoeffs, qcoeffs, x_s, dir_right,cache) - { - if (!this->_is_continuous()) - { - // Invalid arc, as it is not continuous. - this->set_invalid(); - } - } - - /*! - * Constructor of 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). - * \param x_s The x-coordinate of the source point. - * \param x_t The x-coordinate of the target point. - * \pre The two x-coordinates must not be equal. - * \pre The denominator polynomial q(x) does not have any roots in the - * x-range of definition (x_min, x_max). - */ - Continuous_rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t,const Cache& cache) : - Base(P, Q, x_s, x_t,cache) - { - if (!this->_is_continuous()) - { - // Invalid arc, as it is not continuous. - this->set_invalid(); - } - } - Continuous_rational_arc_d_1(const Rat_vector& pcoeffs, - const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t, const Cache& cache) : - Base(pcoeffs, qcoeffs, x_s, x_t,cache) - { - if (!this->_is_continuous()) - { - // Invalid arc, as it is not continuous. - this->set_invalid(); - } - } - - //@} - - /// \name Constructions of points and curves. - //@{ - - /*! - * Compute the intersections with the given arc. - * \param arc The given intersecting arc. - * \param oi The output iterator. - * \return The past-the-end iterator. - */ - template - OutputIterator intersect(const Self& arc, OutputIterator oi, - const Cache& cache) const - { - CGAL_precondition(this->is_valid() && this->is_continuous()); - CGAL_precondition(arc.is_valid() && arc.is_continuous()); - - if (this->equals(arc)) - { - Self overlap_arc(*this); - *oi++ = make_object(overlap_arc); - return (oi); - } - - if (this->_has_same_base(arc)) - { - // Get the left and right endpoints of (*this) and their information - // bits. - const Algebraic_point_2& left1 = (this->is_directed_right() ? - this->_ps : this->_pt); - const Algebraic_point_2& right1 = (this->is_directed_right() ? - this->_pt : this->_ps); - int info_left1, info_right1; - - if (this->is_directed_right()) - { - info_left1 = (this->_info & this->SRC_INFO_BITS); - info_right1 = ((this->_info & this->TRG_INFO_BITS) >> 4); - } - else - { - info_right1 = (this->_info & this->SRC_INFO_BITS); - info_left1 = ((this->_info & this->TRG_INFO_BITS) >> 4); - } - - // Get the left and right endpoints of the other arc and their - // information bits. - const Algebraic_point_2& left2 = - (arc.is_directed_right() ? arc._ps : arc._pt); - const Algebraic_point_2& right2 = - (arc.is_directed_right() ? arc._pt : arc._ps); - int info_left2, info_right2; - - if (arc.is_directed_right()) - { - info_left2 = (arc._info & this->SRC_INFO_BITS); - info_right2 = ((arc._info & this->TRG_INFO_BITS) >> 4); - } - else - { - info_right2 = (arc._info & this->SRC_INFO_BITS); - info_left2 = ((arc._info & this->TRG_INFO_BITS) >> 4); - } - - // Locate the left curve-end with larger x-coordinate. - bool at_minus_infinity = false; - Arr_parameter_space inf_l1 = this->left_parameter_space_in_x(); - Arr_parameter_space inf_l2 = arc.left_parameter_space_in_x(); - Algebraic_point_2 p_left; - int info_left; - - if (inf_l1 == ARR_INTERIOR && inf_l2 == ARR_INTERIOR) - { - // Let p_left be the rightmost of the two left endpoints. - if (left1.x() > left2.x()) - { - p_left = left1; - info_left = info_left1; - } - else - { - p_left = left2; - info_left = info_left2; - } - } - else if (inf_l1 == ARR_INTERIOR) - { - // Let p_left be the left endpoint of (*this). - p_left = left1; - info_left = info_left1; - } - else if (inf_l2 == ARR_INTERIOR) - { - // Let p_left be the left endpoint of the other arc. - p_left = left2; - info_left = info_left2; - } - else - { - // Both arcs are defined at x = -oo. - at_minus_infinity = true; - info_left = info_left1; - } - - // Locate the right curve-end with smaller x-coordinate. - bool at_plus_infinity = false; - Arr_parameter_space inf_r1 = this->right_parameter_space_in_x(); - Arr_parameter_space inf_r2 = arc.right_parameter_space_in_x(); - Algebraic_point_2 p_right; - int info_right; - - if (inf_r1 == ARR_INTERIOR && inf_r2 == ARR_INTERIOR) - { - // Let p_right be the rightmost of the two right endpoints. - if (right1.x() < right2.x()) - { - p_right = right1; - info_right = info_right1; - } - else - { - p_right = right2; - info_right = info_right2; - } - } - else if (inf_r1 == ARR_INTERIOR) - { - // Let p_right be the right endpoint of (*this). - p_right = right1; - info_right = info_right1; - } - else if (inf_r2 == ARR_INTERIOR) - { - // Let p_right be the right endpoint of the other arc. - p_right = right2; - info_right = info_right2; - } - else - { - // Both arcs are defined at x = +oo. - at_plus_infinity = true; - info_right = info_right2; - } - - // Check the case of two bounded (in x) ends. - if (! at_minus_infinity && ! at_plus_infinity) - { - Comparison_result res = CGAL::compare(p_left.x(), p_right.x()); - if (res == LARGER) - { - // The x-range of the overlap is empty, so there is no overlap. - return (oi); - } - else if (res == EQUAL) - { - // We have a single overlapping point. Just make sure this point - // is not at y = -/+ oo. - if (info_left && - (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0 && - info_right && - (this->SRC_AT_Y_MINUS_INFTY | this->SRC_AT_Y_PLUS_INFTY) == 0) - { - Intersection_point_2 ip(p_left, 0); - - *oi++ = make_object(ip); - } - - return (oi); - } - } - - // Create the overlapping portion of the rational arc by properly setting - // the source (left) and target (right) endpoints and their information - // bits. - Self overlap_arc(*this); - - overlap_arc._ps = p_left; - overlap_arc._pt = p_right; - - overlap_arc._info = ((info_left) | (info_right << 4) | - this->IS_DIRECTED_RIGHT | this->IS_CONTINUOUS | - this->IS_VALID); - - *oi++ = make_object(overlap_arc); - return (oi); - } - - // We wish to find the intersection points between: - // - // y = p1(x)/q1(x) and y = p2(x)/q2(x) - // - // It is clear that the x-coordinates of the intersection points are - // the roots of the polynomial: ip(x) = p1(x)*q2(x) - p2(x)*q1(x). - - Rational_function_pair rat_pair = - this->get_rational_pair(this->_f, arc._f, cache); - - typename Algebraic_vector::const_iterator x_iter; - typename Multiplicity_vector::const_iterator m_iter; - - // Go over the x-values we obtained. For each value produce an - // intersection point if it is contained in the x-range of both curves. - CGAL_precondition(rat_pair.roots().size() == - rat_pair.multiplicities().size()); - for (x_iter = rat_pair.roots().begin(), - m_iter = rat_pair.multiplicities().begin(); - x_iter != rat_pair.roots().end(); - ++x_iter, ++m_iter) - { - if (this->_is_in_true_x_range(*x_iter) && arc._is_in_true_x_range(*x_iter)) - { - // Compute the intersection point and obtain its multiplicity. - Algebraic_point_2 p(this->_f, *x_iter); - // Output the intersection point: - Intersection_point_2 ip(p, *m_iter); - - *oi++ = make_object(ip); - } - } - - return (oi); - } - - template - OutputIterator intersect(const Vertical_segment_d_1& ver, OutputIterator oi, - const Cache& cache) const - { - CGAL_precondition(this->is_valid() && this->is_continuous()); - - const Algebraic_real_1 x(ver.x()); - Comparison_result c; - bool eq_src,eq_trg; - if (this->_is_in_x_range(x,eq_src,eq_trg) == false) - return oi; - - if (ver.min_bounded()) - { - if (this->_f == ver.min_f()) - { - *oi++ = make_object(Intersection_point_2(ver.min(), 1)); - return oi; - } - else - { - Rational_function_pair p1 = - get_rational_pair(this->_f, ver.min_f(), cache); - c = (p1.compare_f_g_at(x)); - if (c == CGAL::SMALLER) - return oi; - if (c == CGAL::EQUAL) - { - *oi++ = make_object(Intersection_point_2(ver.min(), 1)); - return oi; - } - } - } - - //the vertical segment's max point is above the curve - if (ver.max_bounded()) - { - if (this->_f == ver.max_f()) - { - *oi++ = make_object(Intersection_point_2(ver.max(),1)); - return oi; - } - else - { - Rational_function_pair p2 = - get_rational_pair(this->_f, ver.max_f(), cache); - c = (p2.compare_f_g_at(x)); - if (c == CGAL::LARGER) - return oi; - if (c == CGAL::EQUAL) - { - *oi++ = make_object(Intersection_point_2(ver.max(),1)); - return oi; - } - } - } - //the vertical segment's min point is below the curve - *oi++ = make_object(Intersection_point_2(Algebraic_point_2(this->_f, x), 1)); - return oi; - } - - /*! - * Split 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. - * \pre p lies in the interior of the arc (not one of its endpoints). - */ - void split(const Algebraic_point_2& p, Self& c1, Self& c2, const Cache& cache) const - { - CGAL_precondition(this->is_valid() && this->is_continuous()); - - // Make sure that p lies on the interior of the arc. - CGAL_precondition(this->point_position(p,cache) == EQUAL && - (this->source_parameter_space_in_x() != ARR_INTERIOR || - this->source_parameter_space_in_y() != ARR_INTERIOR || - (p.x() != this->_ps.x())) && - (this->target_boundary_in_x() != ARR_INTERIOR || - this->target_boundary_in_y() != ARR_INTERIOR || - (p.x() != this->_pt.x()))); - - // Make copies of the current arc. - c1 = *this; - c2 = *this; - - // Split the arc, such that c1 lies to the left of c2. - if ((this->_info & this->IS_DIRECTED_RIGHT) != 0) - { - c1._pt = p; - c1._info = (c1._info & ~this->TRG_INFO_BITS); - c2._ps = p; - c2._info = (c2._info & ~this->SRC_INFO_BITS); - } - else - { - c1._ps = p; - c1._info = (c1._info & ~this->SRC_INFO_BITS); - c2._pt = p; - c2._info = (c2._info & ~this->TRG_INFO_BITS); - } - } - - /*! - * Merge the current arc with the given arc. - * \param arc The arc to merge with. - * \pre The two arcs are mergeable. - */ - void merge(const Self& arc) - { - CGAL_precondition(this->is_valid() && this->is_continuous()); - CGAL_precondition(arc.is_valid() && arc.is_continuous()); - CGAL_precondition(this->can_merge_with(arc)); - - // Check if we should extend the arc to the left or to the right. - if (this->right_parameter_space_in_x() == ARR_INTERIOR && - this->right_parameter_space_in_y() == ARR_INTERIOR && - arc.left_parameter_space_in_x() == ARR_INTERIOR && - arc.left_parameter_space_in_y() == ARR_INTERIOR && - (this->right().x() == arc.left().x())) - { - // Extend the arc to the right. - if ((this->_info & this->IS_DIRECTED_RIGHT) != 0) - { - if (arc.right_parameter_space_in_x() == ARR_INTERIOR && - arc.right_parameter_space_in_y() == ARR_INTERIOR) - { - this->_pt = arc.right(); - } - else - { - if (arc.right_parameter_space_in_x() == ARR_LEFT_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_X_MINUS_INFTY); - else if (arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_X_PLUS_INFTY); - - if (arc.right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_Y_MINUS_INFTY); - else if (arc.right_parameter_space_in_y() == ARR_TOP_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_Y_PLUS_INFTY); - - this->_pt = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._pt : arc._ps; - } - } - else - { - if (arc.right_parameter_space_in_x() == ARR_INTERIOR && - arc.right_parameter_space_in_y() == ARR_INTERIOR) - { - this->_ps = arc.right(); - } - else - { - if (arc.right_parameter_space_in_x() == ARR_LEFT_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_X_MINUS_INFTY); - else if (arc.right_parameter_space_in_x() == ARR_RIGHT_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_X_PLUS_INFTY); - - if (arc.right_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_Y_MINUS_INFTY); - else if (arc.right_parameter_space_in_y() == ARR_TOP_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_Y_PLUS_INFTY); - - this->_ps = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._pt : arc._ps; - } - } - } - else - { - CGAL_precondition(this->left_parameter_space_in_x() == ARR_INTERIOR && - this->left_parameter_space_in_y() == ARR_INTERIOR && - arc.right_parameter_space_in_x() == ARR_INTERIOR && - arc.right_parameter_space_in_y() == ARR_INTERIOR && - (this->left().x() == arc.right().x())); - - // Extend the arc to the left. - if ((this->_info & this->IS_DIRECTED_RIGHT) != 0) - { - if (arc.left_parameter_space_in_x() == ARR_INTERIOR && - arc.left_parameter_space_in_y() == ARR_INTERIOR) - { - this->_ps = arc.left(); - } - else - { - if (arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_X_MINUS_INFTY); - else if (arc.left_parameter_space_in_x() == ARR_RIGHT_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_X_PLUS_INFTY); - - if (arc.left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_Y_MINUS_INFTY); - else if (arc.left_parameter_space_in_y() == ARR_TOP_BOUNDARY) - this->_info = (this->_info | this->SRC_AT_Y_PLUS_INFTY); - - this->_ps = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._ps : arc._pt; - } - } - else - { - if (arc.left_parameter_space_in_x() == ARR_INTERIOR && - arc.left_parameter_space_in_y() == ARR_INTERIOR) - { - this->_pt = arc.left(); - } - else - { - if (arc.left_parameter_space_in_x() == ARR_LEFT_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_X_MINUS_INFTY); - else if (arc.left_parameter_space_in_x() == ARR_RIGHT_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_X_PLUS_INFTY); - - if (arc.left_parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_Y_MINUS_INFTY); - else if (arc.left_parameter_space_in_y() == ARR_TOP_BOUNDARY) - this->_info = (this->_info | this->TRG_AT_Y_PLUS_INFTY); - - this->_pt = (arc._info & this->IS_DIRECTED_RIGHT) ? arc._ps : arc._pt; - } - } - } - } - //@} - - -}; - -//*! \class Rational_arc_2 - // * Representation of a generic, not necessarily continuous, portion of a - // * rational function. - // */ -template -class Rational_arc_d_1 : public Base_rational_arc_d_1 -{ -public: - typedef Algebraic_kernel_ Algebraic_kernel; - - typedef Rational_arc_d_1 Self; - typedef Base_rational_arc_d_1 Base; - typedef Continuous_rational_arc_d_1 Continuous_arc; - - typedef typename Base::Integer Integer; - typedef typename Base::Rational Rational; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Base::Algebraic_point_2 Algebraic_point_2; - typedef typename Base::Polynomial_1 Polynomial_1; - - typedef typename Base::Rat_vector Rat_vector; - - typedef typename Base::Cache Cache; - - /// \name Constrcution methods. - //@{ - - /*! - * Default constructor. - */ - Rational_arc_d_1() : - Base() - {} - - /*! - * Constructor of a whole polynomial curve. - * \param pcoeffs The rational coefficients of the polynomial p(x). - */ - Rational_arc_d_1(const Polynomial_1& P, const Cache& cache) : - Base(P, cache) - {} - - Rational_arc_d_1(const Rat_vector& pcoeffs, const Cache& cache) : - Base(pcoeffs, cache) - {} - - /*! - * Constructor of 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). - * \param x_s The x-coordinate of the source point. - * \param dir_right Is the ray directed to the right (to +oo) - * or to the left (to -oo). - */ - Rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s, - bool dir_right, const Cache& cache) : - Base(P, x_s, dir_right,cache) - {} - - Rational_arc_d_1(const Rat_vector& pcoeffs, const Algebraic_real_1& x_s, - bool dir_right, const Cache& cache) : - Base(pcoeffs, x_s, dir_right,cache) - {} - - - /*! - * Constructor of 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. - * \pre The two x-coordinates must not be equal. - */ - Rational_arc_d_1(const Polynomial_1& P, const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t, const Cache& cache) : - Base(P, x_s, x_t, cache) - {} - - Rational_arc_d_1(const Rat_vector& pcoeffs, const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t,const Cache& cache) : - Base(pcoeffs, x_s, x_t, cache) - {} - - /*! - * Constructor of 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). - */ - Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q, const Cache& cache) : - Base(P, Q,cache) - {} - - Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Cache& cache) : - Base(pcoeffs, qcoeffs, cache) - {} - - /*! - * Constructor of 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). - * \param qcoeffs The rational coefficients of the polynomial q(x). - * \param x_s The x-coordinate of the source point. - * \param dir_right Is the ray directed to the right (to +oo) - * or to the left (to -oo). - */ - Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q, - const Algebraic_real_1& x_s, bool dir_right, const Cache& cache) : - Base(P, Q, x_s, dir_right, cache) - {} - - Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, bool dir_right, const Cache& cache) : - Base(pcoeffs, qcoeffs, x_s, dir_right, cache) - {} - - /*! - * Constructor of 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). - * \param x_s The x-coordinate of the source point. - * \param x_t The x-coordinate of the target point. - * \pre The two x-coordinates must not be equal. - */ - Rational_arc_d_1(const Polynomial_1& P,const Polynomial_1& Q, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t, - const Cache& cache) : - Base(P, Q, x_s, x_t, cache) - {} - - Rational_arc_d_1(const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t, - const Cache& cache) : - Base(pcoeffs, qcoeffs, x_s, x_t, cache) - {} - //@} - - /*! - * Subdivide 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_d_1 objects. - */ - template - OutputIterator make_continuous(OutputIterator oi) const - { - // Compute the roots of the denominator polynomial. - std::list q_roots; - bool root_at_ps, root_at_pt; - - if ((this->_info & this->IS_CONTINUOUS) == 0) - this->_denominator_roots(std::back_inserter(q_roots), - root_at_ps, root_at_pt); - - // Check the case of a continuous arc: - Base arc = *this; - - if (q_roots.empty()) - { - arc.set_continuous(); - *oi++ = Continuous_arc(arc); - return (oi); - } - - // The denominator has roots: split the arc accordingly. - typename std::list::const_iterator iter; - - for (iter = q_roots.begin(); iter != q_roots.end(); ++iter) - { - *oi++ = Continuous_arc(arc.split_at_pole(*iter)); - } - - // Add the final x-monotone sub-arc. - arc.set_continuous(); - *oi++ = Continuous_arc(arc); - - return (oi); - } -}; - -} //name_space Arr_rational_arc -} //namespace CGAL { - -#endif //CGAL_RATIONAL_ARC_D_1_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h deleted file mode 100644 index f0d7fe505a9..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function.h +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_RATIONAL_FUNCTION_H -#define CGAL_RATIONAL_FUNCTION_H - -#include -#include -namespace CGAL { -namespace Arr_rational_arc { - -template -class Rational_function_rep : public Base_rational_arc_ds_1 -{ -public: - typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; - typedef Base_rational_arc_ds_1 Base; - - typedef typename Base::Polynomial_1 Polynomial_1; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Base::Algebraic_vector Algebraic_vector; - typedef typename Base::Multiplicity Multiplicity; - typedef typename Base::Multiplicity_vector Multiplicity_vector; - typedef typename Base::Root_multiplicity_vector Root_multiplicity_vector; - typedef typename Base::Solve_1 Solve_1; - -public: - Rational_function_rep() : _ak_ptr(NULL){} - Rational_function_rep(const Polynomial_1& numer, - const Polynomial_1& denom, - Algebraic_kernel_d_1* ak_ptr): - _numer(numer), _denom(denom),_ak_ptr(ak_ptr) - { - initialize(); - } - - CGAL::Sign sign_at (const Algebraic_real_1& x, - CGAL::Sign epsilon = CGAL::ZERO) const - { - //find interval - typename Algebraic_vector::const_iterator iter = - std::lower_bound(_event_roots.begin(), _event_roots.end(),x); - - //case of a value larger than largest root - if (iter == _event_roots.end()) - return (_sign.back()); - - typename Algebraic_vector::iterator::difference_type dist = - iter - _event_roots.begin(); - - //if x is not a root, ignore epsilons - if (*iter != x) - return (_sign[dist]); - - //x is a root - if (epsilon == CGAL::ZERO) - return (CGAL::EQUAL); - else if (epsilon == CGAL::NEGATIVE) - return (_sign[dist] ); - else // CGAL::POSITIVE - return (_sign[dist+1]); - } - - CGAL::Sign sign_near_minus_infinity() const - { - return _sign.front(); - } - - bool operator==(const Rational_function_rep& other) const - { - return ((this->_numer == other.numer()) && - (this->_denom == other.denom()) ); - } - - const Polynomial_1& numer() const - { - return _numer; - } - - const Polynomial_1& denom() const - { - return _denom; - } - - const Algebraic_vector& poles() const - { - return _poles; - } - - const Multiplicity_vector& pole_multiplicities() const - { - return _pole_multiplicities; - } - -private: - void initialize() - { - CGAL_precondition(_ak_ptr != NULL); - CGAL_precondition(CGAL::is_zero(_denom) == false); - if (CGAL::is_zero(_numer)) - { - //function does not change sign - _sign.push_back(CGAL::ZERO); - return; - } - - Solve_1 solve_1 (_ak_ptr->solve_1_object()); - Root_multiplicity_vector rm_poles_vec,rm_intersctions_vec; - solve_1(_denom, std::back_inserter(rm_poles_vec)); //poles - solve_1(_numer, std::back_inserter(rm_intersctions_vec)); //intersections with zero - - //reserve memory - typename Root_multiplicity_vector::size_type num_of_poles = - rm_poles_vec.size(); - typename Root_multiplicity_vector::size_type num_of_intersections = - rm_intersctions_vec.size(); - - _poles.reserve(num_of_poles); - _pole_multiplicities.reserve(num_of_poles); - - _event_roots.reserve(num_of_poles + num_of_intersections); - _pole_multiplicities.reserve(num_of_poles + num_of_intersections); - - //initialize poles - for ( typename Root_multiplicity_vector::iterator it = rm_poles_vec.begin(); - it != rm_poles_vec.end() ; - ++it) - { - _poles.push_back(it->first); - _pole_multiplicities.push_back(it->second); - } - - //initialize events - Root_multiplicity_vector events_mult_vec; - std::merge( rm_poles_vec.begin() , rm_poles_vec.end() , - rm_intersctions_vec.begin() , rm_intersctions_vec.end() , - std::back_inserter(events_mult_vec)); - - typename Root_multiplicity_vector::iterator it; - for (it = events_mult_vec.begin(); it != events_mult_vec.end(); ++it) - { - _event_roots.push_back(it->first); - _event_multiplicities.push_back(it->second); - } - - //initialize left most interval (at -oo) - //for (ax^n+.../x^m+...) the sign is: sign(a) * (-1)^(n +m) - CGAL::Sign curr_sign = CGAL::sign(CGAL::leading_coefficient(_numer)); - if ((CGAL::degree(_numer) + CGAL::degree(_denom)) % 2 == 1) - curr_sign = curr_sign * CGAL::NEGATIVE; - _sign.push_back(curr_sign); - - typename Multiplicity_vector::iterator it2; - for (it2 = _event_multiplicities.begin(); - it2 != _event_multiplicities.end(); - ++it2) - { - if (*it2 % 2 == 1) - curr_sign = curr_sign * CGAL::NEGATIVE; - _sign.push_back(curr_sign); - } - } - -private: - Polynomial_1 _numer; - Polynomial_1 _denom; - Algebraic_vector _poles; //roots of the denominator - Multiplicity_vector _pole_multiplicities; //multiplicities of the poles - Algebraic_vector _event_roots; //poles and intersection points with y=0, function can change signs in these events - Multiplicity_vector _event_multiplicities; //multiplicities of the events - std::vector _sign; //function's sign in the corresponding interval induced by _event_roots (if no roots then only one value) - mutable Algebraic_kernel_d_1* _ak_ptr; - -};//Rational_function_rep - -template < class Algebraic_kernel_ > -class Rational_function: - public Handle_with_policy > -{ -public: - typedef Algebraic_kernel_ Algebraic_kernel_d_1; - typedef Handle_with_policy > - Base; - typedef Rational_function Self; - typedef Rational_function_rep Rep; - typedef typename Rep::Algebraic_real_1 Algebraic_real_1; - typedef typename Rep::Polynomial_1 Polynomial_1; - typedef typename Rep::Algebraic_vector Algebraic_vector; - typedef typename Rep::Multiplicity_vector Multiplicity_vector; - - typedef typename Base::Id_type Id_type; -private: - static Self& get_default_instance() - { - static Algebraic_kernel_d_1 kernel; - static Self x = Self(Polynomial_1(0), Polynomial_1(1), &kernel); - return x; - } -public: - Rational_function(const Polynomial_1& numer, - const Polynomial_1& denom, - Algebraic_kernel_d_1* ak_ptr) : - Base(numer,denom,ak_ptr) {} - - //used to solve VS bug... - Rational_function (const Self & r = get_default_instance()) : - Base(static_cast (r)) {} - - CGAL::Sign sign_at(const Algebraic_real_1& x, - CGAL::Sign epsilon = CGAL::ZERO) const - { - return this->ptr()->sign_at(x,epsilon); - } - - CGAL::Sign sign_near_minus_infinity() const - { - return this->ptr()->sign_near_minus_infinity (); - } - bool operator== (const Self & other) const - { - if (this->is_identical (other)) - return true; - return (*(this->ptr()) == *(other.ptr())); - } - - const Polynomial_1& numer () const - { - return this->ptr()->numer(); - } - - const Polynomial_1& denom () const - { - return this->ptr()->denom(); - } - - const Algebraic_vector& poles () const - { - return this->ptr()->poles(); - } - - const Multiplicity_vector& pole_multiplicities () const - { - return this->ptr()->pole_multiplicities(); - } -}; //Rational_function - -} //namespace Arr_rational_arc -} //namespace CGAL { - -#endif //CGAL_RATIONAL_FUNCTION_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h deleted file mode 100644 index 4fe80ec8888..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_canonicalized_pair.h +++ /dev/null @@ -1,508 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H -#define CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H - -#include -#include -#include - -namespace CGAL { -namespace Arr_rational_arc { - -template -class Rational_function_canonicalized_pair_rep: - public Base_rational_arc_ds_1 -{ -public: - typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; - typedef Base_rational_arc_ds_1 Base; - - typedef CGAL::Arr_rational_arc::Rational_function - Rational_function; - typedef typename Base::Polynomial_1 Polynomial_1; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Base::Algebraic_vector Algebraic_vector; - typedef typename Base::Multiplicity Multiplicity; - typedef typename Base::Multiplicity_vector Multiplicity_vector; - typedef typename Base::Root_multiplicity_vector Root_multiplicity_vector; - typedef typename Base::Solve_1 Solve_1; - typedef typename Base::Bound Bound; - typedef typename Base::Coefficient Coefficient; - -public: - Rational_function_canonicalized_pair_rep(const Rational_function& f, - const Rational_function& g, - Algebraic_kernel_d_1* ak_ptr) - :_f(f),_g(g),_ak_ptr(ak_ptr) - { - CGAL_precondition(_ak_ptr != NULL); - //canonicalized representation - if ( !(f.id() < g.id()) ) - std::swap(_f,_g); - _resultant = (_f.numer() * _g.denom() - _f.denom() * _g.numer()); - - //f and g are not the same... - CGAL_precondition(CGAL::is_zero(_resultant) == false); - - Solve_1 solve_1(_ak_ptr->solve_1_object()); - Root_multiplicity_vector rm_vec; - -#if 1 - solve_1(_resultant,std::back_inserter(rm_vec)); -#else - assert(false); - // don't use this code yet since g and resultant/g may still have a - // common root - if( CGAL::internal::may_have_common_factor(_f.denom(),_g.denom())){ - Polynomial_1 g = CGAL::gcd(_f.denom(), _g.denom()); - solve_1(CGAL::integral_division(_resultant, g), - std::back_inserter(rm_vec)); - solve_1(g, std::back_inserter(rm_vec)); - std::sort(rm_vec.begin(), rm_vec.end()); - }else{ - solve_1(_resultant, std::back_inserter(rm_vec)); - } -#endif - - _roots.reserve(rm_vec.size()); - _multiplicities.reserve(rm_vec.size()); - - for (typename Root_multiplicity_vector::iterator it = rm_vec.begin(); - it != rm_vec.end() ; - ++it) - { - _roots.push_back(it->first); - _multiplicities.push_back(it->second); - } - - Algebraic_vector tmp; - tmp.reserve(_f.poles().size() + _g.poles().size()); - _event_roots.reserve(rm_vec.size() + _f.poles().size() + _g.poles().size()); - //merge the roots of f,g & resultant - std::merge( _f.poles().begin(), _f.poles().end(), - _g.poles().begin(), _g.poles().end(), - std::back_inserter(tmp)); - std::merge(tmp.begin(), tmp.end(), - _roots.begin(), _roots.end(), - std::back_inserter(_event_roots)); - - //remove duplicate entries - typename Algebraic_vector::iterator new_end,old_end; - new_end = std::unique(_event_roots.begin(), old_end=_event_roots.end()); - _event_roots.erase(new_end,old_end); - - //compute the values of _is_above - bool curr_is_above = get_is_above_near_minus_infinity(); - _is_above.push_back(curr_is_above); - - // TBD: is_sorted is provided both by stl and boost. The interface of - // boost version changed, and as of version ? it accepts a single - // argument, that is a model of the SinglePassRange concept. The stl - // version, on the other hand, is on it's way out. - // (The name is wrong-should be is_ordered). - // - // CGAL_precondition(std::is_sorted(_f.poles().begin(),_f.poles().end())); - // CGAL_precondition(std::is_sorted(_g.poles().begin(),_g.poles().end())); - // CGAL_precondition(std::is_sorted(_roots.begin(),_roots.end())); - - typename Algebraic_vector ::const_iterator it_f_pole = _f.poles().begin(); - typename Multiplicity_vector::const_iterator it_f_mult = - _f.pole_multiplicities().begin(); - typename Algebraic_vector ::const_iterator it_g_pole = _g.poles().begin(); - typename Multiplicity_vector::const_iterator it_g_mult = - _g.pole_multiplicities().begin(); - typename Algebraic_vector ::const_iterator it_r_root = _roots.begin(); - typename Multiplicity_vector::const_iterator it_r_mult = - _multiplicities.begin() ; - while ( (it_f_pole != _f.poles().end()) || - (it_g_pole != _g.poles().end()) || - (it_r_root != _roots.end())) - { - //std::cout << "_f._poles.size() " << _f._poles.size() < tmp_is_above = - compute_is_above_explicitly(); - ); - CGAL_postcondition(_is_above == tmp_is_above); - } - - Comparison_result compare_f_g_at(const Algebraic_real_1& x, - CGAL::Sign epsilon = CGAL::ZERO) const - { - //f and g must be different - CGAL_precondition(!CGAL::is_zero(_resultant)); - - //find interval - typename Algebraic_vector::const_iterator iter = - std::lower_bound(_event_roots.begin(), _event_roots.end(),x); - - //case of a value larger than largest root - if (iter == _event_roots.end()) - return (_is_above.back() ? CGAL:: LARGER : CGAL::SMALLER); - - typename Algebraic_vector::iterator::difference_type dist = - iter - _event_roots.begin(); - - //if x is not a root, ignore epsilons - if (*iter != x){ - return (_is_above[dist] ? CGAL:: LARGER : CGAL::SMALLER); - } - - //x is a root - if (epsilon == CGAL::ZERO){ - CGAL_precondition(_f.poles().end() == - std::find(_f.poles().begin(), _f.poles().end(),x)); - CGAL_precondition(_g.poles().end() == - std::find(_g.poles().begin(), _g.poles().end(),x)); - return (CGAL::EQUAL); - } - - if (epsilon == CGAL::NEGATIVE) - return (_is_above[dist] ? CGAL:: LARGER : CGAL::SMALLER); - else // CGAL::POSITIVE - return (_is_above[dist+1] ? CGAL:: LARGER : CGAL::SMALLER); - } - Comparison_result compare_f_g_at(Arr_parameter_space boundary) const - { - CGAL_precondition((boundary == ARR_LEFT_BOUNDARY) || - (boundary == ARR_RIGHT_BOUNDARY) ); - - //f and g are the same... - if (CGAL::is_zero(_resultant)) - return CGAL::EQUAL; - - if (boundary == ARR_LEFT_BOUNDARY) - return _is_above.front() ? CGAL::LARGER : CGAL::SMALLER ; - else // boundary = ARR_RIGHT_BOUNDARY - return _is_above.back() ? CGAL::LARGER : CGAL::SMALLER ; - } - - bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space, - const Algebraic_real_1 left, - const Arr_parameter_space right_parameter_space, - const Algebraic_real_1 right) const - { - //the two function intersect iff the left index and the right index - //of the array _is_above are different - - //get left index - typename Algebraic_vector::const_iterator left_index = - (left_parameter_space == ARR_LEFT_BOUNDARY) ? - _event_roots.begin(): - std::lower_bound(_event_roots.begin(), _event_roots.end(),left); - //check if intersect at left index - if (*left_index == left) - return true; - - //get right index - typename Algebraic_vector::const_iterator right_index = - (right_parameter_space == ARR_RIGHT_BOUNDARY) ? - _event_roots.begin(): - std::lower_bound(_event_roots.begin(), _event_roots.end(),right); - //check if intersect at right index - if (*right_index == right) - return true; - - //check if indices are the same - return (left_index == right_index); - } - - const Rational_function& f() const - { - return _f; - } - - const Rational_function& g() const - { - return _g; - } - - const Algebraic_vector & roots() const - { - return _roots; - } - - const Multiplicity_vector & multiplicities() const - { - return _multiplicities; - } - -private: - bool get_is_above_near_minus_infinity() - { - bool r = _get_is_above_near_minus_infinity(); - CGAL_postcondition(r == __get_is_above_near_minus_infinity()); - return r; - } - - bool _get_is_above_near_minus_infinity() - { - int f_deg = CGAL::degree(_f.numer()) - CGAL::degree(_f.denom()); - int g_deg = CGAL::degree(_g.numer()) - CGAL::degree(_g.denom()); - - if (f_deg > g_deg) //f is stronger than g - { - CGAL::Sign sign = _f.sign_near_minus_infinity(); - return (sign == CGAL::NEGATIVE) ? false : - (sign == CGAL::POSITIVE) ? true : - (_g.sign_near_minus_infinity() == CGAL::NEGATIVE); // _f == zero; - } - if (f_deg < g_deg) //g is stronger than f - { - CGAL::Sign sign = _g.sign_near_minus_infinity(); - return (sign == CGAL::NEGATIVE) ? true : - (sign == CGAL::POSITIVE) ? false : - (_f.sign_near_minus_infinity() == CGAL::POSITIVE); // _g == zero; - } - - //both have the same degree difference, - //check who's leading coeeficient ratio is larger - Coefficient lead_coeff_ratio = - CGAL::abs(CGAL::leading_coefficient(_f.numer())) * - CGAL::leading_coefficient(_g.denom()) - - CGAL::abs(CGAL::leading_coefficient(_g.numer())) * - CGAL::leading_coefficient(_f.denom()); - if (lead_coeff_ratio > 0)//f is stronger than g - return (_f.sign_near_minus_infinity() == CGAL::NEGATIVE ) ? false : true; - if (lead_coeff_ratio < 0) //g is stronger than f - return (_g.sign_near_minus_infinity() == CGAL::NEGATIVE ) ? true : false; - - //ratio is the same, instead of continuing with taylor expansion, - //compute explicitly - - return __get_is_above_near_minus_infinity(); - } - - bool __get_is_above_near_minus_infinity() - { - Bound b; - if (_event_roots.empty()) - b = Bound(0); - else - { - b = (_ak_ptr->approximate_relative_1_object()(_event_roots.front(), 0)).first - 1; //lower bound of first root - } - return is_above_at(b); - } - - bool is_above_at(const Bound& b) - { - //return true if f is above g at b which means return (sign == positive) of : - // - // numer_f * denom _g - numer_f * denom _g - //f-g= -------------------------------------- at b - // denom _f * denom _g - - //TODO: unnescecary construction of real - Algebraic_real_1 x(_ak_ptr->construct_algebraic_real_1_object()(b)); - - CGAL::Sign numer = _ak_ptr->sign_at_1_object()(_resultant, x); - CGAL::Sign denom_f = _ak_ptr->sign_at_1_object()(_f.denom(),x); - CGAL::Sign denom_g = _ak_ptr->sign_at_1_object()(_g.denom(),x); - CGAL::Sign denom = denom_f * denom_g ; - CGAL::Sign s = numer*denom; - - CGAL_precondition(s != CGAL::ZERO); - - return (s == CGAL::POSITIVE); - } - std::vector compute_is_above_explicitly() - { - std::vector tmp_is_above; - if (_event_roots.size()== 0) - { - Bound b = 1; //all bound are legal, choose 1 for simplicity - tmp_is_above.push_back(is_above_at(b)); - return tmp_is_above; - } - - tmp_is_above.reserve(_event_roots.size()+1); - //left boundary - Bound b = (_ak_ptr->approximate_relative_1_object() - (_event_roots.front(),0)).first - 1; //lower bound of first root - tmp_is_above.push_back(is_above_at(b)); - - //mid intervals - typename Algebraic_vector::size_type i; - for (i = 0; i < _event_roots.size()-1; ++i) - { - b = _ak_ptr->bound_between_1_object()(_event_roots[i],_event_roots[i+1]); - tmp_is_above.push_back(is_above_at(b)); - } - - //right boundary - b = (_ak_ptr->approximate_relative_1_object()(_event_roots.back(), 0)).second + 1; //lower bound of last root - tmp_is_above.push_back(is_above_at(b)); - return tmp_is_above; - } - -private: - Rational_function _f,_g; - Polynomial_1 _resultant; - Algebraic_vector _roots; - //roots of resultant merged with roots of f & g's denomenators - Algebraic_vector _event_roots; - Multiplicity_vector _multiplicities; - //is f above g in the interval induced by index i of _roots - std::vector _is_above; - Algebraic_kernel_d_1* _ak_ptr; -}; // Rational_function_canonicalized_pair_rep - -template -class Rational_function_canonicalized_pair: - public Handle_with_policy > -{ -public: - typedef Algebraic_kernel_ Algebraic_kernel_d_1; - typedef Rational_function_canonicalized_pair_rep - Rep; - typedef Handle_with_policy Base; - typedef Rational_function_canonicalized_pair - Self; - typedef typename Rep::Rational_function Rational_function; - typedef typename Rep::Algebraic_real_1 Algebraic_real_1; - typedef typename Rep::Polynomial_1 Polynomial_1; - typedef typename Rep::Algebraic_vector Algebraic_vector; - typedef typename Rep::Multiplicity_vector Multiplicity_vector; - typedef typename Rep::Root_multiplicity_vector Root_multiplicity_vector; - - Rational_function_canonicalized_pair(const Rational_function& f, - const Rational_function& g, - Algebraic_kernel_d_1* ak_ptr) : - Base(f, g, ak_ptr) {} - //used to solve VS bug... - Rational_function_canonicalized_pair(const Self & p) : - Base(static_cast (p)) {} - - Comparison_result compare_f_g_at(const Algebraic_real_1& x, - CGAL::Sign epsilon = CGAL::ZERO) const - { - return this->ptr()->compare_f_g_at(x,epsilon); - } - - Comparison_result compare_f_g_at(Arr_parameter_space boundary) const - { - return this->ptr()->compare_f_g_at(boundary); - } - - bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space, - const Algebraic_real_1 left, - const Arr_parameter_space right_parameter_space, - const Algebraic_real_1 right) const - { - return this->ptr()->is_intersecting_in_range(left_parameter_space, left, - right_parameter_space, right); - } - - const Rational_function& f() const - { - return this->ptr()->f(); - } - - const Rational_function& g() const - { - return this->ptr()->g(); - } - - const Algebraic_vector & roots() const - { - return this->ptr()->roots(); - } - - const Multiplicity_vector & multiplicities() const - { - return this->ptr()->multiplicities(); - } -}; //Rational_function_canonicalized_pair - -} //namespace Arr_rational_arc -} //namespace CGAL { - -#endif //CGAL_RATIONAL_FUNCTION_CANONICALIZED_PAIR_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h deleted file mode 100644 index c6201779ea2..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_ordered_pair.h +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_RATIONAL_FUNCTION_ORDERED_PAIR_H -#define CGAL_RATIONAL_FUNCTION_ORDERED_PAIR_H - - -#include -#include -#include - -namespace CGAL { -namespace Arr_rational_arc -{ -template -class Rational_function_ordered_pair: - public Base_rational_arc_ds_1 -{ -public: - typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; - typedef Base_rational_arc_ds_1 Base; - typedef CGAL::Arr_rational_arc::Rational_function_pair - Rational_function_pair; - typedef CGAL::Arr_rational_arc::Rational_function - Rational_function; - - typedef typename Base::Polynomial_1 Polynomial_1; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Base::Algebraic_vector Algebraic_vector; - typedef typename Base::Multiplicity Multiplicity; - typedef typename Base::Multiplicity_vector Multiplicity_vector; - typedef typename Base::Root_multiplicity_vector Root_multiplicity_vector; - -public: - Rational_function_ordered_pair(const Rational_function_pair& rat_pair, - bool is_opposite = false) : - _rat_pair(rat_pair), _is_opposite(is_opposite) - {} - - Comparison_result compare_f_g_at(const Algebraic_real_1& x, - CGAL::Sign epsilon = CGAL::ZERO) - { - Comparison_result cr = _rat_pair.compare_f_g_at(x,epsilon); - if (_is_opposite == false) - return cr; - return (cr == CGAL:: LARGER ) ? CGAL:: SMALLER : - (cr == CGAL:: SMALLER ) ? CGAL:: LARGER : - /* (cr == CGAL::EQUAL)*/ CGAL:: EQUAL; - } - - Comparison_result compare_f_g_at(Arr_parameter_space boundary) - { - Comparison_result cr = _rat_pair.compare_f_g_at(boundary); - if (_is_opposite == false) - return cr; - return (cr == CGAL:: LARGER ) ? CGAL:: SMALLER : - (cr == CGAL:: SMALLER ) ? CGAL:: LARGER : - /* (cr == CGAL::EQUAL)*/ CGAL::EQUAL; - } - - bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space, - const Algebraic_real_1 left, - const Arr_parameter_space right_parameter_space, - const Algebraic_real_1 right) - { - return _rat_pair.is_intersecting_in_range(left_parameter_space, left, - right_parameter_space, right); - } - - const Algebraic_vector & roots() const - { - return _rat_pair.roots(); - } - - const Multiplicity_vector & multiplicities() const - { - return _rat_pair.multiplicities(); - } - -private: - const Rational_function_pair& _rat_pair; - bool _is_opposite; -}; // Rational_function_ordered_pair - - -} //namespace Arr_rational_arc -} //namespace CGAL { - -#endif //CGAL_RATIONAL_FUNCTION_ORDERED_PAIR_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_pair.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_pair.h deleted file mode 100644 index 87166bc9d73..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_function_pair.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_RATIONAL_FUNCTION_ORDERED_PAIR_H -#define CGAL_RATIONAL_FUNCTION_ORDERED_PAIR_H - - -#include -#include -#include - -namespace CGAL { -namespace Arr_rational_arc { - -template -class Rational_function_pair: - public Base_rational_arc_ds_1 -{ -public: - typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; - typedef Base_rational_arc_ds_1 Base; - typedef CGAL::Arr_rational_arc::Rational_function_canonicalized_pair - Rational_function_canonicalized_pair; - typedef CGAL::Arr_rational_arc::Rational_function - Rational_function; - - typedef typename Base::Polynomial_1 Polynomial_1; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - typedef typename Base::Algebraic_vector Algebraic_vector; - typedef typename Base::Multiplicity Multiplicity; - typedef typename Base::Multiplicity_vector Multiplicity_vector; - typedef typename Base::Root_multiplicity_vector Root_multiplicity_vector; - -public: - Rational_function_pair(const Rational_function_canonicalized_pair& rat_pair, - bool is_opposite = false) : - _rat_pair(rat_pair), _is_opposite(is_opposite) - {} - - Comparison_result compare_f_g_at(const Algebraic_real_1& x , - CGAL::Sign epsilon = CGAL::ZERO) - { - Comparison_result cr = _rat_pair.compare_f_g_at(x,epsilon); - return (_is_opposite) ? -cr : cr ; - } - - Comparison_result compare_f_g_at(Arr_parameter_space boundary) - { - Comparison_result cr = _rat_pair.compare_f_g_at(boundary); - return (_is_opposite) ? -cr : cr ; - } - - bool is_intersecting_in_range(const Arr_parameter_space left_parameter_space, - const Algebraic_real_1 left, - const Arr_parameter_space right_parameter_space, - const Algebraic_real_1 right) - { - return _rat_pair.is_intersecting_in_range(left_parameter_space, left, - right_parameter_space, right); - } - - const Algebraic_vector & roots() const - { - return _rat_pair.roots(); - } - - const Multiplicity_vector & multiplicities() const - { - return _rat_pair.multiplicities(); - } - -private: - const Rational_function_canonicalized_pair& _rat_pair; - bool _is_opposite; -}; // Rational_function_pair - - -} //namespace Arr_rational_arc -} //namespace CGAL { - -#endif //CGAL_RATIONAL_FUNCTION_ORDERED_PAIR_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h deleted file mode 100644 index ee300dabbbf..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Singleton.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - - - -#ifndef SINGLETON_H_ -#define SINGLETON_H_ - -namespace CGAL { -namespace Arr_rational_arc { -template -class Singleton -{ -public: - static T* instance() - { - if(!m_pInstance) - m_pInstance = new T; - assert(m_pInstance !=NULL); - return m_pInstance; - } - - static void DestroyInstance() - { - delete m_pInstance; - m_pInstance = NULL; - }; -private: - Singleton(); // ctor hidden - ~Singleton(); // dtor hidden -private: - static T* m_pInstance; -}; - -template T* Singleton::m_pInstance=NULL; - -} // namespace Arr_rational_arc -} //namespace CGAL { -#endif // SINGLETON_H_ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Vertical_segment_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Vertical_segment_d_1.h deleted file mode 100644 index a622e7f1d23..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Vertical_segment_d_1.h +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_VERTICAL_SEGMENT_D_1 -#define CGAL_VERTICAL_SEGMENT_D_1 - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace CGAL { -namespace Arr_rational_arc { - -template -class Vertical_segment_d_1: public Base_rational_arc_ds_1 -{ -public: - typedef Algebraic_kernel_ Algebraic_kernel; - typedef Base_rational_arc_ds_1 Base; - typedef Vertical_segment_d_1 Self; - - typedef CGAL::Arr_rational_arc::Rational_function Rational_function; - typedef CGAL::Arr_rational_arc::Rational_function_pair Rational_function_pair; - typedef CGAL::Arr_rational_arc::Algebraic_point_2 Algebraic_point_2; - typedef typename Base::Algebraic_real_1 Algebraic_real_1; - - typedef CGAL::Arr_rational_arc::Cache Cache; - -public: - //////////////////// - //concept functions - //////////////////// - Vertical_segment_d_1() {} - //construct a vertical line at p.x - Vertical_segment_d_1(const Algebraic_point_2& p) - :_max(p) , _min(p), _max_parameter_space(ARR_TOP_BOUNDARY), _min_parameter_space(ARR_BOTTOM_BOUNDARY) - {} - //construct a vertical ray at p - Vertical_segment_d_1(const Algebraic_point_2& p, bool is_directed_up) - :_max(p) , _min(p) - { - _max_parameter_space = is_directed_up ? ARR_TOP_BOUNDARY : ARR_INTERIOR ; - _min_parameter_space = is_directed_up ? ARR_INTERIOR : ARR_BOTTOM_BOUNDARY ; - } - //construct a vertical line at between points p1,p2 - Vertical_segment_d_1(const Algebraic_point_2& p1,const Algebraic_point_2& p2,Cache& cache) - :_max_parameter_space(ARR_INTERIOR), _min_parameter_space(ARR_INTERIOR) - { - CGAL_precondition(p1.x() == p2.x()); - CGAL_precondition(p1.compare_xy_2(p2,cache) != CGAL::EQUAL); - - Rational_function_pair rat_func_pair = cache.get_rational_pair( p1.rational_function(), - p2.rational_function()); - Comparison_result comp (rat_func_pair.compare_f_g_at(p1.x())); - CGAL_postcondition(comp != CGAL::EQUAL); - - _min = (comp == CGAL::SMALLER) ? p1 : p2; - _max = (comp == CGAL::SMALLER) ? p2 : p1; - } - - Vertical_segment_d_1(const Self& other) - { - _max = other.max(); - _min = other.min(); - _max_parameter_space = other.max_parameter_space(); - _min_parameter_space = other.min_parameter_space(); - } - bool has_same_x(const Self& other) const - { - return (_min.x() == other.x()) ; - } - Self& operator= (const Self & other) - { - if (this != &other) // protect against invalid self-assignment - { - _min = other.min(); - _max = other.max(); - _min_parameter_space = other.min_parameter_space(); - _max_parameter_space = other.max_parameter_space(); - } - return *this; - } - Algebraic_point_2& max() - { - return _max; - } - const Algebraic_point_2 & max() const - { - return _max; - } - Algebraic_point_2& min() - { - return _min; - } - const Algebraic_point_2 & min() const - { - return _min; - } - - CGAL::Arr_parameter_space max_parameter_space() const - { - return _max_parameter_space; - } - CGAL::Arr_parameter_space min_parameter_space() const - { - return _min_parameter_space; - } - - //////////////////////// - //non concept functions - //////////////////////// -public: - const Algebraic_real_1& x() const - { - return _min.x(); - } - const Rational_function& min_f() const - { - CGAL_precondition (_min_parameter_space == CGAL::ARR_INTERIOR ); - return _min.rational_function(); - } - const Rational_function& max_f() const - { - CGAL_precondition (_max_parameter_space == CGAL::ARR_INTERIOR ); - return _max.rational_function(); - } - bool max_bounded() const - { - CGAL_precondition( (_max_parameter_space == ARR_TOP_BOUNDARY) || - (_max_parameter_space == ARR_INTERIOR)) ; - return (_max_parameter_space == ARR_TOP_BOUNDARY) ? false : true; - } - bool min_bounded() const - { - CGAL_precondition( (_min_parameter_space == ARR_BOTTOM_BOUNDARY) || - (_min_parameter_space == ARR_INTERIOR)) ; - return (_min_parameter_space == ARR_BOTTOM_BOUNDARY) ? false : true; - } - -private: - - bool is_line() const - { - return ((_max_parameter_space == ARR_TOP_BOUNDARY ) && - (_min_parameter_space == ARR_BOTTOM_BOUNDARY) ); - } - bool is_ray() const - { - CGAL_precondition( (_max_parameter_space == ARR_TOP_BOUNDARY) || - (_max_parameter_space == ARR_INTERIOR)) ; - CGAL_precondition( (_min_parameter_space == ARR_BOTTOM_BOUNDARY) || - (_min_parameter_space == ARR_INTERIOR)) ; - return ( ((_max_parameter_space == ARR_TOP_BOUNDARY) && (_min_parameter_space == ARR_INTERIOR ))|| - ((_max_parameter_space == ARR_INTERIOR ) && (_min_parameter_space == ARR_BOTTOM_BOUNDARY )) ); - } - bool is_segment() const - { - CGAL_precondition( (_max_parameter_space == ARR_TOP_BOUNDARY) || - (_max_parameter_space == ARR_INTERIOR)) ; - CGAL_precondition( (_min_parameter_space == ARR_BOTTOM_BOUNDARY) || - (_min_parameter_space == ARR_INTERIOR)) ; - return ((_max_parameter_space == ARR_INTERIOR) && - (_min_parameter_space == ARR_INTERIOR) ); - } - -public: - //------------------------ - // Print the vertical segment. - std::ostream& print (std::ostream& os) const - { - os << "x = " << _min.x() << " "; - //print lower point - if (_min_parameter_space == CGAL::ARR_BOTTOM_BOUNDARY) - { - os << "min y = -oo"; - } - else - { - os << "y = ("; - print_polynomial (os, _min.rational_function().numer(), 'x'); - os << ") / ("; - print_polynomial (os, _min.rational_function().denom(), 'x'); - os << ")"; - } - - os << " to "; - - //print lower point - if (_max_parameter_space == CGAL::ARR_TOP_BOUNDARY) - { - os << "max y = +oo"; - } - else - { - os << "y = ("; - print_polynomial (os, _max.rational_function().numer(), 'x'); - os << ") / ("; - print_polynomial (os, _max.rational_function().denom(), 'x'); - os << ")"; - } - return (os); - } - -private: - Algebraic_point_2 _min; - Algebraic_point_2 _max; - - CGAL::Arr_parameter_space _min_parameter_space; - CGAL::Arr_parameter_space _max_parameter_space; -}; //Vertical_segment - - //------------------------------- - //! Exporter for Vertical_segment. - template - std::ostream& - operator<< (std::ostream& os, - const Vertical_segment_d_1 & ver) - { - return (ver.print (os)); - } - -} //namespace Arr_rational_arc { -} //namespace CGAL { - -#endif //CGAL_VERTICAL_SEGMENT_D_1 diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rational_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rational_arc_traits_2.h index 7219dab84a6..ea618292c84 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rational_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rational_arc_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -20,13 +20,6 @@ #ifndef CGAL_ARR_RATIONAL_ARC_TRAITS_2_H #define CGAL_ARR_RATIONAL_ARC_TRAITS_2_H - -#if (defined __GNUC__) - #warning Arr_rational_arc_traits_2.h is DEPRECATED, please include Arr_rational_function_traits_2.h instead -#elif (defined _MSC_VER) - #pragma message("Arr_rational_arc_traits_2.h is DEPRECATED, please include Arr_rational_function_traits_2.h instead") -#endif - /*! \file * Definition of the Arr_rational_arc_traits_2 class. */ @@ -65,10 +58,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_open_side_tag Left_side_category; - typedef Arr_open_side_tag Bottom_side_category; - typedef Arr_open_side_tag Top_side_category; - typedef Arr_open_side_tag Right_side_category; + typedef Arr_open_side_tag Arr_left_side_category; + typedef Arr_open_side_tag Arr_bottom_side_category; + typedef Arr_open_side_tag Arr_top_side_category; + typedef Arr_open_side_tag Arr_right_side_category; // Traits objects: typedef _Rational_arc_2 Curve_2; @@ -623,17 +616,16 @@ public: 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 arc ends on the + /*! A function object that compares the x-coordinates of arc ends near the * boundary of the parameter space */ - class Compare_x_at_limit_2 { + class Compare_x_near_boundary_2 { public: - /*! Compare the x-coordinate of a point and the x-coordinate of the limit - * of a rational arc at its specificed end at y = +/- oo. - * \param p the point. - * \param xcv the parametric curve, the endpoint of which is compared. - * \param ce identifies an open end of xcv - + /*! Compare 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. + * \param ce the line-end indicator - * ARR_MIN_END - the minimal end of xc or * ARR_MAX_END - the maximal end of xc. * \return the comparison result: @@ -641,82 +633,44 @@ 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 curve xcv lies on a boundary, implying that xcv - * is either a vertical line or a curve with a vertical asymptote. + * \pre the ce end of the line xcv lies on a boundary. */ Comparison_result operator()(const Point_2 & p, const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { - // TODO implement (simplify) return (xcv.compare_end (p, ce)); } - /*! Compare the x-coordinates of the limits of 2 parameteric curves at - * their specificed ends at y = +/- oo. + /*! Compare the x-coordinates of 2 arcs ends near the boundary of the + * parameter space at y = +/- oo. * \param xcv1 the first arc. - * \param ce1 identifies an open end of ce1 - + * \param ce1 the first arc end indicator - * ARR_MIN_END - the minimal end of xcv1 or * ARR_MAX_END - the maximal end of xcv1. * \param xcv2 the second arc. - * \param ce2 identifies an open end of ce2 - + * \param ce2 the second arc end indicator - * 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 either a vertical line or a curve with a vertical asymptote. - * \pre the ce2 end of the line xcv2 lies on a boundary, implying that xcv2 - * is either a vertical line or a curve with a vertical asymptote. + * \pre the ce1 end of the line xcv1 lies on a boundary. + * \pre the ce2 end of the line xcv2 lies on a boundary. */ Comparison_result operator()(const X_monotone_curve_2 & xcv1, Arr_curve_end ce1, const X_monotone_curve_2 & xcv2, Arr_curve_end ce2) const { - // TODO implement (simplify) return xcv1.compare_ends (ce1, xcv2, ce2); } }; - /*! Obtain a Compare_x_at_limit_2 function object */ - Compare_x_at_limit_2 compare_x_at_limit_2_object() const - { return Compare_x_at_limit_2(); } - - /*! A function object that compares the x-coordinates of arc ends near the - * boundary of the parameter space - */ - class Compare_x_near_limit_2 { - public: - - /*! Compare the x-coordinates of 2 arcs ends near the boundary of the - * parameter space at y = +/- oo. - * \param xcv1 the first arc. - * \param xcv2 the second arc. - * \param ce the curve end indicator - - * ARR_MIN_END - the minimal end of curves or - * ARR_MAX_END - the maximal end of curves. - * \return the second comparison result: - * SMALLER - x(xcv1, ce) < x(xcv2, ce); - * EQUAL - x(xcv1, ce) = x(xcv2, ce); - * LARGER - x(xcv1, ce) > x(xcv2, ce). - * \pre the ce end of the line xcv1 lies on a boundary. - * \pre the ce end of the line xcv2 lies on a boundary. - */ - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - // TODO implement (simplify) - return xcv1.compare_ends (ce, xcv2, ce); - } - }; - - /*! Obtain a Compare_x_near_limit_2 function object */ - Compare_x_near_limit_2 compare_x_near_limit_2_object() const - { return Compare_x_near_limit_2(); } + /*! 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-coordinates of arc ends near the 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 deleted file mode 100644 index eee7b601269..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h +++ /dev/null @@ -1,1307 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H -#define CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H - -#include -#include -#include -#include -#include -#include -#include -#include - - - -namespace CGAL { - -/*! \class - * A traits class for maintaining an arrangement of bounded arcs (segments) of - * rational functions of arbitrary degree. - * - * The class is templated with two parameters: - * Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type - * for the coordinates of arrangement vertices, which are algebraic - * numbers (defined by Nt_traits::Algebraic). - * Nt_traits A traits class for performing various operations on the integer, - * rational and algebraic types. - */ - -template -class Arr_rational_function_traits_2 -{ -public: - typedef AlgebraicKernel_d_1 Algebraic_kernel_d_1; - - typedef Arr_rational_function_traits_2 - Self; - typedef Arr_rational_arc::Base_rational_arc_ds_1 - Base_rational_arc_ds_1; - - // Traits objects: - typedef Arr_rational_arc::Base_rational_arc_d_1 - Base_curve_2; - typedef Arr_rational_arc::Continuous_rational_arc_d_1 - X_monotone_curve_2; - typedef Arr_rational_arc::Rational_arc_d_1 - Curve_2; - typedef Arr_rational_arc::Algebraic_point_2 - Point_2; - - typedef typename Base_rational_arc_ds_1::Algebraic_real_1 Algebraic_real_1; - typedef typename Base_rational_arc_ds_1::Multiplicity Multiplicity; - typedef typename Base_curve_2::Rat_vector Rat_vector; - - typedef typename Base_rational_arc_ds_1::Integer Integer; - typedef typename Base_rational_arc_ds_1::Rational Rational; - typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; - typedef typename Base_rational_arc_ds_1::Coefficient Coefficient; - - typedef typename Base_rational_arc_ds_1::FT_rat_1 FT_rat_1; - typedef typename Base_rational_arc_ds_1::Polynomial_traits_1 - Polynomial_traits_1; - - typedef typename Algebraic_kernel_d_1::Bound Bound; - typedef Bound - Approximate_number_type; - - typedef CGAL::Arr_rational_arc::Rational_function - Rational_function; - typedef CGAL::Arr_rational_arc::Cache Cache; - - typedef typename Arr_rational_arc::Vertical_segment_d_1 - Vertical_segment; - - //Category tags: - typedef Tag_true Has_left_category; - typedef Tag_true Has_merge_category; - typedef Tag_true Has_do_intersect_category; - - typedef Tag_true Has_vertical_segment_category; - - typedef Arr_open_side_tag Left_side_category; - typedef Arr_open_side_tag Bottom_side_category; - typedef Arr_open_side_tag Top_side_category; - typedef Arr_open_side_tag Right_side_category; - -private: - mutable Cache _cache; - mutable Algebraic_kernel_d_1* _ak_ptr; - bool delete_ak; - -public: - Algebraic_kernel_d_1* algebraic_kernel_d_1() const {return _ak_ptr;} - - bool delete_ak_internal_flag() const - { - return delete_ak; - } - // Algebraic_kernel_d_1& algebraic_kernel_d_1() {return _ak;} - -public: - const Cache& cache() const {return _cache;} - -public: - //------------ - //Constructors - //------------ - - //--------------------- - // Default constructor. - Arr_rational_function_traits_2() : delete_ak(true) - { - _ak_ptr = new Algebraic_kernel_d_1; - _cache.initialize(_ak_ptr); - } - - Arr_rational_function_traits_2(Algebraic_kernel_d_1* ak_ptr) : - _ak_ptr(ak_ptr),delete_ak(false) - { - _cache.initialize(_ak_ptr); - } - - Arr_rational_function_traits_2(const Self& other) - :delete_ak(other.delete_ak_internal_flag()) - { - //copy kernel - if (delete_ak) - _ak_ptr = new Algebraic_kernel_d_1(*other.algebraic_kernel_d_1()); - else - _ak_ptr = other.algebraic_kernel_d_1(); - - //copy cache - _cache.initialize(other.cache(), _ak_ptr); - } - - ~Arr_rational_function_traits_2() - { - if (delete_ak) - delete (_ak_ptr); - } - - /*! A functor that constructs an x_monotone curve */ - class Construct_x_monotone_curve_2 - { - protected: - typedef Arr_rational_function_traits_2 Traits; - typedef CGAL::Arr_rational_arc::Cache Cache; - - /*! The traits */ - const Traits* _traits; - - /*! Constructor - * \param traits the traits - */ - Construct_x_monotone_curve_2(const Traits* traits) : _traits(traits) {} - - friend class Arr_rational_function_traits_2; - - public: - typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; - typedef typename Base_rational_arc_ds_1::Algebraic_real_1 - Algebraic_real_1; - typedef Arr_rational_arc::Continuous_rational_arc_d_1 - X_monotone_curve_2; - typedef Polynomial_1 argument_type; - typedef Polynomial_1 first_argument_type; - typedef Polynomial_1 second_argument_type; - typedef X_monotone_curve_2 result_type; - - X_monotone_curve_2 operator()( const Polynomial_1& P) const - { - return X_monotone_curve_2(P, _traits->cache()); - } - - template - X_monotone_curve_2 operator()( InputIterator begin, InputIterator end) const - { - Rat_vector rat_vec(begin,end); - return X_monotone_curve_2(rat_vec, _traits->cache()); - } - - X_monotone_curve_2 operator()(const Polynomial_1& P, - const Algebraic_real_1& x_s, - bool dir_right) const - { - return X_monotone_curve_2(P, x_s, dir_right, _traits->cache()); - } - - template - X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, - const Algebraic_real_1& x_s, - bool dir_right) const - { - Rat_vector rat_vec(begin,end); - return X_monotone_curve_2(rat_vec, x_s, dir_right, _traits->cache()); - } - - X_monotone_curve_2 operator()(const Polynomial_1& P, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - return X_monotone_curve_2(P, x_s, x_t, _traits->cache()); - } - - template - X_monotone_curve_2 operator()(InputIterator begin, InputIterator end, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - Rat_vector rat_vec(begin,end); - return X_monotone_curve_2(rat_vec, x_s, x_t, _traits->cache()); - } - - X_monotone_curve_2 operator()(const Polynomial_1& P, - const Polynomial_1& Q) const - { - return X_monotone_curve_2(P, Q, _traits->cache()); - } - - template - X_monotone_curve_2 operator()(InputIterator begin_numer, - InputIterator end_numer, - InputIterator begin_denom, - InputIterator end_denom) const - { - Rat_vector rat_vec_numer(begin_numer,end_numer); - Rat_vector rat_vec_denom(begin_denom,end_denom); - return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, _traits->cache()); - } - - X_monotone_curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q, - const Algebraic_real_1& x_s, - bool dir_right) const - { - return X_monotone_curve_2(P, Q, x_s, dir_right, _traits->cache()); - } - - template - X_monotone_curve_2 operator()(InputIterator begin_numer, - InputIterator end_numer, - InputIterator begin_denom, - InputIterator end_denom, - const Algebraic_real_1& x_s, - bool dir_right) const - { - Rat_vector rat_vec_numer(begin_numer,end_numer); - Rat_vector rat_vec_denom(begin_denom,end_denom); - return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, x_s,dir_right, - _traits->cache()); - } - - X_monotone_curve_2 operator()(const Polynomial_1& P, - const Polynomial_1& Q, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - return X_monotone_curve_2(P, Q, x_s, x_t, _traits->cache()); - } - - template - X_monotone_curve_2 operator()(InputIterator begin_numer, - InputIterator end_numer, - InputIterator begin_denom, - InputIterator end_denom, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - Rat_vector rat_vec_numer(begin_numer, end_numer); - Rat_vector rat_vec_denom(begin_denom, end_denom); - return X_monotone_curve_2(rat_vec_numer, rat_vec_denom, x_s, x_t, - _traits->cache()); - } - }; - - Construct_x_monotone_curve_2 construct_x_monotone_curve_2_object() const - { - return Construct_x_monotone_curve_2(this); - } - - /*! A functor that constructs an arbitrary curve */ - class Construct_curve_2 - { - protected: - typedef Arr_rational_function_traits_2 Traits; - typedef CGAL::Arr_rational_arc::Cache Cache; - - /*! The traits */ - const Traits* _traits; - - /*! Constructor - * \param traits the traits - */ - Construct_curve_2(const Traits* traits) : _traits(traits) {} - - friend class Arr_rational_function_traits_2; - - public: - typedef typename Base_rational_arc_ds_1::Polynomial_1 Polynomial_1; - typedef typename Base_rational_arc_ds_1::Algebraic_real_1 - Algebraic_real_1; - typedef Arr_rational_arc::Rational_arc_d_1 - Curve_2; - typedef Polynomial_1 argument_type; - typedef Polynomial_1 first_argument_type; - typedef Polynomial_1 second_argument_type; - typedef Curve_2 result_type; - - Curve_2 operator()(const Polynomial_1& P) const - { - return Curve_2(P, _traits->cache()); - } - - template - Curve_2 operator()(InputIterator begin, InputIterator end) const - { - Rat_vector rat_vec(begin, end); - return Curve_2(rat_vec, _traits->cache()); - } - - Curve_2 operator()(const Polynomial_1& P, - const Algebraic_real_1& x_s, bool dir_right) const - { - return Curve_2(P, x_s, dir_right, _traits->cache()); - } - - template - Curve_2 operator()(InputIterator begin, InputIterator end, - const Algebraic_real_1& x_s, bool dir_right) const - { - Rat_vector rat_vec(begin, end); - return Curve_2(rat_vec, x_s, dir_right, _traits->cache()); - } - - Curve_2 operator()(const Polynomial_1& P, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - return Curve_2(P, x_s, x_t, _traits->cache()); - } - - template - Curve_2 operator()(InputIterator begin, InputIterator end, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - Rat_vector rat_vec(begin,end); - return Curve_2(rat_vec, x_s, x_t, _traits->cache()); - } - - Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q) const - { - return Curve_2(P, Q, _traits->cache()); - } - - template - Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom) const - { - Rat_vector rat_vec_numer(begin_numer, end_numer); - Rat_vector rat_vec_denom(begin_denom, end_denom); - return Curve_2(rat_vec_numer, rat_vec_denom, _traits->cache()); - } - - Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q, - const Algebraic_real_1& x_s, bool dir_right) const - { - return Curve_2(P, Q, x_s, dir_right, _traits->cache()); - } - - template - Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom, - const Algebraic_real_1& x_s, bool dir_right) const - { - Rat_vector rat_vec_numer(begin_numer,end_numer); - Rat_vector rat_vec_denom(begin_denom,end_denom); - return Curve_2(rat_vec_numer, rat_vec_denom, x_s, dir_right, - _traits->cache()); - } - - Curve_2 operator()(const Polynomial_1& P, const Polynomial_1& Q, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - return Curve_2(P, Q, x_s, x_t, _traits->cache()); - } - - template - Curve_2 operator()(InputIterator begin_numer, InputIterator end_numer, - InputIterator begin_denom, InputIterator end_denom, - const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t) const - { - Rat_vector rat_vec_numer(begin_numer,end_numer); - Rat_vector rat_vec_denom(begin_denom,end_denom); - return Curve_2(rat_vec_numer, rat_vec_denom, x_s, x_t, _traits->cache()); - } - }; - - Construct_curve_2 construct_curve_2_object() const - { - return Construct_curve_2(this); - } - - /*! Construct a point */ - class Construct_point_2 - { - protected: - typedef Arr_rational_function_traits_2 Traits; - typedef CGAL::Arr_rational_arc::Cache Cache; - - /*! The traits */ - const Traits* _traits; - - /*! Constructor - * \param traits the traits - */ - Construct_point_2(const Traits* traits) : _traits(traits) {} - - friend class Arr_rational_function_traits_2; - - public: - Point_2 operator()(const Rational_function& rational_function, - const Algebraic_real_1& x_coordinate) - { - return Point_2(rational_function, x_coordinate); - } - - Point_2 operator()(const Rational& x, const Rational& y) - { - Integer y_numer,y_denom; - typename FT_rat_1::Decompose()(y,y_numer,y_denom); - - return Point_2(_traits->cache().get_rational_function(Rational(y_numer, - y_denom)), - _traits->algebraic_kernel_d_1()-> - construct_algebraic_real_1_object()(x)); - } - Point_2 operator()(const Algebraic_real_1& x, const Rational& y) - { - Integer y_numer; - Integer y_denom; - typename FT_rat_1::Decompose()(y, y_numer, y_denom); - return Point_2(_traits->cache().get_rational_function(Rational(y_numer, - y_denom)), - x); - } - }; //Construct_point - - Construct_point_2 construct_point_2_object() const - { - return Construct_point_2(this); - } - - class Construct_vertical_segment - { - private: - Cache& _cache; - - public: - Construct_vertical_segment(Cache& cache) : _cache(cache) {} - - Vertical_segment operator()(const Point_2& p) const - { - return Vertical_segment(p); - } - - Vertical_segment operator()(const Point_2& p, bool is_directed_up) const - { - return Vertical_segment(p, is_directed_up); - } - - Vertical_segment operator()(const Point_2& p1,const Point_2& p2) const - { - return Vertical_segment(p1, p2, _cache); - } - }; //Construct_vertical_segment - - Construct_vertical_segment construct_vertical_segment_object() const - { - return Construct_vertical_segment(_cache); - } - - //------------------------ - //Functor definitions. - //------------------------ - - //--------------------------------------------------------------- - //A functor that compares the x-coordinates of two points - class Compare_x_2 - { - public: - /*! - * Compare the x-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). - */ - Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const - { - Comparison_result comp = CGAL::compare(p1.x(), p2.x()); - return (comp); - } - }; - - /*! Obtain a Compare_x_2 functor object. */ - Compare_x_2 compare_x_2_object() const - { - return Compare_x_2(); - } - - /*! A functor that compares two points lexigoraphically: by x, then by y. */ - class Compare_xy_2 - { - protected: - typedef Arr_rational_function_traits_2 Traits; - typedef CGAL::Arr_rational_arc::Cache Cache; - - /*! The traits */ - const Traits* _traits; - - /*! Constructor - * \param traits the traits - */ - Compare_xy_2(const Traits* traits) : _traits(traits) {} - - friend class Arr_rational_function_traits_2; - - public: - /*! - * 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); - * SMALLER if x(p1) < x(p2), or if x(p1) = x(p2) and y(p1) < y(p2); - * EQUAL if the two points are equal. - */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - return p1.compare_xy_2(p2, _traits->cache()); - } - }; - - /*! Obtain a Compare_xy_2 functor object. */ - Compare_xy_2 compare_xy_2_object() const - { - return Compare_xy_2(this); - } - - /*! A functor that obtains the left endpoint of a curve. */ - class Construct_min_vertex_2 - { - public: - /*! - * Get the left endpoint of the x-monotone curve (segment). - * \param cv The curve. - * \return The left endpoint. - */ - const Point_2& operator()(const X_monotone_curve_2 & cv) const - { - return (cv.left()); - } - }; - - /*! 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 curve. */ - class Construct_max_vertex_2 - { - public: - /*! - * Get the right endpoint of the x-monotone curve (segment). - * \param cv The curve. - * \return The right endpoint. - */ - const Point_2& operator() (const X_monotone_curve_2& cv) const - { - return (cv.right()); - } - }; - - /*! 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 curve is vertical. */ - class Is_vertical_2 - { - public: - /*! - * Check 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. - */ - bool operator()(const X_monotone_curve_2&) const - { - // A rational function can never be vertical. - return false; - } - }; - - /*! 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 curve at - * the point x-coordinate. - */ - class Compare_y_at_x_2 - { - 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. - * \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. - */ - Comparison_result operator()(const Point_2& p, - const X_monotone_curve_2& cv) const - { - return (cv.point_position(p,_cache)); - } - }; - - /*! 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(_cache); - } - - /*! A functor that compares compares the y-coordinates of two curves - * immediately to the left of their intersection point. - */ - class Compare_y_at_x_left_2 - { - private: - 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 - * 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 - * 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, - const Point_2& p) const - { - // Make sure that p lies on both curves, and that both are defined to its - // left (so their left endpoint is lexicographically smaller than p). - CGAL_precondition(cv1.point_position(p,_cache) == EQUAL && - cv2.point_position(p,_cache) == EQUAL); - - CGAL_precondition((cv1.left_parameter_space_in_x() != ARR_INTERIOR || - cv1.left_parameter_space_in_y() != ARR_INTERIOR || - (p.x() > cv1.left().x())) && - (cv2.left_parameter_space_in_x() != ARR_INTERIOR || - cv2.left_parameter_space_in_y() != ARR_INTERIOR || - (p.x() > cv2.left().x()))); - - // Compare the two arcs. - return cv1.compare_at_intersection (cv2,p,true,_cache);} - }; - - /*! 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(_cache); - } - - /*! A functor that compares compares the y-coordinates of two curves - * immediately to the right of their intersection point. - */ - class Compare_y_at_x_right_2 - { - private: - Cache& _cache; - - public: - Compare_y_at_x_right_2(Cache& cache) :_cache(cache) {} - /*! - * 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. - * \param p The intersection point. - * \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. - */ - Comparison_result operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - const Point_2& p) const - { - // Make sure that p lies on both curves, and that both are defined to its - // left (so their left endpoint is lexicographically smaller than p). - CGAL_precondition(cv1.point_position (p,_cache) == EQUAL && - cv2.point_position (p,_cache) == EQUAL); - - - CGAL_precondition((cv1.right_parameter_space_in_x() != ARR_INTERIOR || - cv1.right_parameter_space_in_y() != ARR_INTERIOR || - (p.x() < cv1.right().x())) && - (cv2.right_parameter_space_in_x() != ARR_INTERIOR || - cv2.right_parameter_space_in_y() != ARR_INTERIOR || - (p.x() < cv2.right().x()))); - - - // Compare the two arcs. - return cv1.compare_at_intersection (cv2,p,false,_cache); - } - }; - - /*! 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(_cache); - } - - /*! A functor that checks whether two points and two curves are identical. */ - class Equal_2 - { - protected: - typedef Arr_rational_function_traits_2 Traits; - typedef CGAL::Arr_rational_arc::Cache Cache; - /*! The traits */ - const Traits* _traits; - - /*! Constructor - * \param traits the traits - */ - Equal_2(const Traits* traits) : _traits(traits) {} - - friend class Arr_rational_function_traits_2; - - public: - /*! - * Check 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. - */ - bool operator() (const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { - if (&cv1 == &cv2) - return true; - - return (cv1.equals(cv2)); - } - - /*! - * Check 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. - */ - bool operator()(const Point_2& p1, const Point_2& p2) const - { - if (&p1 == &p2) - return true; - - return - (p1.compare_xy_2(p2, _traits->cache()) == CGAL::EQUAL) ? - true : false; - } - }; - - /*! Obtain an Equal_2 functor object. */ - Equal_2 equal_2_object() const - { - return Equal_2(this); - } - - /*! A functor that divides a curve into continues (x-monotone) curves. */ - class Make_x_monotone_2 - { - public: - - /*! - * Cut the given conic curve (or conic arc) into x-monotone subcurves - * and insert them to the given output iterator. - * \param cv The curve. - * \param oi The output iterator, whose value-type is Object. The returned - * objects is a wrapper for an X_monotone_curve_2 object. - * \return The past-the-end iterator. - */ - template - OutputIterator operator()(const Curve_2& cv, OutputIterator oi) const - { - // Make the rational arc continuous. - std::list arcs; - - cv.make_continuous(std::back_inserter(arcs)); - - // Create objects. - typename std::list::const_iterator iter; - - for (iter = arcs.begin(); iter != arcs.end(); ++iter) - { - *oi = make_object (*iter); - ++oi; - } - - return (oi); - } - }; - - /*! Obtain a Make_x_monotone_2 functor object. */ - Make_x_monotone_2 make_x_monotone_2_object() const - { - return Make_x_monotone_2(); - } - - /*! A functor that splits a curve at a point. */ - class Split_2 - { - private: - Cache& _cache; - - public: - Split_2(Cache& cache) : _cache(cache) {} - /*! - * Split 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). - * \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 - { - cv.split(p, c1, c2, _cache); - } - }; - - /*! Obtain a Split_2 functor object. */ - Split_2 split_2_object() const - { - return Split_2(_cache); - } - - /*! A functor that computes intersections between two curves. */ - class Intersect_2 - { - private: - Cache& _cache; - public: - Intersect_2(Cache& cache) : _cache(cache) {} - /*! - * Find 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. - * \param cv2 The second curve. - * \param oi The output iterator. - * \return The past-the-end iterator. - */ - template - OutputIterator operator()(const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - OutputIterator oi) const - { - return (cv1.intersect (cv2, oi,_cache)); - } - template - OutputIterator operator()(const X_monotone_curve_2& cv1, - const Vertical_segment& cv2, - OutputIterator oi) const - { - return (cv1.intersect(cv2, oi,_cache)); - } - }; - - /*! Obtain an Intersect_2 functor object. */ - Intersect_2 intersect_2_object() const - { - return Intersect_2(_cache); - } - - /*! A functor that tests whether two curves can be merged. */ - class Are_mergeable_2 - { - public: - /*! - * Check 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 - * 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 - { - return (cv1.can_merge_with(cv2)); - } - }; - - /*! Obtain an Are_mergeable_2 functor object. */ - Are_mergeable_2 are_mergeable_2_object() const - { - return Are_mergeable_2(); - } - - /*! A functor that merges two curves into one. */ - class Merge_2 - { - public: - /*! - * Merge 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. - * \pre The two curves are mergeable, that is they are supported by the - * same conic curve and share a common endpoint. - */ - void operator()(const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2, - X_monotone_curve_2& c) const - { - c = cv1; - c.merge(cv2); - } - }; - - /*! Obtain a Merge_2 functor object. */ - Merge_2 merge_2_object() const - { - return Merge_2(); - } - - //@} - - /// \name Functor definitions to handle boundaries - //@{ - - /*! A function object that obtains the parameter space of a geometric - * entity along the x-axis - */ - class Parameter_space_in_x_2 { - public: - /*! 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 - * ARR_MAX_END - the maximal end of xc - * \return the parameter space at the ce end of the line xcv. - * ARR_LEFT_BOUNDARY - the line approaches the identification arc from - * the right at the line left end. - * ARR_INTERIOR - the line does not approache the identification arc. - * ARR_RIGHT_BOUNDARY - the line approaches the identification arc from - * the left at the line right end. - */ - Arr_parameter_space operator()(const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - return (ce == ARR_MIN_END) ? - xcv.left_parameter_space_in_x() : xcv.right_parameter_space_in_x(); - } - - /*! Obtains the parameter space at a point along the x-axis. - * \param p the point. - * \return the parameter space at p. - */ - Arr_parameter_space operator()(const Point_2 ) const - { - return ARR_INTERIOR; - } - }; - - /*! 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 - */ - class Parameter_space_in_y_2 { - public: - /*! 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. - * If the line coincides with the identification arc, it is assumed to - * be smaller than any other object. - * \param xcv the line - * \param ce the line end indicator: - * ARR_MIN_END - the minimal end of xc or - * ARR_MAX_END - the maximal end of xc - * \return the parameter space at the ce end of the line xcv. - * ARR_BOTTOM_BOUNDARY - the line approaches the south pole at the line - * left end. - * ARR_INTERIOR - the line does not approache a contraction point. - * ARR_TOP_BOUNDARY - the line approaches the north pole at the line - * right end. - */ - Arr_parameter_space operator()(const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - return (ce == ARR_MIN_END) ? - xcv.left_parameter_space_in_y() : xcv.right_parameter_space_in_y(); - } - - /*! Obtains the parameter space at a point along the y-axis. - * \param p the point. - * \return the parameter space at p. - */ - Arr_parameter_space operator()(const Point_2 ) const - { - return ARR_INTERIOR; - } - }; - - /*! 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-coordinates of arc ends near the - * boundary of the parameter space - */ - class Compare_x_near_boundary_2 { - public: - /*! Compare 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. - * \param ce the line-end indicator - - * ARR_MIN_END - the minimal end of xc or - * ARR_MAX_END - the maximal end of xc. - * \return the comparison result: - * 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 line xcv lies on a boundary. - */ - Comparison_result operator()(const Point_2 & p, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - Comparison_result r = xcv.compare_end(ce, p); - if (r == EQUAL) - return EQUAL; - return (r == NEGATIVE) ? POSITIVE : NEGATIVE ; - } - - /*! Compare 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 - - * 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. - * \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. - * \pre the ce2 end of the line xcv2 lies on a boundary. - */ - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2) const - { - return xcv1.compare_ends(ce1, xcv2, ce2); - } - }; - - /*! 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-coordinates of arc ends near the - * boundary of the parameter space. - */ - class Compare_y_near_boundary_2 - { - private: - Cache& _cache; - - public: - /*! Compare 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. - * \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 - * boundary or on the right boundary of the parameter space. - */ - Compare_y_near_boundary_2(Cache& cache) : _cache(cache) {} - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return (ce == ARR_MIN_END) ? - xcv1.compare_at_minus_infinity(xcv2,_cache) : - xcv1.compare_at_plus_infinity(xcv2,_cache); - } - }; - - /*! 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(_cache); } - - - /*! A function object that compares at limit - */ - //new functor - class Compare_x_at_limit_2 - { - public: - /*! 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. - */ - Comparison_result operator()(const Point_2& p, - const X_monotone_curve_2& xcv, - Arr_curve_end ce) - { - CGAL_precondition(Parameter_space_in_x_2()(xcv,ce) == ARR_INTERIOR); - CGAL_precondition(Parameter_space_in_y_2()(xcv,ce) != ARR_INTERIOR); - 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 - * with the curve end of xcv2 that is defined by ce2 - * at their limits in x. - * Returns SMALLER, EQUAL, or LARGER accordingly. - */ - Comparison_result operator()(const X_monotone_curve_2& xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2& xcv2, - Arr_curve_end ce2) - { - CGAL_precondition(Parameter_space_in_x_2()(xcv1,ce1) == ARR_INTERIOR); - CGAL_precondition(Parameter_space_in_y_2()(xcv1,ce1) != ARR_INTERIOR); - CGAL_precondition(Parameter_space_in_x_2()(xcv2,ce2) == ARR_INTERIOR); - CGAL_precondition(Parameter_space_in_y_2()(xcv2,ce2) != ARR_INTERIOR); - - return CGAL::compare((ce1 == ARR_MIN_END) ? xcv1.left_x() : xcv1.right_x(), - (ce2 == ARR_MIN_END) ? xcv2.left_x() : xcv2.right_x()); - } - - }; //Compare_x_at_limit_2 - - /*! Obtain a Compare_x_at_limit_2 function object */ - Compare_x_at_limit_2 compare_x_at_limit_2_object() const - { return Compare_x_at_limit_2(); } - //@} - - /// \name Functor definitions for the Boolean set-operation traits. - //@{ - - //new functor - class Compare_x_near_limit_2 - { - private: - Cache& _cache; - - public: - Compare_x_near_limit_2(Cache& cache) : _cache(cache) {} - /*! 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. - */ - Comparison_result operator()( const X_monotone_curve_2& xcv1, - const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - return xcv1.compare_near_end(xcv2,ce,_cache); - } - }; //Compare_x_near_limit_2 - - /*! Obtain a Compare_x_near_limit_2 function object */ - Compare_x_near_limit_2 compare_x_near_limit_2_object() const - { return Compare_x_near_limit_2(_cache); } - - class Compare_endpoints_xy_2 - { - public: - - /*! - * Compare 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; - * LARGER if the curve is directed left. - */ - Comparison_result operator()(const X_monotone_curve_2& cv) - { - if (cv.is_directed_right()) - return (SMALLER); - else - return (LARGER); - } - }; - - /*! 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). - * \param cv The curve. - * \return The opposite curve. - */ - X_monotone_curve_2 operator()(const X_monotone_curve_2& cv) - { - return (cv.flip()); - } - }; - - /*! Obtain a Construct_opposite_2 functor object. */ - Construct_opposite_2 construct_opposite_2_object() const - { - return Construct_opposite_2(); - } - - //@} - - class Approximate_2{ - Approximate_number_type approx_x(const Point_2& p){ - return Approximate_number_type(p.x().lower()); - } - Approximate_number_type approx_y(const Point_2& p){ - typedef typename Algebraic_kernel_d_1::Polynomial_1 Polynomial_1; - typename CGAL::Coercion_traits::Cast cast; - return - cast(p.rational_function().numer()).evaluate(p.x().lower())/ - cast(p.rational_function().denom()).evaluate(p.x().lower()); - } - public: - Approximate_number_type operator()(const Point_2& p, int i){ - if(i==0) return approx_x(p); - if(i==1) return approx_y(p); - assert(false); - return Approximate_number_type(0); - } - }; - - Approximate_2 approximate_2_object() const { return Approximate_2(); } - - void cleanup_cache() const - { - _cache.cleanup(); - } -}; //Arr_rational_function_traits_2 - -} //namespace CGAL { - -#endif //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H 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 f3abc0fb63e..b057f89d64f 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -63,10 +63,10 @@ public: typedef Tag_true Has_merge_category; typedef Tag_false Has_do_intersect_category; - typedef Arr_oblivious_side_tag Left_side_category; - typedef Arr_oblivious_side_tag Bottom_side_category; - typedef Arr_oblivious_side_tag Top_side_category; - typedef Arr_oblivious_side_tag Right_side_category; + typedef Arr_oblivious_side_tag Arr_left_side_category; + typedef Arr_oblivious_side_tag Arr_bottom_side_category; + typedef Arr_oblivious_side_tag Arr_top_side_category; + typedef Arr_oblivious_side_tag Arr_right_side_category; typedef typename Kernel::Line_2 Line_2; typedef CGAL::Segment_assertions > diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h index 25b424643a6..560f82d8d05 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h index 182d33b254c..290e1a41df8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_on_sphere_transformation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -34,4 +34,4 @@ class Arr_on_sphere_transformation } //namespace CGAL -#endif +#endif \ No newline at end of file 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 ebcf7730663..1b44ccab33f 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 0b78f537c1d..8dcffde2032 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h index 0d96e8a8bcc..78b41b5d54b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_initializer_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h index 062a4ea4752..0ee3f443826 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_overlay.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University(Israel). +// Copyright(c) 2006 Tel-Aviv University(Israel). // All rights reserved. // // This file is part of CGAL(www.cgal.org); you may redistribute it under 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 2c404ebb5b4..39b1a64505a 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h index 830f0ccf333..8922a49a6a2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_traits.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h index e2938bb37fc..aae0d5faa72 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_transformation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h index 42c1efdf6fa..7ed9c5efaf2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h index d976b5de447..345c3471562 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 55b586a5598..699eb6f937b 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006, Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -85,42 +85,43 @@ public: typedef typename Dcel::Isolated_vertex Isolated_vertex; //@} - //! \name Arrangement types - //!@{ - typedef Arr_spherical_topology_traits_2 Self; + // TODO remove adaptor as top-traits might be instantiated by Aos_2 itself typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; - //!@} + + typedef Arr_spherical_topology_traits_2 + Self; ///! \name The side tags //@{ - typedef typename Traits_adaptor_2::Left_side_category Left_side_category; - typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_adaptor_2::Top_side_category Top_side_category; - typedef typename Traits_adaptor_2::Right_side_category Right_side_category; + // are inherited from the geometry traits + typedef typename Traits_adaptor_2::Arr_left_side_category Arr_left_side_category; + typedef typename Traits_adaptor_2::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Traits_adaptor_2::Arr_top_side_category Arr_top_side_category; + typedef typename Traits_adaptor_2::Arr_right_side_category Arr_right_side_category; BOOST_MPL_ASSERT ( (boost::mpl::or_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, - boost::is_same< Left_side_category, Arr_identified_side_tag > >) + boost::is_same< Arr_left_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_left_side_category, Arr_identified_side_tag > >) ); BOOST_MPL_ASSERT ( (boost::mpl::or_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, - boost::is_same< Bottom_side_category, Arr_contracted_side_tag > >) + boost::is_same< Arr_bottom_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_bottom_side_category, Arr_contracted_side_tag > >) ); BOOST_MPL_ASSERT ( (boost::mpl::or_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, - boost::is_same< Top_side_category, Arr_contracted_side_tag > >) + boost::is_same< Arr_top_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_top_side_category, Arr_contracted_side_tag > >) ); BOOST_MPL_ASSERT ( (boost::mpl::or_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, - boost::is_same< Right_side_category, Arr_identified_side_tag > >) + boost::is_same< Arr_right_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_right_side_category, Arr_identified_side_tag > >) ); //@} @@ -358,7 +359,7 @@ public: private: /// \name Auxiliary type definitions. //@{ - typedef Arrangement_on_surface_2 Arr; + typedef Arrangement_on_surface_2 Arr; // Type definition for the constuction sweep-line visitor. typedef Arr_construction_subcurve CSubcurve; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h index a2a855feab1..b29f72bf51f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2007, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -38,191 +38,191 @@ namespace CGAL { struct Arr_boundary_side_tag {}; struct Arr_oblivious_side_tag : public virtual Arr_boundary_side_tag {}; -struct Arr_open_side_tag : public virtual Arr_oblivious_side_tag {}; -struct Arr_closed_side_tag : public virtual Arr_oblivious_side_tag {}; -struct Arr_contracted_side_tag : public virtual Arr_oblivious_side_tag {}; -struct Arr_identified_side_tag : public virtual Arr_oblivious_side_tag {}; +struct Arr_open_side_tag : public virtual Arr_boundary_side_tag {}; +struct Arr_closed_side_tag : public virtual Arr_boundary_side_tag {}; +struct Arr_contracted_side_tag : public virtual Arr_boundary_side_tag {}; +struct Arr_identified_side_tag : public virtual Arr_boundary_side_tag {}; -BOOST_MPL_HAS_XXX_TRAIT_DEF(Left_side_category) -BOOST_MPL_HAS_XXX_TRAIT_DEF(Bottom_side_category) -BOOST_MPL_HAS_XXX_TRAIT_DEF(Top_side_category) -BOOST_MPL_HAS_XXX_TRAIT_DEF(Right_side_category) +BOOST_MPL_HAS_XXX_TRAIT_DEF(Arr_left_side_category) +BOOST_MPL_HAS_XXX_TRAIT_DEF(Arr_bottom_side_category) +BOOST_MPL_HAS_XXX_TRAIT_DEF(Arr_top_side_category) +BOOST_MPL_HAS_XXX_TRAIT_DEF(Arr_right_side_category) namespace internal { //! type to provide left side tag (is oblivious if not existing) template < class Traits_, bool B > -struct Get_left_side_category { +struct Get_left_side_tag { }; template < class Traits_ > -struct Get_left_side_category< Traits_, true > { - typedef typename Traits_::Left_side_category Category; +struct Get_left_side_tag< Traits_, true > { + typedef typename Traits_::Arr_left_side_category Tag; }; template < class Traits_ > -struct Get_left_side_category< Traits_, false > { - typedef Arr_oblivious_side_tag Category; +struct Get_left_side_tag< Traits_, false > { + typedef Arr_oblivious_side_tag Tag; }; template < class Traits_ > -struct Arr_complete_left_side_category { +struct Arr_complete_left_side_tag { public: typedef Traits_ Traits; typedef typename - Get_left_side_category< Traits, has_Left_side_category< Traits >::value >::Category Category; + Get_left_side_tag< Traits, has_Arr_left_side_category< Traits >::value >::Tag Tag; }; template < class GeometryTraits_2, bool b > -struct Validate_left_side_category {}; +struct Validate_left_side_tag {}; template < class GeometryTraits_2 > -struct Validate_left_side_category< GeometryTraits_2, true > { - void missing__Left_side_category() {} +struct Validate_left_side_tag< GeometryTraits_2, true > { + void missing__Arr_left_side_category() {} }; template < class GeometryTraits_2 > -struct Validate_left_side_category< GeometryTraits_2, false > { - void missing__Left_side_category() +struct Validate_left_side_tag< GeometryTraits_2, false > { + void missing__Arr_left_side_category() { bool - missing__Left_side_category__assuming__Arr_oblivious_side_tag__instead; + missing__Arr_left_side_category__assuming__Arr_oblivious_side_tag__instead; } }; //! type to provide bottom side tag (is oblivious if not existing) template < class Traits_, bool B > -struct Get_bottom_side_category { +struct Get_bottom_side_tag { }; template < class Traits_ > -struct Get_bottom_side_category< Traits_, true > { - typedef typename Traits_::Bottom_side_category Category; +struct Get_bottom_side_tag< Traits_, true > { + typedef typename Traits_::Arr_bottom_side_category Tag; }; template < class Traits_ > -struct Get_bottom_side_category< Traits_, false > { - typedef Arr_oblivious_side_tag Category; +struct Get_bottom_side_tag< Traits_, false > { + typedef Arr_oblivious_side_tag Tag; }; template < class Traits_ > -struct Arr_complete_bottom_side_category { +struct Arr_complete_bottom_side_tag { public: typedef Traits_ Traits; typedef typename - Get_bottom_side_category< Traits, has_Bottom_side_category< Traits >::value >::Category - Category; + Get_bottom_side_tag< Traits, has_Arr_bottom_side_category< Traits >::value >::Tag + Tag; }; template < class GeometryTraits_2, bool b > -struct Validate_bottom_side_category {}; +struct Validate_bottom_side_tag {}; template < class GeometryTraits_2 > -struct Validate_bottom_side_category< GeometryTraits_2, true > { - void missing__Bottom_side_category() {} +struct Validate_bottom_side_tag< GeometryTraits_2, true > { + void missing__Arr_bottom_side_category() {} }; template < class GeometryTraits_2 > -struct Validate_bottom_side_category< GeometryTraits_2, false > { - void missing__Bottom_side_category() +struct Validate_bottom_side_tag< GeometryTraits_2, false > { + void missing__Arr_bottom_side_category() { bool - missing__Bottom_side_category__assuming__Arr_oblivious_side_tag__instead; + missing__Arr_bottom_side_category__assuming__Arr_oblivious_side_tag__instead; } }; //! type to provide top side tag (is oblivious if not existing) template < class Traits_, bool B > -struct Get_top_side_category { +struct Get_top_side_tag { }; template < class Traits_ > -struct Get_top_side_category< Traits_, true > { - typedef typename Traits_::Top_side_category Category; +struct Get_top_side_tag< Traits_, true > { + typedef typename Traits_::Arr_top_side_category Tag; }; template < class Traits_ > -struct Get_top_side_category< Traits_, false > { - typedef Arr_oblivious_side_tag Category; +struct Get_top_side_tag< Traits_, false > { + typedef Arr_oblivious_side_tag Tag; }; template < class Traits_ > -struct Arr_complete_top_side_category { +struct Arr_complete_top_side_tag { public: typedef Traits_ Traits; typedef typename - Get_top_side_category< Traits, has_Top_side_category< Traits >::value >::Category Category; + Get_top_side_tag< Traits, has_Arr_top_side_category< Traits >::value >::Tag Tag; }; template < class GeometryTraits_2, bool b > -struct Validate_top_side_category {}; +struct Validate_top_side_tag {}; template < class GeometryTraits_2 > -struct Validate_top_side_category< GeometryTraits_2, true > { - void missing__Top_side_category() {} +struct Validate_top_side_tag< GeometryTraits_2, true > { + void missing__Arr_top_side_category() {} }; template < class GeometryTraits_2 > -struct Validate_top_side_category< GeometryTraits_2, false > { - void missing__Top_side_category() +struct Validate_top_side_tag< GeometryTraits_2, false > { + void missing__Arr_top_side_category() { - bool missing__Top_side_category__assuming__Arr_oblivious_side_tag__instead; + bool missing__Arr_top_side_category__assuming__Arr_oblivious_side_tag__instead; } }; //! type to provide right side tag (is oblivious if not existing) template < class Traits_, bool B > -struct Get_right_side_category { +struct Get_right_side_tag { }; template < class Traits_ > -struct Get_right_side_category< Traits_, true > { - typedef typename Traits_::Right_side_category Category; +struct Get_right_side_tag< Traits_, true > { + typedef typename Traits_::Arr_right_side_category Tag; }; template < class Traits_ > -struct Get_right_side_category< Traits_, false > { - typedef Arr_oblivious_side_tag Category; +struct Get_right_side_tag< Traits_, false > { + typedef Arr_oblivious_side_tag Tag; }; template < class Traits_ > -struct Arr_complete_right_side_category { +struct Arr_complete_right_side_tag { public: typedef Traits_ Traits; typedef typename - Get_right_side_category< Traits, has_Right_side_category< Traits >::value >::Category - Category; + Get_right_side_tag< Traits, has_Arr_right_side_category< Traits >::value >::Tag + Tag; }; template < class GeometryTraits_2, bool b > -struct Validate_right_side_category {}; +struct Validate_right_side_tag {}; template < class GeometryTraits_2 > -struct Validate_right_side_category< GeometryTraits_2, true > { - void missing__Right_side_category() {} +struct Validate_right_side_tag< GeometryTraits_2, true > { + void missing__Arr_right_side_category() {} }; template < class GeometryTraits_2 > -struct Validate_right_side_category< GeometryTraits_2, false > { - void missing__Right_side_category() +struct Validate_right_side_tag< GeometryTraits_2, false > { + void missing__Arr_right_side_category() { bool - missing__Right_side_category__assuming__Arr_oblivious_side_tag__instead; + missing__Arr_right_side_category__assuming__Arr_oblivious_side_tag__instead; } }; @@ -242,23 +242,23 @@ struct Arr_not_all_sides_non_open_tag {}; /*!\brief Struct to determine whether all side tags are "oblivious" */ -template < class ArrLeftSideCategory, class ArrBottomSideCategory, - class ArrTopSideCategory, class ArrRightSideCategory > +template < class ArrLeftSideTag, class ArrBottomSideTag, + class ArrTopSideTag, class ArrRightSideTag > struct Arr_are_all_sides_oblivious_tag { public: //! This instance's first template parameter - typedef ArrLeftSideCategory Left_side_category; + typedef ArrLeftSideTag Arr_left_side_category; //! This instance's second template parameter - typedef ArrBottomSideCategory Bottom_side_category; + typedef ArrBottomSideTag Arr_bottom_side_category; //! This instance's third template parameter - typedef ArrTopSideCategory Top_side_category; + typedef ArrTopSideTag Arr_top_side_category; //! This instance's fourth template parameter - typedef ArrRightSideCategory Right_side_category; + typedef ArrRightSideTag Arr_right_side_category; private: @@ -266,22 +266,22 @@ private: typedef boost::mpl::bool_< false > false_; typedef boost::mpl::if_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_left_side_category, Arr_oblivious_side_tag >, true_, false_ > Left_oblivious; typedef boost::mpl::if_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_bottom_side_category, Arr_oblivious_side_tag >, true_, false_ > Bottom_oblivious; typedef boost::mpl::if_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_top_side_category, Arr_oblivious_side_tag >, true_, false_ > Top_oblivious; typedef boost::mpl::if_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_right_side_category, Arr_oblivious_side_tag >, true_, false_ > Right_oblivious; @@ -301,23 +301,23 @@ public: /*!\brief Struct to determine whether all side tags are "non-open" */ -template < class ArrLeftSideCategory, class ArrBottomSideCategory, - class ArrTopSideCategory, class ArrRightSideCategory > +template < class ArrLeftSideTag, class ArrBottomSideTag, + class ArrTopSideTag, class ArrRightSideTag > struct Arr_are_all_sides_non_open_tag { public: //! This instance's first template parameter - typedef ArrLeftSideCategory Left_side_category; + typedef ArrLeftSideTag Arr_left_side_category; //! This instance's second template parameter - typedef ArrBottomSideCategory Bottom_side_category; + typedef ArrBottomSideTag Arr_bottom_side_category; //! This instance's third template parameter - typedef ArrTopSideCategory Top_side_category; + typedef ArrTopSideTag Arr_top_side_category; //! This instance's fourth template parameter - typedef ArrRightSideCategory Right_side_category; + typedef ArrRightSideTag Arr_right_side_category; private: @@ -325,22 +325,22 @@ private: typedef boost::mpl::bool_< false > false_; typedef boost::mpl::if_< - boost::is_same< Left_side_category, Arr_open_side_tag >, + boost::is_same< Arr_left_side_category, Arr_open_side_tag >, true_, false_ > Left_open; typedef boost::mpl::if_< - boost::is_same< Bottom_side_category, Arr_open_side_tag >, + boost::is_same< Arr_bottom_side_category, Arr_open_side_tag >, true_, false_ > Bottom_open; typedef boost::mpl::if_< - boost::is_same< Top_side_category, Arr_open_side_tag >, + boost::is_same< Arr_top_side_category, Arr_open_side_tag >, true_, false_ > Top_open; typedef boost::mpl::if_< - boost::is_same< Right_side_category, Arr_open_side_tag >, + boost::is_same< Arr_right_side_category, Arr_open_side_tag >, true_, false_ > Right_open; @@ -362,23 +362,23 @@ public: /*!\brief Struct to check consistent tagging of identifications */ -template < class ArrLeftSideCategory, class ArrBottomSideCategory, - class ArrTopSideCategory, class ArrRightSideCategory > +template < class ArrLeftSideTag, class ArrBottomSideTag, + class ArrTopSideTag, class ArrRightSideTag > struct Arr_sane_identified_tagging { public: //! This instance's first template parameter - typedef ArrLeftSideCategory Left_side_category; + typedef ArrLeftSideTag Arr_left_side_category; //! This instance's second template parameter - typedef ArrBottomSideCategory Bottom_side_category; + typedef ArrBottomSideTag Arr_bottom_side_category; //! This instance's third template parameter - typedef ArrTopSideCategory Top_side_category; + typedef ArrTopSideTag Arr_top_side_category; //! This instance's fourth template parameter - typedef ArrRightSideCategory Right_side_category; + typedef ArrRightSideTag Arr_right_side_category; private: @@ -386,22 +386,22 @@ private: typedef boost::mpl::bool_< false > false_; typedef boost::mpl::if_< - boost::is_same< Left_side_category, Arr_identified_side_tag >, + boost::is_same< Arr_left_side_category, Arr_identified_side_tag >, true_, false_ > Left_identified; typedef boost::mpl::if_< - boost::is_same< Bottom_side_category, Arr_identified_side_tag >, + boost::is_same< Arr_bottom_side_category, Arr_identified_side_tag >, true_, false_ > Bottom_identified; typedef boost::mpl::if_< - boost::is_same< Top_side_category, Arr_identified_side_tag >, + boost::is_same< Arr_top_side_category, Arr_identified_side_tag >, true_, false_ > Top_identified; typedef boost::mpl::if_< - boost::is_same< Right_side_category, Arr_identified_side_tag >, + boost::is_same< Arr_right_side_category, Arr_identified_side_tag >, true_, false_ > Right_identified; 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 b125e8ceceb..8a5b7273535 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 e44b04ee654..e3a1098fddc 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h index bf37162cbd7..146f6f3b800 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_insertion_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 22047a0a136..ee3b711630f 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h index e6f48ffe781..2358b3f32ba 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_bounded_planar_topology_traits_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 da50af21a93..4d1988e0990 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h index 766e698870c..5118e766313 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 ff1a648e373..d29b4734ceb 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 891e0b7361a..805e05131f8 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 714195de49a..0d382f20700 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 bc9f81641f9..cf440e1dfbd 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 efe3edf7e79..c78f977fcea 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 35c8eef8010..7689c3d9afd 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006, Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -188,8 +188,8 @@ is_in_face(const Face * f, const Point_2 & p, const Vertex * v) const m_traits->compare_x_2_object(); typename Traits_adaptor_2::Compare_y_at_x_2 cmp_y_at_x_op = m_traits->compare_y_at_x_2_object(); - typename Traits_adaptor_2::Compare_x_point_curve_end_2 cmp_x_pt_ce = - m_traits->compare_x_point_curve_end_2_object(); + typename Traits_adaptor_2::Compare_x_near_boundary_2 cmp_x_near_bnd = + m_traits->compare_x_near_boundary_2_object(); /* Maintain a counter of the number of x-monotone curves that intersect an * upward vertical ray emanating from p. Handle degenerate cases as @@ -266,9 +266,9 @@ is_in_face(const Face * f, const Point_2 & p, const Vertex * v) const if ((bnd1 == ARR_TOP_BOUNDARY) && (bnd2 == ARR_TOP_BOUNDARY)) { // Compare the x-coordinates: Comparison_result rc1 = - cmp_x_pt_ce(p, curr->curve(), ARR_MAX_END); + cmp_x_near_bnd(p, curr->curve(), ARR_MAX_END); Comparison_result rc2 = - cmp_x_pt_ce(p, curr->next()->curve(), ARR_MAX_END); + cmp_x_near_bnd(p, curr->next()->curve(), ARR_MAX_END); if (rc1 == opposite(rc2)) ++num_intersections; } curr = curr->next(); @@ -334,11 +334,11 @@ is_in_face(const Face * f, const Point_2 & p, const Vertex * v) const res_source = (bnd_source == ARR_INTERIOR) ? cmp_x_op(p, curr->opposite()->vertex()->point()) : - cmp_x_pt_ce(p, curr->curve(), ind_source); + cmp_x_near_bnd(p, curr->curve(), ind_source); res_target = (bnd_target == ARR_INTERIOR) ? cmp_x_op(p, curr->vertex()->point()) : - cmp_x_pt_ce(p, curr->curve(), ind_target); + cmp_x_near_bnd(p, curr->curve(), ind_target); /* If a vertical ray is shot from p upward, the x-monotone curve * associated with curr is hit once. @@ -720,21 +720,21 @@ _locate_around_pole(Vertex * v, // Traverse all other halfedges, and compare their x-positions next to the // pole with the query curve xc. - typename Traits_adaptor_2::Compare_x_curve_ends_2 cmp_x_curve_ends = - m_traits->compare_x_curve_ends_2_object(); + typename Traits_adaptor_2::Compare_x_near_boundary_2 cmp_x_near_bnd = + m_traits->compare_x_near_boundary_2_object(); Arr_curve_end curr_end, next_end; Comparison_result curr_res, next_res; Comparison_result curr_next_res; curr_end = (curr->direction() == ARR_RIGHT_TO_LEFT) ? ARR_MIN_END : ARR_MAX_END; - curr_res = cmp_x_curve_ends(xc, ind, curr->curve(), curr_end); + curr_res = cmp_x_near_bnd(xc, ind, curr->curve(), curr_end); do { next_end = (next->direction() == ARR_RIGHT_TO_LEFT) ? ARR_MIN_END : ARR_MAX_END; - next_res = cmp_x_curve_ends(xc, ind, next->curve(), next_end); + next_res = cmp_x_near_bnd(xc, ind, next->curve(), next_end); curr_next_res = - cmp_x_curve_ends(curr->curve(), curr_end, next->curve(), next_end); + cmp_x_near_bnd(curr->curve(), curr_end, next->curve(), next_end); if (curr_next_res == cross_res) { // The line of discontinuity must lie between curr and next, so the // comparison result of xc with the two curves should be equal: 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 c8f36a32848..495da360de4 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 77908c5e2ec..49b55766a2c 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 ce1958b1046..180392a302e 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h index 058bb6ea922..4f2ff28120e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_insertion_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 d5026ec59c6..e994cfbd82e 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h index 4449e858bea..74461ea091d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -271,8 +271,9 @@ are_equal(const Vertex *v, if (v_cv == NULL) return (v->parameter_space_in_x() == ps_x && v->parameter_space_in_y() == ps_y); - - res = this->traits->compare_y_curve_ends_2_object() (cv, *v_cv, v_ind); + + CGAL_assertion (v_ind == ind); + res = this->traits->compare_y_near_boundary_2_object() (cv, *v_cv, v_ind); } else { @@ -288,7 +289,7 @@ are_equal(const Vertex *v, v->parameter_space_in_y() == ps_y); res = - this->traits->compare_x_curve_ends_2_object() (cv, ind, *v_cv, v_ind); + this->traits->compare_x_near_boundary_2_object() (cv, ind, *v_cv, v_ind); } return (res == EQUAL); @@ -621,7 +622,7 @@ compare_x (const Point_2& p, const Vertex* v) const const X_monotone_curve_2 *v_cv = _curve (v, v_ind); CGAL_assertion (v_cv != NULL); - return (this->traits->compare_x_point_curve_end_2_object() (p, *v_cv, v_ind)); + return (this->traits->compare_x_near_boundary_2_object() (p, *v_cv, v_ind)); } // In this case v represents a normal point, and we compare it with p. @@ -658,7 +659,7 @@ compare_xy (const Point_2& p, const Vertex* v) const CGAL_assertion (v_cv != NULL); Comparison_result res = - this->traits->compare_x_point_curve_end_2_object() (p, *v_cv, v_ind); + this->traits->compare_x_near_boundary_2_object() (p, *v_cv, v_ind); if (res != EQUAL) return (res); @@ -783,9 +784,9 @@ _is_on_fictitious_edge (const X_monotone_curve_2& cv, Arr_curve_end ind, (ps_x == ARR_LEFT_BOUNDARY) ? ARR_MIN_END : ARR_MAX_END; res1 = - this->traits->compare_y_curve_ends_2_object() (cv, - *_curve (v1, v_ind), - ind); + this->traits->compare_y_near_boundary_2_object() (cv, + *_curve (v1, v_ind), + ind); if (res1 == EQUAL) { eq_source = true; @@ -810,9 +811,9 @@ _is_on_fictitious_edge (const X_monotone_curve_2& cv, Arr_curve_end ind, (ps_x == ARR_LEFT_BOUNDARY) ? ARR_MIN_END : ARR_MAX_END; res2 = - this->traits->compare_y_curve_ends_2_object() (cv, - *_curve (v2, v_ind), - ind); + this->traits->compare_y_near_boundary_2_object() (cv, + *_curve (v2, v_ind), + ind); if (res2 == EQUAL) { @@ -859,9 +860,9 @@ _is_on_fictitious_edge (const X_monotone_curve_2& cv, Arr_curve_end ind, // The comparison result in this case is trivial. if (v_cv1 != NULL) { - res1 = this->traits->compare_x_curve_ends_2_object() (cv, ind, - *v_cv1, v_ind); - + res1 = this->traits->compare_x_near_boundary_2_object() (cv, ind, + *v_cv1, v_ind); + if (res1 == EQUAL) { eq_source = true; @@ -898,9 +899,9 @@ _is_on_fictitious_edge (const X_monotone_curve_2& cv, Arr_curve_end ind, // The comparison result in this case is trivial. if (v_cv2 != NULL) { - res2 = this->traits->compare_x_curve_ends_2_object() (cv, ind, - *v_cv2, v_ind); - + res2 = this->traits->compare_x_near_boundary_2_object() (cv, ind, + *v_cv2, v_ind); + if (res2 == EQUAL) { eq_target = true; 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 407a80115e5..1718ca6ea92 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Sign_of_path.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Sign_of_path.h index 81eabba8f7a..dd9f4a50eca 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Sign_of_path.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Sign_of_path.h @@ -1,4 +1,4 @@ -// Copyright (c) 2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2007-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 28b112c25ad..73c767be5e1 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -63,16 +63,14 @@ public: COMPARE_ENDPOINTS_XY_OP, PARAMETER_SPACE_IN_X_OP, - IS_ON_X_IDENTIFICATION_OP, - COMPARE_Y_ON_BOUNDARY_OP, COMPARE_Y_NEAR_BOUNDARY_OP, + COMPARE_Y_ON_BOUNDARY_OP, + IS_ON_X_IDENTIFICATION_OP, PARAMETER_SPACE_IN_Y_OP, - IS_ON_Y_IDENTIFICATION_OP, - COMPARE_X_AT_LIMIT_OP, - COMPARE_X_NEAR_LIMIT_OP, - COMPARE_X_ON_BOUNDARY_OP, COMPARE_X_NEAR_BOUNDARY_OP, + COMPARE_X_ON_BOUNDARY_OP, + IS_ON_Y_IDENTIFICATION_OP, NUMBER_OF_OPERATIONS }; @@ -135,39 +133,29 @@ private: bool compare_endpoints_xy_op() const { return (0 != (m_flags & (0x1 << COMPARE_ENDPOINTS_XY_OP))); } - // left-right - bool parameter_space_in_x_op() const { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_X_OP))); } - bool is_on_x_identification_op() const - { return m_flags & (0x1 << IS_ON_X_IDENTIFICATION_OP); } + bool compare_y_near_boundary_op() const + { return (0 != (m_flags & (0x1 << COMPARE_Y_NEAR_BOUNDARY_OP))); } bool compare_y_on_boundary_op() const { return (0 != (m_flags & (0x1 << COMPARE_Y_ON_BOUNDARY_OP))); } - bool compare_y_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_Y_NEAR_BOUNDARY_OP); } - - // bottom-top - + bool is_on_x_identification_op() const + { return (0 != (m_flags & (0x1 << IS_ON_X_IDENTIFICATION_OP))); } + bool parameter_space_in_y_op() const { return (0 != (m_flags & (0x1 << PARAMETER_SPACE_IN_Y_OP))); } - bool is_on_y_identification_op() const - { return m_flags & (0x1 << IS_ON_Y_IDENTIFICATION_OP); } - - bool compare_x_at_limit_op() const - { return m_flags & (0x1 << COMPARE_X_AT_LIMIT_OP); } - - bool compare_x_near_limit_op() const - { return m_flags & (0x1 << COMPARE_X_NEAR_LIMIT_OP); } + bool compare_x_near_boundary_op() const + { return (0 != (m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP))); } bool compare_x_on_boundary_op() const { return (0 != (m_flags & (0x1 << COMPARE_X_ON_BOUNDARY_OP))); } - bool compare_x_near_boundary_op() const - { return m_flags & (0x1 << COMPARE_X_NEAR_BOUNDARY_OP); } + bool is_on_y_identification_op() const + { return (0 != (m_flags & (0x1 << IS_ON_Y_IDENTIFICATION_OP))); } public: /*! Default constructor */ @@ -205,14 +193,14 @@ public: typedef typename Base::Has_merge_category Has_merge_category; typedef typename Base::Has_do_intersect_category 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; + typedef typename internal::Arr_complete_left_side_tag< Base >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Base >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Base >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Base >::Tag + Arr_right_side_category; typedef typename Base::Point_2 Point_2; typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; @@ -754,8 +742,6 @@ public: } }; - // 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. */ @@ -787,112 +773,6 @@ public: } }; - /*! A functor that determines whether a point or curve is on - * x-identification. - */ - class Is_on_x_identification_2 { - private: - typename Base::Is_on_x_identification_2 m_object; - bool m_enabled; - - 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) {} - /*! Operate - * \param p1 the point. - */ - Comparison_result 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; - Comparison_result cr = m_object(p); - std::cout << " result: " << cr << std::endl; - return cr; - } - - /*! Operate - * \param xcv1 the curve - */ - Comparison_result 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; - Comparison_result cr = m_object(xcv); - std::cout << " result: " << cr << std::endl; - return cr; - } - }; - - /*! A functor that compares the y-coordinate of two given points - * that lie on vertical boundaries. - */ - class Compare_y_on_boundary_2 { - private: - typename Base::Compare_y_on_boundary_2 m_object; - bool m_enabled; - - public: - /*! Construct */ - Compare_y_on_boundary_2(const Base * base, bool enabled = true) : - m_object(base->compare_y_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); - std::cout << "compare_y_on_boundary" << std::endl - << " p1: " << p1 << std::endl - << " p2: " << p2 << std::endl; - Comparison_result cr = m_object(p1, p2); - std::cout << " result: " << cr << std::endl; - return cr; - } - }; - - /*! A functor that compares the y-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_y_near_boundary_2 { - private: - typename Base::Compare_y_near_boundary_2 m_object; - bool m_enabled; - - 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) {} - - /*! 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 - */ - 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); - std::cout << "compare_y_near_boundary" << std::endl - << " ce: " << ce << std::endl - << " xcv1: " << xcv1 << std::endl - << " xcv2: " << xcv2 << std::endl; - Comparison_result cr = m_object(xcv1, xcv2, ce); - std::cout << " result: " << cr << std::endl; - return cr; - } - }; - - // bottom-top - /*! A functor that determines whether an endpoint of an x-monotone arc lies * on a boundary of the parameter space along the y axis. */ @@ -937,6 +817,192 @@ public: } }; + /*! A functor that compares the x-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; + bool m_enabled; + + 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) {} + + /*! Operate + * \param p the first point + * \param xcv the curve the end of which is to be compared + * \param ce the curve-end identifier + * \return the comparison result + */ + Comparison_result operator()(const Point_2 & p, + const X_monotone_curve_2 & xcv, + Arr_curve_end ce) const + { + if (!m_enabled) return m_object(p, xcv, ce); + std::cout << "compare_x_near_boundary 1" << std::endl + << " p: " << p << std::endl + << " ce: " << ce << ", xcv: " << xcv << std::endl; + Comparison_result cr = m_object(p, xcv, ce); + std::cout << " result: " << std::endl; + return cr; + } + + /*! 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 + */ + 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(xcv1, ce1, xcv2, ce2); + std::cout << "compare_x_near_boundary 2" << std::endl + << " ce1: " << ce1 << ", xcv1: " << xcv1 << std::endl + << " ce2: " << ce2 << ", xcv2: " << xcv2 << std::endl; + Comparison_result cr = m_object(xcv1, ce1, xcv2, ce2); + std::cout << " result: " << cr << std::endl; + return cr; + } + }; + + /*! A functor that compares the y-coordinates of curve ends near the + * boundary of the parameter space. + */ + class Compare_y_near_boundary_2 { + private: + typename Base::Compare_y_near_boundary_2 m_object; + bool m_enabled; + + 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) {} + + /*! 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 + */ + 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); + std::cout << "compare_y_near_boundary" << std::endl + << " ce: " << ce << std::endl + << " xcv1: " << xcv1 << std::endl + << " xcv2: " << xcv2 << std::endl; + Comparison_result cr = m_object(xcv1, xcv2, ce); + std::cout << " result: " << cr << std::endl; + return cr; + } + }; + + /*! A functor that compares the x-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; + bool m_enabled; + + 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) {} + /*! 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); + std::cout << "compare_x_on_boundary" << std::endl + << " p1: " << p1 << std::endl + << " p2: " << p2 << std::endl; + Comparison_result cr = m_object(p1, p2); + std::cout << " result: " << cr << std::endl; + return cr; + } + }; + + /*! A functor that compares the y-coordinate of two given points + * that lie on vertical boundaries. + */ + class Compare_y_on_boundary_2 { + private: + typename Base::Compare_y_on_boundary_2 m_object; + bool m_enabled; + + public: + /*! Construct */ + Compare_y_on_boundary_2(const Base * base, bool enabled = true) : + m_object(base->compare_y_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); + std::cout << "compare_y_on_boundary" << std::endl + << " p1: " << p1 << std::endl + << " p2: " << p2 << std::endl; + Comparison_result cr = m_object(p1, p2); + std::cout << " result: " << cr << std::endl; + return cr; + } + }; + + /*! A functor that determines whether a point or curve is on + * x-identification. + */ + class Is_on_x_identification_2 { + private: + typename Base::Is_on_x_identification_2 m_object; + bool m_enabled; + + 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) {} + /*! Operate + * \param p1 the point. + */ + Comparison_result 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; + Comparison_result cr = m_object(p); + std::cout << " result: " << cr << std::endl; + return cr; + } + + /*! Operate + * \param xcv1 the curve + */ + Comparison_result 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; + Comparison_result cr = m_object(xcv); + std::cout << " result: " << cr << std::endl; + return cr; + } + }; + /*! A functor that determines whether a point or curve is on * y-identification. */ @@ -975,204 +1041,11 @@ public: return cr; } }; - - /*! A functor that compares the x-limits of curve ends on the - * boundary of the parameter space. - */ - class Compare_x_at_limit_2 { - private: - typename Base::Compare_x_at_limit_2 m_object; - bool m_enabled; - - public: - /*! Construct */ - Compare_x_at_limit_2(const Base * base, bool enabled = true) : - m_object(base->compare_x_at_limit_2_object()), m_enabled(enabled) {} - - /*! Operate - * \param p the first point - * \param xcv the curve the end of which is to be compared - * \param ce the curve-end identifier - * \return the comparison result - */ - Comparison_result operator()(const Point_2 & p, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - if (!m_enabled) return m_object(p, xcv, ce); - std::cout << "compare_x_at_limit 1" << std::endl - << " p: " << p << std::endl - << " ce: " << ce << ", xcv: " << xcv << std::endl; - Comparison_result cr = m_object(p, xcv, ce); - std::cout << " result: " << std::endl; - return cr; - } - - /*! 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 - */ - 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(xcv1, ce1, xcv2, ce2); - std::cout << "compare_x_at_limit 2" << std::endl - << " ce1: " << ce1 << ", xcv1: " << xcv1 << std::endl - << " ce2: " << ce2 << ", xcv2: " << xcv2 << std::endl; - Comparison_result cr = m_object(xcv1, ce1, xcv2, ce2); - std::cout << " result: " << cr << std::endl; - return cr; - } - }; - - - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_x_near_limit_2 { - private: - typename Base::Compare_x_near_limit_2 m_object; - bool m_enabled; - - public: - /*! Construct */ - Compare_x_near_limit_2(const Base * base, bool enabled = true) : - m_object(base->compare_x_near_limit_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 - */ - 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); - std::cout << "compare_x_near_limit 2" << std::endl - << " xcv1: " << xcv1 << std::endl - << " xcv2: " << xcv2 << std::endl - << " ce: " << ce << std::endl; - Comparison_result cr = m_object(xcv1, xcv2, ce); - std::cout << " result: " << cr << std::endl; - return cr; - } - }; - - /*! A functor that compares the x-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; - bool m_enabled; - - 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) {} - /*! 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); - std::cout << "compare_x_on_boundary" << std::endl - << " p1: " << p1 << std::endl - << " p2: " << p2 << std::endl; - Comparison_result cr = m_object(p1, p2); - std::cout << " result: " << cr << std::endl; - return cr; - } - - /*! Operate - * \param pt the point. - * \param xcv the curve. - * \param ce the curve-end - */ - 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); - std::cout << "compare_x_on_boundary" << std::endl - << " pt: " << pt << std::endl - << " xcv: " << xcv << std::endl - << " ce: " << ce << std::endl; - Comparison_result cr = m_object(pt, xcv, ce); - std::cout << " result: " << cr << std::endl; - return cr; - } - - /*! Operate - * \param xcv1 the first curve. - * \param ce1 the first curve-end - * \param xcv2 the second curve. - * \param ce2 the second curve-end - */ - 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); - std::cout << "compare_x_on_boundary" << std::endl - << "xcv1: " << xcv1 << std::endl - << " ce1: " << ce1 << std::endl - << "xcv2: " << xcv2 << std::endl - << " ce2: " << ce2 << std::endl; - Comparison_result cr = m_object(xcv1, ce1, xcv2, ce2); - std::cout << " result: " << cr << std::endl; - return cr; - } - - }; - /*! A functor that compares the x-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; - bool m_enabled; - - 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) {} - - /*! 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 - */ - 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); - std::cout << "compare_x_near_boundary 2" << std::endl - << " xcv1: " << xcv1 << std::endl - << " xcv2: " << xcv2 << std::endl - << " ce: " << ce << std::endl; - Comparison_result cr = m_object(xcv1, xcv2, ce); - std::cout << " result: " << cr << std::endl; - return cr; - } - }; - //@} /// \name Obtain the appropriate functor //@{ - Compare_x_2 compare_x_2_object() const { return Compare_x_2(this, compare_x_op()); } @@ -1221,40 +1094,34 @@ public: Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(this, compare_endpoints_xy_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()); } - Is_on_x_identification_2 is_on_x_identification_2_object() const - { 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()); } - Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(this, compare_y_near_boundary_op()); } - // bottom-top + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const + { + return Compare_y_on_boundary_2(this, compare_y_on_boundary_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()); } Parameter_space_in_y_2 parameter_space_in_y_2_object() const { 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()); } - - Compare_x_at_limit_2 compare_x_at_limit_2_object() const - { return Compare_x_at_limit_2(this, compare_x_at_limit_op()); } - - Compare_x_near_limit_2 compare_x_near_limit_2_object() const - { return Compare_x_near_limit_2(this, compare_x_near_limit_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()); } - Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(this, compare_x_near_boundary_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()); + } + + Is_on_y_identification_2 is_on_y_identification_2_object() const + { return Is_on_y_identification_2(this, is_on_y_identification_op()); } + //@} }; 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 aaf0bb4d308..ac054c06977 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h index d9a28a2a644..694971b4f6c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 4a93f07f31f..9e6fee34189 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -75,42 +75,42 @@ public: typedef typename Base::Isolated_vertex Isolated_vertex; //@} - - //! \name Arrangement types - //!@{ - typedef Arr_unb_planar_topology_traits_2 Self; + // TODO remove adaptor as top-traits might be instantiated by Aos_2 itself typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; - //!@} + typedef Arr_unb_planar_topology_traits_2 Self; + ///! \name The side tags //@{ - typedef typename Traits_adaptor_2::Left_side_category Left_side_category; - typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_adaptor_2::Top_side_category Top_side_category; - typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - + // are inherited from the geometry traits + typedef typename Traits_adaptor_2::Arr_left_side_category Arr_left_side_category; + typedef typename Traits_adaptor_2::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Traits_adaptor_2::Arr_top_side_category Arr_top_side_category; + typedef typename Traits_adaptor_2::Arr_right_side_category Arr_right_side_category; + BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, - boost::is_same< Left_side_category, Arr_open_side_tag > > + boost::is_same< Arr_left_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_left_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, - boost::is_same< Bottom_side_category, Arr_open_side_tag > > + boost::is_same< Arr_bottom_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_bottom_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, - boost::is_same< Top_side_category, Arr_open_side_tag > > + boost::is_same< Arr_top_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_top_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, - boost::is_same< Right_side_category, Arr_open_side_tag > > + boost::is_same< Arr_right_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_right_side_category, Arr_open_side_tag > > ) ); //@} @@ -225,7 +225,7 @@ private: /// \name Auxiliary type definitions. //@{ - typedef Arrangement_on_surface_2 Arr; + typedef Arrangement_on_surface_2 Arr; // Type definition for the constuction sweep-line visitor. typedef Arr_construction_subcurve CSubcurve; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_ver_support/Rational_arc_with_ver_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_ver_support/Rational_arc_with_ver_d_1.h deleted file mode 100644 index 10f7d17c30c..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_ver_support/Rational_arc_with_ver_d_1.h +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_RATIONAL_ARC_WITH_VER_D_1_H -#define CGAL_RATIONAL_ARC_WITH_VER_D_1_H - -#include -#include -#include - -#include "boost/variant.hpp" -#include - -namespace CGAL { -namespace Arr_vertical_rational_arc { - -template -class Rational_arc_with_ver_d_1 -{ -public: - - typedef Arc_ Arc; - typedef Algebraic_kernel_ Algebraic_kernel; - - typedef Rational_arc_with_ver_d_1 Self; - - typedef typename Arc::Vertical_segment_d_1 Vertical_segment; - - typedef typename boost::variant Rational_arc_with_ver_d_1_variant; - - typedef typename Arc::Algebraic_point_2 Algebraic_point_2; - typedef typename Arc::Multiplicity Multiplicity; - typedef typename Arc::Polynomial_1 Polynomial; - typedef typename Arc::Coefficient Coefficient; - typedef typename Arc::Arithmetic_kernel Arithmetic_kernel; - typedef typename Arc::Rational Rational; - typedef typename Arc::Integer Integer; - typedef typename Arc::Algebraic_real_1 Algebraic_real_1; - typedef typename Arc::Algebraic_vector Algebraic_vector; - typedef typename Arc::Rat_vector Rat_vector; - typedef typename Arc::Polynomial_1 Polynomial_1; - typedef typename Arc::Cache Cache; -private: - typedef Arr_vertical_rational_arc::Source_infinite_in_x_visitor< Arc,Vertical_segment> Source_infinite_in_x_visitor; - typedef Arr_vertical_rational_arc::Source_infinite_in_y_visitor< Arc,Vertical_segment> Source_infinite_in_y_visitor; - typedef Arr_vertical_rational_arc::Target_infinite_in_x_visitor< Arc,Vertical_segment> Target_infinite_in_x_visitor; - typedef Arr_vertical_rational_arc::Target_infinite_in_y_visitor< Arc,Vertical_segment> Target_infinite_in_y_visitor; - typedef Arr_vertical_rational_arc::Source_visitor< Arc,Vertical_segment,Algebraic_point_2> Source_visitor; - typedef Arr_vertical_rational_arc::Source_x_visitor< Arc,Vertical_segment,Algebraic_real_1> Source_x_visitor; - typedef Arr_vertical_rational_arc::Target_visitor< Arc,Vertical_segment,Algebraic_point_2> Target_visitor; - typedef Arr_vertical_rational_arc::Target_x_visitor< Arc,Vertical_segment,Algebraic_real_1> Target_x_visitor; - typedef Arr_vertical_rational_arc::Left_infinite_in_x_visitor< Arc,Vertical_segment> Left_infinite_in_x_visitor; - typedef Arr_vertical_rational_arc::Left_infinite_in_y_visitor< Arc,Vertical_segment> Left_infinite_in_y_visitor; - typedef Arr_vertical_rational_arc::Right_infinite_in_x_visitor Right_infinite_in_x_visitor; - typedef Arr_vertical_rational_arc::Right_infinite_in_y_visitor Right_infinite_in_y_visitor; - typedef Arr_vertical_rational_arc::Left_visitor< Arc,Vertical_segment,Algebraic_point_2> Left_visitor; - typedef Arr_vertical_rational_arc::Left_x_visitor< Arc,Vertical_segment,Algebraic_real_1> Left_x_visitor; - typedef Arr_vertical_rational_arc::Right_visitor< Arc,Vertical_segment,Algebraic_point_2> Right_visitor; - typedef Arr_vertical_rational_arc::Right_x_visitor< Arc,Vertical_segment,Algebraic_real_1> Right_x_visitor; - typedef Arr_vertical_rational_arc::Is_continuous_visitor< Arc,Vertical_segment> Is_continuous_visitor; - typedef Arr_vertical_rational_arc::Is_directed_right_visitor< Arc,Vertical_segment> Is_directed_right_visitor; -private: - //------------------------------ - //Vertical_Arc members - //------------------------------ - - Rational_arc_with_ver_d_1_variant _arc; // The arc - enum - { - RATIONAL_ARC_TYPE = 0, - VERTICAL_TYPE = 1, - }; - -public: - const Rational_arc_with_ver_d_1_variant & variant() const - { - return _arc; - } - Rational_arc_with_ver_d_1_variant & variant() - { - return _arc; - } - -public: - //------------ - //Constructors - //------------ - - //--------------------------------------------------------------------------- - //default constructor - Rational_arc_with_ver_d_1 () {} - - - //--------------------------------------------------------------------------- - //Constructor of a whole polynomial curve defined by pcoeffs - the rational coefficients of the polynomial p(x). - Rational_arc_with_ver_d_1 (const Rat_vector& pcoeffs,Cache& cache) - :_arc (Arc(pcoeffs,cache)) {} - Rational_arc_with_ver_d_1 ( const Rat_vector& pcoeffs,const Algebraic_real_1& x_s, - bool dir_right,Cache& cache) - :_arc(Arc(pcoeffs,x_s,dir_right,cache)) {} - Rational_arc_with_ver_d_1 ( const Rat_vector& pcoeffs,const Algebraic_real_1& x_s, - const Algebraic_real_1& x_t,Cache& cache) - :_arc(Arc(pcoeffs,x_s,x_t,cache)) {} - Rational_arc_with_ver_d_1 (const Rat_vector& pcoeffs, const Rat_vector& qcoeffs,Cache& cache) - :_arc(Arc(pcoeffs,qcoeffs,cache)) {} - Rational_arc_with_ver_d_1 ( const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, bool dir_right,Cache& cache) - :_arc(Arc(pcoeffs,qcoeffs,x_s,dir_right,cache)) {} - Rational_arc_with_ver_d_1 ( const Rat_vector& pcoeffs, const Rat_vector& qcoeffs, - const Algebraic_real_1& x_s, const Algebraic_real_1& x_t,Cache& cache) - :_arc(Arc(pcoeffs,qcoeffs,x_s,x_t,cache)) {} - - Rational_arc_with_ver_d_1 (const Algebraic_point_2& p1,const Algebraic_point_2& p2) - :_arc (Vertical_segment(p1,p2,cache)) {} - Rational_arc_with_ver_d_1 (const Algebraic_point_2& p,bool is_directed_up) - :_arc (Vertical_segment(p,is_directed_up)) {} - Rational_arc_with_ver_d_1 (const Algebraic_point_2& p) - :_arc (Vertical_segment(p)) {} - Rational_arc_with_ver_d_1 (const Vertical_segment& other) - :_arc (other) {} - Rational_arc_with_ver_d_1 (const Arc& other) - :_arc (other) {} - - const Polynomial_1& numerator () const - { - CGAL_precondition (_arc.which() == RATIONAL_ARC_TYPE); - if ( const Arc* pc = boost::get( &_arc ) ) - return pc->numerator (); - else - CGAL_postcondition(false); - //should not be reached - assert (false); - return dummy_p; - } - const Polynomial_1& denominator () const - { - CGAL_precondition (_arc.which() == RATIONAL_ARC_TYPE); - if ( const Arc* pc = boost::get( &_arc ) ) - return pc->denominator(); - else - CGAL_postcondition(false); - //should not be reached - assert (false); - return dummy_p; - } - - //--------------------------------------------------------- - //Check if the x-coordinate of the source point is infinite - Arr_parameter_space source_infinite_in_x () const - { - return (boost::apply_visitor(Source_infinite_in_x_visitor(),_arc)); - } - - //--------------------------------------------------------- - //Check if the y-coordinate of the source point is infinite - Arr_parameter_space source_infinite_in_y () const - { - return (boost::apply_visitor(Source_infinite_in_y_visitor(),_arc)); - } - - //--------------------------------------------------------- - //Check if the x-coordinate of the target point is infinite - Arr_parameter_space target_infinite_in_x () const - { - return (boost::apply_visitor(Target_infinite_in_x_visitor(),_arc)); - } - - //--------------------------------------------------------- - //Check if the y-coordinate of the target point is infinite - Arr_parameter_space target_infinite_in_y () const - { - return (boost::apply_visitor(Target_infinite_in_y_visitor(),_arc)); - } - - //-------------------- - //Get the source point - const Algebraic_point_2& source () const - { - return (boost::apply_visitor(Source_visitor(),_arc)); - } - - //---------------------------------------- - //Get the x-coordinate of the source point - Algebraic_real_1 source_x () const - { - return (boost::apply_visitor(Source_x_visitor(),_arc)); - } - - //-------------------- - //Get the target point - const Algebraic_point_2& target () const - { - return (boost::apply_visitor(Target_visitor(),_arc)); - } - - //---------------------------------------- - //Get the x-coordinate of the target point - Algebraic_real_1 target_x () const - { - return (boost::apply_visitor(Target_x_visitor(),_arc)); - } - - //------------------------------------------------------- - //Check if the x-coordinate of the left point is infinite - Arr_parameter_space left_infinite_in_x () const - { - return (boost::apply_visitor(Left_infinite_in_x_visitor(),_arc)); - } - - //------------------------------------------------------- - //Check if the y-coordinate of the left point is infinite - Arr_parameter_space left_infinite_in_y () const - { - return (boost::apply_visitor(Left_infinite_in_y_visitor(),_arc)); - } - //-------------------------------------------------------- - //Check if the x-coordinate of the right point is infinite - Arr_parameter_space right_infinite_in_x () const - { - return (boost::apply_visitor(Right_infinite_in_x_visitor(),_arc)); - } - - //-------------------------------------------------------- - //Check if the y-coordinate of the right point is infinite - Arr_parameter_space right_infinite_in_y () const - { - return (boost::apply_visitor(Right_infinite_in_y_visitor(),_arc)); - } - - //------------------------------------ - //Get the x_value of the left endpoint - const Algebraic_real_1 left_x () const - { - return (boost::apply_visitor(Left_x_visitor(),_arc)); - } - - //------------------------------------ - //Get the x_value of the right endpoint - const Algebraic_real_1 right_x () const - { - return (boost::apply_visitor(Right_x_visitor(),_arc)); - } - //--------------------- - //Get the left endpoint - const Algebraic_point_2 left () const - { - return (boost::apply_visitor(Left_visitor(),_arc)); - } - - //---------------------- - //Get the right endpoint - const Algebraic_point_2 right () const - { - return (boost::apply_visitor(Right_visitor(),_arc)); - } - - //------------------------------ - //Check if the arc is continuous - bool is_continuous () const - { - return (boost::apply_visitor(Is_continuous_visitor(),_arc)); - } - - //---------------------------------- - //Check if the arc is directed right - bool is_directed_right () const - { - return (boost::apply_visitor(Is_directed_right_visitor(),_arc)); - } -private: - Polynomial_1 dummy_p; - -}; - -//------------------------------- -//! Exporter for rational arcs. -template -std::ostream& -operator<< (std::ostream& os, - const Rational_arc_with_ver_d_1 & _arc) -{ - return (boost::apply_visitor(Print_visitor < Arc_, typename Arc_::Vertical_segment_d_1 > (os),_arc.variant())); -} - -} //name_space Arr_vertical_rational_arc -} //namespace CGAL { -#endif //CGAL_RATIONAL_ARC_WITH_VER_D_1_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_ver_support/Visitors_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_ver_support/Visitors_d_1.h deleted file mode 100644 index 0acffa8898f..00000000000 --- a/Arrangement_on_surface_2/include/CGAL/Arr_ver_support/Visitors_d_1.h +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) 2011 Tel-Aviv University (Israel), INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Oren Salzman -// Michael Hemmer - -#ifndef CGAL_VISITORS_D_1_H -#define CGAL_VISITORS_D_1_H - -#include -#include -#include - -#include "boost/variant.hpp" - - -namespace CGAL { -namespace Arr_vertical_rational_arc { - -template < class Non_vertical_arc,class Vertical_Segment > -class Source_infinite_in_x_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.source_infinite_in_x(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return CGAL::ARR_INTERIOR; - } -}; //Source_infinite_in_x_visitor - -template < class Non_vertical_arc,class Vertical_Segment > -class Source_infinite_in_y_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.source_infinite_in_y(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return ver.min_parameter_space(); - } -}; //Source_infinite_in_y_visitor -template < class Non_vertical_arc,class Vertical_Segment > -class Target_infinite_in_x_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.target_infinite_in_x(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return CGAL::ARR_INTERIOR; - } -}; //Target_infinite_in_x_visitor - -template < class Non_vertical_arc,class Vertical_Segment > -class Target_infinite_in_y_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.target_infinite_in_y(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return ver.min_parameter_space(); - } -}; //Target_infinite_in_y_visitor - -template < class Non_vertical_arc,class Vertical_Segment, class Point_2 > -class Source_visitor - : public boost::static_visitor -{ -public: - const Point_2& operator() (const Non_vertical_arc & arc) const - { - return arc.source(); - } - const Point_2& operator() (const Vertical_Segment & ver) const - { - return ver.min(); - } -}; //Source_visitor - -template < class Non_vertical_arc,class Vertical_Segment, class Algebraic > -class Source_x_visitor - : public boost::static_visitor -{ -public: - Algebraic operator() (const Non_vertical_arc & arc) const - { - return arc.source_x(); - } - Algebraic operator() (const Vertical_Segment & ver) const - { - return ver.x(); - } -}; //Source_x_visitor - -template < class Non_vertical_arc,class Vertical_Segment, class Point_2 > -class Target_visitor - : public boost::static_visitor -{ -public: - const Point_2& operator() (const Non_vertical_arc & arc) const - { - return arc.target(); - } - const Point_2& operator() (const Vertical_Segment & ver) const - { - return ver.max(); - } -}; //Target_visitor -template < class Non_vertical_arc,class Vertical_Segment, class Algebraic > -class Target_x_visitor - : public boost::static_visitor -{ -public: - Algebraic operator() (const Non_vertical_arc & arc) const - { - return arc.target_x(); - } - Algebraic operator() (const Vertical_Segment & ver) const - { - return ver.x(); - } -}; //Target_x_visitor -template < class Non_vertical_arc,class Vertical_Segment > -class Left_infinite_in_x_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.left_infinite_in_x(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return CGAL::ARR_INTERIOR; - } -}; //Left_infinite_in_x_visitor -template < class Non_vertical_arc,class Vertical_Segment > -class Left_infinite_in_y_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.left_infinite_in_y(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return ver.min_parameter_space(); - } -}; //Left_infinite_in_x_visitor - -template < class Non_vertical_arc,class Vertical_Segment > -class Right_infinite_in_x_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.right_infinite_in_x(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return CGAL::ARR_INTERIOR; - } -}; //right_infinite_in_x_visitor - -template < class Non_vertical_arc,class Vertical_Segment > -class Right_infinite_in_y_visitor - : public boost::static_visitor -{ -public: - Arr_parameter_space operator() (const Non_vertical_arc & arc) const - { - return arc.right_infinite_in_y(); - } - Arr_parameter_space operator() (const Vertical_Segment & ver) const - { - return ver.max_parameter_space(); - } -}; //Right_infinite_in_y_visitor - -template < class Non_vertical_arc,class Vertical_Segment, class Point_2 > -class Left_visitor - : public boost::static_visitor -{ -public: - const Point_2& operator() (const Non_vertical_arc & arc) const - { - return arc.left(); - } - const Point_2& operator() (const Vertical_Segment & ver) const - { - return ver.min(); - } -}; //Left_visitor - -template < class Non_vertical_arc,class Vertical_Segment, class Algebraic > -class Left_x_visitor - : public boost::static_visitor -{ -public: - Algebraic operator() (const Non_vertical_arc & arc) const - { - return arc.left_x(); - } - Algebraic operator() (const Vertical_Segment & ver) const - { - return ver.x(); - } -}; //Left_x_visitor - -template < class Non_vertical_arc,class Vertical_Segment, class Point_2 > -class Right_visitor - : public boost::static_visitor -{ -public: - const Point_2& operator() (const Non_vertical_arc & arc) const - { - return arc.right(); - } - const Point_2& operator() (const Vertical_Segment & ver) const - { - return ver.max(); - } -}; //Right_visitor - -template < class Non_vertical_arc,class Vertical_Segment,class Algebraic > -class Right_x_visitor - : public boost::static_visitor -{ -public: - Algebraic operator() (const Non_vertical_arc & arc) const - { - return arc.right_x(); - } - Algebraic operator() (const Vertical_Segment & ver) const - { - return ver.x(); - } -}; //Right_x_visitor - -template < class Non_vertical_arc,class Vertical_Segment > -class Is_continuous_visitor - : public boost::static_visitor -{ -public: - bool operator() (const Non_vertical_arc & arc) const - { - return arc.is_directed_right(); - } - bool operator() (const Vertical_Segment & ver) const - { - return true; - } -}; //Is_continuous_visitor - -template < class Non_vertical_arc,class Vertical_Segment > -class Is_directed_right_visitor - : public boost::static_visitor -{ -public: - bool operator() (const Non_vertical_arc & arc) const - { - return arc.is_directed_right(); - } - bool operator() (const Vertical_Segment & ver) const - { - return true; - } -}; //Is_directed_right_visitor - - -template < class Non_vertical_arc,class Vertical_Segment > -class Print_visitor - : public boost::static_visitor -{ -public: - Print_visitor (std::ostream& os) : _os (&os) {} - std::ostream& operator() (const Non_vertical_arc & arc) const - { - *_os << arc; - return *_os; - } - std::ostream& operator() (const Vertical_Segment & ver) const - { - *_os << ver; - return *_os; - } -private: - std::ostream* _os; - -}; //Print_visitor - -} //name_space Arr_vertical_rational_arc -} //namespace CGAL { -#endif //CGAL_VISITORS_D_1_H 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 0b74188a92e..96a78f32da9 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_map.h index 909014fb403..83a3e6b07cc 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_map.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h index c780fbceea7..192887fde5a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h index 7529d031ec5..13aeb4f7d9a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h index c0ab88a79d5..cf032ce464b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -164,13 +164,18 @@ public: ///! \name Specialized access methods. //@{ - /*! Obtain the geometry-traits class. */ + /*! Get the geometry-traits class (for backward compatibility). */ const Traits_2* traits () const { return (this->geometry_traits()); } - /*! Obtain the number of vertices at infinity. */ + Traits_2* traits () + { + return (this->geometry_traits()); + } + + /*! Get the number of vertices at infinity. */ Size number_of_vertices_at_infinity () const { // The vertices at infinity are valid, but not concrete: @@ -178,7 +183,7 @@ public: this->topology_traits()->number_of_concrete_vertices()); } - /*! Obtain the unbounded face (non-const version). */ + /*! Get the unbounded face (non-const version). */ Face_handle unbounded_face () { // The fictitious un_face contains all other valid faces in a single diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h index 523e2dde57f..fcee1f89048 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_default_planar_topology.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_default_planar_topology.h index 2e1d8008ac6..b5d19673ca9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_default_planar_topology.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_default_planar_topology.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -64,10 +64,10 @@ struct Default_planar_topology : public internal::Default_planar_topology_impl < GeomTraits, Dcel, typename Arr_are_all_sides_oblivious_tag< - typename internal::Arr_complete_left_side_category< GeomTraits >::Category, - typename internal::Arr_complete_bottom_side_category< GeomTraits> ::Category, - typename internal::Arr_complete_top_side_category< GeomTraits >::Category, - typename internal::Arr_complete_right_side_category< GeomTraits >::Category >::result + typename internal::Arr_complete_left_side_tag< GeomTraits >::Tag, + typename internal::Arr_complete_bottom_side_tag< GeomTraits> ::Tag, + typename internal::Arr_complete_top_side_tag< GeomTraits >::Tag, + typename internal::Arr_complete_right_side_tag< GeomTraits >::Tag >::result > {}; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h index 742354fe803..b46cc304ba0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h index d538e11a220..056a1baa15c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 9e5f5ccceb0..91005032b4d 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -18,7 +18,7 @@ // // Author(s) : Ron Wein s // Efi Fogel -// Eric Berberich +// Eric Berberich // (based on old version by Iddo Hanniel // Eyal Flato // Oren Nechushtan @@ -56,53 +56,54 @@ public: typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; typedef typename Base::Point_2 Point_2; - // Categories + // Tags. typedef typename Base::Has_left_category Has_left_category; typedef typename Base::Has_do_intersect_category 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; + typedef typename internal::Arr_complete_left_side_tag< Base >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Base >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Base >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Base >::Tag + Arr_right_side_category; protected: // left-right dispatch typedef CGAL::internal::Arr_left_right_implementation_dispatch< - Left_side_category, Right_side_category > LR; + Arr_left_side_category, Arr_right_side_category > LR; - typedef typename LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end_tag; - typedef typename LR::Parameter_space_in_x_2_curve_tag Psx_2_curve_tag; - typedef typename LR::Parameter_space_in_x_2_point_tag Psx_2_point_tag; - typedef typename LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve_tag; - typedef typename LR::Is_on_y_identification_2_point_tag Ioyi_2_point_tag; - typedef typename LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points_tag; - typedef typename LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends_tag; + typedef typename LR::Parameter_space_in_x_2_curve_end_tag + Psx_2_curve_end_tag; + typedef typename LR::Parameter_space_in_x_2_curve_tag Psx_2_curve_tag; + typedef typename LR::Parameter_space_in_x_2_point_tag Psx_2_point_tag; + typedef typename LR::Compare_y_near_boundary_2_curve_ends_tag + Cmp_y_nb_2_curve_ends_tag; + typedef typename LR::Compare_y_on_boundary_2_points_tag + Cmp_y_ob_2_points_tag; + typedef typename LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve_tag; + typedef typename LR::Is_on_y_identification_2_point_tag Ioyi_2_point_tag; // bottom-top dispatch typedef CGAL::internal::Arr_bottom_top_implementation_dispatch< - Bottom_side_category, Top_side_category > BT; + Arr_bottom_side_category, Arr_top_side_category > BT; - typedef typename BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end_tag; - typedef typename BT::Parameter_space_in_y_2_curve_tag Psy_2_curve_tag; - typedef typename BT::Parameter_space_in_y_2_point_tag Psy_2_point_tag; - typedef typename BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve_tag; - typedef typename BT::Is_on_x_identification_2_point_tag Ioxi_2_point_tag; - - typedef typename BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end_tag; - typedef typename BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends_tag; - typedef typename BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends_tag; - - typedef typename BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points_tag; - typedef typename BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end_tag; - typedef typename BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends_tag; - typedef typename BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends_tag; + typedef typename BT::Parameter_space_in_y_2_curve_end_tag + Psy_2_curve_end_tag; + typedef typename BT::Parameter_space_in_y_2_curve_tag Psy_2_curve_tag; + typedef typename BT::Parameter_space_in_y_2_point_tag Psy_2_point_tag; + typedef typename BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end_tag; + typedef typename BT::Compare_x_near_boundary_2_curve_ends_tag + Cmp_x_nb_2_curve_ends_tag; + typedef typename BT::Compare_x_on_boundary_2_points_tag + Cmp_x_ob_2_points_tag; + typedef typename BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve_tag; + typedef typename BT::Is_on_x_identification_2_point_tag Ioxi_2_point_tag; public: @@ -331,14 +332,9 @@ public: //@} - - - /// \name Overriden functors for boundaries. //@{ - // left-right - /*! A functor that determines the location of a geometric object * with respect to the parameter space along the x axis. */ @@ -467,213 +463,7 @@ public: return Parameter_space_in_x_2(this); } - /*! A function object that determines whether an x-monotone curve or a - * point coincide with the vertical identification curve. - */ - class Is_on_y_identification_2 { - protected: - //! The base traits. - const Base * m_base; - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Is_on_y_identification_2 (const Base * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_traits_basic_adaptor_2; - - public: - /*! Determones 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. - */ - bool operator() (const Point_2 & p) const - { - return is_on_y_idn (p, Ioyi_2_point_tag()); - } - - /*! Determones whether an x-monotone curve coicide with the vertical - * identification curve - * \param xcv the point. - * \return true if xcv coincides with an identification curve, - * and false otherwise. - */ - bool operator()(const X_monotone_curve_2 & xcv) const - { - return is_on_y_idn (xcv, Ioyi_2_curve_tag()); - } - - private: - bool is_on_y_idn (const Point_2 & p, Arr_use_traits_tag) const - { - return m_base->is_on_identification_2_object ()(p); - } - - bool is_on_y_idn (const Point_2 &, Arr_use_dummy_tag) const - { - CGAL_error(); - return SMALLER; - } - - bool is_on_y_idn (const X_monotone_curve_2 & xcv, Arr_use_traits_tag) const - { - return m_base->is_on_y_identification_2_object ()(xcv); - } - - bool is_on_y_idn (const X_monotone_curve_2 &, Arr_use_dummy_tag) const - { - CGAL_error(); - return SMALLER; - } - }; - - /*! Obtain 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); - } - - - /*! A function object that compares the y-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_y_near_boundary_2 { - protected: - //! The base traits. - const Base * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_y_near_boundary_2(const Base * base) : m_base(base) {} - - //! 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. - */ - Comparison_result comp_y_near_bnd (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce, - 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. - */ - Comparison_result comp_y_near_bnd (const X_monotone_curve_2 &, - const X_monotone_curve_2 &, - Arr_curve_end, Arr_use_dummy_tag) const - { - CGAL_error(); - return EQUAL; - } - - public: - /*! - * Compare 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. - * \pre Both curve ends have a special boundary in x. - * \return SMALLER if xcv1 lies below xcv2; - * LARGER if xcv1 lies above xcv2; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - // The function is implemented based on the tag disatching - // If the traits class does not support open curves, we just - // return EQUAL, as this comparison will not be invoked anyway. - return comp_y_near_bnd (xcv1, xcv2, ce, Cmp_y_nb_2_curve_ends_tag()); - } - }; - - /*! Obtain 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); - } - - /*! A function object that compares the y-coordinate of two given points - * that lie on vertical boundaries. - */ - class Compare_y_on_boundary_2 { - protected: - //! The base traits. - const Base * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_y_on_boundary_2(const Base * base) : m_base(base) {} - - //! 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. - */ - 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. - */ - 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. - * \param p1 The first point. - * \param p2 The second point. - * \pre Both points lie on vertical boundaries. - * \return SMALLER if xcv1 lies below xcv2; - * LARGER if xcv1 lies above xcv2; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const Point_2 & p1, const Point_2 & p2) const - { - // The function is implemented based on the tag dispatching. - // If the traits class does not support open curves, we just - // return EQUAL, as this comparison will not be invoked anyway. - return comp_y_on_bnd (p1, p2, Cmp_y_ob_2_points_tag()); - } - }; - - /*! 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); - } - - // bottom-top /*! A functor that determines the location of a geometric object * with respect to the parameter space along the y axis. @@ -798,6 +588,305 @@ public: return Parameter_space_in_y_2(this); } + /*! A functor that compares the x-coordinates of curve ends near the + * boundary of the parameter space + */ + class Compare_x_near_boundary_2 { + protected: + //! The base traits. + const Base * m_base; + + /*! Constructor. + * \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 + * obtaining function, which is a member of the nesting class, + * constructing it. + */ + Compare_x_near_boundary_2(const Base * base) : m_base(base) {} + + //! 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. + */ + Comparison_result _compare_point_curve (const Point_2 & p, + const X_monotone_curve_2 & xcv, + Arr_curve_end ce, + Arr_use_traits_tag) const + { + return (m_base->compare_x_near_boundary_2_object()(p, xcv, ce)); + } + + /*! + * Implementation of the operator() in case the dummy should be used. + */ + Comparison_result _compare_point_curve(const Point_2 &, + const X_monotone_curve_2 &, + Arr_curve_end, + Arr_use_dummy_tag) const + { + CGAL_error(); + return EQUAL; + } + + /*! + * Implementation of the operator() in case the base should be used. + */ + Comparison_result _compare_curves (const X_monotone_curve_2 & xcv1, + Arr_curve_end ce1, + const X_monotone_curve_2 & xcv2, + Arr_curve_end ce2, + Arr_use_traits_tag) const + { + return m_base->compare_x_near_boundary_2_object()(xcv1, ce1, xcv2, ce2); + } + + /*! + * Implementation of the operator() in case the dummy should be used. + */ + Comparison_result _compare_curves (const X_monotone_curve_2 &, + Arr_curve_end, + const X_monotone_curve_2 &, + Arr_curve_end, + Arr_use_dummy_tag) const + { + CGAL_error(); + return EQUAL; + } + + public: + /*! Compare the relative x-positions of a vertical curve and another given + * curve end. + * \param p A reference point; we refer to a vertical line incident to p. + * \param xcv The compared curve. + * \param ind ARR_MIN_END if we refer to xcv's minimal end; + * ARR_MAX_END if we refer to its maximal end. + * \pre xcv's relevant end has a special boundary in y. + * \return SMALLER if p lies to the left of xcv; + * LARGER if p lies to the right xcv; + * EQUAL in case of an overlap. + */ + Comparison_result operator() (const Point_2 & p, + const X_monotone_curve_2 & xcv, + Arr_curve_end ce) const + { + return _compare_point_curve(p, xcv, ce, Cmp_x_nb_2_point_curve_end_tag()); + } + + /*! Compare 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. + * \param xcv2 The second curve. + * \param ind2 ARR_MIN_END if we refer to xcv2's minimal end; + * ARR_MAX_END if we refer to its maximal end. + * \pre Both curve ends have a special boundary in y. + * \return SMALLER if xcv1 lies to the left of xcv2; + * LARGER if xcv1 lies to the right xcv2; + * EQUAL in case of an overlap. + */ + Comparison_result operator() (const X_monotone_curve_2 & xcv1, + Arr_curve_end ce1, + const X_monotone_curve_2 & xcv2, + Arr_curve_end ce2) const + { + return _compare_curves(xcv1, ce1, xcv2, ce2, Cmp_x_nb_2_curve_ends_tag()); + } + }; + + /*! 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 function object that compares the y-coordinates of curve ends near the + * boundary of the parameter space. + */ + class Compare_y_near_boundary_2 { + protected: + //! The base traits. + const Base * m_base; + + /*! Constructor. + * \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 + * obtaining function, which is a member of the nesting class, + * constructing it. + */ + Compare_y_near_boundary_2(const Base * base) : m_base(base) {} + + //! 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. + */ + Comparison_result comp_y_near_bnd (const X_monotone_curve_2 & xcv1, + const X_monotone_curve_2 & xcv2, + Arr_curve_end ce, + 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. + */ + Comparison_result comp_y_near_bnd (const X_monotone_curve_2 &, + const X_monotone_curve_2 &, + Arr_curve_end, Arr_use_dummy_tag) const + { + CGAL_error(); + return EQUAL; + } + + public: + /*! + * Compare 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. + * \pre Both curve ends have a special boundary in x. + * \return SMALLER if xcv1 lies below xcv2; + * LARGER if xcv1 lies above xcv2; + * EQUAL in case of an overlap. + */ + Comparison_result operator() (const X_monotone_curve_2 & xcv1, + const X_monotone_curve_2 & xcv2, + Arr_curve_end ce) const + { + // The function is implemented based on the tag disatching + // If the traits class does not support open curves, we just + // return EQUAL, as this comparison will not be invoked anyway. + return comp_y_near_bnd (xcv1, xcv2, ce, Cmp_y_nb_2_curve_ends_tag()); + } + }; + + /*! Obtain 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); + } + + /*! A function object that compares the x-coordinate of two given points + * that lie on horizontal boundaries. + */ + class Compare_x_on_boundary_2 { + protected: + //! The base traits. + const Base * m_base; + + /*! Constructor. + * \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 + * obtaining function, which is a member of the nesting class, + * constructing it. + */ + Compare_x_on_boundary_2(const Base * base) : m_base(base) {} + + //! Allow its functor obtaining function calling the private constructor. + friend class Arr_traits_basic_adaptor_2; + + public: + /*! Compare the x-coordinate of two given points that lie on horizontal + * boundaries + * \param p1 the first point. + * \param p2 the second point. + */ + Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const + { + return comp_x_on_bnd (p1, p2, Cmp_x_ob_2_points_tag()); + } + + private: + Comparison_result comp_x_on_bnd (const Point_2 & p1, const Point_2 & p2, + Arr_use_traits_tag) const + { + return m_base->compare_x_on_boundary_2_object ()(p1, p2); + } + + Comparison_result comp_x_on_bnd (const Point_2 &, const Point_2 &, + Arr_use_dummy_tag) const + { + CGAL_error(); + return SMALLER; + } + }; + + /*! 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 y-coordinate of two given points + * that lie on vertical boundaries. + */ + class Compare_y_on_boundary_2 { + protected: + //! The base traits. + const Base * m_base; + + /*! Constructor. + * \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 + * obtaining function, which is a member of the nesting class, + * constructing it. + */ + Compare_y_on_boundary_2(const Base * base) : m_base(base) {} + + //! 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. + */ + 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. + */ + 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. + * \param p1 The first point. + * \param p2 The second point. + * \pre Both points lie on vertical boundaries. + * \return SMALLER if xcv1 lies below xcv2; + * LARGER if xcv1 lies above xcv2; + * EQUAL in case of an overlap. + */ + Comparison_result operator() (const Point_2 & p1, const Point_2 & p2) const + { + // The function is implemented based on the tag dispatching. + // If the traits class does not support open curves, we just + // return EQUAL, as this comparison will not be invoked anyway. + return comp_y_on_bnd (p1, p2, Cmp_y_ob_2_points_tag()); + } + }; + + /*! 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); + } + /*! A function object that determines whether an x-monotone curve or a * point coincide with the horizontal identification curve. */ @@ -837,7 +926,7 @@ public: */ bool operator()(const X_monotone_curve_2 & xcv) const { - return is_on_x_idn (xcv, Ioxi_2_curve_tag()); + return is_on_idn (xcv, Ioxi_2_curve_tag()); } private: @@ -871,11 +960,11 @@ public: { return Is_on_x_identification_2(this); } - - /*! A functor that compares the x-limits of curve ends near the - * boundary of the parameter space + + /*! A function object that determines whether an x-monotone curve or a + * point coincide with the vertical identification curve. */ - class Compare_x_at_limit_2 { + class Is_on_y_identification_2 { protected: //! The base traits. const Base * m_base; @@ -887,800 +976,63 @@ public: * obtaining function, which is a member of the nesting class, * constructing it. */ - Compare_x_at_limit_2(const Base * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_traits_basic_adaptor_2; + Is_on_y_identification_2 (const Base * base) : m_base(base) {} - /*! - * Implementation of the operator() in case the base should be used. - */ - Comparison_result _compare_point_curve (const Point_2 & p, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce, - Arr_use_traits_tag) const - { - return (m_base->compare_x_at_limit_2_object()(p, xcv, ce)); - } - - /*! - * Implementation of the operator() in case the dummy should be used. - */ - Comparison_result _compare_point_curve(const Point_2 &, - const X_monotone_curve_2 &, - Arr_curve_end, - Arr_use_dummy_tag) const - { - CGAL_error(); - return EQUAL; - } - - /*! - * Implementation of the operator() in case the base should be used. - */ - Comparison_result _compare_curves (const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2, - Arr_use_traits_tag) const - { - return m_base->compare_x_at_limit_2_object()(xcv1, ce1, xcv2, ce2); - } - - /*! - * Implementation of the operator() in case the dummy should be used. - */ - Comparison_result _compare_curves (const X_monotone_curve_2 &, - Arr_curve_end, - const X_monotone_curve_2 &, - Arr_curve_end, - Arr_use_dummy_tag) const - { - CGAL_error(); - return EQUAL; - } - - public: - /*! Compare the x-limits of a vertical curve and another given - * curve end. - * \param p A reference point; we refer to a vertical line incident to p. - * \param xcv The compared curve. - * \param ind ARR_MIN_END if we refer to xcv's minimal end; - * ARR_MAX_END if we refer to its maximal end. - * \pre xcv's relevant end has a special boundary in y. - * \return SMALLER if p lies to the left of xcv; - * LARGER if p lies to the right xcv; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const Point_2 & p, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - return _compare_point_curve(p, xcv, ce, Cmp_x_al_2_point_curve_end_tag()); - } - - /*! Compare the x-limits of two curve ends on the boundary. - * \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. - * \param xcv2 The second curve. - * \param ind2 ARR_MIN_END if we refer to xcv2's minimal end; - * ARR_MAX_END if we refer to its maximal end. - * \pre Both curve ends have a special boundary in y. - * \return SMALLER if xcv1 lies to the left of xcv2; - * LARGER if xcv1 lies to the right xcv2; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2) const - { - return _compare_curves(xcv1, ce1, xcv2, ce2, Cmp_x_al_2_curve_ends_tag()); - } - }; - - /*! Obtain a Compare_x_at_limit_2 function object. */ - Compare_x_at_limit_2 compare_x_at_limit_2_object () const - { - return Compare_x_at_limit_2(this); - } - - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space - */ - class Compare_x_near_limit_2 { - protected: - //! The base traits. - const Base * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_near_limit_2(const Base * base) : m_base(base) {} - //! 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. - */ - Comparison_result _compare_curves (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce, - Arr_use_traits_tag) const - { - return m_base->compare_x_near_limit_2_object()(xcv1, xcv2, ce); - } - - /*! - * Implementation of the operator() in case the dummy should be used. - */ - Comparison_result _compare_curves (const X_monotone_curve_2 &, - const X_monotone_curve_2 &, - Arr_curve_end, - Arr_use_dummy_tag) const - { - CGAL_error(); - return EQUAL; - } public: - - /*! Compare 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; - * ARR_MAX_END if we refer to the curves' maximal end. - * \pre Both curve ends have a special boundary in y. - * \return SMALLER if xcv1 lies to the left of xcv2; - * LARGER if xcv1 lies to the right xcv2; - * EQUAL in case of an overlap. + /*! Determones 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. */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const + bool operator() (const Point_2 & p) const { - return _compare_curves(xcv1, xcv2, ce, Cmp_x_nl_2_curve_ends_tag()); - } - }; - - /*! Obtain a Compare_x_near_limit_2 function object. */ - Compare_x_near_limit_2 compare_x_near_limit_2_object () const - { - return Compare_x_near_limit_2(this); - } - - /*! A function object that compares the x-coordinate of two given points - * that lie on horizontal boundaries. - */ - class Compare_x_on_boundary_2 { - protected: - //! The base traits. - const Base * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_on_boundary_2(const Base * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_traits_basic_adaptor_2; - - public: - /*! Compare the x-coordinate of two given points projected onto the horizontal boundaries - * \param p1 the first point. - * \param p2 the second point. - */ - Comparison_result operator()(const Point_2 & p1, const Point_2 & p2) const - { - return comp_x_on_bnd (p1, p2, Cmp_x_ob_2_points_tag()); + return is_on_y_idn (p, Ioyi_2_point_tag()); } - /*! Compare the x-coordinate of a point and a curve-end projected onto the horizontal - * boundaries - * \param pt the point. - * \param xcv the curve - * \param ce the curve-end + /*! Determones whether an x-monotone curve coicide with the vertical + * identification curve + * \param xcv the point. + * \return true if xcv coincides with an identification curve, + * and false otherwise. */ - Comparison_result operator()(const Point_2 & pt, const X_monotone_curve_2 & xcv, Arr_curve_end ce) const + bool operator()(const X_monotone_curve_2 & xcv) const { - return comp_x_on_bnd (pt, xcv, ce, Cmp_x_ob_2_point_curve_end_tag()); - } - - /*! Compare the x-coordinates of two curve-ends projected onto the horizontal - * boundaries - * \param xcv1 the curve - * \param ce1 the curve-end - * \param xcv2 the curve - * \param ce2 the curve-end - */ - Comparison_result operator()(const X_monotone_curve_2 & xcv1, Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, Arr_curve_end ce2) const - { - return comp_x_on_bnd (xcv1, ce1, xcv2, ce2, Cmp_x_ob_2_curve_ends_tag()); + return is_on_y_idn (xcv, Ioyi_2_curve_tag()); } private: - Comparison_result comp_x_on_bnd (const Point_2 & p1, const Point_2 & p2, - Arr_use_traits_tag) const + bool is_on_y_idn (const Point_2 & p, Arr_use_traits_tag) const { - return m_base->compare_x_on_boundary_2_object ()(p1, p2); - } - - Comparison_result comp_x_on_bnd (const Point_2 &, const Point_2 &, - Arr_use_dummy_tag) const - { - CGAL_error(); - return SMALLER; - } - - Comparison_result comp_x_on_bnd (const Point_2 & pt, const X_monotone_curve_2 & xcv, Arr_curve_end ce, - Arr_use_traits_tag) const - { - return m_base->compare_x_on_boundary_2_object ()(pt, xcv, ce); - } - - Comparison_result comp_x_on_bnd (const Point_2 &, const X_monotone_curve_2 & xcv, Arr_curve_end ce, - Arr_use_dummy_tag) const - { - CGAL_error(); - return SMALLER; - } - - - Comparison_result comp_x_on_bnd (const X_monotone_curve_2 & xcv1, Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, Arr_curve_end ce2, - Arr_use_traits_tag) const - { - return m_base->compare_x_on_boundary_2_object ()(xcv1, ce1, xcv2, ce2); - } - - Comparison_result comp_x_on_bnd (const X_monotone_curve_2 & xcv1, Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, Arr_curve_end ce2, - Arr_use_dummy_tag) const - { - CGAL_error(); - return SMALLER; - } - - }; - - /*! 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 curve ends near the - * boundary of the parameter space - */ - class Compare_x_near_boundary_2 { - protected: - //! The base traits. - const Base * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_near_boundary_2(const Base * base) : m_base(base) {} - - //! 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. - */ - Comparison_result _compare_curves (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce, - Arr_use_traits_tag) const - { - return m_base->compare_x_near_boundary_2_object()(xcv1, xcv2, ce); - } - - /*! - * Implementation of the operator() in case the dummy should be used. - */ - Comparison_result _compare_curves (const X_monotone_curve_2 &, - const X_monotone_curve_2 &, - Arr_curve_end, - Arr_use_dummy_tag) const - { - CGAL_error(); - return EQUAL; - } - - public: - - /*! Compare 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; - * ARR_MAX_END if we refer to the curves' maximal end. - * \pre Both curve ends have a special boundary in y. - * \return SMALLER if xcv1 lies to the left of xcv2; - * LARGER if xcv1 lies to the right xcv2; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return _compare_curves(xcv1, xcv2, ce, Cmp_x_nb_2_curve_ends_tag()); - } - }; - - /*! 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); - } - - - // special non-public comparison functors - - - /*! A functor that compares the y-coordinates of curve ends near the - * boundary of the parameter space - */ - class Compare_y_curve_ends_2 { - protected: - //! The base traits. - const Self * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_y_curve_ends_2(const Self * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_traits_basic_adaptor_2; - - protected: - - // for open - Comparison_result _compare_curve_ends(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce, - Arr_open_side_tag) const - { - Comparison_result res = - m_base->compare_y_near_boundary_2_object()(xcv1, xcv2, ce); - - return res; + return m_base->is_on_identification_2_object ()(p); } - // for non-open - Comparison_result _compare_curve_ends(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce, - Arr_oblivious_side_tag) const + bool is_on_y_idn (const Point_2 &, Arr_use_dummy_tag) const { - Comparison_result res = - m_base->compare_y_on_boundary_2_object()( - m_base->construct_vertex_at_curve_end_2_object()(xcv1, ce), - m_base->construct_vertex_at_curve_end_2_object()(xcv2, ce) - ); - - return res; - + CGAL_error(); + return SMALLER; } - - public: - - /*! Compare 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. - * \param xcv2 The second curve. - * \param ind2 ARR_MIN_END if we refer to xcv2's minimal end; - * ARR_MAX_END if we refer to its maximal end. - * \pre Both curve ends have a special boundary in y. - * \return SMALLER if xcv1 lies to the left of xcv2; - * LARGER if xcv1 lies to the right xcv2; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const + + bool is_on_y_idn (const X_monotone_curve_2 & xcv, Arr_use_traits_tag) const { + return m_base->is_on_identification_2_object ()(xcv); + } - Arr_parameter_space ps1 = - m_base->parameter_space_in_x_2_object()(xcv1, ce); - - CGAL_precondition(ps1 != ARR_INTERIOR); - - CGAL_assertion_code( - Arr_parameter_space ps2 = - m_base->parameter_space_in_x_2_object()(xcv2, ce); - ); - CGAL_assertion(ps1 == ps2); - - switch (ps1) { - - case ARR_LEFT_BOUNDARY: - return _compare_curve_ends(xcv1, xcv2, ce, Left_side_category()); - - case ARR_RIGHT_BOUNDARY: - return _compare_curve_ends(xcv1, xcv2, ce, Right_side_category()); - - case ARR_INTERIOR: - // fall-through - default: - CGAL_error(); // never reached - return CGAL::EQUAL; - } - + bool is_on_y_idn (const X_monotone_curve_2 &, Arr_use_dummy_tag) const + { + CGAL_error(); + return SMALLER; } }; - /*! Obtain a Compare_y_curve_ends_2 function object. */ - Compare_y_curve_ends_2 compare_y_curve_ends_2_object () const + /*! Obtain a Is_on_y_identification_2 function object. */ + Is_on_y_identification_2 is_on_y_identification_2_object() const { - return Compare_y_curve_ends_2(this); - } - - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space - */ - class Compare_x_point_curve_end_2 { - protected: - //! The base traits. - const Self * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_point_curve_end_2(const Self * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_traits_basic_adaptor_2; - - protected: - - // for open - Comparison_result _compare_point_curve_end(const Point_2 & pt, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce, - Arr_open_side_tag) const - { - Comparison_result res = - m_base->compare_x_at_limit_2_object()(pt, xcv, ce); - - if (res != EQUAL || m_base->is_vertical_2_object()(xcv)) { - return res; - } - - // look at the side from which the - // vertical asymptote is approached - res = (ce == CGAL::ARR_MIN_END ? CGAL::SMALLER : CGAL::LARGER); - - return res; - } - - - // for contraction - Comparison_result _compare_point_curve_end(const Point_2 & pt, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce, - Arr_contracted_side_tag) const - { - Comparison_result res = - m_base->compare_x_on_boundary_2_object()(pt, xcv, ce); - - if (res != EQUAL || m_base->is_vertical_2_object()(xcv)) { - return res; - } - - // look at the side from which the - // vertical asymptote is approached - res = (ce == CGAL::ARR_MIN_END ? CGAL::SMALLER : CGAL::LARGER); - - return res; - } - - // for others - Comparison_result _compare_point_curve_end(const Point_2 & pt, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce, - Arr_oblivious_side_tag) const - { - Comparison_result res = - m_base->compare_x_on_boundary_2_object()( - pt, - m_base->construct_vertex_at_curve_end_2_object()(xcv, ce)); - - return res; - } - - - public: - - /*! Compare 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; - * ARR_MAX_END if we refer to its maximal end. - * \pre Both curve ends have a special boundary in y. - * \return SMALLER if pt lies to the left of xcv; - * LARGER if pt lies to the right xcv; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const Point_2 & pt, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - - Arr_parameter_space ps = - m_base->parameter_space_in_y_2_object()(xcv, ce); - - CGAL_precondition(ps != ARR_INTERIOR); - - switch (ps) { - - case ARR_BOTTOM_BOUNDARY: - return _compare_point_curve_end(pt, xcv, ce, Bottom_side_category()); - - case ARR_TOP_BOUNDARY: - return _compare_point_curve_end(pt, xcv, ce, Top_side_category()); - - case ARR_INTERIOR: - // fall-through - default: - CGAL_error(); // never reached - return CGAL::EQUAL; - } - - } - - }; - - /*! Obtain 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); - } - - - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space - */ - class Compare_x_curve_ends_2 { - protected: - //! The base traits. - const Self * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_curve_ends_2(const Self * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_traits_basic_adaptor_2; - - - protected: - - Comparison_result _compare_curve_ends_same_x(const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2) const { - - CGAL::Comparison_result res = CGAL::EQUAL; - - CGAL::Arr_parameter_space loc1 = m_base->parameter_space_in_y_2_object()(xcv1, ce1); - CGAL::Arr_parameter_space loc2 = m_base->parameter_space_in_y_2_object()(xcv2, ce2); - bool vert1 = m_base->is_vertical_2_object()(xcv1); - bool vert2 = m_base->is_vertical_2_object()(xcv2); - - // now we are in the open case: ARR_MIN_END > vertical > ARR_MAX_END - if (vert1) { - if (!vert2) { - res = (ce2 == CGAL::ARR_MIN_END ? CGAL::SMALLER : CGAL::LARGER); - return res; - } - // both are vertical - if (loc1 == loc2) { // both ends converge to the same infinity - res = CGAL::EQUAL; - return res; - } - res = (loc1 == CGAL::ARR_BOTTOM_BOUNDARY ? - CGAL::SMALLER : CGAL::LARGER); - return res; - } - - if (vert2) { - res = (ce1 == CGAL::ARR_MIN_END ? CGAL::LARGER : CGAL::SMALLER); - return res; - } - - // otherwise: both ends have asymptotic behaviour - if (ce1 == ce2) { // both ends approach asymptote from one side - if (loc1 == loc2) { // need special y-comparison - res = m_base->compare_x_near_limit_2_object()(xcv1, xcv2, ce2); - return res; - } - // else: order can be determined without y-comparison - res = CGAL::EQUAL; - return res; - } - // curve ends approach vertical asymptote (or singularity) from - // different sides => no comparisons required - res = (ce1 == CGAL::ARR_MIN_END ? CGAL::LARGER : CGAL::SMALLER); - return res; - - } - - - // for open - Comparison_result _compare_curve_ends(const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2, - Arr_open_side_tag) const { - - Comparison_result res = - m_base->compare_x_at_limit_2_object()(xcv1, ce1, xcv2, ce2); - - if (res == EQUAL) { - res = _compare_curve_ends_same_x(xcv1, ce1, xcv2, ce2); - } - - return res; - - } - - // for contracted - Comparison_result _compare_curve_ends(const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2, - Arr_contracted_side_tag) const { - - Comparison_result res = - m_base->compare_x_on_boundary_2_object()(xcv1, ce1, xcv2, ce2); - - if (res == EQUAL) { - res = _compare_curve_ends_same_x(xcv1, ce1, xcv2, ce2); - } - - return res; - } - - - // for others - Comparison_result _compare_curve_ends(const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2, - Arr_oblivious_side_tag) const { - - Comparison_result res = - m_base->compare_x_on_boundary_2_object()( - m_base->construct_vertex_at_curve_end_2_object()(xcv1, ce1), - m_base->construct_vertex_at_curve_end_2_object()(xcv2, ce2) - ); - - return res; - } - - public: - - /*! Compare 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. - * \param xcv2 The second curve. - * \param ind2 ARR_MIN_END if we refer to xcv2's minimal end; - * ARR_MAX_END if we refer to its maximal end. - * \pre Both curve ends have a special boundary in y. - * \return SMALLER if xcv1 lies to the left of xcv2; - * LARGER if xcv1 lies to the right xcv2; - * EQUAL in case of an overlap. - */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2) const - { - - bool first_open = !m_base->is_closed_2_object()(xcv1, ce1); - bool second_open = !m_base->is_closed_2_object()(xcv2, ce2); - - if (first_open) { - if (second_open) { - return _compare_curve_ends(xcv1, ce1, xcv2, ce2, - // both sides are open, so pick one - Bottom_side_category()); - } else { - return CGAL::opposite(m_base->compare_x_point_curve_end_2_object()( - m_base->construct_vertex_at_curve_end_2_object()(xcv2, ce2), - xcv1, ce1)); - } - } else { - if (second_open) { - return m_base->compare_x_point_curve_end_2_object()( - m_base->construct_vertex_at_curve_end_2_object()(xcv1, ce1), - xcv2, ce2); - - } else { - return _compare_curve_ends(xcv1, ce1, xcv2, ce2, - // both sides are non-open, so pick one - Bottom_side_category()); - } - } - - } - }; - - /*! Obtain 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); + return Is_on_y_identification_2(this); } - class Construct_vertex_at_curve_end_2 { - protected: - //! The base traits. - const Self * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Construct_vertex_at_curve_end_2(const Self * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_traits_basic_adaptor_2; - - public: - Point_2 operator() (const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - if (ce == ARR_MIN_END) { - return m_base->construct_min_vertex_2_object()(xcv); - } - // else - return m_base->construct_max_vertex_2_object()(xcv); - - } - }; - - /*! Obtain 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); - } - /*! A function object that determines whether a curve end is closed. */ class Is_closed_2 { protected: @@ -1698,20 +1050,17 @@ public: //! Allow its functor obtaining function calling the private constructor. friend class Arr_traits_basic_adaptor_2; - - inline - bool _is_closed(Arr_oblivious_side_tag) const + + bool _is_closed(Arr_boundary_side_tag) const { return true; } - inline bool _is_closed(Arr_open_side_tag) const { return false; } - inline bool _is_closed(const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { Arr_parameter_space ps = @@ -1723,16 +1072,16 @@ public: switch (ps) { case ARR_LEFT_BOUNDARY: - return _is_closed(Left_side_category()); + return _is_closed(Arr_left_side_category()); case ARR_BOTTOM_BOUNDARY: - return _is_closed(Bottom_side_category()); + return _is_closed(Arr_bottom_side_category()); case ARR_TOP_BOUNDARY: - return _is_closed(Top_side_category()); + return _is_closed(Arr_top_side_category()); case ARR_RIGHT_BOUNDARY: - return _is_closed(Right_side_category()); + return _is_closed(Arr_right_side_category()); case ARR_INTERIOR: // fall-through @@ -1777,8 +1126,8 @@ public: Parameter_space_in_x_2 ps_x = m_self->parameter_space_in_x_2_object(); Parameter_space_in_y_2 ps_y = m_self->parameter_space_in_y_2_object(); Compare_x_2 compare_x = m_self->compare_x_2_object(); - Compare_x_point_curve_end_2 - compare_x_point_curve_end = m_self->compare_x_point_curve_end_2_object(); + Compare_x_near_boundary_2 + compare_x_near_bnd = m_self->compare_x_near_boundary_2_object(); // Compare p to the position of the left end of the curve. // Note that if the left end of xcv lies at x boundary, p is obviously to @@ -1795,7 +1144,7 @@ public: // The left endpoint of xcv is a normal point. compare_x (p, m_self->construct_min_vertex_2_object() (xcv)) : // The left end of xcv lies at y boundary. - compare_x_point_curve_end (p, xcv, ARR_MIN_END); + compare_x_near_bnd (p, xcv, ARR_MIN_END); if (res == SMALLER) return (false); // p is to the left of the x-range. @@ -1816,7 +1165,7 @@ public: // The right endpoint of xcv is a normal point. compare_x (p, m_self->construct_max_vertex_2_object() (xcv)) : // The right end of xcv lies at y boundary: - compare_x_point_curve_end (p, xcv, ARR_MAX_END); + compare_x_near_bnd (p, xcv, ARR_MAX_END); return (res != LARGER); } @@ -1838,10 +1187,8 @@ public: m_self->construct_min_vertex_2_object(); Construct_max_vertex_2 max_vertex = m_self->construct_max_vertex_2_object(); - Compare_x_point_curve_end_2 compare_x_point_curve_end = - m_self->compare_x_point_curve_end_2_object(); - Compare_x_curve_ends_2 compare_x_curve_ends = - m_self->compare_x_curve_ends_2_object(); + Compare_x_near_boundary_2 compare_x_near_bnd = + m_self->compare_x_near_boundary_2_object(); // Locate the rightmost of the two left endpoints of the two curves. // Note that we guard for curve ends with special boundary. @@ -1880,12 +1227,12 @@ public: if (ps_y1 == ARR_INTERIOR) { res = (ps_y2 == ARR_INTERIOR) ? compare_x (min_vertex (xcv1), min_vertex (xcv2)) : - compare_x_point_curve_end (min_vertex (xcv1), xcv2, ARR_MIN_END); + compare_x_near_bnd (min_vertex (xcv1), xcv2, ARR_MIN_END); } else { res = (ps_y2 == ARR_INTERIOR) ? - opposite(compare_x_point_curve_end (min_vertex (xcv2), xcv1, ARR_MIN_END)): - compare_x_curve_ends (xcv1, ARR_MIN_END, xcv2, ARR_MIN_END); + opposite(compare_x_near_bnd (min_vertex (xcv2), xcv1, ARR_MIN_END)): + compare_x_near_bnd (xcv1, ARR_MIN_END, xcv2, ARR_MIN_END); } if (res == LARGER) { @@ -1932,12 +1279,12 @@ public: if (ps_y1 == ARR_INTERIOR) { res = (ps_y2 == ARR_INTERIOR) ? compare_x (max_vertex (xcv1), max_vertex (xcv2)) : - compare_x_point_curve_end (max_vertex (xcv1), xcv2, ARR_MAX_END); + compare_x_near_bnd (max_vertex (xcv1), xcv2, ARR_MAX_END); } else { res = (ps_y2 == ARR_INTERIOR) ? - opposite(compare_x_point_curve_end (max_vertex (xcv2), xcv1, ARR_MAX_END)): - compare_x_curve_ends (xcv1, ARR_MAX_END, xcv2, ARR_MAX_END); + opposite(compare_x_near_bnd (max_vertex (xcv2), xcv1, ARR_MAX_END)): + compare_x_near_bnd (xcv1, ARR_MAX_END, xcv2, ARR_MAX_END); } if (res == SMALLER) { @@ -1955,13 +1302,13 @@ public: if (by_left == ARR_INTERIOR) { res = (by_right == ARR_INTERIOR) ? compare_x (min_vertex (*xcv_left), max_vertex (*xcv_right)) : - compare_x_point_curve_end (min_vertex (*xcv_left), *xcv_right, ARR_MAX_END); + compare_x_near_bnd (min_vertex (*xcv_left), *xcv_right, ARR_MAX_END); } else { res = (by_right == ARR_INTERIOR) ? - opposite(compare_x_point_curve_end (max_vertex (*xcv_right), - *xcv_left, ARR_MIN_END)) : - compare_x_curve_ends (*xcv_left, ARR_MIN_END, *xcv_right, ARR_MAX_END); + opposite(compare_x_near_bnd (max_vertex (*xcv_right), + *xcv_left, ARR_MIN_END)) : + compare_x_near_bnd (*xcv_left, ARR_MIN_END, *xcv_right, ARR_MAX_END); } // The two curves overlap in their x-range if and only if the left end @@ -2028,10 +1375,8 @@ public: Compare_y_at_x_2 compare_y_at_x = m_self->compare_y_at_x_2_object(); Construct_min_vertex_2 min_vertex = m_self->construct_min_vertex_2_object(); - Compare_x_point_curve_end_2 - compare_x_point_curve_end = m_self->compare_x_point_curve_end_2_object(); - Compare_x_curve_ends_2 - compare_x_curve_ends = m_self->compare_x_curve_ends_2_object(); + Compare_x_near_boundary_2 + compare_x_near_bnd = m_self->compare_x_near_boundary_2_object(); Compare_y_near_boundary_2 compare_y_near_bnd = m_self->compare_y_near_boundary_2_object(); @@ -2103,7 +1448,7 @@ public: // Both curves have vertical asymptotes with the same sign in y. // Check which asymptote is the rightmost. Note that in this case // the vertical asymptotes cannot be equal. - l_res = compare_x_curve_ends(xcv1, ARR_MIN_END, xcv2, ARR_MIN_END); + l_res = compare_x_near_bnd(xcv1, ARR_MIN_END, xcv2, ARR_MIN_END); CGAL_assertion (l_res != EQUAL); if (ps_y1 == ARR_TOP_BOUNDARY) @@ -2116,7 +1461,7 @@ public: // Compare the x-positions of this endpoint and the asymptote. const Point_2& left2 = min_vertex(xcv2); - l_res = compare_x_point_curve_end(left2, xcv1, ARR_MIN_END); + l_res = compare_x_near_bnd(left2, xcv1, ARR_MIN_END); if (l_res == LARGER) { // left2 lies in the x-range of xcv1, so it is safe to compare: @@ -2140,7 +1485,7 @@ public: // Compare the x-positions of this endpoint and the asymptote. const Point_2& left1 = min_vertex(xcv1); - l_res = compare_x_point_curve_end(left1, xcv2, ARR_MIN_END); + l_res = compare_x_near_bnd(left1, xcv2, ARR_MIN_END); if (l_res == LARGER) // left1 lies in the x-range of xcv2, so it is safe to compare: @@ -2509,15 +1854,19 @@ public: typedef typename Base::X_monotone_curve_2 X_monotone_curve_2; typedef typename Base::Point_2 Point_2; - // Categories. + // Tags. 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; - typedef typename Base::Left_side_category Left_side_category; - typedef typename Base::Bottom_side_category Bottom_side_category; - typedef typename Base::Top_side_category Top_side_category; - typedef typename Base::Right_side_category Right_side_category; + typedef typename internal::Arr_complete_left_side_tag< Base >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Base >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Base >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Base >::Tag + Arr_right_side_category; /// \name Construction. //@{ diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h index 384c66e0a38..47b4755fbfc 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2007, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -15,7 +15,7 @@ // $Id$ // // -// Author(s): Eric Berberich +// Author(s): Eric Berberich #ifndef CGAL_ARR_TRAITS_ADAPTOR_2_DISPATCHING_H #define CGAL_ARR_TRAITS_ADAPTOR_2_DISPATCHING_H @@ -44,9 +44,527 @@ struct Arr_use_traits_tag {}; namespace internal { -/////////////// -// combining // -/////////////// +//////////////// +// left-right // +//////////////// + +namespace Parameter_space_in_x_2 { + + // Curve-end + + template < class ArrSideTag > + struct Curve_end { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_end< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_end< Arr_open_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_end< Arr_contracted_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_end< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_end< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + + // Curve + + template < class ArrSideTag > + struct Curve { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve< Arr_identified_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + // Point + + template < class ArrSideTag > + struct Point { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_contracted_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Point< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Point< Arr_identified_side_tag > { + typedef Arr_use_dummy_tag type; + }; + +} // namespace Parameter_space_in_x_2 + + +namespace Compare_y_near_boundary_2 { + +// Curve-ends + + template < class ArrSideTag > + struct Curve_ends { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_ends< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_ends< Arr_open_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_ends< Arr_contracted_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_ends< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_ends< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + +} // Compare_y_near_boundary_2 + +namespace Compare_y_on_boundary_2 { + + // Poitns + template < class ArrSideTag > + struct Points { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Points< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + +} // namespace Compare_y_on_boundary_2 + +namespace Is_on_y_identification_2 { + + // Curve + + template < class ArrSideTag > + struct Curve { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_closed_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + + // Point + + template < class ArrSideTag > + struct Point { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_closed_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + +} // namespace Is_on_y_identification_2 + + + +//////////////// +// bottom-top // +//////////////// + +namespace Parameter_space_in_y_2 { + + // Curve-end + + template < class ArrSideTag > + struct Curve_end { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_end< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_end< Arr_open_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_end< Arr_contracted_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_end< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_end< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + + // Curve + + template < class ArrSideTag > + struct Curve { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve< Arr_identified_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + // Point + + template < class ArrSideTag > + struct Point { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_contracted_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Point< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Point< Arr_identified_side_tag > { + typedef Arr_use_dummy_tag type; + }; + +} // namespace Parameter_space_in_y_2 + +namespace Compare_x_near_boundary_2 { + + // Point_curve-end + + template < class ArrSideTag > + struct Point_curve_end { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point_curve_end< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point_curve_end< Arr_open_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Point_curve_end< Arr_contracted_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Point_curve_end< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Point_curve_end< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + + // Curve-ends + + template < class ArrSideTag > + struct Curve_ends { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_ends< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve_ends< Arr_open_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_ends< Arr_contracted_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_ends< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Curve_ends< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + +} // Compare_y_near_boundary_2 + +namespace Compare_x_on_boundary_2 { + + // Poitns + template < class ArrSideTag > + struct Points { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Points< Arr_closed_side_tag > { + typedef Arr_use_traits_tag type; + }; + + template <> + struct Points< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + +} // namespace Compare_x_on_boundary_2 + +namespace Is_on_x_identification_2 { + + // Curve + + template < class ArrSideTag > + struct Curve { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_closed_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Curve< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + + // Point + + template < class ArrSideTag > + struct Point { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_oblivious_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_open_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_contracted_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_closed_side_tag > { + typedef Arr_use_dummy_tag type; + }; + + template <> + struct Point< Arr_identified_side_tag > { + typedef Arr_use_traits_tag type; + }; + +} // namespace Is_on_x_identification_2 + //! struct to combine results in "or"-fashion template < class ArrSmallerImplementationTag, class ArrLargerImplementationTag > @@ -85,873 +603,173 @@ public: }; - -//////////////// -// left-right // -//////////////// - -namespace Parameter_space_in_x_2 { - - // Curve-end - - template < class ArrSideTag > - struct Curve_end { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_end< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_end< Arr_open_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_end< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_end< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_end< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - - // Curve - - template < class ArrSideTag > - struct Curve { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - // Point - - template < class ArrSideTag > - struct Point { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Point< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Point< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - -} // namespace Parameter_space_in_x_2 - - -namespace Is_on_y_identification_2 { - - // Curve - - template < class ArrSideTag > - struct Curve { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - - // Point - - template < class ArrSideTag > - struct Point { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - -} // namespace Is_on_y_identification_2 - - -namespace Compare_y_on_boundary_2 { - - // Poitns - template < class ArrSideTag > - struct Points { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Points< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - -} // namespace Compare_y_on_boundary_2 - - -namespace Compare_y_near_boundary_2 { - -// Curve-ends - - template < class ArrSideTag > - struct Curve_ends { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_open_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - -} // Compare_y_near_boundary_2 - - - template < class ArrLeftSideTag, class ArrRightSideTag > struct Arr_left_right_implementation_dispatch { public: //! This instance's first template parameter - typedef ArrLeftSideTag Left_side_category; + typedef ArrLeftSideTag Arr_left_side_category; //! This instance's second template parameter - typedef ArrRightSideTag Right_side_category; + typedef ArrRightSideTag Arr_right_side_category; public: //! tag type for Parameter_space_in_x_2 (curve-end signature) typedef typename internal::Or_traits< typename - internal::Parameter_space_in_x_2::Curve_end< Left_side_category >::type, + internal::Parameter_space_in_x_2::Curve_end< Arr_left_side_category >::type, typename - internal::Parameter_space_in_x_2::Curve_end< Right_side_category >::type + internal::Parameter_space_in_x_2::Curve_end< Arr_right_side_category >::type >::type Parameter_space_in_x_2_curve_end_tag; //! tag type for Parameter_space_in_x_2 (curve signature) typedef typename internal::Or_traits< typename - internal::Parameter_space_in_x_2::Curve< Left_side_category >::type, + internal::Parameter_space_in_x_2::Curve< Arr_left_side_category >::type, typename - internal::Parameter_space_in_x_2::Curve< Right_side_category >::type + internal::Parameter_space_in_x_2::Curve< Arr_right_side_category >::type >::type Parameter_space_in_x_2_curve_tag; //! tag type for Parameter_space_in_x_2 (point signature) typedef typename internal::Or_traits< typename - internal::Parameter_space_in_x_2::Point< Left_side_category >::type, + internal::Parameter_space_in_x_2::Point< Arr_left_side_category >::type, typename - internal::Parameter_space_in_x_2::Point< Right_side_category >::type >::type + internal::Parameter_space_in_x_2::Point< Arr_right_side_category >::type >::type Parameter_space_in_x_2_point_tag; - //! tag type for Is_on_y_identification_2 (curve signature) + + //! tag type for Compare_y_near_boundary_2 (curve-ends signature) typedef typename internal::Or_traits< typename - internal::Is_on_y_identification_2::Curve< Left_side_category >::type, + internal::Compare_y_near_boundary_2::Curve_ends< Arr_left_side_category >::type, typename - internal::Is_on_y_identification_2::Curve< Right_side_category >::type + internal::Compare_y_near_boundary_2::Curve_ends< Arr_right_side_category >::type >::type - Is_on_y_identification_2_curve_tag; + Compare_y_near_boundary_2_curve_ends_tag; - //! tag type for Is_on_y_identification_2 (point signature) - typedef typename internal::Or_traits< - typename - internal::Is_on_y_identification_2::Point< Left_side_category >::type, - typename - internal::Is_on_y_identification_2::Point< Right_side_category >::type - >::type - Is_on_y_identification_2_point_tag; + // TODO Compare_y_right_of_2 ??? //! tag type for Compare_y_on_boundary_2 (points signature) typedef typename internal::Or_traits< typename - internal::Compare_y_on_boundary_2::Points< Left_side_category >::type, + internal::Compare_y_on_boundary_2::Points< Arr_left_side_category >::type, typename - internal::Compare_y_on_boundary_2::Points< Right_side_category >::type + internal::Compare_y_on_boundary_2::Points< Arr_right_side_category >::type >::type Compare_y_on_boundary_2_points_tag; - //! tag type for Compare_y_near_boundary_2 (curve-ends signature) + //! tag type for Is_on_y_identification_2 (point signature) typedef typename internal::Or_traits< typename - internal::Compare_y_near_boundary_2::Curve_ends< Left_side_category >::type, + internal::Is_on_y_identification_2::Point< Arr_left_side_category >::type, typename - internal::Compare_y_near_boundary_2::Curve_ends< Right_side_category >::type + internal::Is_on_y_identification_2::Point< Arr_right_side_category >::type >::type - Compare_y_near_boundary_2_curve_ends_tag; + Is_on_y_identification_2_point_tag; + + //! tag type for Is_on_y_identification_2 (curve signature) + typedef typename internal::Or_traits< + typename + internal::Is_on_y_identification_2::Curve< Arr_left_side_category >::type, + typename + internal::Is_on_y_identification_2::Curve< Arr_right_side_category >::type + >::type + Is_on_y_identification_2_curve_tag; }; // left-right-dispatch -//////////////// -// bottom-top // -//////////////// - -namespace Parameter_space_in_y_2 { - - // Curve-end - - template < class ArrSideTag > - struct Curve_end { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_end< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_end< Arr_open_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_end< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_end< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_end< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - - // Curve - - template < class ArrSideTag > - struct Curve { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - // Point - - template < class ArrSideTag > - struct Point { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Point< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Point< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - -} // namespace Parameter_space_in_y_2 - - -namespace Is_on_x_identification_2 { - - // Curve - - template < class ArrSideTag > - struct Curve { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - - // Point - - template < class ArrSideTag > - struct Point { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - -} // namespace Is_on_x_identification_2 - - -namespace Compare_x_at_limit_2 { - - // Point_curve-end - - template < class ArrSideTag > - struct Point_curve_end { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_open_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Point_curve_end< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - // Curve-ends - - template < class ArrSideTag > - struct Curve_ends { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_open_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - -} // Compare_x_at_limit_2 - -namespace Compare_x_near_limit_2 { - - // Curve-ends - - template < class ArrSideTag > - struct Curve_ends { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_open_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - -} // Compare_x_near_limit_2 - - -namespace Compare_x_on_boundary_2 { - - // Points - template < class ArrSideTag > - struct Points { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Points< Arr_contracted_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Points< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - - // Point_curve-end - - template < class ArrSideTag > - struct Point_curve_end { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Point_curve_end< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Point_curve_end< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - // Curve-ends - - template < class ArrSideTag > - struct Curve_ends { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_closed_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_identified_side_tag > { - typedef Arr_use_dummy_tag type; - }; - -} // namespace Compare_x_on_boundary_2 - - -namespace Compare_x_near_boundary_2 { - - // Curve-ends - - template < class ArrSideTag > - struct Curve_ends { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_oblivious_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_open_side_tag > { - typedef Arr_use_dummy_tag type; - }; - - template <> - struct Curve_ends< Arr_closed_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_contracted_side_tag > { - typedef Arr_use_traits_tag type; - }; - - template <> - struct Curve_ends< Arr_identified_side_tag > { - typedef Arr_use_traits_tag type; - }; - -} // Compare_y_near_boundary_2 - - - template < class ArrBottomSideTag, class ArrTopSideTag > struct Arr_bottom_top_implementation_dispatch { public: //! This instance's first template parameter - typedef ArrBottomSideTag Bottom_side_category; + typedef ArrBottomSideTag Arr_bottom_side_category; //! This instance's second template parameter - typedef ArrTopSideTag Top_side_category; + typedef ArrTopSideTag Arr_top_side_category; public: //! tag type for Parameter_space_in_y_2 (curve-end signature) typedef typename internal::Or_traits< typename - internal::Parameter_space_in_y_2::Curve_end< Bottom_side_category >::type, + internal::Parameter_space_in_y_2::Curve_end< Arr_bottom_side_category >::type, typename - internal::Parameter_space_in_y_2::Curve_end< Top_side_category >::type + internal::Parameter_space_in_y_2::Curve_end< Arr_top_side_category >::type >::type Parameter_space_in_y_2_curve_end_tag; //! tag type for Parameter_space_in_y_2 (curve signature) typedef typename internal::Or_traits< typename - internal::Parameter_space_in_y_2::Curve< Bottom_side_category >::type, + internal::Parameter_space_in_y_2::Curve< Arr_bottom_side_category >::type, typename - internal::Parameter_space_in_y_2::Curve< Top_side_category >::type + internal::Parameter_space_in_y_2::Curve< Arr_top_side_category >::type >::type Parameter_space_in_y_2_curve_tag; //! tag type for Parameter_space_in_y_2 (point signature) typedef typename internal::Or_traits< typename - internal::Parameter_space_in_y_2::Point< Bottom_side_category >::type, + internal::Parameter_space_in_y_2::Point< Arr_bottom_side_category >::type, typename - internal::Parameter_space_in_y_2::Point< Top_side_category >::type >::type + internal::Parameter_space_in_y_2::Point< Arr_top_side_category >::type >::type Parameter_space_in_y_2_point_tag; - //! tag type for Is_on_x_identification_2 (curve signature) + //! tag type for Compare_x_near_boundary_2 (point-curve-end signature) typedef typename internal::Or_traits< typename - internal::Is_on_x_identification_2::Curve< Bottom_side_category >::type, + internal::Compare_x_near_boundary_2::Point_curve_end< Arr_bottom_side_category > + ::type, typename - internal::Is_on_x_identification_2::Curve< Top_side_category >::type + internal::Compare_x_near_boundary_2::Point_curve_end< Arr_top_side_category >::type >::type - Is_on_x_identification_2_curve_tag; + Compare_x_near_boundary_2_point_curve_end_tag; + + //! tag type for Compare_x_near_boundary_2 (curve-ends signature) + typedef typename internal::Or_traits< + typename + internal::Compare_x_near_boundary_2::Curve_ends< Arr_bottom_side_category >::type, + typename + internal::Compare_x_near_boundary_2::Curve_ends< Arr_top_side_category >::type + >::type + Compare_x_near_boundary_2_curve_ends_tag; + + //! tag type for Compare_y_on_boundary_2 (points signature) + typedef typename internal::Or_traits< + typename + internal::Compare_x_on_boundary_2::Points< Arr_bottom_side_category >::type, + typename + internal::Compare_x_on_boundary_2::Points< Arr_top_side_category >::type + >::type + Compare_x_on_boundary_2_points_tag; //! tag type for Is_on_x_identification_2 (point signature) typedef typename internal::Or_traits< typename - internal::Is_on_x_identification_2::Point< Bottom_side_category >::type, + internal::Is_on_x_identification_2::Point< Arr_bottom_side_category >::type, typename - internal::Is_on_x_identification_2::Point< Top_side_category >::type + internal::Is_on_x_identification_2::Point< Arr_top_side_category >::type >::type Is_on_x_identification_2_point_tag; - //! tag type for Compare_x_at_limit_2 (point-curve-end signature) + //! tag type for Is_on_x_identification_2 (curve signature) typedef typename internal::Or_traits< typename - internal::Compare_x_at_limit_2::Point_curve_end< Bottom_side_category > - ::type, + internal::Is_on_x_identification_2::Curve< Arr_bottom_side_category >::type, typename - internal::Compare_x_at_limit_2::Point_curve_end< Top_side_category >::type + internal::Is_on_x_identification_2::Curve< Arr_top_side_category >::type >::type - Compare_x_at_limit_2_point_curve_end_tag; - - //! tag type for Compare_x_at_limit_2 (curve-ends signature) - typedef typename internal::Or_traits< - typename - internal::Compare_x_at_limit_2::Curve_ends< Bottom_side_category >::type, - typename - internal::Compare_x_at_limit_2::Curve_ends< Top_side_category >::type - >::type - Compare_x_at_limit_2_curve_ends_tag; - - //! tag type for Compare_x_near_limit_boundary_2 (curve-ends signature) - typedef typename internal::Or_traits< - typename - internal::Compare_x_near_limit_2::Curve_ends< Bottom_side_category > - ::type, - typename - internal::Compare_x_near_limit_2::Curve_ends< Top_side_category >::type - >::type - Compare_x_near_limit_2_curve_ends_tag; - - //! tag type for Compare_x_on_boundary_2 (points signature) - typedef typename internal::Or_traits< - typename - internal::Compare_x_on_boundary_2::Points< Bottom_side_category >::type, - typename - internal::Compare_x_on_boundary_2::Points< Top_side_category >::type - >::type - Compare_x_on_boundary_2_points_tag; - - //! tag type for Compare_x_on_boundary_2 (point_curve-end signature) - typedef typename internal::Or_traits< - typename - internal::Compare_x_on_boundary_2::Point_curve_end< Bottom_side_category >::type, - typename - internal::Compare_x_on_boundary_2::Point_curve_end< Top_side_category >::type - >::type - Compare_x_on_boundary_2_point_curve_end_tag; - - //! tag type for Compare_x_on_boundary_2 (curve-ends signature) - typedef typename internal::Or_traits< - typename - internal::Compare_x_on_boundary_2::Curve_ends< Bottom_side_category >::type, - typename - internal::Compare_x_on_boundary_2::Curve_ends< Top_side_category >::type - >::type - Compare_x_on_boundary_2_curve_ends_tag; + Is_on_x_identification_2_curve_tag; - //! tag type for Compare_x_near_boundary_2 (curve-ends signature) - typedef typename internal::Or_traits< - typename - internal::Compare_x_near_boundary_2::Curve_ends< Bottom_side_category >::type, - typename - internal::Compare_x_near_boundary_2::Curve_ends< Top_side_category >::type - >::type - Compare_x_near_boundary_2_curve_ends_tag; - - }; // bottom-top-dispatch +}; // bottom-top-dispatch } // namespace internal diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h index 2e8ec0c343b..5a3f19a3c30 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_2_iterators.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_2_iterators.h index 581d5241d47..0c4df3b7831 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_2_iterators.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_2_iterators.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index 94c3aa86b29..e6c9cdb5a1c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h index 21af74a3dbe..d75ae0a90e3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -53,32 +53,32 @@ Arrangement_on_surface_2::Arrangement_on_surface_2 () : m_topol_traits() { - typedef has_Left_side_category Cond_left; - typedef internal::Validate_left_side_category< GeomTraits, Cond_left::value > - Validate_left_side_category; - void (Validate_left_side_category::*pleft)(void) = - &Validate_left_side_category::missing__Left_side_category; + typedef has_Arr_left_side_category Cond_left; + typedef internal::Validate_left_side_tag< GeomTraits, Cond_left::value > + Validate_left_side_tag; + void (Validate_left_side_tag::*pleft)(void) = + &Validate_left_side_tag::missing__Arr_left_side_category; (void)pleft; - typedef has_Bottom_side_category Cond_bottom; - typedef internal::Validate_bottom_side_category< GeomTraits, Cond_bottom::value > - Validate_bottom_side_category; - void (Validate_bottom_side_category::*pbottom)(void) = - &Validate_bottom_side_category::missing__Bottom_side_category; + typedef has_Arr_bottom_side_category Cond_bottom; + typedef internal::Validate_bottom_side_tag< GeomTraits, Cond_bottom::value > + Validate_bottom_side_tag; + void (Validate_bottom_side_tag::*pbottom)(void) = + &Validate_bottom_side_tag::missing__Arr_bottom_side_category; (void)pbottom; - typedef has_Top_side_category Cond_top; - typedef internal::Validate_top_side_category< GeomTraits, Cond_top::value > - Validate_top_side_category; - void (Validate_top_side_category::*ptop)(void) = - &Validate_top_side_category::missing__Top_side_category; + typedef has_Arr_top_side_category Cond_top; + typedef internal::Validate_top_side_tag< GeomTraits, Cond_top::value > + Validate_top_side_tag; + void (Validate_top_side_tag::*ptop)(void) = + &Validate_top_side_tag::missing__Arr_top_side_category; (void)ptop; - typedef has_Right_side_category Cond_right; - typedef internal::Validate_right_side_category< GeomTraits, Cond_right::value > - Validate_right_side_category; - void (Validate_right_side_category::*pright)(void) = - &Validate_right_side_category::missing__Right_side_category; + typedef has_Arr_right_side_category Cond_right; + typedef internal::Validate_right_side_tag< GeomTraits, Cond_right::value > + Validate_right_side_tag; + void (Validate_right_side_tag::*pright)(void) = + &Validate_right_side_tag::missing__Arr_right_side_category; (void)pright; // Initialize the DCEL structure to represent an empty arrangement. @@ -87,6 +87,8 @@ Arrangement_on_surface_2::Arrangement_on_surface_2 () : // Allocate the traits. m_geom_traits = new Traits_adaptor_2; m_own_traits = true; + + init_boundary_types(); } //----------------------------------------------------------------------------- @@ -110,32 +112,32 @@ Arrangement_on_surface_2(const Geometry_traits_2 * geom_traits) : m_topol_traits (geom_traits) { - typedef has_Left_side_category Cond_left; - typedef internal::Validate_left_side_category< GeomTraits, Cond_left::value > - Validate_left_side_category; - void (Validate_left_side_category::*pleft)(void) = - &Validate_left_side_category::missing__Left_side_category; + typedef has_Arr_left_side_category Cond_left; + typedef internal::Validate_left_side_tag< GeomTraits, Cond_left::value > + Validate_left_side_tag; + void (Validate_left_side_tag::*pleft)(void) = + &Validate_left_side_tag::missing__Arr_left_side_category; (void)pleft; - typedef has_Bottom_side_category Cond_bottom; - typedef internal::Validate_bottom_side_category< GeomTraits, Cond_bottom::value > - Validate_bottom_side_category; - void (Validate_bottom_side_category::*pbottom)(void) = - &Validate_bottom_side_category::missing__Bottom_side_category; + typedef has_Arr_bottom_side_category Cond_bottom; + typedef internal::Validate_bottom_side_tag< GeomTraits, Cond_bottom::value > + Validate_bottom_side_tag; + void (Validate_bottom_side_tag::*pbottom)(void) = + &Validate_bottom_side_tag::missing__Arr_bottom_side_category; (void)pbottom; - typedef has_Top_side_category Cond_top; - typedef internal::Validate_top_side_category< GeomTraits, Cond_top::value > - Validate_top_side_category; - void (Validate_top_side_category::*ptop)(void) = - &Validate_top_side_category::missing__Top_side_category; + typedef has_Arr_top_side_category Cond_top; + typedef internal::Validate_top_side_tag< GeomTraits, Cond_top::value > + Validate_top_side_tag; + void (Validate_top_side_tag::*ptop)(void) = + &Validate_top_side_tag::missing__Arr_top_side_category; (void)ptop; - typedef has_Right_side_category Cond_right; - typedef internal::Validate_right_side_category< GeomTraits, Cond_right::value > - Validate_right_side_category; - void (Validate_right_side_category::*pright)(void) = - &Validate_right_side_category::missing__Right_side_category; + typedef has_Arr_right_side_category Cond_right; + typedef internal::Validate_right_side_tag< GeomTraits, Cond_right::value > + Validate_right_side_tag; + void (Validate_right_side_tag::*pright)(void) = + &Validate_right_side_tag::missing__Arr_right_side_category; (void)pright; // Initialize the DCEL structure to represent an empty arrangement. @@ -144,6 +146,8 @@ Arrangement_on_surface_2(const Geometry_traits_2 * geom_traits) : // Set the traits. m_geom_traits = static_cast (geom_traits); m_own_traits = false; + + init_boundary_types(); } //----------------------------------------------------------------------------- @@ -226,6 +230,10 @@ void Arrangement_on_surface_2::assign (const Self& arr) // Notify the observers that the assignment has been performed. _notify_after_assign (); + + init_boundary_types(); + + return; } //----------------------------------------------------------------------------- @@ -388,7 +396,6 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f) // right end. _place_and_set_curve_end (p_f, cv, ARR_MAX_END, ps_x2, ps_y2, &fict_prev2); - // Create the edge connecting the two vertices (note we know v1 is // lexicographically smaller than v2). DHalfedge *new_he; @@ -411,23 +418,9 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f) } else { - // Both vertices are inserted using their predecessor halfedges. // Note that in this case we may create a new face. - bool new_face_created = false; - - // This is a bug fix and we could not think of a better one. - // In case the inserted curve has two vertical asymptotes at the top - // it happens that fict_prev1 is split by the max end and becomes the - // prev edge, which is fict_prev2. Since both pointers are equal they - // both point to the max end. Thus, we advance fict_prev1 by one - // such that it points to the min end again. - // Note that this only happens at the top. At the bottom everything - // goes fine since the insertion order is reverted with respect to the - // orientation of the edges. - if (fict_prev1 == fict_prev2) - fict_prev1 = fict_prev1->next(); new_he = _insert_at_vertices (cv, fict_prev1, @@ -2547,7 +2540,6 @@ _insert_at_vertices(const X_monotone_curve_2& cv, { CGAL_precondition(prev1 != NULL); CGAL_precondition(prev2 != NULL); - CGAL_precondition(prev1 != prev2); // Get the vertices that match cv's endpoints. DVertex *v1 = prev1->vertex(); @@ -2610,7 +2602,7 @@ _insert_at_vertices(const X_monotone_curve_2& cv, std::cout << "curr: fictitious" << std::endl; } std::cout << "dir: " - << (curr->direction() == CGAL::ARR_LEFT_TO_RIGHT ? "L2R" : "R2L") + << (curr->direction() == CGAL::LEFT_TO_RIGHT ? "L2R" : "R2L") << std::endl; curr = curr->next(); } @@ -2632,7 +2624,7 @@ _insert_at_vertices(const X_monotone_curve_2& cv, std::cout << "curr: fictitious" << std::endl; } std::cout << "dir: " - << (curr->direction() == CGAL::ARR_LEFT_TO_RIGHT ? "L2R" : "R2L") + << (curr->direction() == CGAL::LEFT_TO_RIGHT ? "L2R" : "R2L") << std::endl; curr = curr->next(); } @@ -3397,33 +3389,25 @@ _compare_vertices_xy_impl (const DVertex * v1, const DVertex * v2, { if (v1 == v2) return (EQUAL); - + // Check the boundary conditions in y: const Arr_parameter_space ps_y1 = v1->parameter_space_in_y(); const Arr_parameter_space ps_y2 = v2->parameter_space_in_y(); - // In case one of the vertices is a contraction point in y, then the - // "negative" contraction is the smallest vertex, and the "positive" - // contraction is considered to be the largest vertex. - if (((ps_y1 == ARR_BOTTOM_BOUNDARY) && - is_contracted(Bottom_side_category())) || - ((ps_y2 == ARR_TOP_BOUNDARY) && - is_contracted(Top_side_category()))) - return SMALLER; - - if (((ps_y2 == ARR_BOTTOM_BOUNDARY) && - is_contracted(Bottom_side_category())) || - ((ps_y1 == ARR_TOP_BOUNDARY) && - is_contracted(Top_side_category()))) - return LARGER; - + // In case one of the vertices is a singularity point in y, then the + // "negative" singularity is the smallest vertex, and the "positive" + // singularity is considered to be the largest vertex. + if ((m_boundary_types[ps_y1] == ARR_CONTRACTION) && + (m_boundary_types[ps_y2] == ARR_CONTRACTION)) { + if ((ps_y1 == ARR_BOTTOM_BOUNDARY) || (ps_y2 == ARR_TOP_BOUNDARY)) + return SMALLER; + if ((ps_y2 == ARR_BOTTOM_BOUNDARY) || (ps_y1 == ARR_TOP_BOUNDARY)) + return LARGER; + } + // Check the boundary conditions in x: const Arr_parameter_space ps_x1 = v1->parameter_space_in_x(); const Arr_parameter_space ps_x2 = v2->parameter_space_in_x(); - - // A more elegant code: - // if (ps_x1 == ps_x2) || (ps_y1 == ps_y1) compare ... - // if (ps_x1 == ARR_LEFT_BOUNDARY) { return (ps_x1 == ps_x2) ? @@ -3449,8 +3433,10 @@ _compare_vertices_xy_impl (const DVertex * v1, const DVertex * v2, m_geom_traits->compare_xy_2_object() (v1->point(), v2->point()) : LARGER; } - if (ps_y2 == ARR_BOTTOM_BOUNDARY) return (LARGER); - else if (ps_y2 == ARR_TOP_BOUNDARY) return (SMALLER); + if (ps_y2 == ARR_BOTTOM_BOUNDARY) + return (LARGER); + else if (ps_y2 == ARR_TOP_BOUNDARY) + return (SMALLER); // If we reached here, both vertices do not have boundary conditions, and // we can just compare their associated points lexicographically. @@ -3484,7 +3470,7 @@ _find_leftmost_vertex_on_open_loop (const DHalfedge *he_before, // We go over the sequence of vertices, starting from he_before's target // vertex, until reaching he_after's source vertex, and find the leftmost // one. Note that we do this carefully, keeping track of the number of - // times we crossed the identification curve in x or in y (if they exist). + // times we crossed the line of discontinuity in x or in y (if they exist). // Note that the path must not be incident to any vertex on open boundary. typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x = m_geom_traits->parameter_space_in_x_2_object(); @@ -3582,7 +3568,7 @@ _find_leftmost_vertex_on_open_loop (const DHalfedge *he_before, } } - // If we cross the identification curve in x, then we must update the + // If we cross the line of discontinuity in x, then we must update the // index. Note that a crossing takes place in the following cases: // . . // . . @@ -3595,25 +3581,25 @@ _find_leftmost_vertex_on_open_loop (const DHalfedge *he_before, // if ((ps_x == ARR_LEFT_BOUNDARY) && (ps_x_next == ARR_RIGHT_BOUNDARY)) { - CGAL_assertion(is_identified(Left_side_category()) && - is_identified(Right_side_category())); + CGAL_assertion((m_boundary_types[ps_x] == ARR_IDENTIFICATION) && + (m_boundary_types[ps_x_next] == ARR_IDENTIFICATION)); x_cross_count++; index--; } else if ((ps_x == ARR_RIGHT_BOUNDARY) && (ps_x_next == ARR_LEFT_BOUNDARY)) { - CGAL_assertion(is_identified(Left_side_category()) && - is_identified(Right_side_category())); + CGAL_assertion((m_boundary_types[ps_x] == ARR_IDENTIFICATION) && + (m_boundary_types[ps_x_next] == ARR_IDENTIFICATION)); x_cross_count++; index++; } - // Check if we cross the identification curve in y. + // Check if we cross the line of discontinuity in y. if (((ps_y == ARR_BOTTOM_BOUNDARY) && (ps_y_next == ARR_TOP_BOUNDARY)) || ((ps_y == ARR_TOP_BOUNDARY) && (ps_y_next == ARR_BOTTOM_BOUNDARY))) { - CGAL_assertion(is_identified(Bottom_side_category()) && - is_identified(Top_side_category())); + CGAL_assertion((m_boundary_types[ps_y] == ARR_IDENTIFICATION) && + (m_boundary_types[ps_y_next] == ARR_IDENTIFICATION)); y_cross_count++; } } @@ -3653,8 +3639,8 @@ _find_leftmost_vertex_on_open_loop (const DHalfedge *he_before, } while (he != he_after); - // Determine if the path is perimetric, namely if there exists an identification - // curve in x (or in y), and we have crossed it an odd number of + // Determine if the path is perimetric, namely if there exists a line of + // discontinuity in x (or in y), and we have crossed it an odd number of // times. is_perimetric = (x_cross_count % 2 == 1) || (y_cross_count % 2 == 1); @@ -3680,10 +3666,10 @@ _find_leftmost_vertex_on_closed_loop (const DHalfedge *he_anchor, // vertex and stopping at the source vertex of its twin. As this path is a // closed loop, he_anchor's twin is reachable from he_anchor. // Note that we do this carefully, keeping track of the number of times we - // crossed the identification curve in x or in y (if they exist). We return + // crossed the line of discontinuity in x or in y (if they exist). We return // the leftmost vertex we find, along with its index with respect of the - // he_anchor halfedge; this index is decremented each time we cross the - // identification curve from right to left, and + // he_anchor halfedge; this index is decremented each time we cross the line + // of discontinuity from right to left, and // incremented each time we cross it from left to right. typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x = m_geom_traits->parameter_space_in_x_2_object(); @@ -3750,7 +3736,7 @@ _find_leftmost_vertex_on_closed_loop (const DHalfedge *he_anchor, ps_y_next = parameter_space_in_y (he->next()->curve(), ARR_MAX_END); } - // If we cross the identification curve in x, then we must update the + // If we cross the line of discontinuity in x, then we must update the // index. Note that a crossing takes place in the following cases: // . . // . . @@ -3763,25 +3749,25 @@ _find_leftmost_vertex_on_closed_loop (const DHalfedge *he_anchor, // if ((ps_x == ARR_LEFT_BOUNDARY) && (ps_x_next == ARR_RIGHT_BOUNDARY)) { - CGAL_assertion(is_identified(Left_side_category()) && - is_identified(Right_side_category())); + CGAL_assertion((m_boundary_types[ps_x] == ARR_IDENTIFICATION) && + (m_boundary_types[ps_x_next] == ARR_IDENTIFICATION)); x_cross_count++; index--; } else if ((ps_x == ARR_RIGHT_BOUNDARY) && (ps_x_next == ARR_LEFT_BOUNDARY)) { - CGAL_assertion(is_identified(Left_side_category()) && - is_identified(Right_side_category())); + CGAL_assertion((m_boundary_types[ps_x] == ARR_IDENTIFICATION) && + (m_boundary_types[ps_x_next] == ARR_IDENTIFICATION)); x_cross_count++; index++; } - // Check if we cross the identification curve in y. + // Check if we cross the line of discontinuity in y. if (((ps_y == ARR_BOTTOM_BOUNDARY) && (ps_y_next == ARR_TOP_BOUNDARY)) || ((ps_y == ARR_TOP_BOUNDARY) && (ps_y_next == ARR_BOTTOM_BOUNDARY))) { - CGAL_assertion(is_identified(Bottom_side_category()) && - is_identified(Top_side_category())); + CGAL_assertion((m_boundary_types[ps_y] == ARR_IDENTIFICATION) && + (m_boundary_types[ps_y_next] == ARR_IDENTIFICATION)); y_cross_count++; } } @@ -3810,8 +3796,8 @@ _find_leftmost_vertex_on_closed_loop (const DHalfedge *he_anchor, } while (he->next() != he_anchor->opposite()); - // Determine if the path is perimetric, namely if there exists an identification - // curve in x (or in y), and we have crossed it an odd number of + // Determine if the path is perimetric, namely if there exists a line of + // discontinuity in x (or in y), and we have crossed it an odd number of // times. is_perimetric = (x_cross_count % 2 == 1) || (y_cross_count % 2 == 1); @@ -3881,37 +3867,35 @@ _is_inside_new_face (const DHalfedge *prev1, p_cv_next = &(prev2->next()->curve()); } - // Check if the vertex lies on the identification curve in y, in which case + // Check if the vertex lies on the line of discontinuity in y, in which case // special care must be taken. - if (((v_min->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) && - is_identified(Bottom_side_category())) || - ((v_min->parameter_space_in_y() == ARR_TOP_BOUNDARY) && - is_identified(Top_side_category()))) + if ((v_min->parameter_space_in_y() != ARR_INTERIOR) && + (m_boundary_types[v_min->parameter_space_in_y()] == ARR_IDENTIFICATION)) { - // Both current and next curves are incident to the identification curve. + // Both current and next curves are incident to the line of discontinuity. // As v_min is the leftmost vertex, we now that their left ends must have - // a boundary condition of type identification in y. + // a boundary condition of type discontinuity in y. Arr_parameter_space ps_y_curr = m_geom_traits->parameter_space_in_y_2_object()(*p_cv_curr, ARR_MIN_END); Arr_parameter_space ps_y_next = m_geom_traits->parameter_space_in_y_2_object()(*p_cv_next, ARR_MIN_END); - // Check if the curves lie on opposite sides of the identification curve. + // Check if the curves lie on opposite sides of the line of discontinuity. if ((ps_y_curr == ARR_BOTTOM_BOUNDARY) && (ps_y_next == ARR_TOP_BOUNDARY)) { // In this case the current curve is "above" the next one to the right - // of v_min, in a cyclic order around the identification curve. + // of v_min, in a cyclic order around the line of discontinuity. return (true); } else if ((ps_y_curr == ARR_TOP_BOUNDARY) && (ps_y_next == ARR_BOTTOM_BOUNDARY)) { // In this case the current curve is "below" the next one to the right - // of v_min, in a cyclic order around the identification curve. + // of v_min, in a cyclic order around the line of discontinuity. return (false); } - // If both curves are on the same side of the identification curve, we + // If both curves are on the same side of the line of discontinuity, we // continue to compare them to the right of v_min. CGAL_assertion (((ps_y_curr == ARR_BOTTOM_BOUNDARY) && (ps_y_next == ARR_BOTTOM_BOUNDARY)) || @@ -3919,28 +3903,26 @@ _is_inside_new_face (const DHalfedge *prev1, (ps_y_next == ARR_TOP_BOUNDARY))); } - // Check if the leftmost vertex is acontraction point in y, in which case + // Check if the leftmost vertex is asingularity point in y, in which case // special care must be taken. - if (((v_min->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) && - is_contracted(Bottom_side_category())) || - ((v_min->parameter_space_in_y() == ARR_TOP_BOUNDARY) && - is_contracted(Top_side_category()))) + if ((v_min->parameter_space_in_y() != ARR_INTERIOR) && + (m_boundary_types[v_min->parameter_space_in_y()] == ARR_CONTRACTION)) { // Get the curve-ends for cv_curr and cv_next that conincide with the - // contraction point. + // singularity point. Arr_curve_end ind_curr; Arr_curve_end ind_next; if (he_left_low != NULL) { - // The contraction point is he_left_low's target and cv_curr is its + // The singularity point is he_left_low's target and cv_curr is its // associated curve. ind_curr = (he_left_low->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MAX_END : ARR_MIN_END; if (he_left_low->next() != he_last) { - // The contraction point is he_left_low->next()'s source and cv_next + // The singularity point is he_left_low->next()'s source and cv_next // is its associated curve. ind_next = (he_left_low->next()->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END; @@ -3965,28 +3947,18 @@ _is_inside_new_face (const DHalfedge *prev1, m_geom_traits->parameter_space_in_y_2_object() (cv, ARR_MIN_END))) ? ARR_MIN_END : ARR_MAX_END; - // The contraction point is prev2->next()'s source and cv_next + // The singularity point is prev2->next()'s source and cv_next // is its associated curve. ind_next = (prev2->next()->direction() == ARR_LEFT_TO_RIGHT) ? ARR_MIN_END : ARR_MAX_END; } // Compare the horizontal position of the two curve-ends at the point - // of contraction. + // of singularity. + const Comparison_result x_res = + m_geom_traits->compare_x_near_boundary_2_object() (*p_cv_curr, ind_curr, + *p_cv_next, ind_next); - Comparison_result x_res = EQUAL; - - if (ind_curr != ind_next) { - x_res = (ind_curr == ARR_MAX_END ? SMALLER : LARGER); - } else { - - CGAL_assertion(ind_curr == ind_next); - - x_res = - m_geom_traits->compare_x_curve_ends_2_object() (*p_cv_curr, ind_curr, - *p_cv_next, ind_next); - - } CGAL_assertion (x_res != EQUAL); return (((v_min->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) && @@ -3995,8 +3967,6 @@ _is_inside_new_face (const DHalfedge *prev1, (x_res == LARGER))); } - // TODO EBEB minimal point can also be on left boundary where we have to call boundary-functors - return (m_geom_traits->compare_y_at_x_right_2_object() (*p_cv_curr, *p_cv_next, v_min->point()) == LARGER); } @@ -4365,6 +4335,8 @@ _remove_edge (DHalfedge *e, bool remove_source, bool remove_target) oc1->set_halfedge (prev1); // Notify the observers that a new outer CCB has been formed. + Ccb_halfedge_circulator hccb = (Halfedge_handle(he1->next()))->ccb(); + _notify_after_split_outer_ccb (Face_handle (f1), Halfedge_handle (he1->next())->ccb(), Halfedge_handle (prev1)->ccb()); diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h index 28c2223512d..5a504443712 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -718,8 +718,8 @@ _is_to_left_impl(const Point_2& p, Halfedge_handle he, if (ps_y != ARR_INTERIOR) { // Check if p is to the left of the minimal curve-end: const Comparison_result res = - m_geom_traits->compare_x_point_curve_end_2_object() (p, he->curve(), - ARR_MIN_END); + m_geom_traits->compare_x_near_boundary_2_object() (p, he->curve(), + ARR_MIN_END); return ((res == SMALLER) || (res == EQUAL && ps_y == ARR_TOP_BOUNDARY)); } @@ -755,8 +755,8 @@ _is_to_right_impl(const Point_2& p, Halfedge_handle he, if (ps_y != ARR_INTERIOR) { // Check if p is to the right of the maximal curve-end: const Comparison_result res = - m_geom_traits->compare_x_point_curve_end_2_object() (p, he->curve(), - ARR_MAX_END); + m_geom_traits->compare_x_near_boundary_2_object() (p, he->curve(), + ARR_MAX_END); return ((res == LARGER) || (res == EQUAL && ps_y == ARR_BOTTOM_BOUNDARY)); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Open_hash.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Open_hash.h index c4e77f61497..fe121d521c1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Open_hash.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Open_hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h index 04ccaddc121..4095c48f7a3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2009,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 4aa8428cbff..5273a5aac7a 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005-2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -73,15 +73,15 @@ public: typedef Arr_traits_basic_adaptor_2 Traits_adaptor_2; // .. as it completes (potentially) missing side tags - typedef typename Traits_adaptor_2::Left_side_category Left_side_category; - typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_adaptor_2::Top_side_category Top_side_category; - typedef typename Traits_adaptor_2::Right_side_category Right_side_category; + typedef typename Traits_adaptor_2::Arr_left_side_category Arr_left_side_category; + typedef typename Traits_adaptor_2::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Traits_adaptor_2::Arr_top_side_category Arr_top_side_category; + typedef typename Traits_adaptor_2::Arr_right_side_category Arr_right_side_category; BOOST_MPL_ASSERT( (typename - Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, - Top_side_category, Right_side_category >::result) + Arr_sane_identified_tagging< Arr_left_side_category, Arr_bottom_side_category, + Arr_top_side_category, Arr_right_side_category >::result) ); public: @@ -95,8 +95,8 @@ public: // maybe remove this in a future version (that supports complete handling // of all sides) typedef typename Arr_are_all_sides_oblivious_tag< - Left_side_category, Bottom_side_category, - Top_side_category, Right_side_category >::result + Arr_left_side_category, Arr_bottom_side_category, + Arr_top_side_category, Arr_right_side_category >::result Are_all_sides_oblivious_tag; public: @@ -656,6 +656,10 @@ public: Vertex() {} + /*! \deprecated Use is_at_open_boundary instead. */ + CGAL_DEPRECATED bool is_at_infinity() const + { return (Base::has_null_point()); } + /*! Check whether the vertex lies on an open boundary. */ bool is_at_open_boundary () const { @@ -1069,6 +1073,8 @@ protected: const Traits_adaptor_2 * m_geom_traits; // the geometry-traits adaptor. bool m_own_traits; // inidicates whether the geometry // traits should be freed up. + Arr_boundary_type m_boundary_types[4]; + public: /// \name Constructors. @@ -1648,43 +1654,62 @@ public: protected: - /// \name Determining the boundary-side conditions. + /// \name Allocating and de-allocating points and curves. //@{ - /*! Determines whether a boundary-side categoty 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. + /*! Is one of the given x and y parameter spaces open? * These parameter spaces are typically associated with a particular curve * end. * \param ps_x The parameter space in x. * \param ps_y The parameter space in y. */ - inline bool is_open(Arr_parameter_space ps_x, Arr_parameter_space ps_y) const + inline bool is_open(Arr_parameter_space ps_x, Arr_parameter_space ps_y) + const { return - (((ps_x == ARR_LEFT_BOUNDARY) && is_open(Left_side_category())) || - ((ps_x == ARR_RIGHT_BOUNDARY) && is_open(Right_side_category())) || - ((ps_y == ARR_BOTTOM_BOUNDARY) && is_open(Bottom_side_category())) || - ((ps_y == ARR_TOP_BOUNDARY) && is_open(Top_side_category()))); + (((ps_x != ARR_INTERIOR) && (m_boundary_types[ps_x] == ARR_OPEN)) || + ((ps_y != ARR_INTERIOR) && (m_boundary_types[ps_y] == ARR_OPEN))); + } + /*! Initialize the boundary_types array */ + inline void init_boundary_types() + { + init_boundary_side(ARR_LEFT_BOUNDARY, Arr_left_side_category()); + init_boundary_side(ARR_BOTTOM_BOUNDARY, Arr_bottom_side_category()); + init_boundary_side(ARR_TOP_BOUNDARY, Arr_top_side_category()); + init_boundary_side(ARR_RIGHT_BOUNDARY, Arr_right_side_category()); } - /*! Determines whether a boundary-side categoty indicates a constracted side. - */ - inline bool is_contracted(Arr_boundary_side_tag) const { return false; } - inline bool is_contracted(Arr_contracted_side_tag) const { return true; } + /*! Initialize the boundary_types array */ + void init_boundary_side(Arr_parameter_space ps, Arr_oblivious_side_tag) + { + m_boundary_types[ps] = ARR_OBLIVIOUS; + } + + /*! Initialize the boundary_types array */ + void init_boundary_side(Arr_parameter_space ps, Arr_open_side_tag) + { + m_boundary_types[ps] = ARR_OPEN; + } - /*! Determines whether a boundary-side categoty indicates a constracted side. - */ - inline bool is_identified(Arr_boundary_side_tag) const { return false; } - inline bool is_identified(Arr_identified_side_tag) const { return true; } - //@} - - /// \name Allocating and de-allocating points and curves. - //@{ + /*! Initialize the boundary_types array */ + void init_boundary_side(Arr_parameter_space ps, Arr_closed_side_tag) + { + m_boundary_types[ps] = ARR_CLOSED; + } + + /*! Initialize the boundary_types array */ + void init_boundary_side(Arr_parameter_space ps, Arr_contracted_side_tag) + { + m_boundary_types[ps] = ARR_CONTRACTION; + } + + /*! Initialize the boundary_types array */ + void init_boundary_side(Arr_parameter_space ps, + Arr_identified_side_tag) + { + m_boundary_types[ps] = ARR_IDENTIFICATION; + } /*! Allocate a new point. */ Point_2 *_new_point (const Point_2& pt) 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 2761413dc14..b3a37b32e0a 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 2150b8e0e3a..645f4dbcabf 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 354077105b3..caafc4c7103 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -66,15 +66,15 @@ protected: typedef Arr_traits_adaptor_2 Traits_adaptor_2; - typedef typename Traits_adaptor_2::Left_side_category Left_side_category; - typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_adaptor_2::Top_side_category Top_side_category; - typedef typename Traits_adaptor_2::Right_side_category Right_side_category; + typedef typename Traits_adaptor_2::Arr_left_side_category Arr_left_side_category; + typedef typename Traits_adaptor_2::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Traits_adaptor_2::Arr_top_side_category Arr_top_side_category; + typedef typename Traits_adaptor_2::Arr_right_side_category Arr_right_side_category; BOOST_MPL_ASSERT( (typename - Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, - Top_side_category, Right_side_category >::result) + Arr_sane_identified_tagging< Arr_left_side_category, Arr_bottom_side_category, + Arr_top_side_category, Arr_right_side_category >::result) ); public: @@ -93,8 +93,8 @@ public: protected: typedef typename Arr_are_all_sides_oblivious_tag< - Left_side_category, Bottom_side_category, - Top_side_category, Right_side_category >::result + Arr_left_side_category, Arr_bottom_side_category, + Arr_top_side_category, Arr_right_side_category >::result Are_all_sides_oblivious_tag; typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; diff --git a/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h b/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h index 5c0303e21b9..57c257974b3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Basic_sweep_line_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -96,22 +96,22 @@ public: typedef typename Traits_adaptor_2::Point_2 Point_2; typedef typename Traits_adaptor_2::X_monotone_curve_2 X_monotone_curve_2; - typedef typename Traits_adaptor_2::Left_side_category Left_side_category; - typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_adaptor_2::Top_side_category Top_side_category; - typedef typename Traits_adaptor_2::Right_side_category Right_side_category; + typedef typename Traits_adaptor_2::Arr_left_side_category Arr_left_side_category; + typedef typename Traits_adaptor_2::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Traits_adaptor_2::Arr_top_side_category Arr_top_side_category; + typedef typename Traits_adaptor_2::Arr_right_side_category Arr_right_side_category; BOOST_MPL_ASSERT( (typename - Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, - Top_side_category, Right_side_category >::result) + Arr_sane_identified_tagging< Arr_left_side_category, Arr_bottom_side_category, + Arr_top_side_category, Arr_right_side_category >::result) ); protected: typedef typename Arr_are_all_sides_oblivious_tag< - Left_side_category, Bottom_side_category, - Top_side_category, Right_side_category >::result + Arr_left_side_category, Arr_bottom_side_category, + Arr_top_side_category, Arr_right_side_category >::result Are_all_sides_oblivious_tag; public: diff --git a/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h b/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h index 05e99924158..00a1a2d6a95 100644 --- a/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h index fb8a636d56b..ae8e24c0fb1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2004-2010 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or @@ -934,59 +934,6 @@ public: //! \name Predicates //!@{ - /*! - * Compare the relative x-limits of a vertical line at an interior point - * and the arc's end on a bottom or top boundary - * - * \param p A reference point; we refer to a vertical line incident to p. - * \param ce ARR_MIN_END if we refer to the arc's minimal end, - * ARR_MAX_END if we refer to its maximal end. - * \return CGAL::SMALLER if p lies to the left of the arc; - * CGAL::LARGER if p lies to the right of the arc; - * CGAL::EQUAL in case of an overlap. - * - * \pre the arc's relevant end is on bottom or top boundary - */ - CGAL::Comparison_result compare_x_at_limit( - CGAL::Arr_curve_end ce, - const Point_2& p - ) const { - - CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2, - compare_x_at_limit_2) - CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this)); - return compare_x_at_limit_2( - p, *dynamic_cast< const Kernel_arc_2* >(this), ce - ); - } - - - /*!\brief - * Compare the relative x-limits of the curve end of \c *this - * and \c cv2 - * \param ce1 ARR_MIN_END if we refer to this' minimal end, - * ARR_MAX_END if we refer to this' maximal end. - * \param cv2 The second curve. - * \param ce2 ARR_MIN_END if we refer to its minimal end, - * ARR_MAX_END if we refer to its maximal end. - * \return CGAL::SMALLER if \c this lies to the left of cv2; - * CGAL::LARGER if \c this lies to the right of cv2; - * CGAL::EQUAL in case of an overlap. - * - * \pre the curve ends lie on the bottom or top boundary - */ - CGAL::Comparison_result compare_x_at_limit( - CGAL::Arr_curve_end ce1, - const Kernel_arc_2& cv2, CGAL::Arr_curve_end ce2) const { - - CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2, - compare_x_at_limit_2) - CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this)); - return compare_x_at_limit_2( - *dynamic_cast< const Kernel_arc_2* >(this), ce1, cv2, ce2 - ); - } - /*! * Compare the relative x-positions of an interior point * and the arc's end on a bottom or top boundary @@ -1000,15 +947,15 @@ public: * * \pre the arc's relevant end is on bottom or top boundary */ - CGAL::Comparison_result compare_x_near_limit( + CGAL::Comparison_result compare_x_near_boundary( CGAL::Arr_curve_end ce, const Point_2& p ) const { - CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2, - compare_x_near_limit_2) + CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_boundary_2, + compare_x_near_boundary_2) CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this)); - return compare_x_near_limit_2( + return compare_x_near_boundary_2( p, *dynamic_cast< const Kernel_arc_2* >(this), ce ); } @@ -1027,13 +974,16 @@ public: * * \pre the curve ends lie on the bottom or top boundary */ - CGAL::Comparison_result compare_x_near_limit(const Kernel_arc_2& cv2, - CGAL::Arr_curve_end ce) const { + CGAL::Comparison_result compare_x_near_boundary( + CGAL::Arr_curve_end ce1, + const Kernel_arc_2& cv2, CGAL::Arr_curve_end ce2) const { - CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2, - compare_x_near_limit_2) + CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_boundary_2, + compare_x_near_boundary_2) CGAL_precondition(dynamic_cast< const Kernel_arc_2* >(this)); - return compare_x_near_limit_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce); + return compare_x_near_boundary_2( + *dynamic_cast< const Kernel_arc_2* >(this), ce1, cv2, ce2 + ); } /*!\brief @@ -3270,8 +3220,7 @@ public: CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_y_near_boundary_2) CGAL_BEFRIEND_CKvA_2_FUNCTOR(Parameter_space_in_y_2) - CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_at_limit_2) - CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_near_limit_2) + CGAL_BEFRIEND_CKvA_2_FUNCTOR(Compare_x_near_boundary_2) #undef CGAL_BEFRIEND_CKvA_2_FUNCTOR diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h index ac3e72ec1dc..192da5ec925 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h index fceff291f5b..0050a9f622c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h @@ -1,4 +1,4 @@ -// Copyright (c) 2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany). +// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h index 1fe873c8e40..08bfef30416 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or @@ -2081,75 +2081,23 @@ public: result_type operator()(const Arc_2& cv1, const Arc_2& cv2, CGAL::Arr_curve_end ce) const { - CERR("\ncompare_y_near_boundary; cv1: " << cv1 << "; cv2: " << - cv2 << "; end: " << ce << "\n"); - - - CGAL::Comparison_result res = CGAL::EQUAL; - - CGAL::Arr_parameter_space loc1 = cv1.location(ce); - CGAL_precondition(cv1.is_on_left_right(loc1)); - CGAL_precondition(loc1 == cv2.location(ce)); - // comparing ids is the same as calling is_identical() ?? - if (cv1.id() == cv2.id()) { - CERR("result: " << res << "\n"); // EQUAL - return res; - } - - // both points lie on the left-right-identification, i.e., equalx - // TODO this interface is NOT official - CGAL::Object obj1 = - cv1.curve().asymptotic_value_of_arc(loc1, cv1.arcno()); - CGAL::Object obj2 = - cv2.curve().asymptotic_value_of_arc(loc1, cv2.arcno()); - - typename Point_2::Curved_kernel_via_analysis_2::Curve_kernel_2:: - Algebraic_real_1 y1, y2; - CGAL::Arr_parameter_space ps1, ps2; - - if (CGAL::assign(ps1, obj1)) { - if (CGAL::assign(ps2, obj2)) { - res = CGAL::EQUAL; - } else { - CGAL_assertion(CGAL::assign(y2, obj2)); - res = (ps1 == CGAL::ARR_BOTTOM_BOUNDARY ? - CGAL::SMALLER : CGAL::LARGER); - } - } else { - CGAL_assertion_code(bool check = ) - CGAL::assign(y1, obj1); - CGAL_assertion(check); - if (CGAL::assign(ps2, obj2)) { - res = (ps2 == CGAL::ARR_TOP_BOUNDARY ? - CGAL::SMALLER : CGAL::LARGER); - } else { - CGAL_assertion_code(bool check = ) - CGAL::assign(y2, obj2); - CGAL_assertion(check); - - // Remark: Is filtered - res = Base::_ckva()->kernel().compare_1_object()(y1, y2); - } - } - - if (res != EQUAL) { + CERR("\ncompare_y_near_boundary; cv1: " << cv1 << "; cv2: " << + cv2 << "; end: " << ce << "\n"); + + CGAL::Arr_parameter_space loc1 = cv1.location(ce); + CGAL_precondition(cv1.is_on_left_right(loc1)); + CGAL_precondition(loc1 == cv2.location(ce)); + // comparing ids is the same as calling is_identical() ?? + if (cv1.id() == cv2.id()) { + CGAL::Comparison_result res = CGAL::EQUAL; + CERR("result: " << res << "\n"); + return res; + } + + // in this setting same handling as for +/-oo ? + CGAL::Comparison_result res = cv1._compare_arc_numbers(cv2, loc1); CERR("result: " << res << "\n"); return res; - } - - CGAL_precondition(cv1.is_on_left_right(loc1)); - CGAL_precondition(loc1 == cv2.location(ce)); - // comparing ids is the same as calling is_identical() ?? - if (cv1.id() == cv2.id()) { - CGAL::Comparison_result res = CGAL::EQUAL; - CERR("result: " << res << "\n"); - return res; - } - - // in this setting same handling as for +/-oo ? - res = cv1._compare_arc_numbers(cv2, loc1); - CERR("result: " << res << "\n"); - return res; } }; @@ -2212,12 +2160,11 @@ public: }; - /*!\brief - * Functor that compares x-limits at the top or bottom boundary + * Functor that compares x-coordinates near the top or bottom boundary */ template < class CurvedKernelViaAnalysis_2 > -class Compare_x_at_limit_2 : public +class Compare_x_near_boundary_2 : public Curved_kernel_via_analysis_2_functor_base< CurvedKernelViaAnalysis_2 > { public: @@ -2236,12 +2183,12 @@ public: //! the arity of the functor - Compare_x_at_limit_2(Curved_kernel_via_analysis_2 *kernel) : + Compare_x_near_boundary_2(Curved_kernel_via_analysis_2 *kernel) : Base(kernel) { } - /*!\brief Compare the x-limit of a vertical with the x-limit of - * an arc end near the boundary at bottom or top boundary + /*!\brief Compare the x-coordinate of a point with the x-coordinate of + * an arcend near the boundary at bottom or top boundary * * \param p the point direction. * \param cv the arc, the endpoint of which is compared. @@ -2259,13 +2206,12 @@ public: result_type operator()(const Point_2& p, const Arc_2& cv, CGAL::Arr_curve_end ce) const { - - CERR("\ncompare_x_at_limit: p: " << p << "\n cv: " << + CERR("\ncompare_x_near_boundary: p: " << p << "\n cv: " << cv << "; curve_end: " << ce << "\n"); // this curve end has boundary only in y CGAL_precondition(cv.is_on_bottom_top(cv.location(ce))); - if (cv.is_singular()) // the curve end goes to contraction => x-order + if (cv.is_singular()) // the curve end goes to singularity => x-order return CGAL::EQUAL; // doesn't matter CGAL::Comparison_result res = @@ -2273,11 +2219,21 @@ public: kernel().compare_1_object()( p.x(), cv.curve_end_x(ce) ); + // for vertical arcs equality of x-coordinates means overlapping + // in case of discontinuity => x-comparison is enough + if (res != CGAL::EQUAL || cv.is_vertical() || cv.is_on_disc()) { + CERR("result: " << res << "\n"); + return res; + } + + // look at the side from which the + // vertical asymptote is approached + res = (ce == CGAL::ARR_MIN_END ? CGAL::SMALLER : CGAL::LARGER); CERR("result: " << res << "\n"); return res; } - /*! Compare the x-limits of 2 arcs ends near the top or bottom + /*! Compare the x-coordinates of 2 arcs ends near the top or bottom * boundary of the parameter space * \param cv1 the first arc. * \param ce1 the first arc end indicator - @@ -2298,7 +2254,7 @@ public: result_type operator()(const Arc_2& cv1, CGAL::Arr_curve_end ce1, const Arc_2& cv2, CGAL::Arr_curve_end ce2) const { - CERR("\ncompare_x_at_limit: cv1: " << cv1 << "\n cv2: " << + CERR("\ncompare_x_near_boundary: cv1: " << cv1 << "\n cv2: " << cv2 << "; end1: " << ce1 << "; end2: " << ce2 << "\n"); /*CGAL::Arr_boundary_type bnd1 = boundary(end1), bnd2 = cv2.boundary(ce2);*/ @@ -2314,92 +2270,87 @@ public: implemented"); } - CGAL::Comparison_result res = Curved_kernel_via_analysis_2::instance(). - kernel().compare_1_object()( - cv1.curve_end_x(ce1), - cv2.curve_end_x(ce2) - ); + + CGAL::Comparison_result res; + if (cv1.is_singular() && cv1.is_singular()) { + if (loc1 < loc2) { + return CGAL::SMALLER; + } + if (loc1 > loc2) { + return CGAL::LARGER; + } + // both ends lie at the same singularity => need special handling + // but x-order doesn't matter + } else { // establish x-order + res = Curved_kernel_via_analysis_2::instance(). + kernel().compare_1_object()( + cv1.curve_end_x(ce1), + cv2.curve_end_x(ce2) + ); + // x-coordinate comparison is enough for these cases + // we assume that either both curve ends lie on disc or neither of + // them + if (res != CGAL::EQUAL || + (cv1.is_on_disc() && cv1.is_on_disc())) { + CERR("result: " << res << "\n"); + return res; + } + } + // now we either +/-oo case: ARR_MIN_END > vertical > ARR_MAX_END + // or both ends lie at the same singularity: these cases can be + // handled simultaneously + if (cv1.is_vertical()) { + if (!cv2.is_vertical()) { + return (ce2 == CGAL::ARR_MIN_END ? + CGAL::SMALLER : CGAL::LARGER); + } + // both are vertical + if (loc1 == loc2) { // both ends converge to the same infinity + return CGAL::EQUAL; + } + return (loc1 == CGAL::ARR_BOTTOM_BOUNDARY ? + CGAL::SMALLER : CGAL::LARGER); + } + + if (cv2.is_vertical()) { + return (ce1 == CGAL::ARR_MIN_END ? CGAL::LARGER : CGAL::SMALLER); + } + + // otherwise: both ends have asymptotic behaviour or singularity + if (ce1 == ce2) { // both ends approach asymptote from one side + + if(loc1 == loc2) { // need special y-comparison + Coordinate_1 x0(cv1.curve_end_x(ce1)); + res = cv1._compare_arc_numbers( + cv2, CGAL::ARR_INTERIOR, x0, + (ce1 == CGAL::ARR_MIN_END ? + CGAL::POSITIVE : CGAL::NEGATIVE) + ); + if ((ce1 == CGAL::ARR_MAX_END && + loc1 == CGAL::ARR_TOP_BOUNDARY) || + (ce1 == CGAL::ARR_MIN_END && + loc1 == CGAL::ARR_BOTTOM_BOUNDARY)) { + res = -res; + } + CERR("result: " << res << "\n"); + return res; + } + // else: order can be determined without y-comparison + //(loc1 == CGAL::ARR_BOTTOM_BOUNDARY ? CGAL::SMALLER : + res = CGAL::EQUAL; + //CGAL::LARGER); + CERR("result: " << res << "\n"); + return res; + } + // curve ends approach vertical asymptote (or singularity) from + // different sides => no comparisons required + res = (ce1 == CGAL::ARR_MIN_END ? CGAL::LARGER : CGAL::SMALLER); CERR("result: " << res << "\n"); return res; } }; -/*!\brief - * Functor that compares x-coordinates near the top or bottom boundary - */ -template < class CurvedKernelViaAnalysis_2 > -class Compare_x_near_limit_2 : public -Curved_kernel_via_analysis_2_functor_base< CurvedKernelViaAnalysis_2 > { - -public: - //! this instance' first template parameter - typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2; - - //! the base type - typedef - Curved_kernel_via_analysis_2_functor_base< Curved_kernel_via_analysis_2 > - Base; - - CGAL_CKvA_2_GRAB_BASE_FUNCTOR_TYPES - - //! the result type - typedef CGAL::Comparison_result result_type; - - //! the arity of the functor - - Compare_x_near_limit_2(Curved_kernel_via_analysis_2 *kernel) : - Base(kernel) { - } - - /*! Compare the x-coordinates of 2 arcs ends near the top or bottom - * boundary of the parameter space - * \param cv1 the first arc. - * \param cv2 the second arc. - * \param ce the arc end indicator - - * ARR_MIN_END - the minimal end of curves or - * ARR_MAX_END - the maximal end of curves. - * \return the second comparison result: - * SMALLER - x(cv1, ce) \< x(cv2, ce); - * EQUAL - x(cv1, ce) = x(cv2, ce); - * LARGER - x(cv1, ce) > x(cv2, ce). - * - * \pre the ce1 end of the arc cv1 lies on a boundary. - * \pre the ce2 end of the arc cv2 lies on a boundary. - * \pre both curve ends are on the same boundary - */ - result_type operator()(const Arc_2& cv1, const Arc_2& cv2, - CGAL::Arr_curve_end ce) const { - - CERR("\ncompare_x_near_limit: cv1: " << cv1 << "\n cv2: " << - cv2 << "; ce: " << ce << "\n"); - - CGAL::Arr_parameter_space - loc1 = cv1.location(ce), - loc2 = cv2.location(ce); - CGAL_precondition(cv1.is_on_bottom_top(loc1)); - CGAL_precondition(cv1.is_on_bottom_top(loc2)); - CGAL_precondition(cv1.compare_x_at_limit(ce, cv2, ce) == CGAL::EQUAL); - - CGAL_precondition(loc1 == loc2); - - Coordinate_1 x0(cv1.curve_end_x(ce)); - CGAL::Comparison_result res = cv1._compare_arc_numbers( - cv2, CGAL::ARR_INTERIOR, x0, - (ce == CGAL::ARR_MIN_END ? - CGAL::POSITIVE : CGAL::NEGATIVE) - ); - if ((ce == CGAL::ARR_MAX_END && - loc1 == CGAL::ARR_TOP_BOUNDARY) || - (ce == CGAL::ARR_MIN_END && - loc1 == CGAL::ARR_BOTTOM_BOUNDARY)) { - res = opposite(res); - } - CERR("result: " << res << "\n"); - return res; - } -}; - /*!\brief * Functor to construct a point on a curve @@ -2721,10 +2672,8 @@ public: // bottom-top CGAL_CKvA_2_functor_pred(Parameter_space_in_y_2, parameter_space_in_y_2_object); - CGAL_CKvA_2_functor_pred(Compare_x_at_limit_2, - compare_x_at_limit_2_object); - CGAL_CKvA_2_functor_pred(Compare_x_near_limit_2, - compare_x_near_limit_2_object); + CGAL_CKvA_2_functor_pred(Compare_x_near_boundary_2, + compare_x_near_boundary_2_object); CGAL_CKvA_2_functor_cons(X_extreme_points_2, x_extreme_points_2_object); CGAL_CKvA_2_functor_cons(Y_extreme_points_2, y_extreme_points_2_object); diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h index 9a26e0d6568..eb9d0323da2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or @@ -95,10 +95,10 @@ public: typedef CGAL::Tag_false Has_do_intersect_category; - typedef Arr_open_side_tag Left_side_category; - typedef Arr_open_side_tag Bottom_side_category; - typedef Arr_open_side_tag Top_side_category; - typedef Arr_open_side_tag Right_side_category; + typedef Arr_open_side_tag Arr_left_side_category; + typedef Arr_open_side_tag Arr_bottom_side_category; + typedef Arr_open_side_tag Arr_top_side_category; + typedef Arr_open_side_tag Arr_right_side_category; //!@} diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h index a2deb8a45a0..d8356e847af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Fig_stream_Curve_renderer_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h index 2890c5d8f1c..dcef4af1f80 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2007-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or @@ -107,10 +107,6 @@ public: } }; - -// TODO implement Compare_y_limit_on_boundary_2 - - template < class CurvedKernelViaAnalysis_2, class FunctorBase > class Compare_y_near_boundary_2 : public FunctorBase::Compare_y_near_boundary_2 { diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h index ab9f430e0bf..7c04be9bde0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2007-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h index 1f2ef476770..27be92578da 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2007-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h index 903f6fc2b6b..251c098ba6d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h index 214f8204083..9d18b79fa2e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2007-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h index 7cddc2acf00..c0b2ccc39ba 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2004-2010 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h index 3c60a765471..40e66b0dc08 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2004-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h index 713a4bb3581..772c1715d7a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// Copyright (c) 2007-2008 Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or @@ -117,12 +117,12 @@ public: return (loc1 == CGAL::ARR_LEFT_BOUNDARY ? CGAL::SMALLER : CGAL::LARGER); return (_m_adapter->kernel(). - compare_y_curve_ends_2_object()(arc, p2.arc(), end)); + compare_y_near_boundary_2_object()(arc, p2.arc(), end)); } // compare curve ends at +/-oo in y if(Native_arc_2::is_on_bottom_top(loc2)) { CGAL::Comparison_result res = (_m_adapter->kernel(). - compare_x_curve_ends_2_object() + compare_x_near_boundary_2_object() (arc, end, p2.arc(), p2.curve_end())); if(res == CGAL::EQUAL && end == p2.curve_end() && loc1 != loc2) { @@ -143,6 +143,8 @@ public: CGAL::SMALLER); else { // point is p1, arc is p2 + //res = _m_adapter->kernel(). + // compare_x_near_boundary_2_object()(pt, arc, end); // compares a finite point with a curve end at y=+/-oo: res = _m_adapter->kernel().kernel().compare_1_object() (pt.x(), arc.curve_end_x(end)); @@ -252,7 +254,7 @@ public: if(Native_arc_2::is_on_left_right(locp)) { CGAL_precondition(locp == cv.arc().location(end)); // compare two curve ends at +/-oo in x - return _m_adapter->kernel().compare_y_curve_ends_2_object() + return _m_adapter->kernel().compare_y_near_boundary_2_object() (p.arc(), cv.arc(), end); } // p.arc() has vertical asymptote; cases: @@ -293,7 +295,7 @@ public: // compare either two asymptotic ends or one vertical arc + asymptote // check whether result need to be reversed CGAL::Comparison_result res = - (_m_adapter->kernel().compare_x_curve_ends_2_object() + (_m_adapter->kernel().compare_x_near_boundary_2_object() (p.arc(), end, cv.arc(), end2)); if(locp == cv.arc().location(end2) && diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_iostream.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_iostream.h index d180e551e24..4f15c231287 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_iostream.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_iostream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 d56874b8605..7894f849fec 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_reader.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_reader.h index 03f950c3bf1..1fc14f567f5 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_reader.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_reader.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_writer.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_writer.h index adade33c4b3..a45029e2c8f 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_writer.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_2_writer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_iostream.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_iostream.h index 4b3411f878c..efdcd0a7374 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_iostream.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_iostream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_text_formatter.h b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_text_formatter.h index f2182747bdc..5da9e4c89d5 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_text_formatter.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arr_with_history_text_formatter.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h index d8848155cbc..ff3026d88ca 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 6a40a9d5996..7154c3cd3f0 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005-2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h index bdabe4c1a10..c32ed7e47f3 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream_Conic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream_Conic_arc_2.h index 7f1c7f5f698..c34f62667b8 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream_Conic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream_Conic_arc_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Conic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Conic_arc_2.h index 90ba9fdaaac..85b234f4975 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Conic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Conic_arc_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Linear_object_2.h b/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Linear_object_2.h index 1c9da9c81fb..77a42e6addd 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Linear_object_2.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Linear_object_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Polyline_2.h b/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Polyline_2.h index 6b908bc80aa..3d6eb923994 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Polyline_2.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Qt_widget_Polyline_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2.h index 08c9a32906b..de789c54c40 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h index 845f7729f5e..d9bcc91cc04 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_basic_insertion_sl_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 f6dff520933..b55d87d2896 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -18,7 +18,6 @@ // Author(s) : Baruch Zukerman // Ron Wein // Efi Fogel -// Eric Berberich #ifndef CGAL_ARR_BASIC_INSERTION_TRAITS_2_H #define CGAL_ARR_BASIC_INSERTION_TRAITS_2_H @@ -65,14 +64,14 @@ public: Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Traits_2 >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Traits_2 >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Traits_2 >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Traits_2 >::Category - Right_side_category; + typedef typename internal::Arr_complete_left_side_tag< Traits_2 >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Traits_2 >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Traits_2 >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Traits_2 >::Tag + Arr_right_side_category; /* Insertion is implemented as sweep-line visitor. The sweep-line algorithm * never uses Compare_y_at_x_left_2. @@ -615,86 +614,7 @@ public: return Parameter_space_in_x_2 (m_base_traits); } - /*! A function object that determines whether an x-monotone curve or a - * point coincide with the vertical identification curve. - */ - class Is_on_x_identification_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Is_on_x_identification_2 (const Traits_2 * tr) : m_base(tr) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_basic_insertion_traits_2; - - public: - bool operator()(const Point_2 & p) const - { - return m_base->is_on_x_identification_2_object() (p.base()); - } - - bool operator()(const X_monotone_curve_2 & xcv) const - { - return m_base->is_on_x_identification_2_object() (xcv.base()); - } - - }; - - /*! Obtain 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); - } - - /*! A functor that compares the y-coordinates of two points on vertical - * boundaries. - */ - class Compare_y_on_boundary_2 - { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - 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; - - public: - /*! Use 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_y_on_boundary_2_object()(p1.base(), p2.base()); - } - - }; - - /*! Obtain 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); - } - - /*! A functor that compares the y-coordinates of curve ends near the + /*! A functor that compares the y-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -735,6 +655,47 @@ public: return Compare_y_near_boundary_2 (m_base_traits); } + /*! A functor that compares the y-coordinates of two points on vertical + * boundaries. + */ + class Compare_y_on_boundary_2 + { + protected: + //! The base traits. + const Traits_2 * m_base; + + /*! Constructor. + * \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 + * obtaining function, which is a member of the nesting class, + * constructing it. + */ + 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; + + public: + /*! Use 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_y_on_boundary_2_object()(p1.base(), p2.base()); + } + + }; + + /*! Obtain 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); + } + + // TODO Is_on_x_identification_2 // bottom-top @@ -784,49 +745,10 @@ public: return Parameter_space_in_y_2 (m_base_traits); } - /*! A function object that determines whether an x-monotone curve or a - * point coincide with the horizontal identification curve. - */ - class Is_on_y_identification_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Is_on_y_identification_2 (const Traits_2 * tr) : m_base(tr) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_basic_insertion_traits_2; - - public: - bool operator()(const Point_2 & p) const - { - return m_base->is_on_y_identification_2_object() (p.base()); - } - - bool operator()(const X_monotone_curve_2 & xcv) const - { - return m_base->is_on_y_identification_2_object() (xcv.base()); - } - - }; - - /*! Obtain 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); - } - - /*! A functor that compares the x-limits of curve ends on the + /*! A functor that compares the x-coordinates of curve ends near the * boundary of the parameter space. */ - class Compare_x_at_limit_2 { + class Compare_x_near_boundary_2 { protected: //! The base traits. const Traits_2 * m_base; @@ -838,7 +760,7 @@ public: * obtaining function, which is a member of the nesting class, * constructing it. */ - Compare_x_at_limit_2 (const Traits_2 * base) : m_base(base) {} + Compare_x_near_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; @@ -852,8 +774,8 @@ public: Arr_curve_end ce) const { - return m_base->compare_x_at_limit_2_object() (p.base(), - xcv.base(), ce); + return m_base->compare_x_near_boundary_2_object() (p.base(), + xcv.base(), ce); } /*! Use tag dispatching to avoid compilation errors in case the functor @@ -864,60 +786,17 @@ public: const X_monotone_curve_2 & xcv2, Arr_curve_end ce2) const { - return m_base->compare_x_at_limit_2_object() (xcv1.base(), ce1, - xcv2.base(), ce2); + return m_base->compare_x_near_boundary_2_object() (xcv1.base(), ce1, + xcv2.base(), ce2); } }; - /*! Obtain a Compare_x_at_limit_2 object + /*! Obtain a Compare_x_near_boundary_2 object */ - Compare_x_at_limit_2 compare_x_at_limit_2_object() const + Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { - return Compare_x_at_limit_2(m_base_traits); - } - - - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_x_near_limit_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_near_limit_2 (const Traits_2 * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the private constructor. - friend class Arr_basic_insertion_traits_2; - - public: - - /*! Use tag dispatching to avoid compilation errors in case the functor - * is not defined - */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return m_base->compare_x_near_limit_2_object() (xcv1.base(), xcv2.base(), - ce); - } - - }; - - /*! Obtain a Compare_x_near_limit_2 object - */ - Compare_x_near_limit_2 compare_x_near_limit_2_object() const - { - return Compare_x_near_limit_2(m_base_traits); + return Compare_x_near_boundary_2(m_base_traits); } /*! A functor that compares the x-coordinates of two points on vertical @@ -951,24 +830,6 @@ public: return m_base->compare_x_on_boundary_2_object()(p1.base(), p2.base()); } - /*! Use tag dispatching to avoid compilation errors in case the functor - * is not defined - */ - Comparison_result operator() (const Point_2 & pt, - const X_monotone_curve_2& xcv, Arr_curve_end ce) const - { - return m_base->compare_x_on_boundary_2_object()(pt.base(), xcv.base(), ce); - } - - /*! Use tag dispatching to avoid compilation errors in case the functor - * is not defined - */ - Comparison_result operator() (const X_monotone_curve_2& xcv1, Arr_curve_end ce1, - const X_monotone_curve_2& xcv2, Arr_curve_end ce2) const - { - return m_base->compare_x_on_boundary_2_object()(xcv1.base(), ce1, xcv2.base(), ce2); - } - }; /*! Obtain a Compare_x_on_boundary_2 object @@ -978,47 +839,7 @@ public: return Compare_x_on_boundary_2(m_base_traits); } - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_x_near_boundary_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_near_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; - - public: - - /*! Use tag dispatching to avoid compilation errors in case the functor - * is not defined - */ - Comparison_result operator() (const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return m_base->compare_x_near_boundary_2_object() (xcv1.base(), xcv2.base(), - ce); - } - - }; - - /*! Obtain 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); - } + // TODO Is_on_y_identification_2 }; diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h index 5f8e867468d..b67b61260e2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_batched_pl_sl_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_event.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_event.h index 2311c2468cb..d2368d24c5e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_event.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_event.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h index 9661569d7e1..76d43b11590 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_sl_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h index d09ae5f8029..0c282264f17 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_construction_subcurve.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h index 9efe515ad07..8ff9a82969c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_default_overlay_traits_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h index e5892428343..03075d57898 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_sl_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h index 1fa557840ed..da3671c9bad 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_insertion_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -55,10 +55,10 @@ public: typedef typename Base::Has_do_intersect_category Has_do_intersect_category; // should be ok, as basic_insertion (=Base) completes incomplete tags - typedef typename Base::Left_side_category Left_side_category; - typedef typename Base::Bottom_side_category Bottom_side_category; - typedef typename Base::Top_side_category Top_side_category; - typedef typename Base::Right_side_category Right_side_category; + typedef typename Base::Arr_left_side_category Arr_left_side_category; + typedef typename Base::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Base::Arr_top_side_category Arr_top_side_category; + typedef typename Base::Arr_right_side_category Arr_right_side_category; /* Insertion is implemented as sweep-line visitor. The sweep-line algorithm * never performs merging of curves. Therefore, AreMergeable_2 and diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h index f4c7f78610e..2e9b5646ba8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_sl_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h index ce192d93e13..a09a339a4a6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_subcurve.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h index 49fb5934a8b..4408d7e81d4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_overlay_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -80,14 +80,14 @@ public: typedef typename Traits_2::Has_do_intersect_category Has_do_intersect_category; - typedef typename internal::Arr_complete_left_side_category< Traits_2 >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Traits_2 >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Traits_2 >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Traits_2 >::Category - Right_side_category; + typedef typename internal::Arr_complete_left_side_tag< Traits_2 >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Traits_2 >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Traits_2 >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Traits_2 >::Tag + Arr_right_side_category; /* Overlay is implemented as sweep-line visitor. The sweep-line algorithm * never uses Compare_y_at_x_left_2, and it never performs merging of curves. @@ -988,88 +988,7 @@ public: }; - /*! Obtain 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); - } - - /*! A function object that determines whether an x-monotone curve or a - * point coincide with the vertical identification curve. - */ - class Is_on_x_identification_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * The constructor is declared protected to allow only the functor - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Is_on_x_identification_2 (const Traits_2 * tr) : m_base (tr) {} - - //! Allow its functor obtaining function calling the protected constructor. - friend class Arr_overlay_traits_2; - - public: - Arr_parameter_space operator() (const Point_2 & p) const - { - return m_base->is_on_x_identification_2_object() (p.base()); - } - - Arr_parameter_space operator() (const X_monotone_curve_2 & xcv) const - { - return m_base->is_on_x_identification_2_object() (xcv.base()); - } - - }; - - /*! Obtain 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); - } - - /*! A functor that compares the y-values of pointss on the - * boundary of the parameter space. - */ - class Compare_y_on_boundary_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_y_on_boundary_2(const Traits_2 * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the protected constructor. - friend class Arr_overlay_traits_2; - - public: - Comparison_result operator() (const Point_2 & pt1, - const Point_2 & pt2) const - { - return m_base->compare_y_on_boundary_2_object()(pt1.base(), pt2.base()); - } - }; - - /*! Obtain 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); - } - - /*! A functor that compares the y-coordinates of curve ends near the + /*! A functor that compares the y-coordinates of curve ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { @@ -1109,9 +1028,17 @@ public: return Compare_y_near_boundary_2(m_base_traits); } + // TODO Compare_y_on_boundary_2 + // TODO Is_on_x_identification_2 // bottom-top + /*! Obtain 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); + } + /*! A functor that determines whether an endpoint of an x-monotone arc lies * on a boundary of the parameter space along the y axis. */ @@ -1157,182 +1084,6 @@ public: return (Parameter_space_in_y_2 (m_base_traits)); } - /*! A function object that determines whether an x-monotone curve or a - * point coincide with the vertical identification curve. - */ - class Is_on_y_identification_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * The constructor is declared protected to allow only the functor - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Is_on_y_identification_2 (const Traits_2 * tr) : m_base (tr) {} - - //! Allow its functor obtaining function calling the protected constructor. - friend class Arr_overlay_traits_2; - - public: - Arr_parameter_space operator() (const Point_2 & p) const - { - return m_base->is_on_y_identification_2_object() (p.base()); - } - - Arr_parameter_space operator() (const X_monotone_curve_2 & xcv) const - { - return m_base->is_on_y_identification_2_object() (xcv.base()); - } - - }; - - /*! Obtain 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); - } - - /*! A functor that compares the x-limits of curve ends on the - * boundary of the parameter space. - */ - class Compare_x_at_limit_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_at_limit_2(const Traits_2 * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the protected constructor. - friend class Arr_overlay_traits_2; - - public: - Comparison_result operator()(const Point_2 & p, - const X_monotone_curve_2 & xcv, - Arr_curve_end ce) const - { - return m_base->compare_x_at_limit_2_object()(p.base(), - xcv.base(), ce); - } - - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - Arr_curve_end ce1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce2) const - { - return m_base->compare_x_at_limit_2_object()(xcv1.base(), ce1, - xcv2.base(), ce2); - } - - }; - - /*! Obtain a Compare_x_at_limit_2 functor. */ - Compare_x_at_limit_2 compare_x_at_limit_2_object () const - { - return Compare_x_at_limit_2(m_base_traits); - } - - /*! A functor that compares the x-coordinates of curve ends near the - * boundary of the parameter space. - */ - class Compare_x_near_limit_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_near_limit_2(const Traits_2 * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the protected constructor. - friend class Arr_overlay_traits_2; - - public: - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, - Arr_curve_end ce) const - { - return m_base->compare_x_near_limit_2_object()(xcv1.base(), - xcv2.base(), - ce); - } - - }; - - /*! Obtain a Compare_x_near_limit_2 functor. */ - Compare_x_near_limit_2 compare_x_near_limit_2_object () const - { - return Compare_x_near_limit_2(m_base_traits); - } - - /*! A functor that compares the y-values of pointss on the - * boundary of the parameter space. - */ - class Compare_x_on_boundary_2 { - protected: - //! The base traits. - const Traits_2 * m_base; - - /*! Constructor. - * \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 - * obtaining function, which is a member of the nesting class, - * constructing it. - */ - Compare_x_on_boundary_2(const Traits_2 * base) : m_base(base) {} - - //! Allow its functor obtaining function calling the protected constructor. - friend class Arr_overlay_traits_2; - - public: - Comparison_result operator() (const Point_2 & pt1, - const Point_2 & pt2) const - { - return m_base->compare_x_on_boundary_2_object()(pt1.base(), pt2.base()); - } - - Comparison_result operator() (const Point_2 & pt, - const X_monotone_curve_2& xcv, Arr_curve_end ce) const - { - return m_base->compare_x_on_boundary_2_object()(pt.base(), xcv.base(), ce); - } - - Comparison_result operator() (const X_monotone_curve_2& xcv1, Arr_curve_end ce1, - const X_monotone_curve_2& xcv2, Arr_curve_end ce2) const - { - return m_base->compare_x_on_boundary_2_object()(xcv1.base(), ce1, xcv2.base(), ce2); - } - - }; - - /*! Obtain 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); - } - /*! A functor that compares the x-coordinates of curve ends near the * boundary of the parameter space. */ @@ -1356,13 +1107,21 @@ public: Arrangement_blue_2>; public: - Comparison_result operator()(const X_monotone_curve_2 & xcv1, - const X_monotone_curve_2 & xcv2, + Comparison_result operator()(const Point_2 & p, + const X_monotone_curve_2 & xcv, Arr_curve_end ce) const { - return m_base->compare_x_near_boundary_2_object()(xcv1.base(), - xcv2.base(), - ce); + return m_base->compare_x_near_boundary_2_object()(p.base(), + xcv.base(), ce); + } + + Comparison_result operator()(const X_monotone_curve_2 & xcv1, + Arr_curve_end ce1, + const X_monotone_curve_2 & xcv2, + Arr_curve_end ce2) const + { + return m_base->compare_x_near_boundary_2_object()(xcv1.base(), ce1, + xcv2.base(), ce2); } }; @@ -1372,6 +1131,9 @@ public: { return Compare_x_near_boundary_2(m_base_traits); } + + // TODO Compare_x_on_boundary_2 + // TODO Is_on_y_identification_2 }; diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h index bf5649fb480..2c9d9934d05 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Arr_vert_decomp_sl_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2007 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h index 40f910cef91..3dd4b9f67bd 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Basic_sweep_line_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2008,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005, 2009 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h index 9017b6f91d1..a47d138a437 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_debug.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h index e6a85771cee..7130314c6c0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h index f3ed1f771b0..6c6ad23ad4b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h index 21d0a2abda7..a7e54926697 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_2_visitors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 1997 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h index 8f1edcf8abe..884fe25b345 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_curve_pair.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2006 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_event.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_event.h index 865892812ef..2a1b531b851 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_event.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_event.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -58,14 +58,14 @@ public: typedef typename Traits_2::Point_2 Point_2; // should be ok, as Traits_ has already extended by Basic_sweep_line - typedef typename internal::Arr_complete_left_side_category< Traits_2 >::Category - Left_side_category; - typedef typename internal::Arr_complete_bottom_side_category< Traits_2 >::Category - Bottom_side_category; - typedef typename internal::Arr_complete_top_side_category< Traits_2 >::Category - Top_side_category; - typedef typename internal::Arr_complete_right_side_category< Traits_2 >::Category - Right_side_category; + typedef typename internal::Arr_complete_left_side_tag< Traits_2 >::Tag + Arr_left_side_category; + typedef typename internal::Arr_complete_bottom_side_tag< Traits_2 >::Tag + Arr_bottom_side_category; + typedef typename internal::Arr_complete_top_side_tag< Traits_2 >::Tag + Arr_top_side_category; + typedef typename internal::Arr_complete_right_side_tag< Traits_2 >::Tag + Arr_right_side_category; typedef Subcurve_ Subcurve; //template diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_functors.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_functors.h index 7ca75d65e1f..bdba37ec04e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_functors.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_functors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -51,10 +51,10 @@ public: typedef typename Traits_2::X_monotone_curve_2 X_monotone_curve_2; // should be ok, as Traits_2 is supposed to be the adaptor - typedef typename Traits_2::Left_side_category Left_side_category; - typedef typename Traits_2::Bottom_side_category Bottom_side_category; - typedef typename Traits_2::Top_side_category Top_side_category; - typedef typename Traits_2::Right_side_category Right_side_category; + typedef typename Traits_2::Arr_left_side_category Arr_left_side_category; + typedef typename Traits_2::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Traits_2::Arr_top_side_category Arr_top_side_category; + typedef typename Traits_2::Arr_right_side_category Arr_right_side_category; private: @@ -136,7 +136,7 @@ public: // given point and this curve end. Arr_curve_end ind = _curve_end(e2); Comparison_result res = - m_traits->compare_x_point_curve_end_2_object()(pt, e2->curve(), ind); + m_traits->compare_x_near_boundary_2_object()(pt, e2->curve(), ind); if (res != EQUAL) return (res); @@ -206,9 +206,9 @@ private: { // Both defined on the left boundary - compare them there. CGAL_assertion (ind == ARR_MIN_END); - - return - m_traits->compare_y_curve_ends_2_object() (cv, e2->curve(), ind); + + return (m_traits->compare_y_near_boundary_2_object() (cv, e2->curve(), + ind)); } // The curve end is obviously smaller. @@ -221,9 +221,9 @@ private: { // Both defined on the right boundary - compare them there. CGAL_assertion (ind == ARR_MAX_END); - - return (m_traits->compare_y_curve_ends_2_object() (cv, e2->curve(), - ind)); + + return (m_traits->compare_y_near_boundary_2_object() (cv, e2->curve(), + ind)); } // The curve end is obviously larger. @@ -242,15 +242,13 @@ private: CGAL_assertion (ps_y != ARR_INTERIOR); Comparison_result res; - Arr_curve_end ind2 = _curve_end(e2); - // Act according to the boundary sign of the event. if (e2->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY) { - // Compare the x-positions of the two entities. - res = m_traits->compare_x_curve_ends_2_object() (cv, ind, - e2->curve(), ind2); + res = m_traits->compare_x_near_boundary_2_object() (cv, ind, e2->curve(), + _curve_end(e2)); + if (res != EQUAL) return (res); @@ -266,8 +264,9 @@ private: if (e2->parameter_space_in_y() == ARR_TOP_BOUNDARY) { // Compare the x-positions of the two entities. - res = m_traits->compare_x_curve_ends_2_object() (cv, ind, - e2->curve(), ind2); + res = m_traits->compare_x_near_boundary_2_object() (cv, ind, e2->curve(), + _curve_end(e2)); + if (res != EQUAL) return (res); @@ -283,7 +282,7 @@ private: // If we reached here, e2 is not a boundary event and is associated with // a valid point. We compare the x-position of this point with the curve // end. - res = m_traits->compare_x_point_curve_end_2_object() (e2->point(), cv, ind); + res = m_traits->compare_x_near_boundary_2_object() (e2->point(), cv, ind); if (res != EQUAL) return (CGAL::opposite(res)); diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h index 736569f95c7..47824623b6e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2/Sweep_line_subcurve.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2_algorithms.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2_algorithms.h index 11757fe80d9..1eed6caad2d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_2_algorithms.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_2_algorithms.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -69,10 +69,10 @@ struct Default_arr_traits -struct Default_arr_traits > +template +struct Default_arr_traits > { - typedef CGAL::Arr_rational_function_traits_2 Traits; + typedef CGAL::Arr_rational_arc_traits_2 Traits; }; template diff --git a/Arrangement_on_surface_2/include/CGAL/Sweep_line_empty_visitor.h b/Arrangement_on_surface_2/include/CGAL/Sweep_line_empty_visitor.h index 7d8d41a35e6..af8c4ad9845 100644 --- a/Arrangement_on_surface_2/include/CGAL/Sweep_line_empty_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Sweep_line_empty_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under 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 1c29c7962d1..95a0c271463 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 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h index 6ef5934a68b..2703e65cecf 100644 --- a/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005,2007,2009,2010,2011 Tel-Aviv University (Israel). +// Copyright (c) 2005 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h index 2b5d0ea3a8d..5c3a0da5b3b 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h @@ -112,43 +112,43 @@ protected: Violation_type m_violation_tested; /*! Collect the data depending on obj_t */ - bool read_input(std::ifstream& is, Read_object_type obj_t); + bool read_input(std::ifstream & is , Read_object_type obj_t); /*! Execute a command */ - virtual bool exec(std::istringstream& str_stream, - const std::string& str_command, - bool& result) = 0; + virtual bool exec(std::istringstream & str_stream, + const std::string & str_command, + bool & result) = 0; /*! Perform the test */ - bool perform(std::ifstream& is); + bool perform(std::ifstream & is); /*! Skip comments */ - void skip_comments(std::ifstream& is, char* one_line); + void skip_comments(std::ifstream & is, char * one_line); - std::string remove_blanks(char* str); + std::string remove_blanks(char * str); - bool get_expected_boolean(std::istringstream& str_stream); + bool get_expected_boolean(std::istringstream & str_stream); - unsigned int get_expected_enum(std::istringstream& str_stream); + unsigned int get_expected_enum(std::istringstream & str_stream); - bool translate_boolean(std::string& str_value); + bool translate_boolean(std::string & str_value); - unsigned int translate_enumerator(std::string& str_value); + unsigned int translate_enumerator(std::string & str_value); std::pair - translate_int_or_text(std::string& str_value); + translate_int_or_text(std::string & str_value); std::pair - get_next_input(std::istringstream& str_stream); + get_next_input(std::istringstream & str_stream); /*! Print curve-end string */ - const char* curve_end_str(CGAL::Arr_curve_end cv_end) const + const char * curve_end_str(CGAL::Arr_curve_end cv_end) const { return (cv_end == CGAL::ARR_MIN_END) ? "MIN_END" : "MAX_END"; } /*! Print an error message */ - void print_error(const std::string& msg) + void print_error(const std::string & msg) { std::cerr << "Error: " << msg.c_str() << std::endl; } @@ -161,7 +161,7 @@ protected: } /*! Print information */ - void print_info(std::string& info, + void print_info(std::string & info, bool start_line = true, bool end_line = true) { if (start_line && !m_eol_printed) print_eol(); @@ -177,15 +177,15 @@ protected: } /*! Print expected answer and real answer */ - void print_answer(const std::string& exp, const std::string& real, - const std::string& str) + void print_answer(const std::string & exp, const std::string & real, + const std::string & str) { print_info(std::string("Expected ").append(str).append(": ").append(exp)); print_info(std::string("Obtained ").append(str).append(": ").append(real)); } /*! Compare two points */ - bool compare_points(const Point_2& exp_answer, const Point_2& real_answer) + bool compare_points(const Point_2 & exp_answer, const Point_2 & real_answer) { typename Traits::Equal_2 equal = m_traits.equal_2_object(); if (equal(exp_answer, real_answer)) return true; @@ -197,8 +197,8 @@ protected: } /*! Compare two x-monotone curves */ - bool compare_curves(const X_monotone_curve_2& exp_answer, - const X_monotone_curve_2& real_answer) + bool compare_curves(const X_monotone_curve_2 & exp_answer, + const X_monotone_curve_2 & real_answer) { typename Traits::Equal_2 equal = m_traits.equal_2_object(); if (equal(exp_answer, real_answer)) return true; @@ -210,9 +210,9 @@ protected: } /*! Compare two unsigned int */ - bool compare(const unsigned int& exp_answer, - const unsigned int& real_answer, - const char* str = "result") + bool compare(const unsigned int & exp_answer, + const unsigned int & real_answer, + const char * str = "result") { if (exp_answer == real_answer) return true; std::string exp_answer_str = boost::lexical_cast(exp_answer); @@ -222,98 +222,74 @@ protected: } template - bool read_point(stream& is, Point_2&); + bool read_point(stream & is, Point_2 &); template - bool read_xcurve(stream& is, X_monotone_curve_2&); + bool read_xcurve(stream & is, X_monotone_curve_2 &); template - bool read_curve(stream& is, Curve_2&); + bool read_curve(stream & is, Curve_2 &); //@{ /*! Test Compare_x_2 */ - bool compare_x_wrapper(std::istringstream& ); - - /*! Test Compare_x_near_limit_2 - */ - bool compare_x_near_limit_wrapper(std::istringstream& ); - bool compare_x_near_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_x_near_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); - - /*! Test Compare_x_at_limit_2 - */ - bool compare_x_at_limit_wrapper(std::istringstream& ); - bool compare_x_at_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_x_at_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); + bool compare_x_wrapper(std::istringstream & ); /*! Test Compare_x_near_boundary_2 */ - bool compare_x_near_boundary_wrapper(std::istringstream& ); - bool compare_x_near_boundary_wrapper_imp(std::istringstream&, + bool compare_x_near_boundary_wrapper(std::istringstream & ); + bool compare_x_near_boundary_wrapper_imp(std::istringstream &, CGAL::Arr_use_dummy_tag); - bool compare_x_near_boundary_wrapper_imp(std::istringstream&, + bool compare_x_near_boundary_wrapper_imp(std::istringstream &, CGAL::Arr_use_traits_tag); - /*! Test Compare_x_on_boundary_2 - */ - bool compare_x_on_boundary_wrapper(std::istringstream& ); - bool compare_x_on_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_x_on_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); - /*! Test Compare_y_near_boundary_2 */ - bool compare_y_near_boundary_wrapper(std::istringstream& ); - bool compare_y_near_boundary_wrapper_imp(std::istringstream&, + bool compare_y_near_boundary_wrapper(std::istringstream & ); + bool compare_y_near_boundary_wrapper_imp(std::istringstream &, CGAL::Arr_use_dummy_tag); - bool compare_y_near_boundary_wrapper_imp(std::istringstream&, + bool compare_y_near_boundary_wrapper_imp(std::istringstream &, CGAL::Arr_use_traits_tag); /*! Test Parameter_space_in_x_2 */ - bool parameter_space_in_x_wrapper(std::istringstream& ); - bool parameter_space_in_x_wrapper_imp(std::istringstream&, + bool parameter_space_in_x_wrapper(std::istringstream & ); + bool parameter_space_in_x_wrapper_imp(std::istringstream &, CGAL::Arr_use_dummy_tag); - bool parameter_space_in_x_wrapper_imp(std::istringstream&, + bool parameter_space_in_x_wrapper_imp(std::istringstream &, CGAL::Arr_use_traits_tag); /*! Test Parameter_space_in_y_2 */ - bool parameter_space_in_y_wrapper(std::istringstream& ); - bool parameter_space_in_y_wrapper_imp(std::istringstream&, + bool parameter_space_in_y_wrapper(std::istringstream & ); + bool parameter_space_in_y_wrapper_imp(std::istringstream &, CGAL::Arr_use_dummy_tag); - bool parameter_space_in_y_wrapper_imp(std::istringstream&, + bool parameter_space_in_y_wrapper_imp(std::istringstream &, CGAL::Arr_use_traits_tag); /*! Compare_xy_2 */ - bool compare_xy_wrapper(std::istringstream& line); + bool compare_xy_wrapper(std::istringstream & line); /*! Tests Construct_min_vertex_2. * Degenerate case: vertical curve. */ - bool min_vertex_wrapper(std::istringstream& line); + bool min_vertex_wrapper(std::istringstream & line); /*! Tests Construct_max_vertex_2. * Degenerate case: vertical curve. */ - bool max_vertex_wrapper(std::istringstream& line); + bool max_vertex_wrapper(std::istringstream & line); - bool is_vertical_wrapper(std::istringstream& line); + bool is_vertical_wrapper(std::istringstream & line); /*! Tests Compare_y_at_x_2. * Return the location of the given point with respect to the input curve. * Degenerate cases: The point is an endpoint of the curve. * The curve is vertical. */ - bool compare_y_at_x_wrapper(std::istringstream& line); + bool compare_y_at_x_wrapper(std::istringstream & line); /*! Tests Compare_y_at_x_left_2. * Compare the y value of two x-monotone curves immediately to the left @@ -322,10 +298,10 @@ protected: * The curves coincide and vertical. * One of the curves is vertical. */ - bool compare_y_at_x_left_wrapper(std::istringstream& line); - bool compare_y_at_x_left_wrapper_imp(std::istringstream& line, + bool compare_y_at_x_left_wrapper(std::istringstream & line); + bool compare_y_at_x_left_wrapper_imp(std::istringstream & line, CGAL::Tag_false); - bool compare_y_at_x_left_wrapper_imp(std::istringstream& line, + bool compare_y_at_x_left_wrapper_imp(std::istringstream & line, CGAL::Tag_true); /*! Tests Compare_y_at_x_right_2. @@ -335,17 +311,17 @@ protected: * The curves coincide and vertical. * One of the curves is vertical. */ - bool compare_y_at_x_right_wrapper(std::istringstream& line); + bool compare_y_at_x_right_wrapper(std::istringstream & line); /*! Tests Equal_2::operator()(Point_2, Point_2). * Check whether two points are the same. */ - bool equal_points_wrapper(std::istringstream& line); + bool equal_points_wrapper(std::istringstream & line); /*! Tests Equal_2::operator()(X_monotone_curve_2, X_monotone_curve_2). * Check whether two x-monotone curves are the same. */ - bool equal_curves_wrapper(std::istringstream& line); + bool equal_curves_wrapper(std::istringstream & line); /*! Tests Make_x_monotone_2. * Cut the given curve into x-monotone subcurves and insert them into the @@ -354,7 +330,7 @@ protected: * segment is vertical. Both firt and last are vertical. An internal segment * is vertical. */ - bool make_x_monotone_wrapper(std::istringstream& line); + bool make_x_monotone_wrapper(std::istringstream & line); /*! Tests Intersect_2. * Find the intersections of the two given curves and insert them into the @@ -364,44 +340,44 @@ protected: * left) endpoint of one curve and the first (resp. last) segment of the * other coincide. */ - bool intersect_wrapper(std::istringstream& line); + bool intersect_wrapper(std::istringstream & line); /*! Tests Split_2. * Split a given x-monotone curve at a given point into two sub-curves. * Degenerate cases for polylines: the point and a polyline internal point * coincides. */ - bool split_wrapper(std::istringstream& line); + bool split_wrapper(std::istringstream & line); /*! Tests Are_mergeable_2. * Check whether it is possible to merge two given x-monotone curves. */ - bool are_mergeable_wrapper(std::istringstream& line); - bool are_mergeable_wrapper_imp(std::istringstream& line, CGAL::Tag_false); - bool are_mergeable_wrapper_imp(std::istringstream& line, CGAL::Tag_true); + bool are_mergeable_wrapper(std::istringstream & line); + bool are_mergeable_wrapper_imp(std::istringstream & line, CGAL::Tag_false); + bool are_mergeable_wrapper_imp(std::istringstream & line, CGAL::Tag_true); /*! Tests Merge_2. * Merge two given x-monotone curves into a single curve. */ - bool merge_wrapper(std::istringstream& line); - bool merge_wrapper_imp(std::istringstream& line, CGAL::Tag_false); - bool merge_wrapper_imp(std::istringstream& line, CGAL::Tag_true); + bool merge_wrapper(std::istringstream & line); + bool merge_wrapper_imp(std::istringstream & line, CGAL::Tag_false); + bool merge_wrapper_imp(std::istringstream & line, CGAL::Tag_true); /*! Tests Approximate_2. * Return an approximation of a point coordinate. */ - bool approximate_wrapper(std::istringstream& line); + bool approximate_wrapper(std::istringstream & line); /*! tests Construct_x_monotone_curve_2. * Return an x-monotone curve connecting the two given endpoints. */ - bool construct_x_monotone_curve_wrapper(std::istringstream& line); + bool construct_x_monotone_curve_wrapper(std::istringstream & line); //@} public: /*! Constructor */ - Traits_base_test(int argc, char* argv[]); + Traits_base_test(int argc, char * argv[]); /*! Destructor */ virtual ~Traits_base_test(); @@ -415,7 +391,7 @@ public: * Accepts test data file name. */ template -Traits_base_test::Traits_base_test(int argc, char* argv[]) : +Traits_base_test::Traits_base_test(int argc, char * argv[]) : m_eol_printed(true), m_abort_on_error(false) // run all tests { @@ -499,7 +475,7 @@ bool Traits_base_test::start() } template -bool Traits_base_test::read_input(std::ifstream& is, +bool Traits_base_test::read_input(std::ifstream & is, Read_object_type obj_t) { char one_line[1024]; @@ -549,7 +525,7 @@ bool Traits_base_test::read_input(std::ifstream& is, * command arguments. */ template -bool Traits_base_test::perform(std::ifstream& is) +bool Traits_base_test::perform(std::ifstream & is) { bool test_result = true; std::cout << "Performing test : traits type is " << m_traitstype @@ -647,8 +623,8 @@ bool Traits_base_test::perform(std::ifstream& is) * end of the line */ template -void Traits_base_test::skip_comments(std::ifstream& is, - char* one_line) +void Traits_base_test::skip_comments(std::ifstream & is, + char * one_line) { while (!is.eof()) { is.getline(one_line, 1024); @@ -659,7 +635,7 @@ void Traits_base_test::skip_comments(std::ifstream& is, /*! */ template -std::string Traits_base_test::remove_blanks(char* str) +std::string Traits_base_test::remove_blanks(char * str) { std::string result = ""; bool flag = false; @@ -685,7 +661,7 @@ std::string Traits_base_test::remove_blanks(char* str) */ template bool Traits_base_test:: -translate_boolean(std::string& str_value) +translate_boolean(std::string & str_value) { if (str_value == "TRUE") return true; return false; @@ -695,7 +671,7 @@ translate_boolean(std::string& str_value) */ template unsigned int -Traits_base_test::translate_enumerator(std::string& str_value) +Traits_base_test::translate_enumerator(std::string & str_value) { if (str_value == "LARGER" ) { return static_cast(CGAL::LARGER); @@ -712,7 +688,7 @@ Traits_base_test::translate_enumerator(std::string& str_value) */ template std::pair::Enum_type, unsigned int> -Traits_base_test::translate_int_or_text(std::string& str_value) +Traits_base_test::translate_int_or_text(std::string & str_value) { if (str_value == "MIN_END" ) { return std::pair(CURVE_END,CGAL::ARR_MIN_END); @@ -755,7 +731,7 @@ Traits_base_test::translate_int_or_text(std::string& str_value) template bool Traits_base_test:: -get_expected_boolean(std::istringstream& str_stream) +get_expected_boolean(std::istringstream & str_stream) { char buff[1024]; str_stream.getline( buff, 1024, '.'); @@ -768,7 +744,7 @@ get_expected_boolean(std::istringstream& str_stream) */ template unsigned int -Traits_base_test::get_expected_enum(std::istringstream& str_stream) +Traits_base_test::get_expected_enum(std::istringstream & str_stream) { char buff[1024]; str_stream.getline(buff, 1024, '.'); @@ -781,7 +757,7 @@ Traits_base_test::get_expected_enum(std::istringstream& str_stream) */ template std::pair::Enum_type, unsigned int> -Traits_base_test::get_next_input(std::istringstream& str_stream) +Traits_base_test::get_next_input(std::istringstream & str_stream) { char buff[1024]; do { @@ -795,7 +771,7 @@ Traits_base_test::get_next_input(std::istringstream& str_stream) template template bool Traits_base_test:: -read_point(stream& is, typename T_Traits::Point_2& p) +read_point(stream & is, typename T_Traits::Point_2 & p) { Basic_number_type x, y; is >> x >> y; @@ -806,7 +782,7 @@ read_point(stream& is, typename T_Traits::Point_2& p) template template bool Traits_base_test:: -read_xcurve(stream& is, typename T_Traits::X_monotone_curve_2& xcv) +read_xcurve(stream & is, typename T_Traits::X_monotone_curve_2 & xcv) { Basic_number_type x1, y1, x2, y2; is >> x1 >> y1 >> x2 >> y2; @@ -820,8 +796,8 @@ read_xcurve(stream& is, typename T_Traits::X_monotone_curve_2& xcv) template template bool -Traits_base_test::read_curve(stream& is, - typename T_Traits::Curve_2& cv) +Traits_base_test::read_curve(stream & is, + typename T_Traits::Curve_2 & cv) { Basic_number_type x1, y1, x2, y2; is >> x1 >> y1 >> x2 >> y2; @@ -832,7 +808,8 @@ Traits_base_test::read_curve(stream& is, return true; } -#if TEST_TRAITS == CORE_CONIC_TRAITS +#if TEST_TRAITS == CORE_CONIC_TRAITS || \ + TEST_TRAITS == RATIONAL_ARC_TRAITS // conic traits and rational traits use same number // type CORE:Expr so this code can be shared @@ -842,7 +819,7 @@ Traits_base_test::read_curve(stream& is, template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) +Traits_base_test::read_point(stream & is, Point_2 & p) { Rational rat_x,rat_y; is >> rat_x >> rat_y; @@ -860,7 +837,7 @@ Traits_base_test::read_point(stream& is, Point_2& p) template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) +Traits_base_test::read_point(stream & is, Point_2 & p) { Basic_number_type x, y, z; is >> x >> y >> z; @@ -872,7 +849,7 @@ Traits_base_test::read_point(stream& is, Point_2& p) template <> template bool -Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) +Traits_base_test::read_xcurve(stream & is, X_monotone_curve_2 & xcv) { Point_2 p1,p2; read_point(is, p1); @@ -886,7 +863,7 @@ Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is, Curve_2& cv) +Traits_base_test::read_curve(stream & is, Curve_2 & cv) { Point_2 p1, p2; read_point(is, p1); @@ -899,34 +876,22 @@ Traits_base_test::read_curve(stream& is, Curve_2& cv) #endif #if TEST_TRAITS == RATIONAL_ARC_TRAITS -/*! Read a point */ +/*! Read a xcurve */ template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) +Traits_base_test::read_xcurve(stream & is, X_monotone_curve_2 & xcv) { - Traits::Construct_point_2 construct_point_2 = m_traits.construct_point_2_object(); - - Rational x, y; - is >> x >> y ; - p = construct_point_2(x, y); + Curve_2 tmp_cv; + if (!read_curve(is,tmp_cv)) + return false; + xcv=X_monotone_curve_2(tmp_cv); return true; } template -bool read_rational_to_real(stream& is, Algebraic_real_1& r) -{ - static Traits::Algebraic_kernel_d_1 algebraic_kernel; - Rational rat; - is >> rat; - r = algebraic_kernel.construct_algebraic_real_1_object()(rat); - return true; -} - - -template -bool read_coefficients(stream& is, Rat_vector& coeffs) +bool read_coefficients(stream & is, Rat_vector & coeffs) { unsigned int num_coeffs; Rational rat; @@ -939,119 +904,14 @@ bool read_coefficients(stream& is, Rat_vector& coeffs) return true; } -/*! Read a xcurve */ -template <> -template -bool -Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) -{ - //curve constructor - const Traits::Construct_x_monotone_curve_2 construct_x_monotone_curve_2 - = m_traits.construct_x_monotone_curve_2_object(); - - // Get the arc type: - Rat_vector p_coeffs, q_coeffs; - Algebraic_real_1 src, trg; - int dir = 0; - char type; - is >> type; - if (type == 'a' || type == 'A') - { - //Default constructor - xcv = X_monotone_curve_2(); - return true; - } - else if (type == 'b' || type == 'B') - { - //Constructor of a whole polynomial curve - if (read_coefficients(is,p_coeffs)) - xcv = construct_x_monotone_curve_2(p_coeffs.begin(),p_coeffs.end()); - else - return false; - return true; - } - else if (type == 'c' || type == 'C') - { - //Constructor of a polynomial ray - if (!read_coefficients(is,p_coeffs)) - return false; - if (!read_rational_to_real(is,src)) - return false; - is >> dir; - xcv = construct_x_monotone_curve_2(p_coeffs.begin(),p_coeffs.end(), src, (dir == 0 ? false : true)); - return true; - } - else if (type == 'd' || type == 'D') - { - //Constructor of a polynomial arc - if (!read_coefficients(is,p_coeffs)) - return false; - if (!read_rational_to_real(is,src)) - return false; - if (!read_rational_to_real(is,trg)) - return false; - xcv = construct_x_monotone_curve_2(p_coeffs.begin(),p_coeffs.end(), src, trg); - return true; - } - else if (type == 'e' || type == 'E') - { - //Constructor of a whole rational function - if (!read_coefficients(is,p_coeffs)) - return false; - if (!read_coefficients(is,q_coeffs)) - return false; - xcv = construct_x_monotone_curve_2(p_coeffs.begin(),p_coeffs.end(), q_coeffs.begin(),q_coeffs.end()); - return true; - } - else if (type == 'f' || type == 'F') - { - //Constructor of a ray of a rational function - if (!read_coefficients(is,p_coeffs)) - return false; - if (!read_coefficients(is,q_coeffs)) - return false; - if (!read_rational_to_real(is,src)) - return false; - is >> dir; - xcv =construct_x_monotone_curve_2(p_coeffs.begin(),p_coeffs.end(), - q_coeffs.begin(),q_coeffs.end(), - src, (dir == 0 ? false : true)); - return true; - } - else if (type == 'g' || type == 'G') - { - //Constructor of a bounded rational arc - if (!read_coefficients(is, p_coeffs)) - return false; - if (!read_coefficients(is, q_coeffs)) - return false; - if (!read_rational_to_real(is,src)) - return false; - if (!read_rational_to_real(is,trg)) - return false; - - xcv = construct_x_monotone_curve_2( p_coeffs.begin(),p_coeffs.end(), - q_coeffs.begin(),q_coeffs.end(), - src, trg); - return true; - } - // If we reached here, we have an unknown rational arc type: - std::cerr << "Illegal rational arc type specification: " << type << "." - << std::endl; - return (false); -} - /*! Read a curve */ template <> template -bool Traits_base_test::read_curve(stream& is, Curve_2& cv) -{ - //curve constructor - const Traits::Construct_curve_2 construct_curve_2 = m_traits.construct_curve_2_object(); - +bool Traits_base_test::read_curve(stream & is, Curve_2 & cv) +{ // Get the arc type: Rat_vector p_coeffs, q_coeffs; - Algebraic_real_1 src, trg; + Algebraic src, trg; int dir = 0; char type; is >> type; @@ -1065,7 +925,7 @@ bool Traits_base_test::read_curve(stream& is, Curve_2& cv) { //Constructor of a whole polynomial curve if (read_coefficients(is,p_coeffs)) - cv = construct_curve_2(p_coeffs.begin(),p_coeffs.end()); + cv = Curve_2(p_coeffs); else return false; return true; @@ -1075,10 +935,8 @@ bool Traits_base_test::read_curve(stream& is, Curve_2& cv) //Constructor of a polynomial ray if (!read_coefficients(is,p_coeffs)) return false; - if (!read_rational_to_real(is,src)) - return false; - is >> dir; - cv = construct_curve_2(p_coeffs.begin(),p_coeffs.end(), src, (dir == 0 ? false : true)); + is >> src >> dir; + cv = Curve_2(p_coeffs ,src ,(dir == 0 ? false : true)); return true; } else if (type == 'd' || type == 'D') @@ -1086,11 +944,8 @@ bool Traits_base_test::read_curve(stream& is, Curve_2& cv) //Constructor of a polynomial arc if (!read_coefficients(is,p_coeffs)) return false; - if (!read_rational_to_real(is,src)) - return false; - if (!read_rational_to_real(is,trg)) - return false; - cv = construct_curve_2(p_coeffs.begin(),p_coeffs.end(), src, trg); + is >> src >> trg; + cv = Curve_2(p_coeffs ,src ,trg); return true; } else if (type == 'e' || type == 'E') @@ -1100,7 +955,7 @@ bool Traits_base_test::read_curve(stream& is, Curve_2& cv) return false; if (!read_coefficients(is,q_coeffs)) return false; - cv = construct_curve_2(p_coeffs.begin(),p_coeffs.end(), q_coeffs.begin(),q_coeffs.end()); + cv = Curve_2(p_coeffs ,q_coeffs); return true; } else if (type == 'f' || type == 'F') @@ -1110,28 +965,19 @@ bool Traits_base_test::read_curve(stream& is, Curve_2& cv) return false; if (!read_coefficients(is,q_coeffs)) return false; - if (!read_rational_to_real(is,src)) - return false; - is >> dir; - cv =construct_curve_2(p_coeffs.begin(),p_coeffs.end(), - q_coeffs.begin(),q_coeffs.end(), - src, (dir == 0 ? false : true)); + is >> src >> dir; + cv = Curve_2(p_coeffs ,q_coeffs ,src ,(dir == 0 ? false : true)); return true; } else if (type == 'g' || type == 'G') { //Constructor of a bounded rational arc - if (!read_coefficients(is, p_coeffs)) + if (!read_coefficients(is,p_coeffs)) return false; - if (!read_coefficients(is, q_coeffs)) + if (!read_coefficients(is,q_coeffs)) return false; - if (!read_rational_to_real(is,src)) - return false; - if (!read_rational_to_real(is,trg)) - return false; - cv = construct_curve_2(p_coeffs.begin(),p_coeffs.end(), - q_coeffs.begin(),q_coeffs.end(), - src, trg); + is >> src >> trg; + cv = Curve_2(p_coeffs ,q_coeffs ,src ,trg); return true; } // If we reached here, we have an unknown rational arc type: @@ -1148,7 +994,7 @@ template <> template bool Traits_base_test:: -read_xcurve(stream& is, Traits::X_monotone_curve_2& xcv) +read_xcurve(stream & is, Traits::X_monotone_curve_2 & xcv) { unsigned int num_points; is >> num_points; @@ -1170,7 +1016,7 @@ read_xcurve(stream& is, Traits::X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is, Traits::Curve_2& cv) +Traits_base_test::read_curve(stream & is, Traits::Curve_2 & cv) { unsigned int num_points; is >> num_points; @@ -1182,8 +1028,10 @@ Traits_base_test::read_curve(stream& is, Traits::Curve_2& cv) Point_2 p(x, y); points.push_back(p); } - cv = CGAL::Arr_polyline_traits_2::Curve_2(points.begin(), - points.end()); + cv = + CGAL:: + Arr_polyline_traits_2::Curve_2(points.begin(), + points.end()); return true; } @@ -1192,7 +1040,7 @@ Traits_base_test::read_curve(stream& is, Traits::Curve_2& cv) template <> template bool -Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) +Traits_base_test::read_xcurve(stream & is, X_monotone_curve_2 & xcv) { is >> xcv; return true; @@ -1201,7 +1049,7 @@ Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is, Curve_2& cv) +Traits_base_test::read_curve(stream & is, Curve_2 & cv) { is >> cv; return true; @@ -1211,7 +1059,7 @@ Traits_base_test::read_curve(stream& is, Curve_2& cv) /*! */ template -bool read_orientation(stream& is, CGAL::Orientation& orient) +bool read_orientation(stream & is, CGAL::Orientation & orient) { int i_orient; is >> i_orient; @@ -1222,7 +1070,7 @@ bool read_orientation(stream& is, CGAL::Orientation& orient) /*! */ template -bool read_app_point(stream& is, Point_2& p) +bool read_app_point(stream & is, Point_2 & p) { double x, y; is >> x >> y; @@ -1232,8 +1080,8 @@ bool read_app_point(stream& is, Point_2& p) /*! */ template -bool read_orientation_and_end_points(stream& is, CGAL::Orientation& orient, - Point_2& source, Point_2& target) +bool read_orientation_and_end_points(stream & is, CGAL::Orientation & orient, + Point_2 & source, Point_2 & target) { // Read the orientation. if (!read_orientation(is, orient)) return false; @@ -1246,9 +1094,9 @@ bool read_orientation_and_end_points(stream& is, CGAL::Orientation& orient, /*! Read a circle or an ellipse */ template -bool read_ellipse(stream& is, bool& is_circle, Rat_circle& circle, - Rational& r, Rational& s, - Rational& t, Rational& u, Rational& v, Rational& w) +bool read_ellipse(stream & is, bool & is_circle, Rat_circle & circle, + Rational & r, Rational & s, + Rational & t, Rational & u, Rational & v, Rational & w) { // Read the ellipse (using the format "a b x0 y0"): // 2 2 @@ -1276,7 +1124,7 @@ bool read_ellipse(stream& is, bool& is_circle, Rat_circle& circle, /*! */ template -bool read_partial_ellipse(stream& is, Curve& cv) +bool read_partial_ellipse(stream & is, Curve & cv) { bool is_circle; // Is this a circle. Rat_circle circle; @@ -1295,7 +1143,7 @@ bool read_partial_ellipse(stream& is, Curve& cv) /*! */ template -bool read_full_ellipse(stream& is, Curve& cv) +bool read_full_ellipse(stream & is, Curve & cv) { bool is_circle; // Is this a circle. Rat_circle circle; @@ -1310,7 +1158,7 @@ bool read_full_ellipse(stream& is, Curve& cv) /*! Read a hyperbola */ template -bool read_hyperbola(stream& is, Curve& cv) +bool read_hyperbola(stream & is, Curve & cv) { // Read the hyperbola (using the format "a b x0 y0"): // 2 2 @@ -1340,7 +1188,7 @@ bool read_hyperbola(stream& is, Curve& cv) /*! Read a hyperbola */ template -bool read_parabola(stream& is, Curve& cv) +bool read_parabola(stream & is, Curve & cv) { // Read the parabola (using the format "c x0 y0"): // @@ -1369,7 +1217,7 @@ bool read_parabola(stream& is, Curve& cv) /*! */ template -bool read_segment(stream& is, Curve& cv) +bool read_segment(stream & is, Curve & cv) { // Read a segment, given by its endpoints (x1,y1) and (x2,y2); @@ -1387,7 +1235,7 @@ bool read_segment(stream& is, Curve& cv) /*! */ template -bool read_general_arc(stream& is, Curve& cv) +bool read_general_arc(stream & is, Curve & cv) { // Read a general conic, given by its coefficients . Rational r, s, t, u, v, w; // The conic coefficients. @@ -1416,7 +1264,7 @@ bool read_general_arc(stream& is, Curve& cv) is >> r2 >> s2 >> t2 >> u2 >> v2 >> w2; // Create the conic arc. - cv = Curve (r, s, t, u, v, w, orient, + cv = Curve (r, s, t, u, v ,w, orient, app_source, r1, s1, t1, u1, v1, w1, app_target, r2, s2, t2, u2, v2, w2); return true; @@ -1424,7 +1272,7 @@ bool read_general_arc(stream& is, Curve& cv) /*! */ template -bool read_general_curve(stream& is, Curve& cv) +bool read_general_curve(stream & is, Curve & cv) { Rational r, s, t, u, v, w; // The conic coefficients. // Read a general conic, given by its coefficients . @@ -1444,7 +1292,7 @@ template <> template bool Traits_base_test:: -read_xcurve(stream& is, X_monotone_curve_2& xcv) +read_xcurve(stream & is, X_monotone_curve_2 & xcv) { Curve_2 tmp_cv; if (!read_curve(is,tmp_cv)) @@ -1457,7 +1305,7 @@ read_xcurve(stream& is, X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is, Curve_2& cv) +Traits_base_test::read_curve(stream & is, Curve_2 & cv) { // Get the arc type: char type; @@ -1509,10 +1357,10 @@ Traits_base_test::read_curve(stream& is, Curve_2& cv) #elif TEST_TRAITS == CIRCLE_SEGMENT_TRAITS template -bool read_ort_point(stream& is, Point_2& p) +bool read_ort_point(stream & is, Point_2 & p) { bool is_rat; - typename Point_2::CoordNT ort_x, ort_y; + typename Point_2::CoordNT ort_x , ort_y; Number_type alpha,beta,gamma; is >> is_rat; if (is_rat) @@ -1536,7 +1384,7 @@ bool read_ort_point(stream& is, Point_2& p) is >> alpha >> beta >> gamma; ort_y=Point_2::CoordNT(alpha,beta,gamma); } - p = Point_2(ort_x, ort_y); + p = Point_2(ort_x , ort_y); return true; } @@ -1544,7 +1392,7 @@ bool read_ort_point(stream& is, Point_2& p) template <> template bool -Traits_base_test::read_xcurve(stream& is,X_monotone_curve_2& xcv) +Traits_base_test::read_xcurve(stream & is,X_monotone_curve_2 & xcv) { bool ans=true; char type; @@ -1556,7 +1404,7 @@ Traits_base_test::read_xcurve(stream& is,X_monotone_curve_2& xcv) is >> l; ans &= read_ort_point(is, ps); ans &= read_ort_point(is, pt); - xcv=X_monotone_curve_2(l, ps, pt); + xcv=X_monotone_curve_2(l,ps,pt); return ans; } else if (type == 'y' || type == 'Y') @@ -1573,7 +1421,7 @@ Traits_base_test::read_xcurve(stream& is,X_monotone_curve_2& xcv) is >> c; ans &= read_ort_point(is, ps); ans &= read_ort_point(is, pt); - xcv=X_monotone_curve_2(c, ps, pt, c.orientation()); + xcv=X_monotone_curve_2(c,ps,pt,c.orientation()); return ans; } // If we reached here, we have an unknown conic type: @@ -1586,7 +1434,7 @@ Traits_base_test::read_xcurve(stream& is,X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is,Curve_2& cv) +Traits_base_test::read_curve(stream & is,Curve_2 & cv) { bool ans=true; char type; @@ -1672,7 +1520,7 @@ Traits_base_test::read_curve(stream& is,Curve_2& cv) template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) +Traits_base_test::read_point(stream & is, Point_2 & p) { Rational rat_x,rat_y; is >> rat_x >> rat_y; @@ -1685,7 +1533,7 @@ Traits_base_test::read_point(stream& is, Point_2& p) template <> template bool -Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) +Traits_base_test::read_xcurve(stream & is, X_monotone_curve_2 & xcv) { std::list x_objs; std::list::const_iterator xoit; @@ -1693,10 +1541,8 @@ Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) is >> tmp_cv; Rational B_psx = Rational(tmp_cv.control_point(0).x()); Rational B_psy = Rational(tmp_cv.control_point(0).y()); - Rational B_ptx = - Rational(tmp_cv.control_point(tmp_cv.number_of_control_points()-1).x()); - Rational B_pty = - Rational(tmp_cv.control_point(tmp_cv.number_of_control_points()-1).y()); + Rational B_ptx = Rational(tmp_cv.control_point(tmp_cv.number_of_control_points()-1).x()); + Rational B_pty = Rational(tmp_cv.control_point(tmp_cv.number_of_control_points()-1).y()); Point_2 B_ps(B_psx, B_psy); Point_2 B_pt(B_ptx, B_pty); Traits::Make_x_monotone_2 make_x_monotone = @@ -1712,7 +1558,7 @@ Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is, Curve_2& cv) +Traits_base_test::read_curve(stream & is, Curve_2 & cv) { is >> cv; return true; @@ -1724,7 +1570,7 @@ Traits_base_test::read_curve(stream& is, Curve_2& cv) /*! Read an arc point */ template -bool read_arc_point(stream& is, typename T_Traits::Point_2& p) +bool read_arc_point(stream & is, typename T_Traits::Point_2 & p) { Basic_number_type x, y; is >> x >> y; @@ -1749,7 +1595,7 @@ bool is_deg_2(char c) TEST_TRAITS == CIRCULAR_LINE_ARC_TRAITS template -Circular_kernel::Line_arc_2 read_line(char type, stream& is) +Circular_kernel::Line_arc_2 read_line(char type, stream & is) { if (type == 'z' || type == 'Z') { @@ -1793,7 +1639,7 @@ Circular_kernel::Line_arc_2 read_line(char type, stream& is) #if TEST_TRAITS == CIRCULAR_ARC_TRAITS || \ TEST_TRAITS == CIRCULAR_LINE_ARC_TRAITS template -Circular_kernel::Circular_arc_2 read_arc(char type,stream& is) +Circular_kernel::Circular_arc_2 read_arc(char type,stream & is) { if (type == 'b' || type == 'B') { @@ -1839,7 +1685,7 @@ Circular_kernel::Circular_arc_2 read_arc(char type,stream& is) template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) +Traits_base_test::read_point(stream & is, Point_2 & p) { return read_arc_point(is, p); } @@ -1848,7 +1694,7 @@ Traits_base_test::read_point(stream& is, Point_2& p) template <> template bool -Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) +Traits_base_test::read_xcurve(stream & is, X_monotone_curve_2 & xcv) { // Get the arc type: char type; @@ -1866,7 +1712,7 @@ Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is, Curve_2& cv) +Traits_base_test::read_curve(stream & is, Curve_2 & cv) { // Get the arc type: char type; @@ -1885,7 +1731,7 @@ Traits_base_test::read_curve(stream& is, Curve_2& cv) template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) +Traits_base_test::read_point(stream & is, Point_2 & p) { return read_arc_point(is, p); } @@ -1894,14 +1740,14 @@ Traits_base_test::read_point(stream& is, Point_2& p) template <> template bool -Traits_base_test::read_xcurve(stream& is,X_monotone_curve_2& xcv) +Traits_base_test::read_xcurve(stream & is,X_monotone_curve_2 & xcv) { // Get the arc type: char type; is >> type; if (is_deg_2(type)) { - xcv=read_arc(type, is); + xcv=read_arc(type,is); return true; } return false; @@ -1911,7 +1757,7 @@ Traits_base_test::read_xcurve(stream& is,X_monotone_curve_2& xcv) template <> template bool -Traits_base_test::read_curve(stream& is, Curve_2& cv) +Traits_base_test::read_curve(stream & is, Curve_2 & cv) { // Get the arc type: char type; @@ -1925,7 +1771,7 @@ Traits_base_test::read_curve(stream& is, Curve_2& cv) } else if (is_deg_2(type)) { - cv=read_arc(type, is); + cv=read_arc(type,is); return true; } return false; @@ -1937,7 +1783,7 @@ Traits_base_test::read_curve(stream& is, Curve_2& cv) template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) +Traits_base_test::read_point(stream & is, Point_2 & p) { return read_arc_point(is, p); } @@ -1946,7 +1792,7 @@ Traits_base_test::read_point(stream& is, Point_2& p) template <> template bool -Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) +Traits_base_test::read_xcurve(stream & is,X_monotone_curve_2 & xcv) { // Get the arc type: char type; @@ -1956,7 +1802,7 @@ Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) return true; } else if (is_deg_2(type)) { - xcv = X_monotone_curve_2(read_arc(type, is)); + xcv = X_monotone_curve_2(read_arc(type,is)); return true; } return false; @@ -1965,7 +1811,7 @@ Traits_base_test::read_xcurve(stream& is, X_monotone_curve_2& xcv) /*! Read a general circular-line curve */ template <> template -bool Traits_base_test::read_curve(stream& is, Curve_2& cv) +bool Traits_base_test::read_curve(stream & is, Curve_2 & cv) { // Get the arc type: char type; @@ -1977,11 +1823,11 @@ bool Traits_base_test::read_curve(stream& is, Curve_2& cv) return true; } else if (is_deg_1(type)) { - cv = Curve_2(read_line(type, is)); + cv = Curve_2(read_line(type,is)); return true; } else if (is_deg_2(type)) { - cv = read_arc(type, is); + cv = read_arc(type,is); return true; } return false; @@ -1999,7 +1845,7 @@ bool Traits_base_test::read_curve(stream& is, Curve_2& cv) template <> template bool -Traits_base_test::read_point(stream& is, Point_2& p) { +Traits_base_test::read_point(stream & is, Point_2 & p) { Traits traits; Traits::Construct_point_2 construct_point_2 = traits.construct_point_2_object(); @@ -2009,25 +1855,25 @@ Traits_base_test::read_point(stream& is, Point_2& p) { case 'i': { int x=0,y=0; is >> x >> y; - p=construct_point_2(x, y); + p=construct_point_2(x,y); break; } case 'b': { Traits::Bound x,y; is >> x >> y; - p=construct_point_2(x, y); + p=construct_point_2(x,y); break; } case 'c': { - Traits::Coefficient x, y; + Traits::Coefficient x,y; is >> x >> y; - p=construct_point_2(x, y); + p=construct_point_2(x,y); break; } case 'a': { - Traits::Algebraic_real_1 x, y; + Traits::Algebraic_real_1 x,y; is >> x >> y; - p=construct_point_2(x, y); + p=construct_point_2(x,y); break; } case 's': { @@ -2036,11 +1882,11 @@ Traits_base_test::read_point(stream& is, Point_2& p) { Traits::X_monotone_curve_2 xcv; CGAL::swallow(is,'('); CGAL_assertion_code(bool check=) - read_xcurve(is, xcv); + read_xcurve(is,xcv); CGAL_assertion(check); CGAL::swallow(is,')'); - p=construct_point_2(x, xcv); + p=construct_point_2(x,xcv); break; } case 'g': { @@ -2052,11 +1898,11 @@ Traits_base_test::read_point(stream& is, Point_2& p) { CGAL_assertion(check); int arcno=0; is >> arcno; - p=construct_point_2(x, c, arcno); + p=construct_point_2(x,c,arcno); break; } default: { - std::cout << "Expected i, b, c, a, s, or g, but got \"" << type << "\"" + std::cout << "Expected i,b,c,a,s, or g , but got \"" << type << "\"" << std::endl; return false; } @@ -2066,76 +1912,76 @@ Traits_base_test::read_point(stream& is, Point_2& p) { template <> template -bool Traits_base_test::read_xcurve(stream& is, - Traits::X_monotone_curve_2& xcv) -{ +bool +Traits_base_test::read_xcurve(stream & is, + Traits::X_monotone_curve_2 & xcv) { Traits traits; Traits::Construct_x_monotone_segment_2 construct_segment_2 = traits.construct_x_monotone_segment_2_object(); char type; is >> type; switch(type) { - case '1': { - Curve_2 cv; - Point_2 end_left,end_right; - CGAL_assertion_code(bool check=) - read_curve(is,cv); - CGAL_assertion(check); - CGAL::swallow(is,'('); - CGAL_assertion_code(check=) - read_point(is,end_left); - CGAL_assertion(check); - CGAL::swallow(is,')'); - CGAL::swallow(is,'('); - CGAL_assertion_code(check=) - read_point(is,end_right); - CGAL_assertion(check); - CGAL::swallow(is,')'); - std::vector xcvs; - construct_segment_2(cv, end_left, end_right, std::back_inserter(xcvs)); - CGAL_assertion(xcvs.size() == 1); - xcv = xcvs[0]; - break; + case '1': { + Curve_2 cv; + Point_2 end_left,end_right; + CGAL_assertion_code(bool check=) + read_curve(is,cv); + CGAL_assertion(check); + CGAL::swallow(is,'('); + CGAL_assertion_code(check=) + read_point(is,end_left); + CGAL_assertion(check); + CGAL::swallow(is,')'); + CGAL::swallow(is,'('); + CGAL_assertion_code(check=) + read_point(is,end_right); + CGAL_assertion(check); + CGAL::swallow(is,')'); + std::vector xcvs; + construct_segment_2(cv,end_left,end_right,std::back_inserter(xcvs)); + CGAL_assertion(xcvs.size()==1); + xcv=xcvs[0]; + break; + } + case '2': { + Curve_2 cv; + Point_2 p; + CGAL_assertion_code(bool check=) + read_curve(is,cv); + CGAL_assertion(check); + CGAL::swallow(is,'('); + CGAL_assertion_code(check=) + read_point(is,p); + CGAL_assertion(check); + CGAL::swallow(is,')'); + std::string site_of_p_string; + Traits::Site_of_point site_of_p; + is >> site_of_p_string; + if(site_of_p_string=="MIN_ENDPOINT") { + site_of_p=Traits::MIN_ENDPOINT; + } else if(site_of_p_string=="MAX_ENDPOINT") { + site_of_p=Traits::MAX_ENDPOINT; + } else { + CGAL_assertion(site_of_p_string=="POINT_IN_INTERIOR"); + site_of_p=Traits::POINT_IN_INTERIOR; } - case '2': { - Curve_2 cv; - Point_2 p; - CGAL_assertion_code(bool check=) - read_curve(is,cv); - CGAL_assertion(check); - CGAL::swallow(is,'('); - CGAL_assertion_code(check=) - read_point(is,p); - CGAL_assertion(check); - CGAL::swallow(is,')'); - std::string site_of_p_string; - Traits::Site_of_point site_of_p; - is >> site_of_p_string; - if (site_of_p_string=="MIN_ENDPOINT") { - site_of_p=Traits::MIN_ENDPOINT; - } else if (site_of_p_string=="MAX_ENDPOINT") { - site_of_p=Traits::MAX_ENDPOINT; - } else { - CGAL_assertion(site_of_p_string=="POINT_IN_INTERIOR"); - site_of_p=Traits::POINT_IN_INTERIOR; - } - std::vector xcvs; - construct_segment_2(cv, p, site_of_p, std::back_inserter(xcvs)); - CGAL_assertion(xcvs.size() == 1); - xcv = xcvs[0]; - break; - } - default: { - std::cout << "Expected 1 or 2, but got \"" << type << "\"" << std::endl; - return false; - } + std::vector xcvs; + construct_segment_2(cv,p,site_of_p,std::back_inserter(xcvs)); + CGAL_assertion(xcvs.size()==1); + xcv=xcvs[0]; + break; + } + default: { + std::cout << "Expected 1 or 2, but got \"" << type << "\"" << std::endl; + return false; + } } return true; } template <> template -bool Traits_base_test::read_curve(stream& is, Curve_2& cv) { +bool Traits_base_test::read_curve(stream & is, Curve_2 & cv) { Traits traits; Traits::Polynomial_2 p; Traits::Construct_curve_2 construct_curve_2 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h index 0f466fd1440..554a0f171d4 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h @@ -21,7 +21,7 @@ #include "Traits_base_test.h" /*! Traits test */ -template +template class Traits_test : public Traits_base_test { private: typedef T_Traits Traits; @@ -33,14 +33,14 @@ private: typedef typename Traits::Curve_2 Curve_2; /*! A map between (strings) commands and (member functions) operations */ - typedef bool(Traits_test::* Wrapper)(std::istringstream&); + typedef bool (Traits_test::* Wrapper)(std::istringstream &); typedef std::map Wrapper_map; typedef typename Wrapper_map::iterator Wrapper_iter; Wrapper_map m_wrappers; - virtual bool exec(std::istringstream& str_stream, - const std::string& str_command, - bool& result) + virtual bool exec(std::istringstream & str_stream, + const std::string & str_command, + bool & result) { Wrapper_iter wi = m_wrappers.find(str_command); str_stream.clear(); @@ -56,30 +56,30 @@ private: /*! Test Compare_x_2 */ - bool compare_x_wrapper(std::istringstream&); + bool compare_x_wrapper(std::istringstream &); /*! Compare_xy_2 */ - bool compare_xy_wrapper(std::istringstream& line); + bool compare_xy_wrapper(std::istringstream & line); /*! Tests Construct_min_vertex_2. * Degenerate case: vertical curve. */ - bool min_vertex_wrapper(std::istringstream& line); + bool min_vertex_wrapper(std::istringstream & line); /*! Tests Construct_max_vertex_2. * Degenerate case: vertical curve. */ - bool max_vertex_wrapper(std::istringstream& line); + bool max_vertex_wrapper(std::istringstream & line); - bool is_vertical_wrapper(std::istringstream& line); + bool is_vertical_wrapper(std::istringstream & line); /*! Tests Compare_y_at_x_2. * Return the location of the given point with respect to the input curve. * Degenerate cases: The point is an endpoint of the curve. * The curve is vertical. */ - bool compare_y_at_x_wrapper(std::istringstream& line); + bool compare_y_at_x_wrapper(std::istringstream & line); /*! Tests Compare_y_at_x_left_2. * Compare the y value of two x-monotone curves immediately to the left @@ -88,10 +88,10 @@ private: * The curves coincide and vertical. * One of the curves is vertical. */ - bool compare_y_at_x_left_wrapper(std::istringstream& line); - bool compare_y_at_x_left_wrapper_imp(std::istringstream& line, + bool compare_y_at_x_left_wrapper(std::istringstream & line); + bool compare_y_at_x_left_wrapper_imp(std::istringstream & line, CGAL::Tag_false); - bool compare_y_at_x_left_wrapper_imp(std::istringstream& line, + bool compare_y_at_x_left_wrapper_imp(std::istringstream & line, CGAL::Tag_true); /*! Tests Compare_y_at_x_right_2. @@ -101,17 +101,17 @@ private: * The curves coincide and vertical. * One of the curves is vertical. */ - bool compare_y_at_x_right_wrapper(std::istringstream& line); + bool compare_y_at_x_right_wrapper(std::istringstream & line); /*! Tests Equal_2::operator()(Point_2, Point_2). * Check whether two points are the same. */ - bool equal_points_wrapper(std::istringstream& line); + bool equal_points_wrapper(std::istringstream & line); /*! Tests Equal_2::operator()(X_monotone_curve_2, X_monotone_curve_2). * Check whether two x-monotone curves are the same. */ - bool equal_curves_wrapper(std::istringstream& line); + bool equal_curves_wrapper(std::istringstream & line); /*! Tests Make_x_monotone_2. * Cut the given curve into x-monotone subcurves and insert them into the @@ -120,7 +120,7 @@ private: * segment is vertical. Both firt and last are vertical. An internal segment * is vertical. */ - bool make_x_monotone_wrapper(std::istringstream& line); + bool make_x_monotone_wrapper(std::istringstream & line); /*! Tests Intersect_2. * Find the intersections of the two given curves and insert them into the @@ -130,38 +130,38 @@ private: * left) endpoint of one curve and the first (resp. last) segment of the * other coincide. */ - bool intersect_wrapper(std::istringstream& line); + bool intersect_wrapper(std::istringstream & line); /*! Tests Split_2. * Split a given x-monotone curve at a given point into two sub-curves. * Degenerate cases for polylines: the point and a polyline internal point * coincides. */ - bool split_wrapper(std::istringstream& line); + bool split_wrapper(std::istringstream & line); /*! Tests Are_mergeable_2. * Check whether it is possible to merge two given x-monotone curves. */ - bool are_mergeable_wrapper(std::istringstream& line); - bool are_mergeable_wrapper_imp(std::istringstream& line, CGAL::Tag_false); - bool are_mergeable_wrapper_imp(std::istringstream& line, CGAL::Tag_true); + bool are_mergeable_wrapper(std::istringstream & line); + bool are_mergeable_wrapper_imp(std::istringstream & line, CGAL::Tag_false); + bool are_mergeable_wrapper_imp(std::istringstream & line, CGAL::Tag_true); /*! Tests Merge_2. * Merge two given x-monotone curves into a single curve. */ - bool merge_wrapper(std::istringstream& line); - bool merge_wrapper_imp(std::istringstream& line, CGAL::Tag_false); - bool merge_wrapper_imp(std::istringstream& line, CGAL::Tag_true); + bool merge_wrapper(std::istringstream & line); + bool merge_wrapper_imp(std::istringstream & line, CGAL::Tag_false); + bool merge_wrapper_imp(std::istringstream & line, CGAL::Tag_true); /*! Tests Approximate_2. * Return an approximation of a point coordinate. */ - bool approximate_wrapper(std::istringstream& line); + bool approximate_wrapper(std::istringstream & line); /*! tests Construct_x_monotone_curve_2. * Return an x-monotone curve connecting the two given endpoints. */ - bool construct_x_monotone_curve_wrapper(std::istringstream& line); + bool construct_x_monotone_curve_wrapper(std::istringstream & line); // ///////////////////////////////////////////////////////////////////////// // boundary-specific functors: @@ -171,21 +171,26 @@ private: /*! Test Parameter_space_in_x_2 */ - bool parameter_space_in_x_wrapper(std::istringstream&); - bool parameter_space_in_x_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool parameter_space_in_x_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); + bool parameter_space_in_x_curve_end_wrapper(std::istringstream &); + bool parameter_space_in_x_curve_end_wrapper_imp(std::istringstream &, + CGAL::Arr_use_dummy_tag); + bool parameter_space_in_x_curve_end_wrapper_imp(std::istringstream &, + CGAL::Arr_use_traits_tag); + + // TODO Parameter_space_in_x_2(pt) + // TODO Parameter_space_in_x_2(xcv) /*! Test Compare_y_near_boundary_2 */ - bool compare_y_near_boundary_wrapper(std::istringstream&); - bool compare_y_near_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_y_near_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); + bool compare_y_near_boundary_curve_ends_wrapper(std::istringstream &); + bool compare_y_near_boundary_curve_ends_wrapper_imp(std::istringstream &, + CGAL::Arr_use_dummy_tag); + bool compare_y_near_boundary_curve_ends_wrapper_imp(std::istringstream &, + CGAL::Arr_use_traits_tag); - // TODO Is_on_y_identification_2 + // TODO Compare_y_on_boundary_2(pt1, pt2) + // TODO Is_on_y_identification_2(pt) + // TODO Is_on_y_identification_2(xcv) // ------------------------------------------------------------------------- @@ -193,45 +198,40 @@ private: /*! Test Parameter_space_in_y_2 */ - bool parameter_space_in_y_wrapper(std::istringstream&); - bool parameter_space_in_y_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool parameter_space_in_y_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); - - /*! Test Compare_x_near_limit_2 - */ - bool compare_x_near_limit_wrapper(std::istringstream&); - bool compare_x_near_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_x_near_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); - - /*! Test Compare_x_at_limit_2 - */ - bool compare_x_at_limit_wrapper(std::istringstream&); - bool compare_x_at_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_x_at_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); + bool parameter_space_in_y_curve_end_wrapper(std::istringstream &); + bool parameter_space_in_y_curve_end_wrapper_imp(std::istringstream &, + CGAL::Arr_use_dummy_tag); + bool parameter_space_in_y_curve_end_wrapper_imp(std::istringstream &, + CGAL::Arr_use_traits_tag); + // TODO Parameter_space_in_y_2(pt) + // TODO Parameter_space_in_y_2(xcv) + /*! Test Compare_x_near_boundary_2 */ - bool compare_x_near_boundary_wrapper(std::istringstream&); - bool compare_x_near_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_x_near_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); - - /*! Test Compare_x_on_boundary_2 - */ - bool compare_x_on_boundary_wrapper(std::istringstream&); - bool compare_x_on_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag); - bool compare_x_on_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_traits_tag); + bool compare_x_near_boundary_point_curve_end_wrapper(std::istringstream &); + bool compare_x_near_boundary_point_curve_end_wrapper_imp( + std::istringstream &, + CGAL::Arr_use_dummy_tag + ); + bool compare_x_near_boundary_point_curve_end_wrapper_imp( + std::istringstream &, + CGAL::Arr_use_traits_tag + ); - // TODO Is_on_x_identification_2 + bool compare_x_near_boundary_curve_ends_wrapper(std::istringstream &); + bool compare_x_near_boundary_curve_ends_wrapper_imp( + std::istringstream &, + CGAL::Arr_use_dummy_tag + ); + bool compare_x_near_boundary_curve_ends_wrapper_imp( + std::istringstream &, + CGAL::Arr_use_traits_tag + ); + + // TODO Compare_x_on_boundary_2(pt1, pt2) + // TODO Is_on_x_identification_2(pt) + // TODO Is_on_x_identification_2(xcv) //@} @@ -247,7 +247,7 @@ public: * Constructor. * Accepts test data file name. */ -template +template Traits_test::Traits_test(int argc, char * argv[]) : Traits_base_test(argc, argv) { @@ -291,40 +291,40 @@ Traits_test::Traits_test(int argc, char * argv[]) : // left-right m_wrappers[std::string("parameter_space_x")] = - &Traits_test::parameter_space_in_x_wrapper; - m_wrappers[std::string("compare_y_near_boundary")] = - &Traits_test::compare_y_near_boundary_wrapper; - - // TODO Is_on_y_identification_2 + &Traits_test::parameter_space_in_x_curve_end_wrapper; + // TODO Parameter_space_in_x_2(pt) + // TODO Parameter_space_in_x_2(xcv) + m_wrappers[std::string("boundary_near_y")] = + &Traits_test::compare_y_near_boundary_curve_ends_wrapper; + // TODO Compare_y_on_boundary_2(pt1, pt2) + // TODO Is_on_y_identification_2(pt) + // TODO Is_on_y_identification_2(xcv) // bottom-top m_wrappers[std::string("parameter_space_y")] = - &Traits_test::parameter_space_in_y_wrapper; - m_wrappers[std::string("compare_x_near_limit")] = - &Traits_test::compare_x_near_limit_wrapper; - m_wrappers[std::string("compare_x_at_limit")] = - &Traits_test::compare_x_at_limit_wrapper; - - m_wrappers[std::string("compare_x_near_boundary")] = - &Traits_test::compare_x_near_boundary_wrapper; - m_wrappers[std::string("compare_x_on_boundary")] = - &Traits_test::compare_x_on_boundary_wrapper; - - // TODO Is_on_x_identification_2 + &Traits_test::parameter_space_in_y_curve_end_wrapper; + // TODO Parameter_space_in_y_2(pt) + // TODO Parameter_space_in_y_2(xcv) + m_wrappers[std::string("boundary_near_x")] = + &Traits_test::compare_x_near_boundary_curve_ends_wrapper; + // TODO split boundary_near_x in point+curve-end + curve-ends + // TODO Compare_x_on_boundary_2(pt1, pt2) + // TODO Is_on_x_identification_2(pt) + // TODO Is_on_x_identification_2(xcv) } /*! * Destructor. */ -template +template Traits_test::~Traits_test() {} /*! Test Compare_x_2 */ -template -bool Traits_test::compare_x_wrapper(std::istringstream& str_stream) +template +bool Traits_test::compare_x_wrapper(std::istringstream & str_stream) { unsigned int id1, id2; str_stream >> id1 >> id2; @@ -340,8 +340,8 @@ bool Traits_test::compare_x_wrapper(std::istringstream& str_stream) /*! Test Compare_xy_2 */ -template -bool Traits_test::compare_xy_wrapper(std::istringstream& str_stream) +template +bool Traits_test::compare_xy_wrapper(std::istringstream & str_stream) { unsigned int id1, id2; str_stream >> id1 >> id2; @@ -358,12 +358,12 @@ bool Traits_test::compare_xy_wrapper(std::istringstream& str_stream) /*! Tests Construct_min_vertex_2. * Degenerate case: vertical curve. */ -template -bool Traits_test::min_vertex_wrapper(std::istringstream& str_stream) +template +bool Traits_test::min_vertex_wrapper(std::istringstream & str_stream) { unsigned int id1, id2; str_stream >> id1 >> id2; - Point_2& exp_answer = this->m_points[id2]; + Point_2 & exp_answer = this->m_points[id2]; std::cout << "Test: min_vertex( " << this->m_xcurves[id1] << " ) ? " << exp_answer << " "; @@ -375,12 +375,12 @@ bool Traits_test::min_vertex_wrapper(std::istringstream& str_stream) /*! Tests Construct_max_vertex_2. * Degenerate case: vertical curve. */ -template -bool Traits_test::max_vertex_wrapper(std::istringstream& str_stream) +template +bool Traits_test::max_vertex_wrapper(std::istringstream & str_stream) { unsigned int id1, id2; str_stream >> id1 >> id2; - Point_2& exp_answer = this->m_points[id2]; + Point_2 & exp_answer = this->m_points[id2]; std::cout << "Test: max_vertex( " << this->m_xcurves[id1] << " ) ? " << exp_answer << " "; @@ -389,9 +389,9 @@ bool Traits_test::max_vertex_wrapper(std::istringstream& str_stream) return this->compare_points(exp_answer, real_answer); } -template +template bool -Traits_test::is_vertical_wrapper(std::istringstream& str_stream) +Traits_test::is_vertical_wrapper(std::istringstream & str_stream) { unsigned int id; str_stream >> id; @@ -408,9 +408,9 @@ Traits_test::is_vertical_wrapper(std::istringstream& str_stream) * Degenerate cases: The point is an endpoint of the curve. * The curve is vertical. */ -template +template bool -Traits_test::compare_y_at_x_wrapper(std::istringstream& str_stream) +Traits_test::compare_y_at_x_wrapper(std::istringstream & str_stream) { unsigned int id1, id2; str_stream >> id1 >> id2; @@ -431,28 +431,29 @@ Traits_test::compare_y_at_x_wrapper(std::istringstream& str_stream) * The curves coincide and vertical. * One of the curves is vertical. */ -template +template bool Traits_test:: -compare_y_at_x_left_wrapper(std::istringstream& str_stream) +compare_y_at_x_left_wrapper(std::istringstream & str_stream) { typedef typename T_Traits::Has_left_category Has_left_category; return compare_y_at_x_left_wrapper_imp(str_stream, Has_left_category()); } -template +template bool Traits_test:: -compare_y_at_x_left_wrapper_imp(std::istringstream&, CGAL::Tag_false) +compare_y_at_x_left_wrapper_imp (std::istringstream &, CGAL::Tag_false) { CGAL_error(); return false; } -template +template bool Traits_test:: -compare_y_at_x_left_wrapper_imp(std::istringstream& str_stream, CGAL::Tag_true) +compare_y_at_x_left_wrapper_imp(std::istringstream & str_stream, + CGAL::Tag_true) { unsigned int id1, id2, id3; str_stream >> id1 >> id2 >> id3; @@ -473,10 +474,10 @@ compare_y_at_x_left_wrapper_imp(std::istringstream& str_stream, CGAL::Tag_true) * The curves coincide and vertical. * One of the curves is vertical. */ -template +template bool Traits_test:: -compare_y_at_x_right_wrapper(std::istringstream& str_stream) +compare_y_at_x_right_wrapper(std::istringstream & str_stream) { unsigned int id1, id2, id3; str_stream >> id1 >> id2 >> id3; @@ -494,9 +495,9 @@ compare_y_at_x_right_wrapper(std::istringstream& str_stream) /*! Tests Equal_2::operator()(Point_2, Point_2). * Check whether two points are the same. */ -template +template bool -Traits_test::equal_points_wrapper(std::istringstream& str_stream) +Traits_test::equal_points_wrapper(std::istringstream & str_stream) { unsigned int id1, id2; str_stream >> id1 >> id2; @@ -511,9 +512,9 @@ Traits_test::equal_points_wrapper(std::istringstream& str_stream) /*! Tests Equal_2::operator()(X_monotone_curve_2, X_monotone_curve_2). * Check whether two x-monotone curves are the same. */ -template +template bool -Traits_test::equal_curves_wrapper(std::istringstream& str_stream) +Traits_test::equal_curves_wrapper(std::istringstream & str_stream) { unsigned int id1, id2; str_stream >> id1 >> id2; @@ -532,9 +533,9 @@ Traits_test::equal_curves_wrapper(std::istringstream& str_stream) * segment is vertical. Both firt and last are vertical. An internal segment * is vertical. */ -template +template bool -Traits_test::make_x_monotone_wrapper(std::istringstream& str_stream) +Traits_test::make_x_monotone_wrapper(std::istringstream & str_stream) { typedef T_Traits Traits; typedef typename Traits::Point_2 Point_2; @@ -590,8 +591,8 @@ Traits_test::make_x_monotone_wrapper(std::istringstream& str_stream) * left) endpoint of one curve and the first (resp. last) segment of the * other coincide. */ -template -bool Traits_test::intersect_wrapper(std::istringstream& str_stream) +template +bool Traits_test::intersect_wrapper(std::istringstream & str_stream) { typedef T_Traits Traits; typedef typename Traits::Point_2 Point_2; @@ -631,7 +632,7 @@ bool Traits_test::intersect_wrapper(std::istringstream& str_stream) typedef std::pair Point_2_pair; const Point_2_pair * pt_pair_ptr = CGAL::object_cast (&(object_vec[i])); - CGAL_assertion(pt_pair_ptr != NULL); + CGAL_assertion (pt_pair_ptr != NULL); if (!this->compare(type, exp_type, "type")) return false; if (!this->compare_points(this->m_points[id], (*pt_pair_ptr).first)) return false; @@ -647,8 +648,8 @@ bool Traits_test::intersect_wrapper(std::istringstream& str_stream) * Degenerate cases for polylines: the point and a polyline internal point * coincides. */ -template -bool Traits_test::split_wrapper(std::istringstream& str_stream) +template +bool Traits_test::split_wrapper(std::istringstream & str_stream) { typedef T_Traits Traits; typedef typename Traits::Point_2 Point_2; @@ -658,8 +659,8 @@ bool Traits_test::split_wrapper(std::istringstream& str_stream) unsigned int id1, id2, id3, id4; str_stream >> id1 >> id2 >> id3 >> id4; X_monotone_curve_2 cv1, cv2; - std::cout << "Test: split( " << this->m_xcurves[id1] << "," - << this->m_points[id2] << " ) ? "; + std::cout << "Test: split( " << this->m_xcurves[id1] << "," << this->m_points[id2] + << " ) ? "; this->m_traits.split_2_object()(this->m_xcurves[id1], this->m_points[id2], cv1, cv2); @@ -670,26 +671,26 @@ bool Traits_test::split_wrapper(std::istringstream& str_stream) /*! Tests Are_mergeable_2. * Check whether it is possible to merge two given x-monotone curves. */ -template +template bool -Traits_test::are_mergeable_wrapper(std::istringstream& str_stream) +Traits_test::are_mergeable_wrapper(std::istringstream & str_stream) { typedef typename T_Traits::Has_merge_category Has_merge_category; return are_mergeable_wrapper_imp(str_stream, Has_merge_category()); } -template +template bool Traits_test:: -are_mergeable_wrapper_imp(std::istringstream&, CGAL::Tag_false) +are_mergeable_wrapper_imp(std::istringstream &, CGAL::Tag_false) { CGAL_error(); return false; } -template +template bool Traits_test:: -are_mergeable_wrapper_imp(std::istringstream& str_stream, CGAL::Tag_true) +are_mergeable_wrapper_imp(std::istringstream & str_stream, CGAL::Tag_true) { unsigned int id1, id2; str_stream >> id1 >> id2; @@ -706,23 +707,23 @@ are_mergeable_wrapper_imp(std::istringstream& str_stream, CGAL::Tag_true) /*! Tests Merge_2. * Merge two given x-monotone curves into a single curve. */ -template -bool Traits_test::merge_wrapper(std::istringstream& str_stream) +template +bool Traits_test::merge_wrapper(std::istringstream & str_stream) { typedef typename T_Traits::Has_merge_category Has_merge_category; return merge_wrapper_imp(str_stream, Has_merge_category()); } -template -bool Traits_test::merge_wrapper_imp(std::istringstream&, +template +bool Traits_test::merge_wrapper_imp(std::istringstream &, CGAL::Tag_false) { CGAL_error(); return false; } -template -bool Traits_test::merge_wrapper_imp(std::istringstream& str_stream, +template +bool Traits_test::merge_wrapper_imp(std::istringstream & str_stream, CGAL::Tag_true) { typedef T_Traits Traits; @@ -741,9 +742,9 @@ bool Traits_test::merge_wrapper_imp(std::istringstream& str_stream, /*! Tests Approximate_2. * Return an approximation of a point coordinate. */ -template +template bool -Traits_test::approximate_wrapper(std::istringstream& ) +Traits_test::approximate_wrapper(std::istringstream & ) { return false; } @@ -751,9 +752,9 @@ Traits_test::approximate_wrapper(std::istringstream& ) /*! tests Construct_x_monotone_curve_2. * Return an x-monotone curve connecting the two given endpoints. */ -template +template bool Traits_test:: -construct_x_monotone_curve_wrapper(std::istringstream& ) +construct_x_monotone_curve_wrapper(std::istringstream & ) { return false; } @@ -768,32 +769,40 @@ construct_x_monotone_curve_wrapper(std::istringstream& ) /*! Test Parameter_space_in_x_2 */ -template +template bool Traits_test:: -parameter_space_in_x_wrapper(std::istringstream& str_stream) +parameter_space_in_x_curve_end_wrapper(std::istringstream & str_stream) { - typedef typename CGAL::internal::Arr_complete_left_side_category< T_Traits >::Category - Left_side_category; - typedef typename CGAL::internal::Arr_complete_right_side_category< T_Traits >::Category - Right_side_category; - typedef CGAL::internal::Arr_left_right_implementation_dispatch - LR; - typedef typename LR::Parameter_space_in_x_2_curve_end_tag Psx_tag; - return parameter_space_in_x_wrapper_imp(str_stream, Psx_tag()); + typedef typename CGAL::internal::Arr_complete_left_side_tag< T_Traits >::Tag + Arr_left_side_category; + typedef typename CGAL::internal::Arr_complete_right_side_tag< T_Traits >::Tag + Arr_right_side_category; + + typedef CGAL::internal::Arr_left_right_implementation_dispatch< + Arr_left_side_category, Arr_right_side_category > LR; + + typedef typename LR::Parameter_space_in_x_2_curve_end_tag + Psx_2_curve_end_tag; + + return parameter_space_in_x_curve_end_wrapper_imp( + str_stream, Psx_2_curve_end_tag() + ); } -template +template bool Traits_test:: -parameter_space_in_x_wrapper_imp(std::istringstream&, CGAL::Arr_use_dummy_tag) +parameter_space_in_x_curve_end_wrapper_imp( + std::istringstream &, CGAL::Arr_use_dummy_tag +) { CGAL_error(); return false; } -template +template bool Traits_test:: -parameter_space_in_x_wrapper_imp(std::istringstream& str_stream, - CGAL::Arr_use_traits_tag) +parameter_space_in_x_curve_end_wrapper_imp (std::istringstream & str_stream, + CGAL::Arr_use_traits_tag) { CGAL::Arr_parameter_space exp_answer, real_answer; unsigned int id; @@ -810,7 +819,7 @@ parameter_space_in_x_wrapper_imp(std::istringstream& str_stream, next_input = this->get_next_input(str_stream); CGAL_assertion(next_input.first == Base::PARAMETER_SPACE); } else if (next_input.first == Base::PARAMETER_SPACE) { - std::cout << "Test: parameter_space_in_x( " << this->m_points[id] << " ) ? "; + std::cout << "Test: parameter_space_x( " << this->m_points[id] << " ) ? "; } else { CGAL_error(); return false; @@ -829,34 +838,45 @@ parameter_space_in_x_wrapper_imp(std::istringstream& str_stream, return this->compare(exp_answer, real_answer); } +// TODO Parameter_space_in_x_2(pt) +// TODO Parameter_space_in_x_2(xcv) + /*! Test Compare_y_near_boundary_2 */ -template +template bool Traits_test:: -compare_y_near_boundary_wrapper(std::istringstream& str_stream) +compare_y_near_boundary_curve_ends_wrapper(std::istringstream & str_stream) { - typedef typename CGAL::internal::Arr_complete_left_side_category< T_Traits >::Category - Left_side_category; - typedef typename CGAL::internal::Arr_complete_right_side_category< T_Traits >::Category - Right_side_category; - typedef CGAL::internal::Arr_left_right_implementation_dispatch - LR; - typedef typename LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_tag; - return compare_y_near_boundary_wrapper_imp(str_stream, Cmp_tag()); + typedef typename CGAL::internal::Arr_complete_left_side_tag< T_Traits >::Tag + Arr_left_side_category; + typedef typename CGAL::internal::Arr_complete_right_side_tag< T_Traits >::Tag + Arr_right_side_category; + + typedef CGAL::internal::Arr_left_right_implementation_dispatch< + Arr_left_side_category, Arr_right_side_category > LR; + + typedef typename LR::Compare_y_near_boundary_2_curve_ends_tag + Cmp_y_nb_2_curve_ends_tag; + + return compare_y_near_boundary_curve_ends_wrapper_imp( + str_stream, + Cmp_y_nb_2_curve_ends_tag() + ); } -template +template bool Traits_test:: -compare_y_near_boundary_wrapper_imp(std::istringstream&, CGAL::Arr_use_dummy_tag) +compare_y_near_boundary_curve_ends_wrapper_imp(std::istringstream &, + CGAL::Arr_use_dummy_tag) { CGAL_error(); return false; } -template +template bool Traits_test:: -compare_y_near_boundary_wrapper_imp(std::istringstream& str_stream, - CGAL::Arr_use_traits_tag) +compare_y_near_boundary_curve_ends_wrapper_imp (std::istringstream & str_stream, + CGAL::Arr_use_traits_tag) { unsigned int id1, id2; str_stream >> id1 >> id2; @@ -865,7 +885,7 @@ compare_y_near_boundary_wrapper_imp(std::istringstream& str_stream, CGAL_assertion(next_input.first == Base::CURVE_END); CGAL::Arr_curve_end cv_end = static_cast(next_input.second); - std::cout << "Test: compare_y_near_boundary( " << this->m_xcurves[id1] << " , " + std::cout << "Test: boundary_near_y( " << this->m_xcurves[id1] << " , " << this->m_xcurves[id2]<< " , " << (cv_end == CGAL::ARR_MIN_END ? "MIN_END" : "MAX_END") << " ) ? "; next_input = this->get_next_input(str_stream); @@ -881,39 +901,49 @@ compare_y_near_boundary_wrapper_imp(std::istringstream& str_stream, return this->compare(exp_answer, real_answer); } -// TODO Is_on_y_identification_2 +// TODO Compare_y_on_boundary_2(pt1, pt2) +// TODO Is_on_y_identification_2(pt) +// TODO Is_on_y_identification_2(xcv) // --------------------------------------------------------------------------- // bottom-top /*! Test Parameter_space_in_y_2 */ -template +template bool Traits_test:: -parameter_space_in_y_wrapper(std::istringstream& str_stream) +parameter_space_in_y_curve_end_wrapper(std::istringstream & str_stream) { - typedef typename CGAL::internal::Arr_complete_bottom_side_category::Category - Bottom_side_category; - typedef typename CGAL::internal::Arr_complete_top_side_category::Category - Top_side_category; - typedef CGAL::internal::Arr_bottom_top_implementation_dispatch - BT; - typedef typename BT::Parameter_space_in_y_2_curve_end_tag Psy_tag; - return parameter_space_in_y_wrapper_imp(str_stream, Psy_tag()); + typedef typename CGAL::internal::Arr_complete_bottom_side_tag< T_Traits >::Tag + Arr_bottom_side_category; + typedef typename CGAL::internal::Arr_complete_top_side_tag< T_Traits >::Tag + Arr_top_side_category; + + typedef CGAL::internal::Arr_bottom_top_implementation_dispatch< + Arr_bottom_side_category, Arr_top_side_category > BT; + + typedef typename BT::Parameter_space_in_y_2_curve_end_tag + Psy_2_curve_end_tag; + + return parameter_space_in_y_curve_end_wrapper_imp( + str_stream, Psy_2_curve_end_tag() + ); } -template +template bool Traits_test:: -parameter_space_in_y_wrapper_imp(std::istringstream&, CGAL::Arr_use_dummy_tag) +parameter_space_in_y_curve_end_wrapper_imp( + std::istringstream &, CGAL::Arr_use_dummy_tag +) { CGAL_error(); return false; } -template +template bool Traits_test:: -parameter_space_in_y_wrapper_imp(std::istringstream& str_stream, - CGAL::Arr_use_traits_tag) +parameter_space_in_y_curve_end_wrapper_imp (std::istringstream & str_stream, + CGAL::Arr_use_traits_tag) { unsigned int id; str_stream >> id; @@ -929,7 +959,7 @@ parameter_space_in_y_wrapper_imp(std::istringstream& str_stream, next_input = this->get_next_input(str_stream); CGAL_assertion(next_input.first == Base::PARAMETER_SPACE); } else if (next_input.first == Base::PARAMETER_SPACE) { - std::cout << "Test: parameter_space_in_y( " << this->m_points[id] << " ) ? "; + std::cout << "Test: parameter_space_y( " << this->m_points[id] << " ) ? "; } else { CGAL_error(); return false; @@ -949,104 +979,53 @@ parameter_space_in_y_wrapper_imp(std::istringstream& str_stream, return this->compare(exp_answer, real_answer); } -/* Compare_x_near_limit_2 - */ -template +// TODO Parameter_space_in_y_2(pt) +// TODO Parameter_space_in_y_2(xcv) + +// TODO split boundary_near_x in point+curve-end + curve-ends + +template bool Traits_test:: -compare_x_near_limit_wrapper(std::istringstream& str_stream) +compare_x_near_boundary_point_curve_end_wrapper ( + std::istringstream & str_stream) { - typedef typename CGAL::internal::Arr_complete_bottom_side_category::Category - Bottom_side_category; - typedef typename CGAL::internal::Arr_complete_top_side_category::Category - Top_side_category; - typedef CGAL::internal::Arr_bottom_top_implementation_dispatch - BT; - typedef typename BT::Compare_x_near_limit_2_curve_ends_tag Cmp_tag; - return compare_x_near_limit_wrapper_imp(str_stream, Cmp_tag()); + typedef typename CGAL::internal::Arr_complete_bottom_side_tag< T_Traits >::Tag + Arr_bottom_side_category; + typedef typename CGAL::internal::Arr_complete_top_side_tag< T_Traits >::Tag + Arr_top_side_category; + + typedef CGAL::internal::Arr_bottom_top_implementation_dispatch< + Arr_bottom_side_category, Arr_top_side_category > BT; + + typedef typename BT::Compare_x_near_boundary_2_curve_ends_tag + Cmp_x_nb_2_point_curve_end_tag; + + return compare_x_near_boundary_point_curve_end_wrapper_imp( + str_stream, + Cmp_x_nb_2_point_curve_end_tag() + ); } -template +template bool Traits_test:: -compare_x_near_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag) +compare_x_near_boundary_point_curve_end_wrapper_imp (std::istringstream &, + CGAL::Arr_use_dummy_tag) { CGAL_error(); return false; } -template +template bool Traits_test:: -compare_x_near_limit_wrapper_imp(std::istringstream& str_stream, - CGAL::Arr_use_traits_tag) +compare_x_near_boundary_point_curve_end_wrapper_imp ( + std::istringstream & str_stream, + CGAL::Arr_use_traits_tag) { - std::cout << "Test: compare_x_near_limit( "; - - unsigned int id1, id2; - // xcurve xcurve curve-end - str_stream >> id1 >> id2; - std::pair next_input = - this->get_next_input(str_stream); - CGAL_assertion(next_input.first == Base::CURVE_END); - CGAL::Arr_curve_end cv_end = - static_cast(next_input.second); - - std::cout << this->m_xcurves[id1] << ", " - << this->m_xcurves[id2] << " , " - << this->curve_end_str(cv_end) << " ) ? "; - - next_input = this->get_next_input(str_stream); - CGAL_assertion(next_input.first == Base::SIGN); - CGAL::Comparison_result exp_answer = - static_cast(next_input.second); - std::cout << (exp_answer == CGAL::SMALLER ? "SMALLER": - (exp_answer == CGAL::LARGER ? "LARGER":"EQUAL")) << " "; - - CGAL::Comparison_result real_answer = - this->m_traits.compare_x_near_limit_2_object() - (this->m_xcurves[id1], this->m_xcurves[id2], cv_end); - return this->compare(exp_answer, real_answer); -} - -/* Compare_x_at_limit - */ -template -bool Traits_test:: -compare_x_at_limit_wrapper(std::istringstream& str_stream) -{ - typedef typename CGAL::internal::Arr_complete_bottom_side_category::Category - Bottom_side_category; - typedef typename CGAL::internal::Arr_complete_top_side_category::Category - Top_side_category; - typedef CGAL::internal::Arr_bottom_top_implementation_dispatch - BT; - typedef typename BT::Compare_x_at_limit_2_curve_ends_tag Cmp_tag1; - typedef typename BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_tag2; - typedef typename CGAL::internal::Or_traits::type Cmp_tag; - return compare_x_at_limit_wrapper_imp(str_stream, Cmp_tag()); -} - -template -bool Traits_test:: -compare_x_at_limit_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag) -{ - CGAL_error(); - return false; -} - -template -bool Traits_test:: -compare_x_at_limit_wrapper_imp(std::istringstream& str_stream, - CGAL::Arr_use_traits_tag) -{ - std::cout << "Test: compare_x_at_limit( "; - CGAL::Comparison_result real_answer; unsigned int id1, id2; // first argument must be a number (either a point or a xcurve) str_stream >> id1; - std::pair next_input = - this->get_next_input(str_stream); + std::pair next_input = this->get_next_input(str_stream); // second argument can be number or text (either xcurve or curve_end) bool curves_op = next_input.first == Base::NUMBER; CGAL::Arr_curve_end cv_end1 = CGAL::ARR_MIN_END, cv_end2 = CGAL::ARR_MIN_END; @@ -1056,8 +1035,7 @@ compare_x_at_limit_wrapper_imp(std::istringstream& str_stream, next_input = this->get_next_input(str_stream); CGAL_assertion(next_input.first == Base::CURVE_END); cv_end1 = static_cast(next_input.second); - - std::cout << this->m_points[id1] << " , " + std::cout << "Test: boundary_near_x( " << this->m_points[id1] << " , " << this->m_xcurves[id2]<< " , " << this->curve_end_str(cv_end1) << " ) ? "; } @@ -1069,8 +1047,7 @@ compare_x_at_limit_wrapper_imp(std::istringstream& str_stream, next_input = this->get_next_input(str_stream); CGAL_assertion(next_input.first == Base::CURVE_END); cv_end2 = static_cast(next_input.second); - - std::cout << this->m_xcurves[id1] << ", " + std::cout << "Test: boundary_near_x( " << this->m_xcurves[id1] << ", " << this->curve_end_str(cv_end1) << ", " << this->m_xcurves[id2] << " , " << this->curve_end_str(cv_end2) << " ) ? "; @@ -1085,114 +1062,53 @@ compare_x_at_limit_wrapper_imp(std::istringstream& str_stream, (exp_answer == CGAL::LARGER ? "LARGER":"EQUAL")) << " "; real_answer = (curves_op) ? - this->m_traits.compare_x_at_limit_2_object() - (this->m_points[id1], this->m_xcurves[id2], cv_end1) : - this->m_traits.compare_x_at_limit_2_object() - (this->m_xcurves[id1], cv_end1,this->m_xcurves[id2], cv_end2); - return this->compare(exp_answer, real_answer); -} - -/* Compare_x_near_boundary_2 - */ -template -bool Traits_test:: -compare_x_near_boundary_wrapper(std::istringstream& str_stream) -{ - typedef typename CGAL::internal::Arr_complete_bottom_side_category::Category - Bottom_side_category; - typedef typename CGAL::internal::Arr_complete_top_side_category::Category - Top_side_category; - typedef CGAL::internal::Arr_bottom_top_implementation_dispatch - BT; - typedef typename BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_tag; - return compare_x_near_boundary_wrapper_imp(str_stream, Cmp_tag()); -} - -template -bool Traits_test:: -compare_x_near_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag) -{ - CGAL_error(); - return false; -} - -template -bool Traits_test:: -compare_x_near_boundary_wrapper_imp(std::istringstream& str_stream, - CGAL::Arr_use_traits_tag) -{ - std::cout << "Test: compare_x_near_boundary( "; - - unsigned int id1, id2; - // xcurve xcurve curve-end - str_stream >> id1 >> id2; - std::pair next_input = - this->get_next_input(str_stream); - CGAL_assertion(next_input.first == Base::CURVE_END); - CGAL::Arr_curve_end cv_end = - static_cast(next_input.second); - - std::cout << this->m_xcurves[id1] << ", " - << this->m_xcurves[id2] << " , " - << this->curve_end_str(cv_end) << " ) ? "; - - next_input = this->get_next_input(str_stream); - CGAL_assertion(next_input.first == Base::SIGN); - CGAL::Comparison_result exp_answer = - static_cast(next_input.second); - std::cout << (exp_answer == CGAL::SMALLER ? "SMALLER": - (exp_answer == CGAL::LARGER ? "LARGER":"EQUAL")) << " "; - - CGAL::Comparison_result real_answer = this->m_traits.compare_x_near_boundary_2_object() - (this->m_xcurves[id1], this->m_xcurves[id2], cv_end); + (this->m_points[id1], this->m_xcurves[id2], cv_end1) : + this->m_traits.compare_x_near_boundary_2_object() + (this->m_xcurves[id1],cv_end1,this->m_xcurves[id2], cv_end2); return this->compare(exp_answer, real_answer); } -/* Compare_x_on_boundary - */ -template + +template bool Traits_test:: -compare_x_on_boundary_wrapper(std::istringstream& str_stream) +compare_x_near_boundary_curve_ends_wrapper (std::istringstream & str_stream) { - typedef typename CGAL::internal::Arr_complete_bottom_side_category::Category - Bottom_side_category; - typedef typename CGAL::internal::Arr_complete_top_side_category::Category - Top_side_category; - typedef CGAL::internal::Arr_bottom_top_implementation_dispatch - BT; - typedef typename BT::Compare_x_on_boundary_2_points_tag Cmp_tag1; - typedef typename BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_tag2; - typedef typename BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_tag3; - typedef typename CGAL::internal::Or_traits::type Cmp_tag12; - typedef typename CGAL::internal::Or_traits::type Cmp_tag; - return compare_x_on_boundary_wrapper_imp(str_stream, Cmp_tag()); + typedef typename CGAL::internal::Arr_complete_bottom_side_tag< T_Traits >::Tag + Arr_bottom_side_category; + typedef typename CGAL::internal::Arr_complete_top_side_tag< T_Traits >::Tag + Arr_top_side_category; + + typedef CGAL::internal::Arr_bottom_top_implementation_dispatch< + Arr_bottom_side_category, Arr_top_side_category > BT; + + typedef typename BT::Compare_x_near_boundary_2_curve_ends_tag + Cmp_x_nb_2_curve_ends_tag; + + return compare_x_near_boundary_curve_ends_wrapper_imp( + str_stream, Cmp_x_nb_2_curve_ends_tag() + ); } -template +template bool Traits_test:: -compare_x_on_boundary_wrapper_imp(std::istringstream&, - CGAL::Arr_use_dummy_tag) +compare_x_near_boundary_curve_ends_wrapper_imp (std::istringstream &, + CGAL::Arr_use_dummy_tag) { CGAL_error(); return false; } -template +template bool Traits_test:: -compare_x_on_boundary_wrapper_imp(std::istringstream& str_stream, - CGAL::Arr_use_traits_tag) +compare_x_near_boundary_curve_ends_wrapper_imp (std::istringstream & str_stream, + CGAL::Arr_use_traits_tag) { - // TBD: points - std::cout << "Test: compare_x_on_boundary( "; - CGAL::Comparison_result real_answer; unsigned int id1, id2; // first argument must be a number (either a point or a xcurve) str_stream >> id1; - std::pair next_input = - this->get_next_input(str_stream); + std::pair next_input = this->get_next_input(str_stream); // second argument can be number or text (either xcurve or curve_end) bool curves_op = next_input.first == Base::NUMBER; CGAL::Arr_curve_end cv_end1 = CGAL::ARR_MIN_END, cv_end2 = CGAL::ARR_MIN_END; @@ -1202,8 +1118,7 @@ compare_x_on_boundary_wrapper_imp(std::istringstream& str_stream, next_input = this->get_next_input(str_stream); CGAL_assertion(next_input.first == Base::CURVE_END); cv_end1 = static_cast(next_input.second); - - std::cout << this->m_points[id1] << " , " + std::cout << "Test: boundary_near_x( " << this->m_points[id1] << " , " << this->m_xcurves[id2]<< " , " << this->curve_end_str(cv_end1) << " ) ? "; } @@ -1215,8 +1130,7 @@ compare_x_on_boundary_wrapper_imp(std::istringstream& str_stream, next_input = this->get_next_input(str_stream); CGAL_assertion(next_input.first == Base::CURVE_END); cv_end2 = static_cast(next_input.second); - - std::cout << this->m_xcurves[id1] << ", " + std::cout << "Test: boundary_near_x( " << this->m_xcurves[id1] << ", " << this->curve_end_str(cv_end1) << ", " << this->m_xcurves[id2] << " , " << this->curve_end_str(cv_end2) << " ) ? "; @@ -1231,13 +1145,15 @@ compare_x_on_boundary_wrapper_imp(std::istringstream& str_stream, (exp_answer == CGAL::LARGER ? "LARGER":"EQUAL")) << " "; real_answer = (curves_op) ? - this->m_traits.compare_x_on_boundary_2_object() + this->m_traits.compare_x_near_boundary_2_object() (this->m_points[id1], this->m_xcurves[id2], cv_end1) : - this->m_traits.compare_x_on_boundary_2_object() - (this->m_xcurves[id1], cv_end1,this->m_xcurves[id2], cv_end2); + this->m_traits.compare_x_near_boundary_2_object() + (this->m_xcurves[id1],cv_end1,this->m_xcurves[id2], cv_end2); return this->compare(exp_answer, real_answer); } -// TODO Is_on_x_identification_2 +// TODO Compare_x_on_boundary_2(pt1, pt2) +// TODO Is_on_x_identification_2(pt) +// TODO Is_on_x_identification_2(xcv) #endif diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base index a1c2641669d..1b3a1845db1 100755 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test_base @@ -31,7 +31,6 @@ FULL_ERROR_DESCRIPTION_FILE=ProgramOutput.error.txt CARTESIAN_KERNEL=0 SIMPLE_CARTESIAN_KERNEL=1 -UNIVARIATE_ALGEBRAIC_KERNEL=2 SEGMENT_TRAITS=0 NON_CACHING_SEGMENT_TRAITS=1 @@ -64,35 +63,31 @@ LAZY_GMPZ_NT=12 LEDA_INT_NT=13 CGAL_GMPZ_NT=14 CORE_INT_NT=15 -CORE_RAT_NT=16 -COMPARE=1 -VERTEX=2 -IS_VERTICAL=3 -COMPARE_Y_AT_X=4 -COMPARE_Y_AT_X_LEFT=5 -COMPARE_Y_AT_X_RIGHT=6 -MAKE_X_MONOTONE=7 -INTERSECT=8 -SPLIT=9 -ARE_MERGEABLE=10 -MERGE=11 -ERRORS=12 -CONSTRUCTOR=13 -COMPARE_X_AT_LIMIT=14 -COMPARE_X_NEAR_LIMIT=15 -COMPARE_X_ON_BOUNDARY=16 -COMPARE_X_NEAR_BOUNDARY=17 -COMPARE_Y_NEAR_BOUNDARY=18 -PARAMETER_SPACE_X=19 -PARAMETER_SPACE_Y=20 -X_ON_IDENTIFICATION=21 -Y_ON_IDENTIFICATION=22 -IS_BOUNDED=23 -IS_IN_X_RANGE=24 -COMPARE_Y_POSITION=25 -IS_BETWEEN_CW=26 -COMPARE_CW_AROUND_POINT=27 +COMPARE=3 +VERTEX=4 +IS_VERTICAL=5 +BOUNDARY_NEAR_X=6 +BOUNDARY_NEAR_Y=7 +PARAMETER_SPACE_X=8 +PARAMETER_SPACE_Y=9 +COMPARE_Y_AT_X=10 +COMPARE_Y_AT_X_LEFT=11 +COMPARE_Y_AT_X_RIGHT=12 +MAKE_X_MONOTONE=13 +INTERSECT=14 +SPLIT=15 +ARE_MERGEABLE=16 +MERGE=17 +ERRORS=18 +CONSTRUCTOR=19 +X_ON_IDENTIFICATION=20 +Y_ON_IDENTIFICATION=21 +IS_BOUNDED=22 +IS_IN_X_RANGE=23 +COMPARE_Y_POSITION=24 +IS_BETWEEN_CW=25 +COMPARE_CW_AROUND_POINT=26 #---------------------------------------------------------------------# # configure @@ -326,6 +321,8 @@ execute_commands_old_structure() commands_indicator[COMPARE]=1 commands_indicator[VERTEX]=1 commands_indicator[IS_VERTICAL]=1 + commands_indicator[BOUNDARY_NEAR_X]=1 + commands_indicator[BOUNDARY_NEAR_Y]=1 commands_indicator[COMPARE_Y_AT_X]=1 commands_indicator[COMPARE_Y_AT_X_LEFT]=1 commands_indicator[COMPARE_Y_AT_X_RIGHT]=1 @@ -360,6 +357,16 @@ execute_commands_old_structure() data/empty.zero data/$1/is_vertical.xcv data/empty.zero \ data/$1/is_vertical $2 fi + if [ ${commands_indicator[$BOUNDARY_NEAR_X]} -ne 0 ] ; then + run_trapped_test test_traits \ + data/empty.zero data/$1/boundary_near_x.xcv data/empty.zero \ + data/$1/boundary_near_x $2 + fi + if [ ${commands_indicator[$BOUNDARY_NEAR_Y]} -ne 0 ] ; then + run_trapped_test test_traits \ + data/empty.zero data/$1/boundary_near_y.xcv data/empty.zero \ + data/$1/boundary_near_y $2 + fi if [ ${commands_indicator[$COMPARE_Y_AT_X]} -ne 0 ] ; then run_trapped_test test_traits \ data/$1/compare_y_at_x.pt data/$1/compare_y_at_x.xcv \ @@ -425,11 +432,8 @@ execute_commands_new_structure() commands_indicator[COMPARE]=0 commands_indicator[VERTEX]=0 commands_indicator[IS_VERTICAL]=0 - commands_indicator[COMPARE_X_AT_LIMIT]=0 - commands_indicator[COMPARE_X_NEAR_LIMIT]=0 - commands_indicator[COMPARE_X_ON_BOUNDARY]=0 - commands_indicator[COMPARE_X_NEAR_BOUNDARY]=0 - commands_indicator[COMPARE_Y_NEAR_BOUNDARY]=0 + commands_indicator[BOUNDARY_NEAR_X]=0 + commands_indicator[BOUNDARY_NEAR_Y]=0 commands_indicator[PARAMETER_SPACE_X]=0 commands_indicator[PARAMETER_SPACE_Y]=0 commands_indicator[COMPARE_Y_AT_X]=0 @@ -463,25 +467,13 @@ execute_commands_new_structure() run_trapped_test test_traits data/$1/points \ data/$1/xcurves data/$1/curves data/$1/is_vertical $2 fi - if [ ${commands_indicator[$COMPARE_X_AT_LIMIT]} -ne 0 ] ; then + if [ ${commands_indicator[$BOUNDARY_NEAR_X]} -ne 0 ] ; then run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_at_limit $2 + data/$1/xcurves data/$1/curves data/$1/boundary_near_x $2 fi - if [ ${commands_indicator[$COMPARE_X_NEAR_LIMIT]} -ne 0 ] ; then + if [ ${commands_indicator[$BOUNDARY_NEAR_Y]} -ne 0 ] ; then run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_near_limit $2 - fi - if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_on_boundary $2 - fi - if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_x_near_boundary $2 - fi - if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits data/$1/points \ - data/$1/xcurves data/$1/curves data/$1/compare_y_near_boundary $2 + data/$1/xcurves data/$1/curves data/$1/boundary_near_y $2 fi if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then run_trapped_test test_traits data/$1/points \ @@ -539,13 +531,10 @@ execute_commands_traits_adaptor() # the new structure is not default, so this function executes only # commands that are given as arguments + commands_indicator[BOUNDARY_NEAR_X]=0 + commands_indicator[BOUNDARY_NEAR_Y]=0 commands_indicator[PARAMETER_SPACE_X]=0 commands_indicator[PARAMETER_SPACE_Y]=0 - commands_indicator[COMPARE_X_AT_LIMIT]=0 - commands_indicator[COMPARE_X_NEAR_LIMIT]=0 - commands_indicator[COMPARE_X_ON_BOUNDARY]=0 - commands_indicator[COMPARE_X_NEAR_BOUNDARY]=0 - commands_indicator[COMPARE_Y_NEAR_BOUNDARY]=0 commands_indicator[COMPARE_Y_AT_X_LEFT]=0 commands_indicator[ARE_MERGEABLE]=0 commands_indicator[MERGE]=0 @@ -567,6 +556,16 @@ execute_commands_traits_adaptor() done fi + if [ ${commands_indicator[$BOUNDARY_NEAR_X]} -ne 0 ] ; then + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/boundary_near_x $2 + fi + if [ ${commands_indicator[$BOUNDARY_NEAR_Y]} -ne 0 ] ; then + run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ + data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ + data/test_adaptor/$1/boundary_near_y $2 + fi if [ ${commands_indicator[$PARAMETER_SPACE_X]} -ne 0 ] ; then run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ @@ -577,33 +576,6 @@ execute_commands_traits_adaptor() data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ data/test_adaptor/$1/parameter_space_y $2 fi - if [ ${commands_indicator[$COMPARE_X_AT_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_at_limit $2 - fi - if [ ${commands_indicator[$COMPARE_X_NEAR_LIMIT]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_near_limit $2 - fi - - if [ ${commands_indicator[$COMPARE_X_ON_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_on_boundary $2 - fi - if [ ${commands_indicator[$COMPARE_X_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_x_near_boundary $2 - fi - - if [ ${commands_indicator[$COMPARE_Y_NEAR_BOUNDARY]} -ne 0 ] ; then - run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ - data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ - data/test_adaptor/$1/compare_y_near_boundary $2 - fi if [ ${commands_indicator[$COMPARE_Y_AT_X_LEFT]} -ne 0 ] ; then run_trapped_test test_traits_adaptor data/test_adaptor/$1/points \ data/test_adaptor/$1/xcurves data/test_adaptor/$1/curves \ @@ -684,8 +656,8 @@ test_linear_traits_adaptor() echo " ERROR: not executed test_traits_adaptor linear_traits" >> $ERRORFILE else execute_commands_traits_adaptor linear linear_traits_adaptor \ - COMPARE_Y_AT_X_LEFT ARE_MERGEABLE MERGE IS_IN_X_RANGE \ - COMPARE_Y_POSITION IS_BETWEEN_CW COMPARE_CW_AROUND_POINT + COMPARE_Y_AT_X_LEFT ARE_MERGEABLE MERGE IS_IN_X_RANGE COMPARE_Y_POSITION \ + IS_BETWEEN_CW COMPARE_CW_AROUND_POINT fi clean_tests } @@ -701,8 +673,8 @@ test_spherical_arcs_traits_adaptor() echo " ERROR: not executed test_traits_adaptor spherical_arcs_traits" >> $ERRORFILE else execute_commands_traits_adaptor spherical_arcs spherical_arcs_traits_adaptor \ - COMPARE_Y_AT_X_LEFT ARE_MERGEABLE MERGE IS_IN_X_RANGE \ - COMPARE_Y_POSITION IS_BETWEEN_CW COMPARE_CW_AROUND_POINT + COMPARE_Y_AT_X_LEFT ARE_MERGEABLE MERGE IS_IN_X_RANGE COMPARE_Y_POSITION \ + IS_BETWEEN_CW COMPARE_CW_AROUND_POINT fi clean_tests } @@ -719,7 +691,7 @@ test_segment_traits() else execute_commands_old_structure segments segment_traits \ VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT CONSTRUCTOR \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE execute_commands_new_structure segments segment_traits \ IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT ARE_MERGEABLE @@ -743,7 +715,8 @@ test_non_caching_segment_traits() else execute_commands_old_structure segments non_caching_segment_traits \ VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT CONSTRUCTOR \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE ERRORS + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT \ + ARE_MERGEABLE ERRORS execute_commands_new_structure segments segment_traits \ IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT @@ -768,7 +741,7 @@ test_polyline_traits() else execute_commands_old_structure polylines polyline_traits \ CONSTRUCTOR COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE fi clean_tests } @@ -785,7 +758,7 @@ test_non_caching_polyline_traits() else execute_commands_old_structure polylines non_caching_polyline_traits \ CONSTRUCTOR COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE fi clean_tests } @@ -802,8 +775,8 @@ test_linear_traits() else execute_commands_old_structure linear/segments linear_traits.segments \ VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT CONSTRUCTOR ARE_MERGEABLE - + COMPARE_Y_AT_X_RIGHT BOUNDARY_NEAR_X BOUNDARY_NEAR_Y CONSTRUCTOR ARE_MERGEABLE + execute_commands_new_structure linear/segments linear_traits.segments \ IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT @@ -813,7 +786,7 @@ test_linear_traits() execute_commands_old_structure linear/rays linear_traits.rays \ VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT CONSTRUCTOR ARE_MERGEABLE + COMPARE_Y_AT_X_RIGHT BOUNDARY_NEAR_X BOUNDARY_NEAR_Y CONSTRUCTOR ARE_MERGEABLE execute_commands_new_structure linear/rays linear_traits.rays \ IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT @@ -823,10 +796,9 @@ test_linear_traits() data/empty.zero data/linear/rays/vertex linear_traits.rays execute_commands_new_structure linear/lines linear_traits.lines \ - IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT INTERSECT \ - SPLIT MERGE \ - PARAMETER_SPACE_X PARAMETER_SPACE_Y \ - COMPARE_X_AT_LIMIT COMPARE_X_NEAR_LIMIT COMPARE_Y_NEAR_BOUNDARY + IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT INTERSECT SPLIT MERGE \ + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y PARAMETER_SPACE_X PARAMETER_SPACE_Y + fi clean_tests } @@ -843,7 +815,7 @@ test_conic_traits() else execute_commands_old_structure conics conic_traits \ INTERSECT SPLIT MERGE COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT ARE_MERGEABLE execute_commands_new_structure conics conic_traits \ INTERSECT SPLIT MERGE @@ -867,7 +839,7 @@ test_line_arc_traits() else execute_commands_old_structure circular_lines line_arc_traits \ VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - ERRORS COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE + ERRORS BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE execute_commands_new_structure circular_lines line_arc_traits \ IS_VERTICAL COMPARE_Y_AT_X @@ -895,7 +867,7 @@ test_circular_arc_traits() else execute_commands_old_structure circular_arcs circular_arc_traits \ VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - ERRORS COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE + ERRORS BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE execute_commands_new_structure circular_arcs circular_arc_traits \ VERTEX IS_VERTICAL COMPARE_Y_AT_X @@ -915,7 +887,7 @@ test_circular_line_arc_traits() else execute_commands_old_structure circular_line_arcs circular_line_arc_traits \ VERTEX IS_VERTICAL CONSTRUCTOR COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - ERRORS COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE + ERRORS BOUNDARY_NEAR_X BOUNDARY_NEAR_Y COMPARE_Y_AT_X_RIGHT MERGE ARE_MERGEABLE execute_commands_new_structure circular_line_arcs circular_line_arc_traits \ IS_VERTICAL COMPARE_Y_AT_X @@ -939,8 +911,7 @@ test_circle_segments_traits() else execute_commands_old_structure circle_segments circle_segments_traits \ VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT \ - COMPARE_Y_AT_X_RIGHT CONSTRUCTOR ARE_MERGEABLE - + COMPARE_Y_AT_X_RIGHT BOUNDARY_NEAR_X BOUNDARY_NEAR_Y CONSTRUCTOR ARE_MERGEABLE run_trapped_test test_traits \ data/circle_segments/points data/circle_segments/xcurves.8 \ data/empty.zero data/circle_segments/vertex circle_segments_traits @@ -975,7 +946,7 @@ test_bezier_traits() else execute_commands_old_structure bezier bezier_traits \ COMPARE_Y_AT_X_LEFT COMPARE_Y_AT_X_RIGHT SPLIT \ - CONSTRUCTOR ERRORS ARE_MERGEABLE + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y CONSTRUCTOR ERRORS ARE_MERGEABLE fi clean_tests } @@ -992,13 +963,11 @@ test_spherical_arc_traits() else execute_commands_old_structure spherical_arcs spherical_arc_traits \ COMPARE_Y_AT_X_LEFT COMPARE_Y_AT_X_RIGHT INTERSECT \ - CONSTRUCTOR \ + BOUNDARY_NEAR_X BOUNDARY_NEAR_Y CONSTRUCTOR \ COMPARE MAKE_X_MONOTONE SPLIT MERGE ERRORS ARE_MERGEABLE execute_commands_new_structure spherical_arcs spherical_arc_traits \ - INTERSECT \ - COMPARE_X_ON_BOUNDARY COMPARE_X_NEAR_BOUNDARY \ - COMPARE_Y_NEAR_BOUNDARY + INTERSECT BOUNDARY_NEAR_X BOUNDARY_NEAR_Y run_trapped_test test_traits \ data/spherical_arcs/compare.pt data/spherical_arcs/compare.xcv \ @@ -1013,7 +982,7 @@ test_spherical_arc_traits() test_rational_arc_traits() { # function executable number type kernel traits - compile_test test_traits $CORE_INT_NT $UNIVARIATE_ALGEBRAIC_KERNEL $RATIONAL_ARC_TRAITS rational_arc_traits + compile_test test_traits $CORE_EXPR_NT $CARTESIAN_KERNEL $RATIONAL_ARC_TRAITS rational_arc_traits if [ ${res} -eq 0 ] ; then echo " ERROR: not executed test_traits rational_arc_traits" >> $ERRORFILE else @@ -1022,9 +991,7 @@ test_rational_arc_traits() data/empty.zero data/compare rational_arc_traits execute_commands_new_structure rational_arcs rational_arc_traits \ - VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT SPLIT MERGE \ - COMPARE_X_AT_LIMIT COMPARE_X_NEAR_LIMIT COMPARE_Y_NEAR_BOUNDARY - + VERTEX IS_VERTICAL COMPARE_Y_AT_X COMPARE_Y_AT_X_LEFT SPLIT MERGE fi clean_tests } @@ -1119,9 +1086,9 @@ if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then fi -if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then - compile_and_run construction_test_suite_generator -fi +# if [ "${TEST_WITH_CMAKE}" != "FALSE" ]; then +# compile_and_run construction_test_suite_generator +# fi test_segment_traits test_non_caching_segment_traits @@ -1148,7 +1115,6 @@ test_algebraic_traits_leda compile_and_run test_insertion compile_and_run test_unbounded_rational_insertion -compile_and_run test_rational_function_traits_2 compile_and_run test_removal compile_and_run test_iso_verts @@ -1169,7 +1135,7 @@ test_segment_traits_adaptor test_linear_traits_adaptor test_spherical_arcs_traits_adaptor -# if any error occured then appened the the full error description file to error file +#if any error occured then appened the the full error description file to error file if [ -f $FULL_ERROR_DESCRIPTION_FILE ] ; then echo "******************** appending all error outputs ********************" >> $ERRORFILE diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_x b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_x new file mode 100644 index 00000000000..3f6300617ba --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_x @@ -0,0 +1,72 @@ +##vertical lines +boundary_near_x 1 MIN_END 1 MIN_END EQUAL +boundary_near_x 5 MIN_END 5 MIN_END EQUAL +boundary_near_x 7 MIN_END 7 MIN_END EQUAL +boundary_near_x 5 MIN_END 1 MIN_END SMALLER +boundary_near_x 5 MIN_END 7 MIN_END SMALLER +boundary_near_x 1 MIN_END 7 MIN_END SMALLER +boundary_near_x 1 MIN_END 5 MIN_END LARGER +boundary_near_x 7 MIN_END 5 MIN_END LARGER +boundary_near_x 7 MIN_END 1 MIN_END LARGER +# +boundary_near_x 1 MAX_END 1 MAX_END EQUAL +boundary_near_x 5 MAX_END 5 MAX_END EQUAL +boundary_near_x 7 MAX_END 7 MAX_END EQUAL +boundary_near_x 5 MAX_END 1 MAX_END SMALLER +boundary_near_x 5 MAX_END 7 MAX_END SMALLER +boundary_near_x 1 MAX_END 7 MAX_END SMALLER +boundary_near_x 1 MAX_END 5 MAX_END LARGER +boundary_near_x 7 MAX_END 5 MAX_END LARGER +boundary_near_x 7 MAX_END 1 MAX_END LARGER +# +boundary_near_x 1 MAX_END 1 MIN_END EQUAL +boundary_near_x 5 MAX_END 5 MIN_END EQUAL +boundary_near_x 7 MAX_END 7 MIN_END EQUAL +boundary_near_x 5 MAX_END 1 MIN_END SMALLER +boundary_near_x 5 MAX_END 7 MIN_END SMALLER +boundary_near_x 1 MAX_END 7 MIN_END SMALLER +boundary_near_x 1 MAX_END 5 MIN_END LARGER +boundary_near_x 7 MAX_END 5 MIN_END LARGER +boundary_near_x 7 MAX_END 1 MIN_END LARGER +# +boundary_near_x 1 MIN_END 1 MAX_END EQUAL +boundary_near_x 5 MIN_END 5 MAX_END EQUAL +boundary_near_x 7 MIN_END 7 MAX_END EQUAL +boundary_near_x 5 MIN_END 1 MAX_END SMALLER +boundary_near_x 5 MIN_END 7 MAX_END SMALLER +boundary_near_x 1 MIN_END 7 MAX_END SMALLER +boundary_near_x 1 MIN_END 5 MAX_END LARGER +boundary_near_x 7 MIN_END 5 MAX_END LARGER +boundary_near_x 7 MIN_END 1 MAX_END LARGER +# +boundary_near_x 1 MIN_END 1 MAX_END EQUAL +boundary_near_x 5 MIN_END 5 MAX_END EQUAL +boundary_near_x 7 MIN_END 7 MAX_END EQUAL +boundary_near_x 5 MIN_END 1 MAX_END SMALLER +boundary_near_x 5 MIN_END 7 MAX_END SMALLER +boundary_near_x 1 MIN_END 7 MAX_END SMALLER +boundary_near_x 1 MIN_END 5 MAX_END LARGER +boundary_near_x 7 MIN_END 5 MAX_END LARGER +boundary_near_x 7 MIN_END 1 MAX_END LARGER +# +boundary_near_x 1 MAX_END 1 MIN_END EQUAL +boundary_near_x 5 MAX_END 5 MIN_END EQUAL +boundary_near_x 7 MAX_END 7 MIN_END EQUAL +boundary_near_x 5 MAX_END 1 MIN_END SMALLER +boundary_near_x 5 MAX_END 7 MIN_END SMALLER +boundary_near_x 1 MAX_END 7 MIN_END SMALLER +boundary_near_x 1 MAX_END 5 MIN_END LARGER +boundary_near_x 7 MAX_END 5 MIN_END LARGER +boundary_near_x 7 MAX_END 1 MIN_END LARGER +# +boundary_near_x 4 1 MIN_END EQUAL +boundary_near_x 1 5 MIN_END EQUAL +boundary_near_x 7 7 MIN_END EQUAL +boundary_near_x 4 1 MAX_END EQUAL +boundary_near_x 1 5 MAX_END EQUAL +boundary_near_x 7 7 MAX_END EQUAL +# +boundary_near_x 7 5 MIN_END LARGER +boundary_near_x 1 7 MIN_END SMALLER +boundary_near_x 7 5 MAX_END LARGER +boundary_near_x 1 7 MAX_END SMALLER diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_y b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_y new file mode 100644 index 00000000000..daacf2c0f4d --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/boundary_near_y @@ -0,0 +1,43 @@ +boundary_near_y 0 0 MIN_END EQUAL +boundary_near_y 2 2 MIN_END EQUAL +boundary_near_y 3 3 MIN_END EQUAL +boundary_near_y 4 4 MIN_END EQUAL +boundary_near_y 6 6 MIN_END EQUAL +# +boundary_near_y 0 0 MAX_END EQUAL +boundary_near_y 2 2 MAX_END EQUAL +boundary_near_y 3 3 MAX_END EQUAL +boundary_near_y 4 4 MAX_END EQUAL +boundary_near_y 6 6 MAX_END EQUAL +# +boundary_near_y 4 0 MAX_END SMALLER +boundary_near_y 4 6 MAX_END SMALLER +boundary_near_y 0 6 MAX_END SMALLER +# +boundary_near_y 0 4 MAX_END LARGER +boundary_near_y 6 4 MAX_END LARGER +boundary_near_y 6 0 MAX_END LARGER +# +boundary_near_y 4 0 MIN_END SMALLER +boundary_near_y 4 6 MIN_END SMALLER +boundary_near_y 0 6 MIN_END SMALLER +# +boundary_near_y 0 4 MIN_END LARGER +boundary_near_y 6 4 MIN_END LARGER +boundary_near_y 6 0 MIN_END LARGER +# +boundary_near_y 2 0 MIN_END LARGER +boundary_near_y 2 4 MIN_END LARGER +boundary_near_y 2 6 MIN_END LARGER +# +boundary_near_y 2 0 MAX_END SMALLER +boundary_near_y 2 4 MAX_END SMALLER +boundary_near_y 2 6 MAX_END SMALLER +# +boundary_near_y 3 0 MAX_END LARGER +boundary_near_y 3 4 MAX_END LARGER +boundary_near_y 3 6 MAX_END LARGER +# +boundary_near_y 3 0 MIN_END SMALLER +boundary_near_y 3 4 MIN_END SMALLER +boundary_near_y 3 6 MIN_END SMALLER diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_at_limit b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_at_limit deleted file mode 100644 index 4b78577d195..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_at_limit +++ /dev/null @@ -1,80 +0,0 @@ -# a point and a vertical line -compare_x_at_limit 4 1 MIN_END EQUAL -compare_x_at_limit 4 1 MAX_END EQUAL -compare_x_at_limit 1 1 MIN_END SMALLER -compare_x_at_limit 1 1 MAX_END SMALLER -compare_x_at_limit 7 1 MIN_END LARGER -compare_x_at_limit 7 1 MAX_END LARGER -# -compare_x_at_limit 1 5 MIN_END EQUAL -compare_x_at_limit 1 5 MAX_END EQUAL -compare_x_at_limit 4 5 MIN_END LARGER -compare_x_at_limit 4 5 MAX_END LARGER -# a point and a vertical ray -compare_x_at_limit 4 15 MIN_END EQUAL -compare_x_at_limit 1 15 MIN_END SMALLER -compare_x_at_limit 7 15 MIN_END LARGER -compare_x_at_limit 4 13 MAX_END EQUAL -compare_x_at_limit 1 13 MAX_END SMALLER -compare_x_at_limit 7 13 MAX_END LARGER -# a vertical line and a vertical line -compare_x_at_limit 1 MIN_END 1 MIN_END EQUAL -compare_x_at_limit 5 MIN_END 5 MIN_END EQUAL -compare_x_at_limit 7 MIN_END 7 MIN_END EQUAL -compare_x_at_limit 5 MIN_END 1 MIN_END SMALLER -compare_x_at_limit 5 MIN_END 7 MIN_END SMALLER -compare_x_at_limit 1 MIN_END 7 MIN_END SMALLER -compare_x_at_limit 1 MIN_END 5 MIN_END LARGER -compare_x_at_limit 7 MIN_END 5 MIN_END LARGER -compare_x_at_limit 7 MIN_END 1 MIN_END LARGER -# -compare_x_at_limit 1 MAX_END 1 MAX_END EQUAL -compare_x_at_limit 5 MAX_END 5 MAX_END EQUAL -compare_x_at_limit 7 MAX_END 7 MAX_END EQUAL -compare_x_at_limit 5 MAX_END 1 MAX_END SMALLER -compare_x_at_limit 5 MAX_END 7 MAX_END SMALLER -compare_x_at_limit 1 MAX_END 7 MAX_END SMALLER -compare_x_at_limit 1 MAX_END 5 MAX_END LARGER -compare_x_at_limit 7 MAX_END 5 MAX_END LARGER -compare_x_at_limit 7 MAX_END 1 MAX_END LARGER -# -compare_x_at_limit 1 MAX_END 1 MIN_END EQUAL -compare_x_at_limit 5 MAX_END 5 MIN_END EQUAL -compare_x_at_limit 7 MAX_END 7 MIN_END EQUAL -compare_x_at_limit 5 MAX_END 1 MIN_END SMALLER -compare_x_at_limit 5 MAX_END 7 MIN_END SMALLER -compare_x_at_limit 1 MAX_END 7 MIN_END SMALLER -compare_x_at_limit 1 MAX_END 5 MIN_END LARGER -compare_x_at_limit 7 MAX_END 5 MIN_END LARGER -compare_x_at_limit 7 MAX_END 1 MIN_END LARGER -# -compare_x_at_limit 1 MIN_END 1 MAX_END EQUAL -compare_x_at_limit 5 MIN_END 5 MAX_END EQUAL -compare_x_at_limit 7 MIN_END 7 MAX_END EQUAL -compare_x_at_limit 5 MIN_END 1 MAX_END SMALLER -compare_x_at_limit 5 MIN_END 7 MAX_END SMALLER -compare_x_at_limit 1 MIN_END 7 MAX_END SMALLER -compare_x_at_limit 1 MIN_END 5 MAX_END LARGER -compare_x_at_limit 7 MIN_END 5 MAX_END LARGER -compare_x_at_limit 7 MIN_END 1 MAX_END LARGER -# -compare_x_at_limit 1 MIN_END 1 MAX_END EQUAL -compare_x_at_limit 5 MIN_END 5 MAX_END EQUAL -compare_x_at_limit 7 MIN_END 7 MAX_END EQUAL -compare_x_at_limit 5 MIN_END 1 MAX_END SMALLER -compare_x_at_limit 5 MIN_END 7 MAX_END SMALLER -compare_x_at_limit 1 MIN_END 7 MAX_END SMALLER -compare_x_at_limit 1 MIN_END 5 MAX_END LARGER -compare_x_at_limit 7 MIN_END 5 MAX_END LARGER -compare_x_at_limit 7 MIN_END 1 MAX_END LARGER -# -compare_x_at_limit 1 MAX_END 1 MIN_END EQUAL -compare_x_at_limit 5 MAX_END 5 MIN_END EQUAL -compare_x_at_limit 7 MAX_END 7 MIN_END EQUAL -compare_x_at_limit 5 MAX_END 1 MIN_END SMALLER -compare_x_at_limit 5 MAX_END 7 MIN_END SMALLER -compare_x_at_limit 1 MAX_END 7 MIN_END SMALLER -compare_x_at_limit 1 MAX_END 5 MIN_END LARGER -compare_x_at_limit 7 MAX_END 5 MIN_END LARGER -compare_x_at_limit 7 MAX_END 1 MIN_END LARGER -# diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_near_limit b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_near_limit deleted file mode 100644 index f7cb2ea70da..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_x_near_limit +++ /dev/null @@ -1 +0,0 @@ -compare_x_near_limit 1 1 MIN_END EQUAL diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_y_near_boundary b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_y_near_boundary deleted file mode 100644 index 6e5f3700bd9..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/linear/lines/compare_y_near_boundary +++ /dev/null @@ -1,43 +0,0 @@ -compare_y_near_boundary 0 0 MIN_END EQUAL -compare_y_near_boundary 2 2 MIN_END EQUAL -compare_y_near_boundary 3 3 MIN_END EQUAL -compare_y_near_boundary 4 4 MIN_END EQUAL -compare_y_near_boundary 6 6 MIN_END EQUAL -# -compare_y_near_boundary 0 0 MAX_END EQUAL -compare_y_near_boundary 2 2 MAX_END EQUAL -compare_y_near_boundary 3 3 MAX_END EQUAL -compare_y_near_boundary 4 4 MAX_END EQUAL -compare_y_near_boundary 6 6 MAX_END EQUAL -# -compare_y_near_boundary 4 0 MAX_END SMALLER -compare_y_near_boundary 4 6 MAX_END SMALLER -compare_y_near_boundary 0 6 MAX_END SMALLER -# -compare_y_near_boundary 0 4 MAX_END LARGER -compare_y_near_boundary 6 4 MAX_END LARGER -compare_y_near_boundary 6 0 MAX_END LARGER -# -compare_y_near_boundary 4 0 MIN_END SMALLER -compare_y_near_boundary 4 6 MIN_END SMALLER -compare_y_near_boundary 0 6 MIN_END SMALLER -# -compare_y_near_boundary 0 4 MIN_END LARGER -compare_y_near_boundary 6 4 MIN_END LARGER -compare_y_near_boundary 6 0 MIN_END LARGER -# -compare_y_near_boundary 2 0 MIN_END LARGER -compare_y_near_boundary 2 4 MIN_END LARGER -compare_y_near_boundary 2 6 MIN_END LARGER -# -compare_y_near_boundary 2 0 MAX_END SMALLER -compare_y_near_boundary 2 4 MAX_END SMALLER -compare_y_near_boundary 2 6 MAX_END SMALLER -# -compare_y_near_boundary 3 0 MAX_END LARGER -compare_y_near_boundary 3 4 MAX_END LARGER -compare_y_near_boundary 3 6 MAX_END LARGER -# -compare_y_near_boundary 3 0 MIN_END SMALLER -compare_y_near_boundary 3 4 MIN_END SMALLER -compare_y_near_boundary 3 6 MIN_END SMALLER diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_at_limit b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_at_limit deleted file mode 100644 index e67ef1ebcc4..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_at_limit +++ /dev/null @@ -1,36 +0,0 @@ -# a point and a vertical asymptote -compare_x_at_limit 1 16 MIN_END SMALLER -compare_x_at_limit 1 17 MAX_END SMALLER -compare_x_at_limit 1 18 MIN_END SMALLER -compare_x_at_limit 1 19 MAX_END SMALLER -# -compare_x_at_limit 7 16 MIN_END LARGER -compare_x_at_limit 7 17 MAX_END LARGER -compare_x_at_limit 7 18 MIN_END LARGER -compare_x_at_limit 7 19 MAX_END LARGER -# -compare_x_at_limit 4 16 MIN_END EQUAL -compare_x_at_limit 4 17 MAX_END EQUAL -compare_x_at_limit 4 18 MIN_END EQUAL -compare_x_at_limit 4 19 MAX_END EQUAL -# a vertical asymptote and a vertical asymptote -compare_x_at_limit 16 MIN_END 24 MIN_END SMALLER -compare_x_at_limit 17 MAX_END 25 MAX_END SMALLER -compare_x_at_limit 18 MIN_END 26 MIN_END SMALLER -compare_x_at_limit 19 MAX_END 27 MAX_END SMALLER -compare_x_at_limit 16 MIN_END 32 MIN_END LARGER -compare_x_at_limit 17 MAX_END 33 MAX_END LARGER -compare_x_at_limit 18 MIN_END 34 MIN_END LARGER -compare_x_at_limit 19 MAX_END 35 MAX_END LARGER -# -compare_x_at_limit 16 MIN_END 17 MAX_END EQUAL -compare_x_at_limit 16 MIN_END 18 MIN_END EQUAL -compare_x_at_limit 16 MIN_END 19 MAX_END EQUAL -compare_x_at_limit 17 MAX_END 18 MIN_END EQUAL -compare_x_at_limit 17 MAX_END 19 MAX_END EQUAL -compare_x_at_limit 18 MIN_END 19 MAX_END EQUAL -# -compare_x_at_limit 16 MIN_END 20 MIN_END EQUAL -compare_x_at_limit 17 MAX_END 21 MAX_END EQUAL -compare_x_at_limit 18 MIN_END 22 MIN_END EQUAL -compare_x_at_limit 19 MAX_END 23 MAX_END EQUAL diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_near_limit b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_near_limit deleted file mode 100644 index 74eaf8c9f1d..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_x_near_limit +++ /dev/null @@ -1,4 +0,0 @@ -compare_x_near_limit 16 20 MIN_END SMALLER -compare_x_near_limit 18 22 MIN_END SMALLER -compare_x_near_limit 20 16 MIN_END LARGER -compare_x_near_limit 20 20 MIN_END EQUAL diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_y_near_boundary b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_y_near_boundary deleted file mode 100644 index 196467e8430..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/compare_y_near_boundary +++ /dev/null @@ -1,7 +0,0 @@ -compare_y_near_boundary 17 19 MIN_END SMALLER -compare_y_near_boundary 17 15 MIN_END SMALLER -compare_y_near_boundary 19 15 MIN_END LARGER -# -compare_y_near_boundary 16 18 MAX_END LARGER -compare_y_near_boundary 16 15 MAX_END LARGER -compare_y_near_boundary 18 15 MAX_END SMALLER diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/curves b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/curves index f2958f17fba..1b89b17621a 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/curves +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/curves @@ -1,14 +1,7 @@ -# 0: a -# 1: b 3 1 1 1 -# 2: -c 3 0 1 1 5/10 0 -# 3: -d 3 0 1 1 5/10 75/100 -# 4: +c 3 0 1 1 0.5 0 +d 3 0 1 1 0.5 0.75 e 3 1 0 0 3 1 1 0 -# 5: -f 3 1 0 0 3 1 1 0 5/10 0 -# 6: -g 3 1 0 0 3 1 1 0 2/10 75/100 +f 3 1 0 0 3 1 1 0 0.5 0 +g 3 1 0 0 3 1 1 0 0.2 0.75 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/xcurves b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/xcurves index e1f808f6ea5..22937cce6d2 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/xcurves +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/rational_arcs/xcurves @@ -1,80 +1,19 @@ -# 0: 1/(1+x^2) -e 1 1 3 1 0 1 -# 1: 1/(-x^2+1) -f 1 1 3 1 0 -1 1 1 -# 2: 1/(1-x^2) -f 1 1 3 1 0 -1 -1 0 -# 3: 1/(1-x^2) -g 1 1 3 1 0 -1 -1 1 -# 4: 1/(x^2-1) -g 1 1 3 -1 0 1 -9/10 9/10 -# 5: 1/(-1+x^2) -g 1 1 3 -1 0 1 -10 -11/10 -# 6: 1/(-1+x^2) -g 1 1 3 -1 0 1 11/10 10 -# 7: x/(x^2+1) -g 2 0 1 3 1 0 1 -10 10 -# 8: 1/(x^2-1) -f 1 1 3 1 0 -1 -2 0 -# 9: 1/(1-x^2) -g 1 1 3 1 0 -1 -2 -1 -# 10: 1/(1-x^2) -g 1 1 3 1 0 -1 -1 0 -# 11: 1/(1-x^2) -g 1 1 3 1 0 -1 0 1 -# 12: 1/(1-x^2) -g 1 1 3 1 0 -1 1 2 -# 13: 1/(1-x^2) -f 1 1 3 1 0 -1 2 1 -# 14: 1/3 -e 1 -1 1 3 -# 15: 0 -e 1 0 1 1 -# 16: 1/x, x > 0 -f 1 1 2 0 1 0 1 -# 17: 1/x, x < 0 -f 1 1 2 0 1 0 0 -# 18: -1/x, x > 0 -f 1 -1 2 0 1 0 1 -# 18: -1/x, x < 0 -f 1 -1 2 0 1 0 0 -# 20: 1/x^2, x > 0 -f 1 1 3 0 0 1 0 1 -# 21: 1/x^2, x < 0 -f 1 1 3 0 0 1 0 0 -# 22: -1/x^2, x > 0 -f 1 -1 3 0 0 1 0 1 -# 23: -1/x^2, x < 0 -f 1 -1 3 0 0 1 0 0 -# 24: 1/(-1+x), x > 1 -f 1 1 2 -1 1 1 1 -# 25: 1/(-1+x), x < 1 -f 1 1 2 -1 1 1 0 -# 26: -1/(-1+x), x > 1 -f 1 -1 2 -1 1 1 1 -# 27: -1/(-1+x), x < 1 -f 1 -1 2 -1 1 1 0 -# 28: 1/(-1+x)^2, x > 1 -f 1 1 3 1 -2 1 1 1 -# 29: 1/(-1+x)^2, x < 1 -f 1 1 3 1 -2 1 1 0 -# 30: -1/(-1+x)^2, x > 1 -f 1 -1 3 1 -2 1 1 1 -# 31: -1/(-1+x)^2, x < 1 -f 1 -1 3 1 -2 1 1 0 -# 32: 1/(1+x), x > -1 -f 1 1 2 1 1 -1 1 -# 33: 1/(1+x), x < -1 -f 1 1 2 1 1 -1 0 -# 34: -1/(1+x), x > -1 -f 1 -1 2 1 1 -1 1 -# 35: -1/(1+x), x < -1 -f 1 -1 2 1 1 -1 0 -# 36: 1/(1+x)^2, x > -1 -f 1 1 3 1 2 1 -1 1 -# 37: 1/(1+x)^2, x < -1 -f 1 1 3 1 2 1 -1 0 -# 38: -1/(1+x)^2, x > -1 -f 1 -1 3 1 2 1 -1 1 -# 39: -1/(1+x)^2, x < -1 -f 1 -1 3 1 2 1 -1 0 +e 1 1 3 1 0 1 +# 1/(-x^2+1) +f 1 1 3 1 0 -1 1 1 +f 1 1 3 1 0 -1 -1 0 +g 1 1 3 1 0 -1 -1 1 +# 1/(x^2-1) +g 1 1 3 -1 0 1 -0.9 0.9 +g 1 1 3 -1 0 1 -10 -1.1 +g 1 1 3 -1 0 1 1.1 10 +# x/(x^2+1) +g 2 0 1 3 1 0 1 -10 10 +# 1/(x^2-1) +f 1 1 3 1 0 -1 -2 0 +g 1 1 3 1 0 -1 -2 -1 +g 1 1 3 1 0 -1 -1 0 +g 1 1 3 1 0 -1 0 1 +g 1 1 3 1 0 -1 1 2 +f 1 1 3 1 0 -1 2 1 +e 1 -1 1 3 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_x b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_x new file mode 100644 index 00000000000..c753f6db749 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_x @@ -0,0 +1,373 @@ +boundary_near_x 8 MIN_END 8 MIN_END EQUAL +boundary_near_x 9 MIN_END 9 MIN_END EQUAL +boundary_near_x 32 MIN_END 32 MIN_END EQUAL +boundary_near_x 33 MIN_END 33 MIN_END EQUAL +boundary_near_x 64 MIN_END 64 MIN_END EQUAL +boundary_near_x 65 MIN_END 65 MIN_END EQUAL +boundary_near_x 92 MIN_END 92 MIN_END EQUAL +boundary_near_x 93 MIN_END 93 MIN_END EQUAL +# +boundary_near_x 0 8 MIN_END LARGER +boundary_near_x 0 9 MIN_END LARGER +boundary_near_x 0 32 MIN_END SMALLER +boundary_near_x 0 33 MIN_END SMALLER +boundary_near_x 0 64 MIN_END SMALLER +boundary_near_x 0 65 MIN_END SMALLER +boundary_near_x 0 92 MIN_END LARGER +boundary_near_x 0 93 MIN_END LARGER # +boundary_near_x 1 8 MIN_END LARGER +boundary_near_x 1 9 MIN_END LARGER +boundary_near_x 1 32 MIN_END SMALLER +boundary_near_x 1 33 MIN_END SMALLER +boundary_near_x 1 64 MIN_END SMALLER +boundary_near_x 1 65 MIN_END SMALLER +boundary_near_x 1 92 MIN_END SMALLER +boundary_near_x 1 93 MIN_END SMALLER # +boundary_near_x 2 8 MIN_END LARGER +boundary_near_x 2 9 MIN_END LARGER +boundary_near_x 2 32 MIN_END SMALLER +boundary_near_x 2 33 MIN_END SMALLER +boundary_near_x 2 64 MIN_END SMALLER +boundary_near_x 2 65 MIN_END SMALLER +boundary_near_x 2 92 MIN_END SMALLER +boundary_near_x 2 93 MIN_END SMALLER +# +boundary_near_x 3 8 MIN_END LARGER +boundary_near_x 3 9 MIN_END LARGER +boundary_near_x 3 32 MIN_END LARGER +boundary_near_x 3 33 MIN_END LARGER +boundary_near_x 3 64 MIN_END LARGER +boundary_near_x 3 65 MIN_END LARGER +boundary_near_x 3 92 MIN_END LARGER +boundary_near_x 3 93 MIN_END LARGER +# +boundary_near_x 4 8 MIN_END LARGER +boundary_near_x 4 9 MIN_END LARGER +boundary_near_x 4 32 MIN_END LARGER +boundary_near_x 4 33 MIN_END LARGER +boundary_near_x 4 64 MIN_END SMALLER +boundary_near_x 4 65 MIN_END SMALLER +boundary_near_x 4 92 MIN_END LARGER +boundary_near_x 4 93 MIN_END LARGER +# +boundary_near_x 5 8 MIN_END LARGER +boundary_near_x 5 9 MIN_END LARGER +boundary_near_x 5 32 MIN_END LARGER +boundary_near_x 5 33 MIN_END LARGER +boundary_near_x 5 64 MIN_END LARGER +boundary_near_x 5 65 MIN_END LARGER +boundary_near_x 5 92 MIN_END LARGER +boundary_near_x 5 93 MIN_END LARGER +# +boundary_near_x 6 8 MIN_END LARGER +boundary_near_x 6 9 MIN_END LARGER +boundary_near_x 6 32 MIN_END SMALLER +boundary_near_x 6 33 MIN_END SMALLER +boundary_near_x 6 64 MIN_END SMALLER +boundary_near_x 6 65 MIN_END SMALLER +boundary_near_x 6 92 MIN_END LARGER +boundary_near_x 6 93 MIN_END LARGER +# +boundary_near_x 7 8 MIN_END LARGER +boundary_near_x 7 9 MIN_END LARGER +boundary_near_x 7 32 MIN_END LARGER +boundary_near_x 7 33 MIN_END LARGER +boundary_near_x 7 64 MIN_END SMALLER +boundary_near_x 7 65 MIN_END SMALLER +boundary_near_x 7 92 MIN_END LARGER +boundary_near_x 7 93 MIN_END LARGER +# +boundary_near_x 8 8 MIN_END LARGER +boundary_near_x 8 9 MIN_END LARGER +boundary_near_x 8 32 MIN_END EQUAL +boundary_near_x 8 33 MIN_END EQUAL +boundary_near_x 8 64 MIN_END SMALLER +boundary_near_x 8 65 MIN_END SMALLER +boundary_near_x 8 92 MIN_END LARGER +boundary_near_x 8 93 MIN_END LARGER +# +boundary_near_x 9 8 MIN_END LARGER +boundary_near_x 9 9 MIN_END LARGER +boundary_near_x 9 32 MIN_END EQUAL +boundary_near_x 9 33 MIN_END EQUAL +boundary_near_x 9 64 MIN_END SMALLER +boundary_near_x 9 65 MIN_END SMALLER +boundary_near_x 9 92 MIN_END LARGER +boundary_near_x 9 93 MIN_END LARGER +# +boundary_near_x 10 8 MIN_END LARGER +boundary_near_x 10 9 MIN_END LARGER +boundary_near_x 10 32 MIN_END EQUAL +boundary_near_x 10 33 MIN_END EQUAL +boundary_near_x 10 64 MIN_END SMALLER +boundary_near_x 10 65 MIN_END SMALLER +boundary_near_x 10 92 MIN_END LARGER +boundary_near_x 10 93 MIN_END LARGER +# +boundary_near_x 11 8 MIN_END LARGER +boundary_near_x 11 9 MIN_END LARGER +boundary_near_x 11 32 MIN_END EQUAL +boundary_near_x 11 33 MIN_END EQUAL +boundary_near_x 11 64 MIN_END SMALLER +boundary_near_x 11 65 MIN_END SMALLER +boundary_near_x 11 92 MIN_END LARGER +boundary_near_x 11 93 MIN_END LARGER +# +boundary_near_x 16 8 MIN_END LARGER +boundary_near_x 16 9 MIN_END LARGER +boundary_near_x 16 32 MIN_END LARGER +boundary_near_x 16 33 MIN_END LARGER +boundary_near_x 16 64 MIN_END EQUAL +boundary_near_x 16 65 MIN_END EQUAL +boundary_near_x 16 92 MIN_END LARGER +boundary_near_x 16 93 MIN_END LARGER +# +boundary_near_x 17 8 MIN_END LARGER +boundary_near_x 17 9 MIN_END LARGER +boundary_near_x 17 32 MIN_END LARGER +boundary_near_x 17 33 MIN_END LARGER +boundary_near_x 17 64 MIN_END EQUAL +boundary_near_x 17 65 MIN_END EQUAL +boundary_near_x 17 92 MIN_END LARGER +boundary_near_x 17 93 MIN_END LARGER +# +boundary_near_x 18 8 MIN_END LARGER +boundary_near_x 18 9 MIN_END LARGER +boundary_near_x 18 32 MIN_END LARGER +boundary_near_x 18 33 MIN_END LARGER +boundary_near_x 18 64 MIN_END EQUAL +boundary_near_x 18 65 MIN_END EQUAL +boundary_near_x 18 92 MIN_END LARGER +boundary_near_x 18 93 MIN_END LARGER +# +boundary_near_x 19 8 MIN_END LARGER +boundary_near_x 19 9 MIN_END LARGER +boundary_near_x 19 32 MIN_END LARGER +boundary_near_x 19 33 MIN_END LARGER +boundary_near_x 19 64 MIN_END EQUAL +boundary_near_x 19 65 MIN_END EQUAL +boundary_near_x 19 92 MIN_END LARGER +boundary_near_x 19 93 MIN_END LARGER # +boundary_near_x 20 8 MIN_END LARGER +boundary_near_x 20 9 MIN_END LARGER +boundary_near_x 20 32 MIN_END SMALLER +boundary_near_x 20 33 MIN_END SMALLER +boundary_near_x 20 64 MIN_END SMALLER +boundary_near_x 20 65 MIN_END SMALLER +boundary_near_x 20 92 MIN_END EQUAL +boundary_near_x 20 93 MIN_END EQUAL +# +boundary_near_x 21 8 MIN_END LARGER +boundary_near_x 21 9 MIN_END LARGER +boundary_near_x 21 32 MIN_END SMALLER +boundary_near_x 21 33 MIN_END SMALLER +boundary_near_x 21 64 MIN_END SMALLER +boundary_near_x 21 65 MIN_END SMALLER +boundary_near_x 21 92 MIN_END EQUAL +boundary_near_x 21 93 MIN_END EQUAL +# +boundary_near_x 22 8 MIN_END LARGER +boundary_near_x 22 9 MIN_END LARGER +boundary_near_x 22 32 MIN_END SMALLER +boundary_near_x 22 33 MIN_END SMALLER +boundary_near_x 22 64 MIN_END SMALLER +boundary_near_x 22 65 MIN_END SMALLER +boundary_near_x 22 92 MIN_END EQUAL +boundary_near_x 22 93 MIN_END EQUAL +# +boundary_near_x 23 8 MIN_END LARGER +boundary_near_x 23 9 MIN_END LARGER +boundary_near_x 23 32 MIN_END SMALLER +boundary_near_x 23 33 MIN_END SMALLER +boundary_near_x 23 64 MIN_END SMALLER +boundary_near_x 23 65 MIN_END SMALLER +boundary_near_x 23 92 MIN_END EQUAL +boundary_near_x 23 93 MIN_END EQUAL +# +boundary_near_x 12 MAX_END 12 MAX_END EQUAL +boundary_near_x 13 MAX_END 13 MAX_END EQUAL +boundary_near_x 44 MAX_END 44 MAX_END EQUAL +boundary_near_x 45 MAX_END 45 MAX_END EQUAL +boundary_near_x 76 MAX_END 76 MAX_END EQUAL +boundary_near_x 77 MAX_END 77 MAX_END EQUAL +boundary_near_x 80 MAX_END 80 MAX_END EQUAL +boundary_near_x 81 MAX_END 81 MAX_END EQUAL +# +boundary_near_x 0 12 MAX_END SMALLER +boundary_near_x 0 13 MAX_END SMALLER +boundary_near_x 0 44 MAX_END SMALLER +boundary_near_x 0 45 MAX_END SMALLER +boundary_near_x 0 76 MAX_END SMALLER +boundary_near_x 0 77 MAX_END SMALLER +boundary_near_x 0 80 MAX_END LARGER +boundary_near_x 0 81 MAX_END LARGER +# +boundary_near_x 1 12 MAX_END SMALLER +boundary_near_x 1 13 MAX_END SMALLER +boundary_near_x 1 44 MAX_END SMALLER +boundary_near_x 1 45 MAX_END SMALLER +boundary_near_x 1 76 MAX_END SMALLER +boundary_near_x 1 77 MAX_END SMALLER +boundary_near_x 1 80 MAX_END SMALLER +boundary_near_x 1 81 MAX_END SMALLER +# +boundary_near_x 2 12 MAX_END SMALLER +boundary_near_x 2 13 MAX_END SMALLER +boundary_near_x 2 44 MAX_END SMALLER +boundary_near_x 2 45 MAX_END SMALLER +boundary_near_x 2 76 MAX_END SMALLER +boundary_near_x 2 77 MAX_END SMALLER +boundary_near_x 2 80 MAX_END SMALLER +boundary_near_x 2 81 MAX_END SMALLER +# +boundary_near_x 3 12 MAX_END SMALLER +boundary_near_x 3 13 MAX_END SMALLER +boundary_near_x 3 44 MAX_END LARGER +boundary_near_x 3 45 MAX_END LARGER +boundary_near_x 3 76 MAX_END LARGER +boundary_near_x 3 77 MAX_END LARGER +boundary_near_x 3 80 MAX_END LARGER +boundary_near_x 3 81 MAX_END LARGER +# +boundary_near_x 4 12 MAX_END SMALLER +boundary_near_x 4 13 MAX_END SMALLER +boundary_near_x 4 44 MAX_END LARGER +boundary_near_x 4 45 MAX_END LARGER +boundary_near_x 4 76 MAX_END SMALLER +boundary_near_x 4 77 MAX_END SMALLER +boundary_near_x 4 80 MAX_END LARGER +boundary_near_x 4 81 MAX_END LARGER +# +boundary_near_x 5 12 MAX_END SMALLER +boundary_near_x 5 13 MAX_END SMALLER +boundary_near_x 5 44 MAX_END LARGER +boundary_near_x 5 45 MAX_END LARGER +boundary_near_x 5 76 MAX_END LARGER +boundary_near_x 5 77 MAX_END LARGER +boundary_near_x 5 80 MAX_END LARGER +boundary_near_x 5 81 MAX_END LARGER +# +boundary_near_x 6 12 MAX_END SMALLER +boundary_near_x 6 13 MAX_END SMALLER +boundary_near_x 6 44 MAX_END SMALLER +boundary_near_x 6 45 MAX_END SMALLER +boundary_near_x 6 76 MAX_END SMALLER +boundary_near_x 6 77 MAX_END SMALLER +boundary_near_x 6 80 MAX_END LARGER +boundary_near_x 6 81 MAX_END LARGER +# +boundary_near_x 7 12 MAX_END SMALLER +boundary_near_x 7 13 MAX_END SMALLER +boundary_near_x 7 44 MAX_END LARGER +boundary_near_x 7 45 MAX_END LARGER +boundary_near_x 7 76 MAX_END SMALLER +boundary_near_x 7 77 MAX_END SMALLER +boundary_near_x 7 80 MAX_END LARGER +boundary_near_x 7 81 MAX_END LARGER +# +boundary_near_x 8 12 MAX_END SMALLER +boundary_near_x 8 13 MAX_END SMALLER +boundary_near_x 8 44 MAX_END EQUAL +boundary_near_x 8 45 MAX_END EQUAL +boundary_near_x 8 76 MAX_END SMALLER +boundary_near_x 8 77 MAX_END SMALLER +boundary_near_x 8 80 MAX_END LARGER +boundary_near_x 8 81 MAX_END LARGER +# +boundary_near_x 9 12 MAX_END SMALLER +boundary_near_x 9 13 MAX_END SMALLER +boundary_near_x 9 44 MAX_END EQUAL +boundary_near_x 9 45 MAX_END EQUAL +boundary_near_x 9 76 MAX_END SMALLER +boundary_near_x 9 77 MAX_END SMALLER +boundary_near_x 9 80 MAX_END LARGER +boundary_near_x 9 81 MAX_END LARGER +# +boundary_near_x 10 12 MAX_END SMALLER +boundary_near_x 10 13 MAX_END SMALLER +boundary_near_x 10 44 MAX_END EQUAL +boundary_near_x 10 45 MAX_END EQUAL +boundary_near_x 10 76 MAX_END SMALLER +boundary_near_x 10 77 MAX_END SMALLER +boundary_near_x 10 80 MAX_END LARGER +boundary_near_x 10 81 MAX_END LARGER +# +boundary_near_x 11 12 MAX_END SMALLER +boundary_near_x 11 13 MAX_END SMALLER +boundary_near_x 11 44 MAX_END EQUAL +boundary_near_x 11 45 MAX_END EQUAL +boundary_near_x 11 76 MAX_END SMALLER +boundary_near_x 11 77 MAX_END SMALLER +boundary_near_x 11 80 MAX_END LARGER +boundary_near_x 11 81 MAX_END LARGER # +boundary_near_x 16 12 MAX_END SMALLER +boundary_near_x 16 13 MAX_END SMALLER +boundary_near_x 16 44 MAX_END LARGER +boundary_near_x 16 45 MAX_END LARGER +boundary_near_x 16 76 MAX_END EQUAL +boundary_near_x 16 77 MAX_END EQUAL +boundary_near_x 16 80 MAX_END LARGER +boundary_near_x 16 81 MAX_END LARGER +# +boundary_near_x 17 12 MAX_END SMALLER +boundary_near_x 17 13 MAX_END SMALLER +boundary_near_x 17 44 MAX_END LARGER +boundary_near_x 17 45 MAX_END LARGER +boundary_near_x 17 76 MAX_END EQUAL +boundary_near_x 17 77 MAX_END EQUAL +boundary_near_x 17 80 MAX_END LARGER +boundary_near_x 17 81 MAX_END LARGER +# +boundary_near_x 18 12 MAX_END SMALLER +boundary_near_x 18 13 MAX_END SMALLER +boundary_near_x 18 44 MAX_END LARGER +boundary_near_x 18 45 MAX_END LARGER +boundary_near_x 18 76 MAX_END EQUAL +boundary_near_x 18 77 MAX_END EQUAL +boundary_near_x 18 80 MAX_END LARGER +boundary_near_x 18 81 MAX_END LARGER +# +boundary_near_x 19 12 MAX_END SMALLER +boundary_near_x 19 13 MAX_END SMALLER +boundary_near_x 19 44 MAX_END LARGER +boundary_near_x 19 45 MAX_END LARGER +boundary_near_x 19 76 MAX_END EQUAL +boundary_near_x 19 77 MAX_END EQUAL +boundary_near_x 19 80 MAX_END LARGER +boundary_near_x 19 81 MAX_END LARGER +# +boundary_near_x 20 12 MAX_END SMALLER +boundary_near_x 20 13 MAX_END SMALLER +boundary_near_x 20 44 MAX_END SMALLER +boundary_near_x 20 45 MAX_END SMALLER +boundary_near_x 20 76 MAX_END SMALLER +boundary_near_x 20 77 MAX_END SMALLER +boundary_near_x 20 80 MAX_END EQUAL +boundary_near_x 20 81 MAX_END EQUAL +# +boundary_near_x 21 12 MAX_END SMALLER +boundary_near_x 21 13 MAX_END SMALLER +boundary_near_x 21 44 MAX_END SMALLER +boundary_near_x 21 45 MAX_END SMALLER +boundary_near_x 21 76 MAX_END SMALLER +boundary_near_x 21 77 MAX_END SMALLER +boundary_near_x 21 80 MAX_END EQUAL +boundary_near_x 21 81 MAX_END EQUAL +# +boundary_near_x 22 12 MAX_END SMALLER +boundary_near_x 22 13 MAX_END SMALLER +boundary_near_x 22 44 MAX_END SMALLER +boundary_near_x 22 45 MAX_END SMALLER +boundary_near_x 22 76 MAX_END SMALLER +boundary_near_x 22 77 MAX_END SMALLER +boundary_near_x 22 80 MAX_END EQUAL +boundary_near_x 22 81 MAX_END EQUAL +# +boundary_near_x 23 12 MAX_END SMALLER +boundary_near_x 23 13 MAX_END SMALLER +boundary_near_x 23 44 MAX_END SMALLER +boundary_near_x 23 45 MAX_END SMALLER +boundary_near_x 23 76 MAX_END SMALLER +boundary_near_x 23 77 MAX_END SMALLER +boundary_near_x 23 80 MAX_END EQUAL +boundary_near_x 23 81 MAX_END EQUAL diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_y b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_y new file mode 100644 index 00000000000..9733a175546 --- /dev/null +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/boundary_near_y @@ -0,0 +1,137 @@ +boundary_near_y 0 1 MIN_END EQUAL +boundary_near_y 0 2 MIN_END EQUAL +boundary_near_y 0 3 MIN_END EQUAL +boundary_near_y 0 4 MIN_END EQUAL +boundary_near_y 0 5 MIN_END EQUAL +boundary_near_y 0 6 MIN_END EQUAL +boundary_near_y 0 7 MIN_END EQUAL +boundary_near_y 0 8 MIN_END EQUAL +boundary_near_y 0 9 MIN_END EQUAL +boundary_near_y 0 10 MIN_END EQUAL +boundary_near_y 0 11 MIN_END EQUAL +boundary_near_y 0 14 MIN_END EQUAL +boundary_near_y 0 15 MIN_END EQUAL +boundary_near_y 0 16 MIN_END EQUAL +boundary_near_y 0 17 MIN_END EQUAL +boundary_near_y 0 18 MIN_END EQUAL +boundary_near_y 0 19 MIN_END EQUAL +boundary_near_y 0 20 MIN_END EQUAL +boundary_near_y 0 21 MIN_END EQUAL +boundary_near_y 0 22 MIN_END EQUAL +boundary_near_y 0 23 MIN_END EQUAL +boundary_near_y 0 24 MIN_END EQUAL +boundary_near_y 0 25 MIN_END EQUAL +boundary_near_y 0 26 MIN_END EQUAL +boundary_near_y 0 27 MIN_END EQUAL +boundary_near_y 0 28 MIN_END EQUAL +boundary_near_y 0 29 MIN_END EQUAL +boundary_near_y 0 30 MIN_END EQUAL +boundary_near_y 0 31 MIN_END EQUAL +boundary_near_y 0 48 MIN_END SMALLER +boundary_near_y 0 49 MIN_END SMALLER +boundary_near_y 0 50 MIN_END SMALLER +boundary_near_y 0 51 MIN_END SMALLER +boundary_near_y 0 52 MIN_END LARGER +boundary_near_y 0 53 MIN_END LARGER +boundary_near_y 0 54 MIN_END LARGER +boundary_near_y 0 55 MIN_END LARGER +boundary_near_y 0 56 MIN_END SMALLER +boundary_near_y 0 57 MIN_END SMALLER +boundary_near_y 0 58 MIN_END SMALLER +boundary_near_y 0 59 MIN_END SMALLER +boundary_near_y 0 60 MIN_END LARGER +boundary_near_y 0 61 MIN_END LARGER +boundary_near_y 0 62 MIN_END LARGER +boundary_near_y 0 63 MIN_END LARGER # +boundary_near_y 0 0 MIN_END EQUAL +boundary_near_y 1 1 MIN_END EQUAL +boundary_near_y 2 2 MIN_END EQUAL +boundary_near_y 3 3 MIN_END EQUAL +boundary_near_y 4 4 MIN_END EQUAL +boundary_near_y 5 5 MIN_END EQUAL +boundary_near_y 6 6 MIN_END EQUAL +boundary_near_y 7 7 MIN_END EQUAL +boundary_near_y 8 8 MIN_END EQUAL +boundary_near_y 9 9 MIN_END EQUAL +boundary_near_y 10 10 MIN_END EQUAL +boundary_near_y 11 11 MIN_END EQUAL +boundary_near_y 14 14 MIN_END EQUAL +boundary_near_y 15 15 MIN_END EQUAL +boundary_near_y 16 16 MIN_END EQUAL +boundary_near_y 17 17 MIN_END EQUAL +boundary_near_y 18 18 MIN_END EQUAL +boundary_near_y 19 19 MIN_END EQUAL +boundary_near_y 20 20 MIN_END EQUAL +boundary_near_y 21 21 MIN_END EQUAL +boundary_near_y 22 22 MIN_END EQUAL +boundary_near_y 23 23 MIN_END EQUAL +boundary_near_y 24 24 MIN_END EQUAL +boundary_near_y 25 25 MIN_END EQUAL +boundary_near_y 26 26 MIN_END EQUAL +boundary_near_y 27 27 MIN_END EQUAL +boundary_near_y 28 28 MIN_END EQUAL +boundary_near_y 29 29 MIN_END EQUAL +boundary_near_y 30 30 MIN_END EQUAL +boundary_near_y 31 31 MIN_END EQUAL +boundary_near_y 48 48 MIN_END EQUAL +boundary_near_y 49 49 MIN_END EQUAL +boundary_near_y 50 50 MIN_END EQUAL +boundary_near_y 51 51 MIN_END EQUAL +boundary_near_y 52 52 MIN_END EQUAL +boundary_near_y 53 53 MIN_END EQUAL +boundary_near_y 54 54 MIN_END EQUAL +boundary_near_y 55 55 MIN_END EQUAL +boundary_near_y 56 56 MIN_END EQUAL +boundary_near_y 57 57 MIN_END EQUAL +boundary_near_y 58 58 MIN_END EQUAL +boundary_near_y 59 59 MIN_END EQUAL +boundary_near_y 60 60 MIN_END EQUAL +boundary_near_y 61 61 MIN_END EQUAL +boundary_near_y 62 62 MIN_END EQUAL +boundary_near_y 63 63 MIN_END EQUAL # +boundary_near_y 0 0 MAX_END EQUAL +boundary_near_y 1 1 MAX_END EQUAL +boundary_near_y 2 2 MAX_END EQUAL +boundary_near_y 3 3 MAX_END EQUAL +boundary_near_y 4 4 MAX_END EQUAL +boundary_near_y 5 5 MAX_END EQUAL +boundary_near_y 6 6 MAX_END EQUAL +boundary_near_y 7 7 MAX_END EQUAL +boundary_near_y 10 10 MAX_END EQUAL +boundary_near_y 11 11 MAX_END EQUAL +boundary_near_y 12 12 MAX_END EQUAL +boundary_near_y 13 13 MAX_END EQUAL +boundary_near_y 14 14 MAX_END EQUAL +boundary_near_y 15 15 MAX_END EQUAL +boundary_near_y 16 16 MAX_END EQUAL +boundary_near_y 17 17 MAX_END EQUAL +boundary_near_y 18 18 MAX_END EQUAL +boundary_near_y 19 19 MAX_END EQUAL +boundary_near_y 20 20 MAX_END EQUAL +boundary_near_y 21 21 MAX_END EQUAL +boundary_near_y 22 22 MAX_END EQUAL +boundary_near_y 23 23 MAX_END EQUAL +boundary_near_y 24 24 MAX_END EQUAL +boundary_near_y 25 25 MAX_END EQUAL +boundary_near_y 26 26 MAX_END EQUAL +boundary_near_y 27 27 MAX_END EQUAL +boundary_near_y 28 28 MAX_END EQUAL +boundary_near_y 29 29 MAX_END EQUAL +boundary_near_y 30 30 MAX_END EQUAL +boundary_near_y 31 31 MAX_END EQUAL +boundary_near_y 48 48 MAX_END EQUAL +boundary_near_y 49 49 MAX_END EQUAL +boundary_near_y 50 50 MAX_END EQUAL +boundary_near_y 51 51 MAX_END EQUAL +boundary_near_y 52 52 MAX_END EQUAL +boundary_near_y 53 53 MAX_END EQUAL +boundary_near_y 54 54 MAX_END EQUAL +boundary_near_y 55 55 MAX_END EQUAL +boundary_near_y 56 56 MAX_END EQUAL +boundary_near_y 57 57 MAX_END EQUAL +boundary_near_y 58 58 MAX_END EQUAL +boundary_near_y 59 59 MAX_END EQUAL +boundary_near_y 60 60 MAX_END EQUAL +boundary_near_y 61 61 MAX_END EQUAL +boundary_near_y 62 62 MAX_END EQUAL +boundary_near_y 63 63 MAX_END EQUAL # diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_near_boundary b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_near_boundary deleted file mode 100644 index 1f5d37fbdf0..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_near_boundary +++ /dev/null @@ -1 +0,0 @@ -compare_x_near_boundary 32 33 MIN_END EQUAL diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_on_boundary b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_on_boundary deleted file mode 100644 index 3f83fb731d4..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_x_on_boundary +++ /dev/null @@ -1,252 +0,0 @@ -compare_x_on_boundary 32 MIN_END 32 MIN_END EQUAL -compare_x_on_boundary 33 MIN_END 33 MIN_END EQUAL -compare_x_on_boundary 64 MIN_END 64 MIN_END EQUAL -compare_x_on_boundary 65 MIN_END 65 MIN_END EQUAL -compare_x_on_boundary 92 MIN_END 92 MIN_END EQUAL -compare_x_on_boundary 93 MIN_END 93 MIN_END EQUAL -compare_x_on_boundary 0 32 MIN_END SMALLER -compare_x_on_boundary 0 33 MIN_END SMALLER -compare_x_on_boundary 0 64 MIN_END SMALLER -compare_x_on_boundary 0 65 MIN_END SMALLER -compare_x_on_boundary 0 92 MIN_END LARGER -compare_x_on_boundary 0 93 MIN_END LARGER -compare_x_on_boundary 1 32 MIN_END SMALLER -compare_x_on_boundary 1 33 MIN_END SMALLER -compare_x_on_boundary 1 64 MIN_END SMALLER -compare_x_on_boundary 1 65 MIN_END SMALLER -compare_x_on_boundary 1 92 MIN_END SMALLER -compare_x_on_boundary 1 93 MIN_END SMALLER -compare_x_on_boundary 2 32 MIN_END SMALLER -compare_x_on_boundary 2 33 MIN_END SMALLER -compare_x_on_boundary 2 64 MIN_END SMALLER -compare_x_on_boundary 2 65 MIN_END SMALLER -compare_x_on_boundary 2 92 MIN_END SMALLER -compare_x_on_boundary 2 93 MIN_END SMALLER -compare_x_on_boundary 3 32 MIN_END LARGER -compare_x_on_boundary 3 33 MIN_END LARGER -compare_x_on_boundary 3 64 MIN_END LARGER -compare_x_on_boundary 3 65 MIN_END LARGER -compare_x_on_boundary 3 92 MIN_END LARGER -compare_x_on_boundary 3 93 MIN_END LARGER -compare_x_on_boundary 4 32 MIN_END LARGER -compare_x_on_boundary 4 33 MIN_END LARGER -compare_x_on_boundary 4 64 MIN_END SMALLER -compare_x_on_boundary 4 65 MIN_END SMALLER -compare_x_on_boundary 4 92 MIN_END LARGER -compare_x_on_boundary 4 93 MIN_END LARGER -compare_x_on_boundary 5 32 MIN_END LARGER -compare_x_on_boundary 5 33 MIN_END LARGER -compare_x_on_boundary 5 64 MIN_END LARGER -compare_x_on_boundary 5 65 MIN_END LARGER -compare_x_on_boundary 5 92 MIN_END LARGER -compare_x_on_boundary 5 93 MIN_END LARGER -compare_x_on_boundary 6 32 MIN_END SMALLER -compare_x_on_boundary 6 33 MIN_END SMALLER -compare_x_on_boundary 6 64 MIN_END SMALLER -compare_x_on_boundary 6 65 MIN_END SMALLER -compare_x_on_boundary 6 92 MIN_END LARGER -compare_x_on_boundary 6 93 MIN_END LARGER -compare_x_on_boundary 7 32 MIN_END LARGER -compare_x_on_boundary 7 33 MIN_END LARGER -compare_x_on_boundary 7 64 MIN_END SMALLER -compare_x_on_boundary 7 65 MIN_END SMALLER -compare_x_on_boundary 7 92 MIN_END LARGER -compare_x_on_boundary 7 93 MIN_END LARGER -compare_x_on_boundary 8 32 MIN_END EQUAL -compare_x_on_boundary 8 33 MIN_END EQUAL -compare_x_on_boundary 8 64 MIN_END SMALLER -compare_x_on_boundary 8 65 MIN_END SMALLER -compare_x_on_boundary 8 92 MIN_END LARGER -compare_x_on_boundary 8 93 MIN_END LARGER -compare_x_on_boundary 9 32 MIN_END EQUAL -compare_x_on_boundary 9 33 MIN_END EQUAL -compare_x_on_boundary 9 64 MIN_END SMALLER -compare_x_on_boundary 9 65 MIN_END SMALLER -compare_x_on_boundary 9 92 MIN_END LARGER -compare_x_on_boundary 9 93 MIN_END LARGER -compare_x_on_boundary 10 32 MIN_END EQUAL -compare_x_on_boundary 10 33 MIN_END EQUAL -compare_x_on_boundary 10 64 MIN_END SMALLER -compare_x_on_boundary 10 65 MIN_END SMALLER -compare_x_on_boundary 10 92 MIN_END LARGER -compare_x_on_boundary 10 93 MIN_END LARGER -compare_x_on_boundary 11 32 MIN_END EQUAL -compare_x_on_boundary 11 33 MIN_END EQUAL -compare_x_on_boundary 11 64 MIN_END SMALLER -compare_x_on_boundary 11 65 MIN_END SMALLER -compare_x_on_boundary 11 92 MIN_END LARGER -compare_x_on_boundary 11 93 MIN_END LARGER -compare_x_on_boundary 16 32 MIN_END LARGER -compare_x_on_boundary 16 33 MIN_END LARGER -compare_x_on_boundary 16 64 MIN_END EQUAL -compare_x_on_boundary 16 65 MIN_END EQUAL -compare_x_on_boundary 16 92 MIN_END LARGER -compare_x_on_boundary 16 93 MIN_END LARGER -compare_x_on_boundary 17 32 MIN_END LARGER -compare_x_on_boundary 17 33 MIN_END LARGER -compare_x_on_boundary 17 64 MIN_END EQUAL -compare_x_on_boundary 17 65 MIN_END EQUAL -compare_x_on_boundary 17 92 MIN_END LARGER -compare_x_on_boundary 17 93 MIN_END LARGER -compare_x_on_boundary 18 32 MIN_END LARGER -compare_x_on_boundary 18 33 MIN_END LARGER -compare_x_on_boundary 18 64 MIN_END EQUAL -compare_x_on_boundary 18 65 MIN_END EQUAL -compare_x_on_boundary 18 92 MIN_END LARGER -compare_x_on_boundary 18 93 MIN_END LARGER -compare_x_on_boundary 19 32 MIN_END LARGER -compare_x_on_boundary 19 33 MIN_END LARGER -compare_x_on_boundary 19 64 MIN_END EQUAL -compare_x_on_boundary 19 65 MIN_END EQUAL -compare_x_on_boundary 19 92 MIN_END LARGER -compare_x_on_boundary 19 93 MIN_END LARGER -compare_x_on_boundary 20 32 MIN_END SMALLER -compare_x_on_boundary 20 33 MIN_END SMALLER -compare_x_on_boundary 20 64 MIN_END SMALLER -compare_x_on_boundary 20 65 MIN_END SMALLER -compare_x_on_boundary 20 92 MIN_END EQUAL -compare_x_on_boundary 20 93 MIN_END EQUAL -compare_x_on_boundary 21 32 MIN_END SMALLER -compare_x_on_boundary 21 33 MIN_END SMALLER -compare_x_on_boundary 21 64 MIN_END SMALLER -compare_x_on_boundary 21 65 MIN_END SMALLER -compare_x_on_boundary 21 92 MIN_END EQUAL -compare_x_on_boundary 21 93 MIN_END EQUAL -compare_x_on_boundary 22 32 MIN_END SMALLER -compare_x_on_boundary 22 33 MIN_END SMALLER -compare_x_on_boundary 22 64 MIN_END SMALLER -compare_x_on_boundary 22 65 MIN_END SMALLER -compare_x_on_boundary 22 92 MIN_END EQUAL -compare_x_on_boundary 22 93 MIN_END EQUAL -compare_x_on_boundary 23 32 MIN_END SMALLER -compare_x_on_boundary 23 33 MIN_END SMALLER -compare_x_on_boundary 23 64 MIN_END SMALLER -compare_x_on_boundary 23 65 MIN_END SMALLER -compare_x_on_boundary 23 92 MIN_END EQUAL -compare_x_on_boundary 23 93 MIN_END EQUAL -compare_x_on_boundary 44 MAX_END 44 MAX_END EQUAL -compare_x_on_boundary 45 MAX_END 45 MAX_END EQUAL -compare_x_on_boundary 76 MAX_END 76 MAX_END EQUAL -compare_x_on_boundary 77 MAX_END 77 MAX_END EQUAL -compare_x_on_boundary 80 MAX_END 80 MAX_END EQUAL -compare_x_on_boundary 81 MAX_END 81 MAX_END EQUAL -compare_x_on_boundary 0 44 MAX_END SMALLER -compare_x_on_boundary 0 45 MAX_END SMALLER -compare_x_on_boundary 0 76 MAX_END SMALLER -compare_x_on_boundary 0 77 MAX_END SMALLER -compare_x_on_boundary 0 80 MAX_END LARGER -compare_x_on_boundary 0 81 MAX_END LARGER -compare_x_on_boundary 1 44 MAX_END SMALLER -compare_x_on_boundary 1 45 MAX_END SMALLER -compare_x_on_boundary 1 76 MAX_END SMALLER -compare_x_on_boundary 1 77 MAX_END SMALLER -compare_x_on_boundary 1 80 MAX_END SMALLER -compare_x_on_boundary 1 81 MAX_END SMALLER -compare_x_on_boundary 2 44 MAX_END SMALLER -compare_x_on_boundary 2 45 MAX_END SMALLER -compare_x_on_boundary 2 76 MAX_END SMALLER -compare_x_on_boundary 2 77 MAX_END SMALLER -compare_x_on_boundary 2 80 MAX_END SMALLER -compare_x_on_boundary 2 81 MAX_END SMALLER -compare_x_on_boundary 3 44 MAX_END LARGER -compare_x_on_boundary 3 45 MAX_END LARGER -compare_x_on_boundary 3 76 MAX_END LARGER -compare_x_on_boundary 3 77 MAX_END LARGER -compare_x_on_boundary 3 80 MAX_END LARGER -compare_x_on_boundary 3 81 MAX_END LARGER -compare_x_on_boundary 4 44 MAX_END LARGER -compare_x_on_boundary 4 45 MAX_END LARGER -compare_x_on_boundary 4 76 MAX_END SMALLER -compare_x_on_boundary 4 77 MAX_END SMALLER -compare_x_on_boundary 4 80 MAX_END LARGER -compare_x_on_boundary 4 81 MAX_END LARGER -compare_x_on_boundary 5 44 MAX_END LARGER -compare_x_on_boundary 5 45 MAX_END LARGER -compare_x_on_boundary 5 76 MAX_END LARGER -compare_x_on_boundary 5 77 MAX_END LARGER -compare_x_on_boundary 5 80 MAX_END LARGER -compare_x_on_boundary 5 81 MAX_END LARGER -compare_x_on_boundary 6 44 MAX_END SMALLER -compare_x_on_boundary 6 45 MAX_END SMALLER -compare_x_on_boundary 6 76 MAX_END SMALLER -compare_x_on_boundary 6 77 MAX_END SMALLER -compare_x_on_boundary 6 80 MAX_END LARGER -compare_x_on_boundary 6 81 MAX_END LARGER -compare_x_on_boundary 7 44 MAX_END LARGER -compare_x_on_boundary 7 45 MAX_END LARGER -compare_x_on_boundary 7 76 MAX_END SMALLER -compare_x_on_boundary 7 77 MAX_END SMALLER -compare_x_on_boundary 7 80 MAX_END LARGER -compare_x_on_boundary 7 81 MAX_END LARGER -compare_x_on_boundary 8 44 MAX_END EQUAL -compare_x_on_boundary 8 45 MAX_END EQUAL -compare_x_on_boundary 8 76 MAX_END SMALLER -compare_x_on_boundary 8 77 MAX_END SMALLER -compare_x_on_boundary 8 80 MAX_END LARGER -compare_x_on_boundary 8 81 MAX_END LARGER -compare_x_on_boundary 9 44 MAX_END EQUAL -compare_x_on_boundary 9 45 MAX_END EQUAL -compare_x_on_boundary 9 76 MAX_END SMALLER -compare_x_on_boundary 9 77 MAX_END SMALLER -compare_x_on_boundary 9 80 MAX_END LARGER -compare_x_on_boundary 9 81 MAX_END LARGER -compare_x_on_boundary 10 44 MAX_END EQUAL -compare_x_on_boundary 10 45 MAX_END EQUAL -compare_x_on_boundary 10 76 MAX_END SMALLER -compare_x_on_boundary 10 77 MAX_END SMALLER -compare_x_on_boundary 10 80 MAX_END LARGER -compare_x_on_boundary 10 81 MAX_END LARGER -compare_x_on_boundary 11 44 MAX_END EQUAL -compare_x_on_boundary 11 45 MAX_END EQUAL -compare_x_on_boundary 11 76 MAX_END SMALLER -compare_x_on_boundary 11 77 MAX_END SMALLER -compare_x_on_boundary 11 80 MAX_END LARGER -compare_x_on_boundary 11 81 MAX_END LARGER# -compare_x_on_boundary 16 44 MAX_END LARGER -compare_x_on_boundary 16 45 MAX_END LARGER -compare_x_on_boundary 16 76 MAX_END EQUAL -compare_x_on_boundary 16 77 MAX_END EQUAL -compare_x_on_boundary 16 80 MAX_END LARGER -compare_x_on_boundary 16 81 MAX_END LARGER -compare_x_on_boundary 17 44 MAX_END LARGER -compare_x_on_boundary 17 45 MAX_END LARGER -compare_x_on_boundary 17 76 MAX_END EQUAL -compare_x_on_boundary 17 77 MAX_END EQUAL -compare_x_on_boundary 17 80 MAX_END LARGER -compare_x_on_boundary 17 81 MAX_END LARGER -compare_x_on_boundary 18 44 MAX_END LARGER -compare_x_on_boundary 18 45 MAX_END LARGER -compare_x_on_boundary 18 76 MAX_END EQUAL -compare_x_on_boundary 18 77 MAX_END EQUAL -compare_x_on_boundary 18 80 MAX_END LARGER -compare_x_on_boundary 18 81 MAX_END LARGER -compare_x_on_boundary 19 44 MAX_END LARGER -compare_x_on_boundary 19 45 MAX_END LARGER -compare_x_on_boundary 19 76 MAX_END EQUAL -compare_x_on_boundary 19 77 MAX_END EQUAL -compare_x_on_boundary 19 80 MAX_END LARGER -compare_x_on_boundary 19 81 MAX_END LARGER -compare_x_on_boundary 20 44 MAX_END SMALLER -compare_x_on_boundary 20 45 MAX_END SMALLER -compare_x_on_boundary 20 76 MAX_END SMALLER -compare_x_on_boundary 20 77 MAX_END SMALLER -compare_x_on_boundary 20 80 MAX_END EQUAL -compare_x_on_boundary 20 81 MAX_END EQUAL -compare_x_on_boundary 21 44 MAX_END SMALLER -compare_x_on_boundary 21 45 MAX_END SMALLER -compare_x_on_boundary 21 76 MAX_END SMALLER -compare_x_on_boundary 21 77 MAX_END SMALLER -compare_x_on_boundary 21 80 MAX_END EQUAL -compare_x_on_boundary 21 81 MAX_END EQUAL -compare_x_on_boundary 22 44 MAX_END SMALLER -compare_x_on_boundary 22 45 MAX_END SMALLER -compare_x_on_boundary 22 76 MAX_END SMALLER -compare_x_on_boundary 22 77 MAX_END SMALLER -compare_x_on_boundary 22 80 MAX_END EQUAL -compare_x_on_boundary 22 81 MAX_END EQUAL -compare_x_on_boundary 23 44 MAX_END SMALLER -compare_x_on_boundary 23 45 MAX_END SMALLER -compare_x_on_boundary 23 76 MAX_END SMALLER -compare_x_on_boundary 23 77 MAX_END SMALLER -compare_x_on_boundary 23 80 MAX_END EQUAL -compare_x_on_boundary 23 81 MAX_END EQUAL diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_y_near_boundary b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_y_near_boundary deleted file mode 100644 index 2c612e9ccdc..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/spherical_arcs/compare_y_near_boundary +++ /dev/null @@ -1,138 +0,0 @@ -compare_y_near_boundary 0 1 MIN_END EQUAL -compare_y_near_boundary 0 2 MIN_END EQUAL -compare_y_near_boundary 0 3 MIN_END EQUAL -compare_y_near_boundary 0 4 MIN_END EQUAL -compare_y_near_boundary 0 5 MIN_END EQUAL -compare_y_near_boundary 0 6 MIN_END EQUAL -compare_y_near_boundary 0 7 MIN_END EQUAL -compare_y_near_boundary 0 8 MIN_END EQUAL -compare_y_near_boundary 0 9 MIN_END EQUAL -compare_y_near_boundary 0 10 MIN_END EQUAL -compare_y_near_boundary 0 11 MIN_END EQUAL -compare_y_near_boundary 0 14 MIN_END EQUAL -compare_y_near_boundary 0 15 MIN_END EQUAL -compare_y_near_boundary 0 16 MIN_END EQUAL -compare_y_near_boundary 0 17 MIN_END EQUAL -compare_y_near_boundary 0 18 MIN_END EQUAL -compare_y_near_boundary 0 19 MIN_END EQUAL -compare_y_near_boundary 0 20 MIN_END EQUAL -compare_y_near_boundary 0 21 MIN_END EQUAL -compare_y_near_boundary 0 22 MIN_END EQUAL -compare_y_near_boundary 0 23 MIN_END EQUAL -compare_y_near_boundary 0 24 MIN_END EQUAL -compare_y_near_boundary 0 25 MIN_END EQUAL -compare_y_near_boundary 0 26 MIN_END EQUAL -compare_y_near_boundary 0 27 MIN_END EQUAL -compare_y_near_boundary 0 28 MIN_END EQUAL -compare_y_near_boundary 0 29 MIN_END EQUAL -compare_y_near_boundary 0 30 MIN_END EQUAL -compare_y_near_boundary 0 31 MIN_END EQUAL -compare_y_near_boundary 0 48 MIN_END SMALLER -compare_y_near_boundary 0 49 MIN_END SMALLER -compare_y_near_boundary 0 50 MIN_END SMALLER -compare_y_near_boundary 0 51 MIN_END SMALLER -compare_y_near_boundary 0 52 MIN_END LARGER -compare_y_near_boundary 0 53 MIN_END LARGER -compare_y_near_boundary 0 54 MIN_END LARGER -compare_y_near_boundary 0 55 MIN_END LARGER -compare_y_near_boundary 0 56 MIN_END SMALLER -compare_y_near_boundary 0 57 MIN_END SMALLER -compare_y_near_boundary 0 58 MIN_END SMALLER -compare_y_near_boundary 0 59 MIN_END SMALLER -compare_y_near_boundary 0 60 MIN_END LARGER -compare_y_near_boundary 0 61 MIN_END LARGER -compare_y_near_boundary 0 62 MIN_END LARGER -compare_y_near_boundary 0 63 MIN_END LARGER# -compare_y_near_boundary 0 0 MIN_END EQUAL -compare_y_near_boundary 1 1 MIN_END EQUAL -compare_y_near_boundary 2 2 MIN_END EQUAL -compare_y_near_boundary 3 3 MIN_END EQUAL -compare_y_near_boundary 4 4 MIN_END EQUAL -compare_y_near_boundary 5 5 MIN_END EQUAL -compare_y_near_boundary 6 6 MIN_END EQUAL -compare_y_near_boundary 7 7 MIN_END EQUAL -compare_y_near_boundary 8 8 MIN_END EQUAL -compare_y_near_boundary 9 9 MIN_END EQUAL -compare_y_near_boundary 10 10 MIN_END EQUAL -compare_y_near_boundary 11 11 MIN_END EQUAL -compare_y_near_boundary 14 14 MIN_END EQUAL -compare_y_near_boundary 15 15 MIN_END EQUAL -compare_y_near_boundary 16 16 MIN_END EQUAL -compare_y_near_boundary 17 17 MIN_END EQUAL -compare_y_near_boundary 18 18 MIN_END EQUAL -compare_y_near_boundary 19 19 MIN_END EQUAL -compare_y_near_boundary 20 20 MIN_END EQUAL -compare_y_near_boundary 21 21 MIN_END EQUAL -compare_y_near_boundary 22 22 MIN_END EQUAL -compare_y_near_boundary 23 23 MIN_END EQUAL -compare_y_near_boundary 24 24 MIN_END EQUAL -compare_y_near_boundary 25 25 MIN_END EQUAL -compare_y_near_boundary 26 26 MIN_END EQUAL -compare_y_near_boundary 27 27 MIN_END EQUAL -compare_y_near_boundary 28 28 MIN_END EQUAL -compare_y_near_boundary 29 29 MIN_END EQUAL -compare_y_near_boundary 30 30 MIN_END EQUAL -compare_y_near_boundary 31 31 MIN_END EQUAL -compare_y_near_boundary 48 48 MIN_END EQUAL -compare_y_near_boundary 49 49 MIN_END EQUAL -compare_y_near_boundary 50 50 MIN_END EQUAL -compare_y_near_boundary 51 51 MIN_END EQUAL -compare_y_near_boundary 52 52 MIN_END EQUAL -compare_y_near_boundary 53 53 MIN_END EQUAL -compare_y_near_boundary 54 54 MIN_END EQUAL -compare_y_near_boundary 55 55 MIN_END EQUAL -compare_y_near_boundary 56 56 MIN_END EQUAL -compare_y_near_boundary 57 57 MIN_END EQUAL -compare_y_near_boundary 58 58 MIN_END EQUAL -compare_y_near_boundary 59 59 MIN_END EQUAL -compare_y_near_boundary 60 60 MIN_END EQUAL -compare_y_near_boundary 61 61 MIN_END EQUAL -compare_y_near_boundary 62 62 MIN_END EQUAL -compare_y_near_boundary 63 63 MIN_END EQUAL# -compare_y_near_boundary 0 0 MAX_END EQUAL -compare_y_near_boundary 1 1 MAX_END EQUAL -compare_y_near_boundary 2 2 MAX_END EQUAL -compare_y_near_boundary 3 3 MAX_END EQUAL -compare_y_near_boundary 4 4 MAX_END EQUAL -compare_y_near_boundary 5 5 MAX_END EQUAL -compare_y_near_boundary 6 6 MAX_END EQUAL -compare_y_near_boundary 7 7 MAX_END EQUAL -compare_y_near_boundary 10 10 MAX_END EQUAL -compare_y_near_boundary 11 11 MAX_END EQUAL -compare_y_near_boundary 12 12 MAX_END EQUAL -compare_y_near_boundary 13 13 MAX_END EQUAL -compare_y_near_boundary 14 14 MAX_END EQUAL -compare_y_near_boundary 15 15 MAX_END EQUAL -compare_y_near_boundary 16 16 MAX_END EQUAL -compare_y_near_boundary 17 17 MAX_END EQUAL -compare_y_near_boundary 18 18 MAX_END EQUAL -compare_y_near_boundary 19 19 MAX_END EQUAL -compare_y_near_boundary 20 20 MAX_END EQUAL -compare_y_near_boundary 21 21 MAX_END EQUAL -compare_y_near_boundary 22 22 MAX_END EQUAL -compare_y_near_boundary 23 23 MAX_END EQUAL -compare_y_near_boundary 24 24 MAX_END EQUAL -compare_y_near_boundary 25 25 MAX_END EQUAL -compare_y_near_boundary 26 26 MAX_END EQUAL -compare_y_near_boundary 27 27 MAX_END EQUAL -compare_y_near_boundary 28 28 MAX_END EQUAL -compare_y_near_boundary 29 29 MAX_END EQUAL -compare_y_near_boundary 30 30 MAX_END EQUAL -compare_y_near_boundary 31 31 MAX_END EQUAL -compare_y_near_boundary 48 48 MAX_END EQUAL -compare_y_near_boundary 49 49 MAX_END EQUAL -compare_y_near_boundary 50 50 MAX_END EQUAL -compare_y_near_boundary 51 51 MAX_END EQUAL -compare_y_near_boundary 52 52 MAX_END EQUAL -compare_y_near_boundary 53 53 MAX_END EQUAL -compare_y_near_boundary 54 54 MAX_END EQUAL -compare_y_near_boundary 55 55 MAX_END EQUAL -compare_y_near_boundary 56 56 MAX_END EQUAL -compare_y_near_boundary 57 57 MAX_END EQUAL -compare_y_near_boundary 58 58 MAX_END EQUAL -compare_y_near_boundary 59 59 MAX_END EQUAL -compare_y_near_boundary 60 60 MAX_END EQUAL -compare_y_near_boundary 61 61 MAX_END EQUAL -compare_y_near_boundary 62 62 MAX_END EQUAL -compare_y_near_boundary 63 63 MAX_END EQUAL - diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h index c4a96a7a819..b91dec3efab 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h @@ -24,11 +24,9 @@ #define LEDA_INT_NT 13 #define CGAL_GMPZ_NT 14 #define CORE_INT_NT 15 -#define CORE_RAT_NT 16 #define CARTESIAN_KERNEL 0 #define SIMPLE_CARTESIAN_KERNEL 1 -#define UNIVARIATE_ALGEBRAIC_KERNEL 2 #define SEGMENT_TRAITS 0 #define NON_CACHING_SEGMENT_TRAITS 1 diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_kernel.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_kernel.h index eae8689762c..7077e2616db 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_kernel.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_kernel.h @@ -12,9 +12,6 @@ #elif TEST_KERNEL == CARTESIAN_KERNEL #include -#elif TEST_KERNEL == UNIVARIATE_ALGEBRAIC_KERNEL -#include - #else #error No kernel (KERNEL) specified! #endif @@ -30,10 +27,6 @@ typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Cartesian Kernel; #define KERNEL_TYPE "Cartesian" -#elif TEST_KERNEL == UNIVARIATE_ALGEBRAIC_KERNEL -typedef CGAL::Algebraic_kernel_d_1 Kernel; -#define KERNEL_TYPE "Univariate Algebraic" - #else #error No kernel (KERNEL) specified! #endif diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_number_type.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_number_type.h index 292fb790ed8..a448688cd22 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_number_type.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_number_type.h @@ -64,9 +64,6 @@ #elif TEST_NT == CORE_INT_NT #include -#elif TEST_NT == CORE_RAT_NT //OS - new -#include - #else #error No Number Type (NT) specified! #endif @@ -179,11 +176,6 @@ typedef Basic_number_type Number_type; typedef Basic_number_type Ring_type; #define NUMBER_TYPE "CORE BigInt" -#elif TEST_NT == CORE_RAT_NT -typedef CGAL::CORE_arithmetic_kernel::Rational Basic_number_type; -typedef Basic_number_type Number_type; -typedef Basic_number_type Ring_type; -#define NUMBER_TYPE "CORE Rational" #else #error No Number Type (NT) Specified diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp deleted file mode 100644 index d830411e96e..00000000000 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp +++ /dev/null @@ -1,280 +0,0 @@ -#include - -#include //NT -#include //Algebraic Kernel -#include //Traits -#include //Arrangement -#include -#include - -typedef CORE::BigInt Number_type; -typedef CGAL::Algebraic_kernel_d_1 AK1; -typedef CGAL::Arr_rational_function_traits_2 Traits_2; -typedef CGAL::Arrangement_2 Arrangement_2; - -int main(int argc, char* argv[]) -{ - - // testing that all types are present: - - // Traits - typedef Traits_2::Polynomial_1 Polynomial_1; - typedef Traits_2::Algebraic_real_1 Algebraic_real_1; - typedef Traits_2::Coefficient Coefficient; - typedef Traits_2::Bound Bound; - typedef Traits_2::Algebraic_kernel_d_1 Algebraic_kernel_d_1; - typedef Traits_2::Construct_curve_2 Construct_curve_2; - typedef Traits_2::Construct_x_monotone_curve_2 Construct_x_monotone_curve_2; - - // typedef induced by concept - - typedef Traits_2::Curve_2 Curve_2; - typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2; - typedef Traits_2::Point_2 Point_2; - - typedef Traits_2::Compare_x_2 Compare_x_2; - typedef Traits_2::Compare_xy_2 Compare_xy_2; - typedef Traits_2::Construct_min_vertex_2 Construct_min_vertex_2; - typedef Traits_2::Construct_max_vertex_2 Construct_max_vertex_2; - typedef Traits_2::Is_vertical_2 Is_vertical_2; - typedef Traits_2::Compare_y_at_x_2 Compare_y_at_x_2; - typedef Traits_2::Compare_y_at_x_left_2 Compare_y_at_x_left_2; - typedef Traits_2::Compare_y_at_x_right_2 Compare_y_at_x_right_2; - typedef Traits_2::Equal_2 Equal_2; - typedef Traits_2::Parameter_space_in_x_2 Parameter_space_in_x_2; - typedef Traits_2::Parameter_space_in_y_2 Parameter_space_in_y_2; - typedef Traits_2::Compare_x_at_limit_2 Compare_x_at_limit_2; - typedef Traits_2::Compare_x_near_limit_2 Compare_x_near_limit_2; - typedef Traits_2::Compare_y_near_boundary_2 Compare_y_near_boundary_2; - typedef Traits_2::Intersect_2 Intersect_2; - typedef Traits_2::Split_2 Split_2; - typedef Traits_2::Are_mergeable_2 Are_mergeable_2; - typedef Traits_2::Merge_2 Merge_2; - typedef Traits_2::Make_x_monotone_2 Make_x_monotone_2; - typedef Traits_2::Approximate_2 Approximate_2; - - // construction traits - // default construction - { - Traits_2 traits; - const Algebraic_kernel_d_1* ak (traits.algebraic_kernel_d_1()); (void) ak; - } - - - // construction from pointer to AK - Algebraic_kernel_d_1 ak; - Traits_2 traits(&ak); - - - traits.cleanup_cache(); - - Construct_curve_2 construct_curve_2 = traits.construct_curve_2_object(); - - Polynomial_1 P(0); - Polynomial_1 Q(1); - Algebraic_real_1 one(1); - Algebraic_real_1 two(2); - { - typedef Construct_curve_2::Polynomial_1 Polynomial_1; - typedef Construct_curve_2::Algebraic_real_1 Algebraic_real_1; - typedef Construct_curve_2::Curve_2 Curve_2; - typedef Construct_curve_2::argument_type argument_type; - typedef Construct_curve_2::first_argument_type first_argument_type; - typedef Construct_curve_2::second_argument_type second_argument_type; - } - {Curve_2 curve = construct_curve_2(P);} - {Curve_2 curve = construct_curve_2(P,one,true);} - {Curve_2 curve = construct_curve_2(P,one,false);} - {Curve_2 curve = construct_curve_2(P,one,two);} - {Curve_2 curve = construct_curve_2(P,Q);} - {Curve_2 curve = construct_curve_2(P,Q,one,true);} - {Curve_2 curve = construct_curve_2(P,Q,one,false);} - //{Curve_2 curve = construct_curve_2(P,Q,one,two);} - {Curve_2 curve = construct_curve_2(P.begin(),P.end());} - {Curve_2 curve = construct_curve_2(P.begin(),P.end(),one,true);} - {Curve_2 curve = construct_curve_2(P.begin(),P.end(),one,false);} - {Curve_2 curve = construct_curve_2(P.begin(),P.end(),one,two);} - {Curve_2 curve = construct_curve_2(P.begin(),P.end());} - {Curve_2 curve = construct_curve_2(P.begin(),P.end(),Q.begin(),Q.end(),one,true);} - {Curve_2 curve = construct_curve_2(P.begin(),P.end(),Q.begin(),Q.end(),one,false);} - {Curve_2 curve = construct_curve_2(P.begin(),P.end(),Q.begin(),Q.end(),one,two);} - - - Construct_x_monotone_curve_2 - construct_x_monotone_curve_2 = traits.construct_x_monotone_curve_2_object(); - { - typedef Construct_x_monotone_curve_2::Polynomial_1 Polynomial_1; - typedef Construct_x_monotone_curve_2::Algebraic_real_1 Algebraic_real_1; - typedef Construct_x_monotone_curve_2::X_monotone_curve_2 X_monotone_curve_2; - typedef Construct_x_monotone_curve_2::argument_type argument_type; - typedef Construct_x_monotone_curve_2::first_argument_type first_argument_type; - typedef Construct_x_monotone_curve_2::second_argument_type second_argument_type; - } - - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P,one,true);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P,one,false);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P,one,two);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P,Q);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P,Q,one,true);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P,Q,one,false);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P,Q,one,two);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end());} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end(),one,true);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end(),one,false);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end(),one,two);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end());} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end(),Q.begin(),Q.end(),one,true);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end(),Q.begin(),Q.end(),one,false);} - {X_monotone_curve_2 x_monotone_curve = construct_x_monotone_curve_2(P.begin(),P.end(),Q.begin(),Q.end(),one,two);} - - { - typedef Curve_2::Polynomial_1 Polynomial_1; - typedef Curve_2::Algebraic_real_1 Algebraic_real_1; - } - - { - - Curve_2 curve = construct_curve_2(P,Q); - {Curve_2 dummy;} - {Curve_2 dummy(curve);} - {Curve_2 dummy = curve;} - - assert(CGAL::degree(curve.numerator()) >=0); - assert(CGAL::degree(curve.denominator())>=0); - assert(curve.is_continuous()); - assert(curve.left_parameter_space_in_x()==CGAL::ARR_LEFT_BOUNDARY); - assert(curve.right_parameter_space_in_x()==CGAL::ARR_RIGHT_BOUNDARY); - } - { - Curve_2 curve = construct_curve_2(P,one,two); - assert(CGAL::degree(curve.numerator()) >=0); - assert(CGAL::degree(curve.denominator())>=0); - assert(curve.is_continuous()); - assert(curve.left_parameter_space_in_x()==CGAL::ARR_INTERIOR); - assert(curve.right_parameter_space_in_x()==CGAL::ARR_INTERIOR); - assert(one == curve.left_x()); - assert(two == curve.right_x()); - } - // X_monotone_curve_2 - { - typedef X_monotone_curve_2::Polynomial_1 Polynomial_1; - typedef X_monotone_curve_2::Algebraic_real_1 Algebraic_real_1; - typedef X_monotone_curve_2::Point_2 Point_2; - - X_monotone_curve_2 xcurve= construct_x_monotone_curve_2(P,Q,one,two); - - {X_monotone_curve_2 dummy;} - {X_monotone_curve_2 dummy(xcurve);} - {X_monotone_curve_2 dummy = xcurve;} - - assert(CGAL::degree(xcurve.numerator()) >=0); - assert(CGAL::degree(xcurve.denominator())>=0); - assert(xcurve.source_parameter_space_in_x()==CGAL::ARR_INTERIOR); - assert(xcurve.source_parameter_space_in_y()==CGAL::ARR_INTERIOR); - xcurve.source(); - xcurve.target(); - xcurve.left(); - xcurve.right(); - xcurve.source_x(); - xcurve.target_x(); - xcurve.left_x(); - xcurve.right_x(); - assert(xcurve.is_left_to_right()); - } - - - // Point_2 - { - typedef Point_2::Polynomial_1 Polynomial_1; - typedef Point_2::Algebraic_real_1 Algebraic_real_1; - typedef Point_2::Bound Bound; - - X_monotone_curve_2 xcurve= construct_x_monotone_curve_2(P,Q,one,two); - Point_2 p = xcurve.left(); - Point_2 q = xcurve.right(); - - p.numerator(); - p.denominator(); - p.to_double(); - p.x(); - p.y(); - p.approximate_absolute_x(1); - p.approximate_absolute_y(1); - p.approximate_relative_x(1); - p.approximate_relative_y(1); - - {Point_2 dummy = p;} - {Point_2 dummy(p);} - } - - { - Arrangement_2 arr; - const Traits_2* traits = arr.traits();(void) traits; - } - - { - - const Traits_2 traits; - traits.cleanup_cache(); - assert( traits.cache().rat_func_map().size()==0); - assert( traits.cache().rat_pair_map().size()==0); - - Construct_curve_2 construct_curve_2 = traits.construct_curve_2_object(); - - Polynomial_1 x = CGAL::shift(Polynomial_1(1),1); - - { - std::vector curves; - std::vector xcurves; - std::vector points; - curves.push_back(construct_curve_2(Polynomial_1(1))); - curves.push_back(construct_curve_2(x*x-2)); - curves.push_back(construct_curve_2(x*x*x)); - curves.push_back(construct_curve_2(x*x*x,x*x-2)); - - - BOOST_FOREACH(const Curve_2& curve, curves){ - assert(CGAL::degree(curve.numerator())>=0); - } - CGAL::compute_subcurves(curves.begin(),curves.end(),std::back_inserter(xcurves),false,traits); - BOOST_FOREACH(const X_monotone_curve_2& xcurve, xcurves){ - assert(CGAL::degree(xcurve.numerator())>=0); - } - - CGAL::compute_intersection_points (curves.begin(),curves.end(),std::back_inserter(points),false,traits); - BOOST_FOREACH(const Point_2& point, points){ - assert(CGAL::degree(point.numerator())>=0); - } - } - traits.cleanup_cache(); - assert( traits.cache().rat_func_map().size()==0); - assert( traits.cache().rat_pair_map().size()==0); - { - std::vector curves; - std::vector xcurves; - std::vector points; - - curves.push_back(construct_curve_2(Polynomial_1(1))); - curves.push_back(construct_curve_2(x*x-2)); - curves.push_back(construct_curve_2(x*x*x)); - curves.push_back(construct_curve_2(x*x*x,x*x-2)); - - traits.cleanup_cache(); - BOOST_FOREACH(const Curve_2& curve, curves){ - assert(CGAL::degree(curve.numerator())>=0); - } - CGAL::compute_subcurves(curves.begin(),curves.end(),std::back_inserter(xcurves),false,traits); - BOOST_FOREACH(const X_monotone_curve_2& xcurve, xcurves){ - assert(CGAL::degree(xcurve.numerator())>=0); - } - CGAL::compute_intersection_points (curves.begin(),curves.end(),std::back_inserter(points),false,traits); - BOOST_FOREACH(const Point_2& point, points){ - assert(CGAL::degree(point.numerator())>=0); - } - std::sort(points.begin(),points.end(), traits.compare_xy_2_object()); - std::sort(points.begin(),points.end(), traits.compare_x_2_object()); - } - } - return 0; -} diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp index ba73bb8347d..6d1be4d61af 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp @@ -8,31 +8,31 @@ #include struct Traits1 { - typedef CGAL::Arr_open_side_tag Left_side_category; - typedef CGAL::Arr_open_side_tag Bottom_side_category; - typedef CGAL::Arr_open_side_tag Top_side_category; - typedef CGAL::Arr_open_side_tag Right_side_category; + typedef CGAL::Arr_open_side_tag Arr_left_side_category; + typedef CGAL::Arr_open_side_tag Arr_bottom_side_category; + typedef CGAL::Arr_open_side_tag Arr_top_side_category; + typedef CGAL::Arr_open_side_tag Arr_right_side_category; }; struct Traits2 { - typedef CGAL::Arr_open_side_tag Left_side_category; - typedef CGAL::Arr_closed_side_tag Bottom_side_category; - typedef CGAL::Arr_open_side_tag Top_side_category; - typedef CGAL::Arr_open_side_tag Right_side_category; + typedef CGAL::Arr_open_side_tag Arr_left_side_category; + typedef CGAL::Arr_closed_side_tag Arr_bottom_side_category; + typedef CGAL::Arr_open_side_tag Arr_top_side_category; + typedef CGAL::Arr_open_side_tag Arr_right_side_category; }; struct Traits3 { - typedef CGAL::Arr_open_side_tag Left_side_category; - typedef CGAL::Arr_open_side_tag Bottom_side_category; - typedef CGAL::Arr_closed_side_tag Top_side_category; - typedef CGAL::Arr_open_side_tag Right_side_category; + typedef CGAL::Arr_open_side_tag Arr_left_side_category; + typedef CGAL::Arr_open_side_tag Arr_bottom_side_category; + typedef CGAL::Arr_closed_side_tag Arr_top_side_category; + typedef CGAL::Arr_open_side_tag Arr_right_side_category; }; struct Traits4 { - typedef CGAL::Arr_open_side_tag Left_side_category; - typedef CGAL::Arr_open_side_tag Bottom_side_category; - typedef CGAL::Arr_open_side_tag Top_side_category; - typedef CGAL::Arr_closed_side_tag Right_side_category; + typedef CGAL::Arr_open_side_tag Arr_left_side_category; + typedef CGAL::Arr_open_side_tag Arr_bottom_side_category; + typedef CGAL::Arr_open_side_tag Arr_top_side_category; + typedef CGAL::Arr_closed_side_tag Arr_right_side_category; }; struct Traits5 { @@ -272,38 +272,38 @@ int main () assert(ident12() == false); BOOST_STATIC_ASSERT( - (boost::is_same< CGAL::internal::Arr_complete_left_side_category< Traits5 >::Category, + (boost::is_same< CGAL::internal::Arr_complete_left_side_tag< Traits5 >::Tag, CGAL::Arr_oblivious_side_tag >::value) ); BOOST_STATIC_ASSERT( - (boost::is_same< CGAL::internal::Arr_complete_left_side_category< Traits1 >::Category, + (boost::is_same< CGAL::internal::Arr_complete_left_side_tag< Traits1 >::Tag, CGAL::Arr_open_side_tag >::value) ); BOOST_STATIC_ASSERT( - (boost::is_same::Category, + (boost::is_same::Tag, CGAL::Arr_oblivious_side_tag >::value) ); BOOST_STATIC_ASSERT( - (boost::is_same::Category, + (boost::is_same::Tag, CGAL::Arr_open_side_tag >::value) ); BOOST_STATIC_ASSERT( - (boost::is_same< CGAL::internal::Arr_complete_top_side_category< Traits5 >::Category, + (boost::is_same< CGAL::internal::Arr_complete_top_side_tag< Traits5 >::Tag, CGAL::Arr_oblivious_side_tag >::value) ); BOOST_STATIC_ASSERT( - (boost::is_same< CGAL::internal::Arr_complete_top_side_category< Traits1 >::Category, + (boost::is_same< CGAL::internal::Arr_complete_top_side_tag< Traits1 >::Tag, CGAL::Arr_open_side_tag >::value) ); BOOST_STATIC_ASSERT( - (boost::is_same< CGAL::internal::Arr_complete_right_side_category< Traits5 >::Category, + (boost::is_same< CGAL::internal::Arr_complete_right_side_tag< Traits5 >::Tag, CGAL::Arr_oblivious_side_tag >::value) ); BOOST_STATIC_ASSERT( - (boost::is_same< CGAL::internal::Arr_complete_right_side_category< Traits1 >::Category, + (boost::is_same< CGAL::internal::Arr_complete_right_side_tag< Traits1 >::Tag, CGAL::Arr_open_side_tag >::value) ); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.h index 46b14b41d50..fe4759844db 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.h @@ -54,10 +54,8 @@ #include #elif TEST_TRAITS == RATIONAL_ARC_TRAITS -//#include //OS - new -//#include -#include - +#include +#include #elif TEST_TRAITS == ALGEBRAIC_TRAITS #include @@ -164,24 +162,14 @@ typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2 Traits; #define TRAITS_TYPE "Spherical Arc" #elif TEST_TRAITS == RATIONAL_ARC_TRAITS - -// TODO: This is for old Ron's traits---remove. -//typedef CGAL::CORE_algebraic_number_traits Nt_traits; //OS - new -//typedef Nt_traits::Rational Rational; -//typedef Nt_traits::Algebraic Algebraic; -//typedef CGAL::Arr_rational_arc_traits_2 Traits; -//typedef Traits::Rat_vector Rat_vector; -//typedef Traits::Point_2 Point_2; -//#define TRAITS_TYPE "Rational Arc" - -typedef CGAL::Arr_rational_function_traits_2 Traits; -typedef Traits::Rational Rational; -typedef Traits::Algebraic_real_1 Algebraic_real_1; -typedef Traits::Point_2 Point_2; -typedef Traits::Rat_vector Rat_vector; +typedef CGAL::CORE_algebraic_number_traits Nt_traits; +typedef Nt_traits::Rational Rational; +typedef Nt_traits::Algebraic Algebraic; +typedef CGAL::Arr_rational_arc_traits_2 Traits; +typedef Traits::Rat_vector Rat_vector; +typedef Traits::Point_2 Point_2; #define TRAITS_TYPE "Rational Arc" - #elif TEST_TRAITS == ALGEBRAIC_TRAITS typedef CGAL::Arr_algebraic_segment_traits_2 Traits; typedef Traits::Point_2 Point_2; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp index 6e74a55f079..7e454fe7162 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits_dispatching.cpp @@ -38,16 +38,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 0); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 0); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 0); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch oblivious-open @@ -61,16 +61,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 0); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch oblivious-contracted @@ -84,16 +84,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch oblivious-closed @@ -107,16 +107,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } // open-oblivious @@ -136,16 +136,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 0); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch open-open @@ -159,16 +159,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 0); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch open-contracted @@ -182,16 +182,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch open-closed @@ -205,16 +205,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } // contracted-oblivious @@ -233,16 +233,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch contracted-open @@ -256,16 +256,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch contracted-contracted @@ -279,16 +279,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 0); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch contracted-closed @@ -302,16 +302,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } // closed-oblivious @@ -330,16 +330,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch closed-open @@ -353,16 +353,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch closed-contracted @@ -376,16 +376,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } { // Arr_left_right_implementation_dispatch closed-closed @@ -399,16 +399,16 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 1); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 0); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 0); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 0); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 0); } @@ -425,18 +425,19 @@ int main () typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point; assert(dispatch(Psx_2_point()) == 0); - typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; - assert(dispatch(Ioyi_2_curve()) == 1); - typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; - assert(dispatch(Ioyi_2_point()) == 1); + typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; + assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points; assert(dispatch(Cmp_y_ob_2_points()) == 1); - typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends; - assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1); + typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve; + assert(dispatch(Ioyi_2_curve()) == 1); + typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point; + assert(dispatch(Ioyi_2_point()) == 1); } + //////////////// // bottom-top // //////////////// @@ -457,26 +458,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 0); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 0); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0); } { // Arr_bottom_top_implementation_dispatch oblivious-open @@ -490,26 +484,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 0); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 1); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0); } { // Arr_bottom_top_implementation_dispatch oblivious-contracted @@ -523,26 +510,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch oblivious-closed @@ -556,26 +536,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } // open-oblivious @@ -586,7 +559,7 @@ int main () // Arr_bottom_top_implementation_dispatch open-oblivious typedef CGAL::internal::Arr_bottom_top_implementation_dispatch< CGAL::Arr_open_side_tag, CGAL::Arr_oblivious_side_tag > BT; - + typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end; assert(dispatch(Psy_2_curve_end()) == 1); typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve; @@ -594,26 +567,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 0); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 1); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0); } { // Arr_bottom_top_implementation_dispatch open-open @@ -627,32 +593,25 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 0); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 1); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0); } { // Arr_bottom_top_implementation_dispatch open-contracted typedef CGAL::internal::Arr_bottom_top_implementation_dispatch< CGAL::Arr_open_side_tag, CGAL::Arr_contracted_side_tag > BT; - + typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end; assert(dispatch(Psy_2_curve_end()) == 1); typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve; @@ -660,26 +619,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 1); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch open-closed @@ -693,26 +645,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 1); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } // contracted-oblivious @@ -731,26 +676,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch contracted-open @@ -764,26 +702,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 1); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch contracted-contracted @@ -797,26 +728,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 0); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 0); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch contracted-closed @@ -830,26 +754,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } // closed-oblivious @@ -868,26 +785,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch closed-open @@ -901,26 +811,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 1); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch closed-contracted @@ -934,26 +837,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } { // Arr_bottom_top_implementation_dispatch closed-closed @@ -967,26 +863,19 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 1); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 0); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 0); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } // identified-identified @@ -1002,27 +891,21 @@ int main () typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point; assert(dispatch(Psy_2_point()) == 0); + typedef BT::Compare_x_near_boundary_2_point_curve_end_tag + Cmp_x_nb_2_point_curve_end; + assert(dispatch(Cmp_x_nb_2_point_curve_end()) == 1); + typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; + assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); + + typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; + assert(dispatch(Cmp_x_ob_2_points()) == 1); + typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve; assert(dispatch(Ioxi_2_curve()) == 1); typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point; assert(dispatch(Ioxi_2_point()) == 1); - - typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end; - assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0); - typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends; - assert(dispatch(Cmp_x_al_2_curve_ends()) == 0); - typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends; - assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0); - - typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points; - assert(dispatch(Cmp_x_ob_2_points()) == 1); - typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end; - assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0); - typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends; - assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0); - typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends; - assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1); } + return EXIT_SUCCESS; } diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_unbounded_rational_insertion.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_unbounded_rational_insertion.cpp index ebef725b9c5..e6a37a33097 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_unbounded_rational_insertion.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_unbounded_rational_insertion.cpp @@ -32,42 +32,49 @@ int main () } #else -#include -#include -#include +#include +#include +#include #include -typedef CORE::BigInt Number_type; -typedef CGAL::Algebraic_kernel_d_1 AK1; -typedef CGAL::Arr_rational_function_traits_2 Traits_2; +typedef CGAL::CORE_algebraic_number_traits Nt_traits; +typedef Nt_traits::Rational Rational; +typedef Nt_traits::Algebraic Algebraic; +typedef CGAL::Cartesian Alg_kernel; +typedef CGAL::Arr_rational_arc_traits_2 Traits_2; +typedef Traits_2::Point_2 Point_2; +typedef Traits_2::Curve_2 Rational_arc_2; +typedef Traits_2::Rat_vector Rat_vector; +typedef std::list Rat_arcs_list; +typedef CGAL::Arrangement_2 Arrangement_2; -typedef Traits_2::Curve_2 Curve_2; -typedef Traits_2::Polynomial_1 Polynomial_1; -typedef Traits_2::Algebraic_real_1 Alg_real_1; - -typedef CGAL::Arrangement_2 Arrangement_2; - -int main() +int main () { - // Traits class object - AK1 ak1; - Traits_2 traits(&ak1); + std::list arcs; - // constructor for rational functions - Traits_2::Construct_curve_2 construct = traits.construct_curve_2_object(); - - // a polynomial representing x .-) - Polynomial_1 x = CGAL::shift(Polynomial_1(1),1); - // Create the rational function y = 1 / ((x - 2)(x - 5)) = 1 / (x^2 - 7x + 10) - Polynomial_1 P1(1); - Polynomial_1 P2(-1); - Polynomial_1 Q = x*x - 7*x + 10; + // Create the rational function y = 1 / ((2 - x)(x - 5)) = 1 / (-x^2 + 7x - 10) + Rat_vector P1(1); + P1[0] = 1; - Curve_2 c1 = construct(P1, Q, Alg_real_1(2), Alg_real_1(5)); - Curve_2 c2 = construct(P2, Q, Alg_real_1(2), Alg_real_1(5)); + Rat_vector Q1(3); + Rat_vector Q2(3); + Q1[2] = 1; Q1[1] = -7; Q1[0] = 10; + Q2[2] = -1; Q2[1] = 7; Q2[0] = -10; - // Output + Rational_arc_2 c1(P1, Q1, Algebraic(2), Algebraic(5)); + Rational_arc_2 c2(P1, Q2, Algebraic(2), Algebraic(5)); + + // Construct the arrangement of the six arcs. + Arrangement_2 arr; + insert (arr, c1); + insert (arr, c2); + + if (!arr.is_valid()) { + std::cerr << "The arrangement is not valid!" << std::endl; + return -1; + } + const char * names[5] = { "number of vertices", "number of vertices at infinity", @@ -76,23 +83,13 @@ int main() "number of unbounded faces" }; - Arrangement_2::Size expected_sizes[] = {0, 2, 1, 2, 2}; - - // Construct the 1st arrangement. - Arrangement_2 arr1(&traits); - insert(arr1, c1); - - if (!arr1.is_valid()) { - std::cerr << "The first arrangement is not valid!" << std::endl; - return -1; - } - + Arrangement_2::Size expected_sizes[] = {0, 4, 2, 3, 3}; Arrangement_2::Size sizes[5]; - sizes[0] = arr1.number_of_vertices(); - sizes[1] = arr1.number_of_vertices_at_infinity(); - sizes[2] = arr1.number_of_edges(); - sizes[3] = arr1.number_of_faces(); - sizes[4] = arr1.number_of_unbounded_faces(); + sizes[0] = arr.number_of_vertices(); + sizes[1] = arr.number_of_vertices_at_infinity(); + sizes[2] = arr.number_of_edges(); + sizes[3] = arr.number_of_faces(); + sizes[4] = arr.number_of_unbounded_faces(); unsigned int i; int result = 0; @@ -106,34 +103,6 @@ int main() } } - // If a failure has already occured, abort. - if (result < 0) return result; - - // Construct the 2nd arrangement. - Arrangement_2 arr2(&traits); - insert(arr2, c2); - - if (!arr1.is_valid()) { - std::cerr << "The first arrangement is not valid!" << std::endl; - return -1; - } - - sizes[0] = arr1.number_of_vertices(); - sizes[1] = arr1.number_of_vertices_at_infinity(); - sizes[2] = arr1.number_of_edges(); - sizes[3] = arr1.number_of_faces(); - sizes[4] = arr1.number_of_unbounded_faces(); - - for (i = 0; i < 5; ++ i) { - if (expected_sizes[i] != sizes[i]) { - std::cerr << names[i] << ": " << sizes[i] << ", expected: " - << expected_sizes[i] << std::endl; - result = -1; - } else { - std::cout << names[i] << ": " << sizes[i] << std::endl; - } - } - return result; } diff --git a/BGL/doc_tex/BGL/PkgDescription.tex b/BGL/doc_tex/BGL/PkgDescription.tex index 199cb7cbc22..0992951b147 100644 --- a/BGL/doc_tex/BGL/PkgDescription.tex +++ b/BGL/doc_tex/BGL/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{CGAL and the Boost Graph Library\label{Pkg:BGL}} -\ccPkgHowToCiteCgal{cgal:cfw-cbgl-11} +\ccPkgHowToCiteCgal{cgal:cfw-cbgl-11b} \ccPkgSummary{This package provides a framework for interfacing \cgal\ data structures with the algorithms of the {\sc BGL}. It allows to run diff --git a/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h b/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h index 95a347fc37f..3f6f52c8b66 100644 --- a/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h +++ b/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h @@ -168,22 +168,22 @@ opposite_edge( typename boost::graph_traits< Polyhedron_3 >::edge_de template typename boost::graph_traits< Polyhedron_3 >::edge_descriptor -next_edge_ccw( typename boost::graph_traits< Polyhedron_3 >::edge_descriptor outedge +next_edge_ccw( typename boost::graph_traits< Polyhedron_3 >::edge_descriptor inedge , Polyhedron_3& ) { HalfedgeDS_items_decorator< Polyhedron_3 > D ; - return D.get_prev(outedge)->opposite(); + return D.get_prev(inedge->opposite()); } template typename boost::graph_traits< Polyhedron_3 >::edge_descriptor -next_edge_cw( typename boost::graph_traits< Polyhedron_3 >::edge_descriptor outedge +next_edge_cw( typename boost::graph_traits< Polyhedron_3 >::edge_descriptor inedge , Polyhedron_3& ) { - return outedge->opposite()->next(); + return inedge->next()->opposite(); } diff --git a/BGL/test/BGL/halfedge_graph_traits_Polyhedron_3.cpp b/BGL/test/BGL/halfedge_graph_traits_Polyhedron_3.cpp index 20e92b332ab..97910e76b1b 100644 --- a/BGL/test/BGL/halfedge_graph_traits_Polyhedron_3.cpp +++ b/BGL/test/BGL/halfedge_graph_traits_Polyhedron_3.cpp @@ -137,8 +137,8 @@ bool test_aux ( Graph& aG ) CHECK_EQUAL(oe,e->opposite()); CHECK_EQUAL(ne,e->next()); CHECK_EQUAL(pe,e->prev()); - CHECK_EQUAL(ccwe,e->prev()->opposite()); - CHECK_EQUAL(cwe,e->opposite()->next()); + CHECK_EQUAL(ccwe,e->opposite()->prev()); + CHECK_EQUAL(cwe,e->next()->opposite()); vertex_descriptor s = source(e,aG); vertex_descriptor t = target(e,aG); diff --git a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2/PkgDescription.tex b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2/PkgDescription.tex index 86434f6fb78..3fd6049c201 100644 --- a/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2/PkgDescription.tex +++ b/Boolean_set_operations_2/doc_tex/Boolean_set_operations_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Regularized Boolean Set-Operations\label{Pkg:BooleanSetOperations2}} -\ccPkgHowToCiteCgal{cgal:fwzh-rbso2-11} +\ccPkgHowToCiteCgal{cgal:fwzh-rbso2-11b} \ccPkgSummary{ This package consists of the implementation of Boolean set-operations on point sets bounded by weakly x-monotone curves in 2-dimensional diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h index 85f741915c3..d322c86da5a 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h @@ -142,34 +142,34 @@ class Gps_agg_meta_traits : typedef typename Traits::Has_merge_category Has_merge_category; typedef typename Traits::Has_do_intersect_category Has_do_intersect_category; - typedef typename Arrangement::Left_side_category Left_side_category; - typedef typename Arrangement::Bottom_side_category Bottom_side_category; - typedef typename Arrangement::Top_side_category Top_side_category; - typedef typename Arrangement::Right_side_category Right_side_category; + typedef typename Arrangement::Arr_left_side_category Arr_left_side_category; + typedef typename Arrangement::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Arrangement::Arr_top_side_category Arr_top_side_category; + typedef typename Arrangement::Arr_right_side_category Arr_right_side_category; // a side is either oblivious or open (unbounded) BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, - boost::is_same< Left_side_category, Arr_open_side_tag > > + boost::is_same< Arr_left_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_left_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, - boost::is_same< Bottom_side_category, Arr_open_side_tag > > + boost::is_same< Arr_bottom_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_bottom_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, - boost::is_same< Top_side_category, Arr_open_side_tag > > + boost::is_same< Arr_top_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_top_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, - boost::is_same< Right_side_category, Arr_open_side_tag > > + boost::is_same< Arr_right_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_right_side_category, Arr_open_side_tag > > ) ); diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h index 439b3bfc66a..83b090365e6 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h @@ -122,6 +122,9 @@ public: { std::list curves_list; + typename Meta_traits::Compare_endpoints_xy_2 cmp_endpoints = + m_traits->compare_endpoints_xy_2_object(); + unsigned int n_inf_pgn = 0; // number of infinte polygons (arrangement // with a contained unbounded face unsigned int n_pgn = 0; // number of polygons (arrangements) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h index cc9c8fadf89..57b6da6f380 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_visitor.h @@ -38,10 +38,10 @@ class Gps_agg_op_base_visitor : // TODO derive (helper) from topology traits class typename boost::mpl::if_< boost::is_same< typename Arr_are_all_sides_oblivious_tag< - typename Traits::Left_side_category, - typename Traits::Bottom_side_category, - typename Traits::Top_side_category, - typename Traits::Right_side_category + typename Traits::Arr_left_side_category, + typename Traits::Arr_bottom_side_category, + typename Traits::Arr_top_side_category, + typename Traits::Arr_right_side_category >::result, Arr_all_sides_oblivious_tag >, Arr_bounded_planar_construction_helper::result, Arr_all_sides_oblivious_tag >, Arr_bounded_planar_construction_helpercompare_endpoints_xy_2_object(); + Construct_opposite_2 ctr_opp = m_traits->construct_opposite_2_object(); for (Edge_const_iterator eci = arr.edges_begin(); eci != arr.edges_end(); diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h index c9e628b8f20..d3712f6cb8c 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h @@ -53,34 +53,34 @@ public: typedef typename Base::Has_merge_category Has_merge_category; typedef typename Base::Has_do_intersect_category Has_do_intersect_category; - typedef typename Base::Left_side_category Left_side_category; - typedef typename Base::Bottom_side_category Bottom_side_category; - typedef typename Base::Top_side_category Top_side_category; - typedef typename Base::Right_side_category Right_side_category; + typedef typename Base::Arr_left_side_category Arr_left_side_category; + typedef typename Base::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Base::Arr_top_side_category Arr_top_side_category; + typedef typename Base::Arr_right_side_category Arr_right_side_category; // a side is either oblivious or open (unbounded) BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Left_side_category, Arr_oblivious_side_tag >, - boost::is_same< Left_side_category, Arr_open_side_tag > > + boost::is_same< Arr_left_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_left_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Bottom_side_category, Arr_oblivious_side_tag >, - boost::is_same< Bottom_side_category, Arr_open_side_tag > > + boost::is_same< Arr_bottom_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_bottom_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Top_side_category, Arr_oblivious_side_tag >, - boost::is_same< Top_side_category, Arr_open_side_tag > > + boost::is_same< Arr_top_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_top_side_category, Arr_open_side_tag > > ) ); BOOST_MPL_ASSERT( (boost::mpl::or_< - boost::is_same< Right_side_category, Arr_oblivious_side_tag >, - boost::is_same< Right_side_category, Arr_open_side_tag > > + boost::is_same< Arr_right_side_category, Arr_oblivious_side_tag >, + boost::is_same< Arr_right_side_category, Arr_open_side_tag > > ) ); diff --git a/Box_intersection_d/doc_tex/Box_intersection_d/PkgDescription.tex b/Box_intersection_d/doc_tex/Box_intersection_d/PkgDescription.tex index f755b4b1228..c60287dfbc9 100644 --- a/Box_intersection_d/doc_tex/Box_intersection_d/PkgDescription.tex +++ b/Box_intersection_d/doc_tex/Box_intersection_d/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Intersecting Sequences of dD Iso-oriented Boxes\label{Pkg:BoxIntersectionD}} -\ccPkgHowToCiteCgal{cgal:kmz-isiobd-11} +\ccPkgHowToCiteCgal{cgal:kmz-isiobd-11b} \ccPkgSummary{ An efficient algorithm for finding all intersecting pairs for large numbers of iso-oriented boxes, in order to apply a user defined callback diff --git a/CGAL_ipelets/doc_tex/CGAL_ipelets/PkgDescription.tex b/CGAL_ipelets/doc_tex/CGAL_ipelets/PkgDescription.tex index becc1d0edf3..afcedb611ff 100644 --- a/CGAL_ipelets/doc_tex/CGAL_ipelets/PkgDescription.tex +++ b/CGAL_ipelets/doc_tex/CGAL_ipelets/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{CGAL Ipelets \label{Pkg:CGALIpelets}} -\ccPkgHowToCiteCgal{cgal:lp-gi-11} +\ccPkgHowToCiteCgal{cgal:lp-gi-11b} \ccPkgSummary{This package provides a generic framework to easily write ipelets (plug-in's) using \cgal{} for the the Ipe extensible drawing editor.} diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/GNUmakefile b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/GNUmakefile deleted file mode 100644 index 23192efc1b4..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/GNUmakefile +++ /dev/null @@ -1,72 +0,0 @@ -# Created by the script cgal_create_makefile -# This is the makefile for compiling a CGAL application. - -#---------------------------------------------------------------------# -# include platform specific settings -#---------------------------------------------------------------------# -# Choose the right include file from the /make directory. - -# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE -include $(CGAL_MAKEFILE) - -#---------------------------------------------------------------------# -# compiler flags -#---------------------------------------------------------------------# - -CXXFLAGS = \ - -I../../include \ - -I../../../Algebraic_kernel_for_circles/include \ - $(CGAL_CXXFLAGS) \ - $(LONG_NAME_PROBLEM_CXXFLAGS) #\ -# -fmessage-length=0 - -#---------------------------------------------------------------------# -# linker flags -#---------------------------------------------------------------------# - -LIBPATH = \ - $(CGAL_LIBPATH) - -LDFLAGS = \ - $(LONG_NAME_PROBLEM_LDFLAGS) \ - $(CGAL_LDFLAGS) - -#---------------------------------------------------------------------# -# target entries -#---------------------------------------------------------------------# - -all: \ - demo$(EXE_EXT) - -demo.moc: demo.cpp - ${QT_MOC} -o demo.moc $< - -Qt_widget_get_arc.moc: Qt_widget_get_arc.h - $(QT_MOC) -o Qt_widget_get_arc.moc $< - -Qt_widget_get_segment.moc: Qt_widget_get_segment.h - $(QT_MOC) -o Qt_widget_get_segment.moc $< - - -demo$(EXE_EXT): demo.moc demo$(OBJ_EXT) Qt_widget_get_arc$(OBJ_EXT) Qt_widget_get_segment$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)demo demo$(OBJ_EXT) Qt_widget_get_arc$(OBJ_EXT) Qt_widget_get_segment$(OBJ_EXT) $(LDFLAGS) - -Qt_widget_get_arc$(OBJ_EXT): Qt_widget_get_arc.cpp Qt_widget_get_arc.moc - $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) Qt_widget_get_arc.cpp - -Qt_widget_get_segment$(OBJ_EXT): Qt_widget_get_segment.cpp Qt_widget_get_segment.moc - $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) Qt_widget_get_segment.cpp - - -clean: \ - demo.clean \ - Qt_widget_get_arc.clean \ - Qt_widget_get_segment.clean - -#---------------------------------------------------------------------# -# suffix rules -#---------------------------------------------------------------------# - -.cpp$(OBJ_EXT): - $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $< - diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_arc.cpp b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_arc.cpp deleted file mode 100644 index a58d1ea084d..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_arc.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France) and -// Max-Planck-Institute Saarbruecken (Germany). -// All rights reserved. -// -// $URL$ -// $Id$ -// -// Authors : Sylvain Pion, Radu Ursu -// -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (CGAL - Effective Computational Geometry for Curves and Surfaces) - -#include - - -#include "Qt_widget_get_arc.h" - -//void Qt_widget_get_arc_helper::new_object_time(){}; - -#include "Qt_widget_get_arc.moc" - diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_arc.h b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_arc.h deleted file mode 100644 index e7db627a685..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_arc.h +++ /dev/null @@ -1,408 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France) and -// Max-Planck-Institute Saarbruecken (Germany). -// All rights reserved. -// -// $URL$ -// $Id$ -// -// Authors : Sylvain Pion, Radu Ursu -// -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (CGAL - Effective Computational Geometry for Curves and Surfaces) - -// file : include/CGAL/IO/Qt_widget_get_arc.h - -#ifndef CGAL_QT_WIDGET_GET_ARC_H -#define CGAL_QT_WIDGET_GET_ARC_H - -#include -#include -#include -#include - -#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON -#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton -#endif - -namespace CGAL { - -namespace internal { - -class Qt_widget_get_arc_helper - : public CGAL::Qt_widget_layer -{ -Q_OBJECT - -public: - - Qt_widget_get_arc_helper(QObject* parent = 0, const char* name = 0) - : Qt_widget_layer(parent, name) {} - - virtual void got_it() { emit new_object_time(); } - -signals: - void new_object_time(); -}; - -} // namespace internal - -template -class Qt_widget_get_arc - : public internal::Qt_widget_get_arc_helper -{ - typedef typename R::FT FT; - typedef typename R::Circle_2 Circle; - typedef typename R::Circular_arc_2 Circular_arc_2; - typedef typename R::Segment_2 Segment; - typedef typename R::Line_2 Line; - typedef typename R::Point_2 Point; - -public: - - Qt_widget_get_arc(const QCursor c=QCursor(Qt::crossCursor), - QObject* parent = 0, const char* name = 0) - : internal::Qt_widget_get_arc_helper(parent, name), - cursor(c), firstpoint(false), - firsttime(true), secondpoint(false), thirdpoint(false), - clockwise(false) - {} - - void draw() - { - if (secondpoint) { - *widget << CGAL::GREEN << introduced_circle; - if (thirdpoint){ - *widget << CGAL::BLUE << Segment(Point(x1, y1), first_point); - } - } - firsttime = true; - } - -private: - - bool is_pure(Qt::ButtonState s) { - return ! ((s & Qt::ControlButton) || - (s & Qt::ShiftButton) || - (s & Qt::AltButton)); - } - - void mousePressEvent(QMouseEvent *e) - { - if (e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON - && !firstpoint - && is_pure(e->state())) - { - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - x1 = x; - y1 = y; - x2 = x; - y2 = y; - firstpoint = true; - center = Point(x, y); - } else if (e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON - && !secondpoint && is_pure(e->state())) - { - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - introduced_circle = Circle(Point(x1,y1), - squared_distance(Point(x1, y1), Point(x,y))); - secondpoint = true; - firsttime = true; - on_the_boundary = Point(x, y); - } else if (e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON - && !thirdpoint && is_pure(e->state())){ - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - first_point = Point(x, y); - thirdpoint = true; - firsttime = true; - } else if (e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON){ - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - second_point = Point(x, y); - firstpoint = false; secondpoint = false; thirdpoint = false; - firsttime = true; - got_it(); - } - } - - void keyPressEvent(QKeyEvent *e) - { - switch ( e->key() ) { - case Key_Escape: // key_escape - if (firstpoint && !secondpoint) - { - firstpoint = false; - RasterOp old_raster = widget->rasterOp(); - QColor old_color = widget->color(); - widget->lock(); - widget->setRasterOp(XorROP); - *widget << CGAL::GREEN; - *widget << Circle(Point(x1,y1), - squared_distance(Point(x1, y1), Point(x2,y2))); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - widget->unlock(); - firsttime = true; - } - break; - case Key_C: - if(thirdpoint){ - clockwise = !clockwise; - if(!firsttime){ - //draw the arc - QColor old_color = widget->color(); - RasterOp old_raster = widget->rasterOp(); - //save the initial raster mode - widget->setRasterOp(XorROP); - widget->lock(); - *widget << CGAL::RED; - int x_screen = widget->x_pixel(CGAL::to_double(center.x())); - int y_screen = widget->y_pixel(CGAL::to_double(center.y())); - int x_screen_b = widget->x_pixel(CGAL::to_double(on_the_boundary.x())); - int y_screen_b = widget->y_pixel(CGAL::to_double(on_the_boundary.y())); - int radius = (int)sqrt(CGAL::to_double((x_screen_b - x_screen) * - (x_screen_b - x_screen) + - (y_screen_b - y_screen) * - (y_screen_b - y_screen))); - double diff = 180/3.1415926; - - double a = atan2( to_double(first_point.y() - center.y()), - to_double(first_point.x() - center.x())); - double a2p = atan2( to_double(y2 - center.y()), - to_double(x2 - center.x())); - if(!clockwise){double tempa = a; a = a2p; a2p = tempa;} - - double alen2; - if(a2p > a) - alen2 = a2p - a; - else - alen2 = 2 * 3.1415926 + a2p - a; - - widget->get_painter().drawArc(x_screen - radius, - y_screen - radius, - 2 * radius, 2 * radius, - (int)(a * diff * 16), - (int)(alen2 * diff * 16)); - a = atan2( to_double(first_point.y() - center.y()), - to_double(first_point.x() - center.x())); - double a2 = atan2( to_double(y2 - center.y()), - to_double(x2 - center.x())); - if(clockwise){double tempa = a; a = a2; a2 = tempa;} - double alen; - if(a2 > a) - alen = a2 - a; - else - alen = 2 * 3.1415926 + a2 - a; - - widget->get_painter().drawArc(x_screen - radius, - y_screen - radius, - 2 * radius, 2 * radius, - (int)(a * diff * 16), - (int)(alen * diff * 16)); - widget->unlock(); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - } - } - break; - }//endswitch - } - - void leaveEvent(QEvent *) - { - if (firstpoint && !secondpoint) - { - QColor old_color = widget->color(); - RasterOp old_raster = widget->rasterOp(); //save the initial raster mode - - widget->lock(); - widget->setRasterOp(XorROP); - *widget << CGAL::GREEN << Circle(Point(x1,y1), - squared_distance(Point(x1, y1), - Point(x2,y2))); - widget->unlock(); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - firsttime = true; - } - } - - void mouseMoveEvent(QMouseEvent *e) - { - if (firstpoint==true && !secondpoint) - { - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - QColor old_color = widget->color(); - RasterOp old_raster = widget->rasterOp();//save the initial raster mode - widget->setRasterOp(XorROP); - widget->lock(); - *widget << CGAL::GREEN; - if(!firsttime) - *widget << Circle(Point(x1,y1), - squared_distance(Point(x1, y1), Point(x2,y2))); - *widget << Circle(Point(x1,y1), - squared_distance(Point(x1, y1), Point(x,y))); - widget->unlock(); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - - //save the last coordinates to redraw the screen - x2 = x; - y2 = y; - firsttime = false; - } else if(secondpoint || thirdpoint){ - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - QColor old_color = widget->color(); - RasterOp old_raster = widget->rasterOp();//save the initial raster mode - widget->setRasterOp(XorROP); - widget->lock(); - *widget << CGAL::BLUE; - if(!firsttime) - *widget << Segment(Point(x1,y1),Point(x2,y2)); - - *widget << Segment(Point(x1,y1),Point(x,y)); - widget->unlock(); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - //save the last coordinates to redraw the screen - - if(thirdpoint){ - //draw the arc - QColor old_color = widget->color(); - RasterOp old_raster = widget->rasterOp();//save the initial raster mode - widget->setRasterOp(XorROP); - widget->lock(); - *widget << CGAL::RED; - - int x_screen = widget->x_pixel(CGAL::to_double(center.x())); - int y_screen = widget->y_pixel(CGAL::to_double(center.y())); - int x_screen_b = widget->x_pixel(CGAL::to_double(on_the_boundary.x())); - int y_screen_b = widget->y_pixel(CGAL::to_double(on_the_boundary.y())); - - int radius = (int)sqrt(CGAL::to_double((x_screen_b - x_screen) * - (x_screen_b - x_screen) + - (y_screen_b - y_screen) * - (y_screen_b - y_screen))); - - double diff = 180/3.1415926; - - double a = atan2( to_double(first_point.y() - center.y()), - to_double(first_point.x() - center.x())); - - double a2 = atan2( to_double(y - center.y()), - to_double(x - center.x())); - if(clockwise){double tempa = a; a = a2; a2 = tempa;} - double alen; - if(a2 > a) - alen = a2 - a; - else - alen = 2 * 3.1415926 + a2 - a; - - if(!firsttime){ - double a = atan2( to_double(first_point.y() - center.y()), - to_double(first_point.x() - center.x())); - double a2p = atan2( to_double(y2 - center.y()), - to_double(x2 - center.x())); - if(clockwise){double tempa = a; a = a2p; a2p = tempa;} - - double alen2; - if(a2p > a) - alen2 = a2p - a; - else - alen2 = 2 * 3.1415926 + a2p - a; - - widget->get_painter().drawArc(x_screen - radius, - y_screen - radius, - 2 * radius, 2 * radius, - (int)(a * diff * 16), - (int)(alen2 * diff * 16)); - } - - widget->get_painter().drawArc(x_screen - radius, - y_screen - radius, - 2 * radius, 2 * radius, - (int)(a * diff * 16), - (int)(alen * diff * 16)); - widget->unlock(); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - } - x2 = x; - y2 = y; - firsttime = false; - } - } - -public: - - Circular_arc_2 get_circular_arc() { - //Circle circ (introduced_circle.center(), - //introduced_circle.squared_radius()); - Circle circ = introduced_circle; - - if (clockwise) - std::swap(first_point, second_point); - - Line l1 (first_point, center); - Line l2 (second_point, center); - - return Circular_arc_2 (circ, - l1, CGAL::compare_xy(first_point, center) == CGAL::SMALLER, - l2, CGAL::compare_xy(second_point, center) == CGAL::SMALLER); - } - -private: - - void activating() - { - oldpolicy = widget->focusPolicy(); - widget->setFocusPolicy(QWidget::StrongFocus); - oldcursor = widget->cursor(); - widget->setCursor(cursor); - } - - void deactivating() - { - widget->setFocusPolicy(oldpolicy); - widget->setCursor(oldcursor); - firstpoint = false; - } - - QCursor cursor; - QCursor oldcursor; - - FT x1, //the X of the first point - y1; //the Y of the first point - FT x2, //the old second point's X - y2; //the old second point's Y - bool firstpoint, //true if the user left clicked once - firsttime; //true if the line is not drawn - bool secondpoint;//true after the secons point - bool thirdpoint; //true after the third point - - Circle introduced_circle; - Point center; - Point on_the_boundary; - - Point first_point; - Point second_point; - - bool clockwise; - - QWidget::FocusPolicy oldpolicy; -}; - -} // namespace CGAL - -#endif // CGAL_QT_WIDGET_GET_ARC_H diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_segment.cpp b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_segment.cpp deleted file mode 100644 index 9f26fec2d64..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_segment.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France) and -// Max-Planck-Institute Saarbruecken (Germany). -// All rights reserved. -// -// $URL$ -// $Id$ -// -// Authors : Radu Ursu -// -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (CGAL - Effective Computational Geometry for Curves and Surfaces) - -#include - - -#include "Qt_widget_get_segment.h" - -//void Qt_widget_get_arc_helper::new_object_time(){}; - -#include "Qt_widget_get_segment.moc" - diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_segment.h b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_segment.h deleted file mode 100644 index 457d0016dbe..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/Qt_widget_get_segment.h +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France) and -// Max-Planck-Institute Saarbruecken (Germany). -// All rights reserved. -// -// $URL$ -// $Id$ -// -// Authors : Radu Ursu -// -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (CGAL - Effective Computational Geometry for Curves and Surfaces) - -#ifndef CGAL_QT_WIDGET_GET_SEGMENT_H -#define CGAL_QT_WIDGET_GET_SEGMENT_H - -#include -#include -//#include "Qt_widget_get_arc.h" - -#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON -#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton -#endif - - -namespace CGAL { - -namespace internal { - -class Qt_widget_get_segment_helper - : public CGAL::Qt_widget_layer -{ -Q_OBJECT - -public: - - Qt_widget_get_segment_helper(QObject* parent = 0, const char* name = 0) - : Qt_widget_layer(parent, name) {} - - virtual void got_it() { emit new_object_time(); } - -signals: - void new_object_time(); -}; - -} // namespace internal - - -template -class Qt_widget_get_segment : public internal::Qt_widget_get_segment_helper -{ -public: - typedef typename R::Point_2 Point; - typedef typename R::Segment_2 Segment; - typedef typename R::Line_arc_2 Line_arc_2; - typedef typename R::FT FT; - - Qt_widget_get_segment(const QCursor c=QCursor(Qt::crossCursor), - QObject* parent = 0, const char* name = 0) - : internal::Qt_widget_get_segment_helper(parent, name), - cursor(c), firstpoint(false), - firsttime(true){}; - -protected: - bool is_pure(Qt::ButtonState s){ - if((s & Qt::ControlButton) || - (s & Qt::ShiftButton) || - (s & Qt::AltButton)) - return 0; - else - return 1; - } - - void mousePressEvent(QMouseEvent *e) - { - if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON - && !firstpoint - && is_pure(e->state())) - { - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - x1 = x; - y1 = y; - x2 = x; - y2 = y; - firstpoint = TRUE; - } else if(e->button() == CGAL_QT_WIDGET_GET_POINT_BUTTON - && is_pure(e->state())){ - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - if(x1!=x || y1!=y) { - widget->new_object( - make_object(Segment(Point(x1,y1),Point(x,y)))); - firstpoint = FALSE; - } - got_it(); - } - } - - void keyPressEvent(QKeyEvent *e) - { - switch ( e->key() ) { - case Key_Escape: // key_escape - if(firstpoint) - { - firstpoint = false; - RasterOp old_raster = widget->rasterOp(); - QColor old_color = widget->color(); - widget->lock(); - widget->setRasterOp(XorROP); - *widget << CGAL::GREEN; - *widget << Segment(Point(x1,y1), Point(x2,y2)); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - widget->unlock(); - firsttime = true; - } - break; - }//endswitch - } - - void leaveEvent(QEvent *) - { - if(firstpoint) - { - RasterOp old_raster = widget->rasterOp();//save the initial raster mode - QColor old_color = widget->color(); - widget->lock(); - widget->setRasterOp(XorROP); - *widget << CGAL::GREEN; - *widget << Segment(Point(x1,y1), Point(x2,y2)); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - widget->unlock(); - firsttime = true; - } - } - void mouseMoveEvent(QMouseEvent *e) - { - if(firstpoint) - { - FT x, y; - widget->x_real(e->x(), x); - widget->y_real(e->y(), y); - RasterOp old_raster = widget->rasterOp();//save the initial raster mode - QColor old_color = widget->color(); - widget->setRasterOp(XorROP); - widget->lock(); - *widget << CGAL::GREEN; - if(!firsttime) - *widget << Segment(Point(x1,y1),Point(x2,y2)); - *widget << Segment(Point(x1,y1),Point(x,y)); - widget->unlock(); - widget->setRasterOp(old_raster); - widget->setColor(old_color); - - //save the last coordinates to redraw the screen - x2 = x; - y2 = y; - firsttime = false; - } - }; - -public: - - Line_arc_2 get_line_arc() { - return Line_arc_2(Point(x1,y1), - Point(x2,y2)); - - } - - void activating() - { - oldpolicy = widget->focusPolicy(); - widget->setFocusPolicy(QWidget::StrongFocus); - oldcursor = widget->cursor(); - widget->setCursor(cursor); - }; - - void deactivating() - { - widget->setFocusPolicy(oldpolicy); - widget->setCursor(oldcursor); - firstpoint = false; - }; - - QCursor oldcursor; - QCursor cursor; - - FT x1, //the X of the first point - y1; //the Y of the first point - FT x2, //the old second point's X - y2; //the old second point's Y - bool firstpoint, //true if the user left clicked once - firsttime; //true if the line is not drawn - QWidget::FocusPolicy oldpolicy; -};//end class - -} // namespace CGAL - -#endif // CGAL_QT_WIDGET_GET_SEGMENT_H diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/README b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/README deleted file mode 100644 index b8d158ab15f..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/README +++ /dev/null @@ -1,3 +0,0 @@ -demo allows to enter line segments and circular arcs -and computes the arrangement -it also allows to read .dxf files (autocad format) diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/demo.cpp b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/demo.cpp deleted file mode 100644 index 6e6ddeb4ad1..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/demo.cpp +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// $URL$ -// $Id$ -// -// Authors : Monique Teillaud, Sylvain Pion, Pedro Machado, Radu Ursu -// -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (CGAL - Effective Computational Geometry for Curves and Surfaces) - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "Qt_widget_get_segment.h" -#include "Qt_widget_get_arc.h" -#include "sweeper.xpm" -#include "trash.xpm" -#include "get_arc.xpm" -#include "lines_icon.xpm" - -#include -#include -#include - -typedef CGAL::Quotient NT; - - -typedef CGAL::Cartesian Linear_k; - -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k; -typedef CGAL::Circular_kernel_2 Circular_k; - -typedef Circular_k::Line_arc_2 Line_arc_2; -typedef Circular_k::Segment_2 Segment; -typedef Circular_k::Circular_arc_2 Circular_arc_2; -typedef Circular_k::Circular_arc_point_2 Circular_arc_point_2; - -typedef std::vector ArcContainer; - -const QString my_title_string("CGAL :: " - "Intersecting Circles, Line Arcs, Circular Arcs"); - -class Qt_layer_show_intersections - : public CGAL::Qt_widget_layer -{ - ArcContainer _ac; - bool show_intersections; - -public: - - Qt_layer_show_intersections() - : _ac(), show_intersections(true) {} - - void swap_show() { show_intersections = ! show_intersections; } - - const ArcContainer & arc_container() const { return _ac; } - ArcContainer & arc_container() { return _ac; } - - void draw() - { - if (!show_intersections) - return; - *widget << CGAL::RED; - int l = _ac.size(); - - for(int i=0; i res; - Circular_arc_2 ca1, ca2; - Line_arc_2 la1, la2; - if(assign(ca1, _ac[i])) { - if(assign(ca2, _ac[j])) { - CGAL::intersection(ca1, ca2, std::back_inserter(res)); - } else { - CGAL::intersection(ca1, la2, std::back_inserter(res)); - } - } else { - if(assign(ca2, _ac[j])) { - CGAL::intersection(la1, ca2, std::back_inserter(res)); - } else { - CGAL::intersection(la1, la2, std::back_inserter(res)); - } - } - for(unsigned k=0; k pair; - Circular_arc_2 ca; - Line_arc_2 la; - if(assign(pair, res[k])) *widget << pair.first; - else if(assign(ca, res[k])) *widget << ca; - else if(assign(la, res[k])) { - *widget << Segment(Circular_k::Point_2(to_double(la.source().x()), - to_double(la.source().y())), - Circular_k::Point_2(to_double(la.target().x()), - to_double(la.target().y()))); - } - } - } - } - } -}; - -struct Qt_layer_show_ch - : public CGAL::Qt_widget_layer -{ - ArcContainer _ac; - bool show_arcs; - -public: - - Qt_layer_show_ch() - : show_arcs(true) {} - - const ArcContainer & arc_container() const { return _ac; } - - ArcContainer & arc_container() { return _ac; } - - void swap_show() { show_arcs = ! show_arcs; } - - void draw() - { - if (!show_arcs) - return; - *widget << CGAL::BLUE; - int l = _ac.size(); - for (int i=0; istart( 200, FALSE ); - - QPopupMenu * file = new QPopupMenu( this ); - menuBar()->insertItem( "&File", file ); - file->insertItem("&New", this, SLOT(new_instance()), CTRL+Key_N); - file->insertItem("New &Window", this, SLOT(new_window()), CTRL+Key_W); - file->insertSeparator(); - file->insertItem("Print", widget, SLOT(print_to_ps()), CTRL+Key_P); - file->insertSeparator(); - file->insertItem( "&Close", this, SLOT(close()), CTRL+Key_X ); - file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); - - QPopupMenu * help = new QPopupMenu( this ); - menuBar()->insertItem( "&Help", help ); - help->insertItem("How To", this, SLOT(howto()), Key_F1); - help->insertSeparator(); - help->insertItem("&About", this, SLOT(about()), CTRL+Key_A ); - help->insertItem("About &Qt", this, SLOT(aboutQt()) ); - - stoolbar = new CGAL::Qt_widget_standard_toolbar (widget, this, "ST"); - - QToolBar * layers_toolbar = new QToolBar("Tools", this, - QMainWindow::Top, TRUE, "Tools"); - - QToolButton * show_intersections_button = - new QToolButton(QPixmap((const char**)::sweeper_xpm ), - "Showing Intersections", - 0, - this, - SLOT(show_intersections()), - layers_toolbar, - "Showing Intersections"); - - widget->attach(&show_intersections_layer); - connect(show_intersections_button, SIGNAL(stateChanged(int)), - &show_intersections_layer, SLOT(stateChanged(int))); - - QToolButton * show_container_button = - new QToolButton(QPixmap((const char**)::get_arc), - "Show Original arcs", - 0, - this, - SLOT(show_original_arcs()), - layers_toolbar, - "Show Original arcs"); - show_container_button->setToggleButton(true); - - show_container_button->toggle(); - connect(show_container_button, SIGNAL(stateChanged(int)), - &testlayer, SLOT(stateChanged(int))); - - QToolButton * line_circle_button = - new QToolButton(QPixmap((const char**)::lines_icon), - "Use Line", - 0, - this, - SLOT(change_line_circle()), - layers_toolbar, - "Use Circular arc"); - - line_circle_button->setToggleButton(true); - arc_circle = true; - - QToolButton * clear_button = - new QToolButton(QPixmap((const char**)trash), - "Clear", - 0, - this, - SLOT(clear_container()), - layers_toolbar, - "Clear"); - - connect(clear_button, SIGNAL(stateChanged(int)), - &testlayer, SLOT(stateChanged(int))); - - *widget << CGAL::LineWidth(2) << CGAL::BackgroundColor(CGAL::WHITE); - - resize(w,h); - widget->set_window(-1, 1, -1, 1); - widget->setMouseTracking(TRUE); - - // layers - widget->attach(&testlayer); - get_arc_layer = new CGAL::Qt_widget_get_arc; - get_segment_layer = new CGAL::Qt_widget_get_segment; - widget->attach(get_arc_layer); - connect(get_arc_layer, SIGNAL(new_object_time()), this, SLOT(get_arc())); - connect(get_segment_layer, SIGNAL(new_object_time()), - this, SLOT(get_arc())); - } - -public slots: - - void new_instance() - { - widget->lock(); - widget->clear_history(); - widget->set_window(-1.1, 1.1, -1.1, 1.1); - widget->unlock(); - something_changed = true; - } - - void get_arc() - { - CGAL::Object o; - if (arc_circle) { - Circular_arc_2 ca = get_arc_layer->get_circular_arc(); - o = make_object(ca); - } - else { - Line_arc_2 la = get_segment_layer->get_line_arc(); - o = make_object(la); - } - arc_container().push_back(o); - intersections_container().push_back(o); - something_changed = true; - widget->redraw(); - } - - void show_original_arcs() - { - testlayer.swap_show(); - something_changed = true; - widget->redraw(); - } - - void show_intersections() - { - show_intersections_layer.swap_show(); - something_changed = true; - widget->redraw(); - } - - void change_line_circle(){ - arc_circle = ! arc_circle; - if(arc_circle){ - widget->detach(get_segment_layer); - widget->attach(get_arc_layer); - } - else{ - widget->detach(get_arc_layer); - widget->attach(get_segment_layer); - } - something_changed = true; - widget->redraw(); - } - - void clear_container() - { - arc_container().clear(); - intersections_container().clear(); - something_changed = true; - widget->redraw(); - } - -private slots: - - void about() - { - QMessageBox::about(this, my_title_string, - "This is a demo of the CGAL's Circular_kernel_2.\n Particularly, the intersection functionality."); - } - - void aboutQt() - { - QMessageBox::aboutQt(this, my_title_string); - } - - void howto() - { - CGAL::Qt_help_window *help = - new CGAL::Qt_help_window("help/index.html", ".", 0, "help viewer"); - help->resize(400, 400); - help->setCaption("Demo HowTo"); - help->show(); - } - - void new_window() - { - MyWindow *ed = new MyWindow(500, 500); - ed->setCaption("Layer"); - ed->widget->clear_history(); - ed->widget->set_window(-1.1, 1.1, -1.1, 1.1); - ed->show(); - something_changed = true; - } - - void timer_done() - { - if (something_changed) - widget->redraw(); - something_changed = false; - } - -private: - bool arc_circle; - - const ArcContainer & arc_container() const - { return testlayer.arc_container(); } - - ArcContainer & arc_container() - { return testlayer.arc_container(); } - - const ArcContainer & intersections_container() const - { return show_intersections_layer.arc_container(); } - - ArcContainer & intersections_container() - { return show_intersections_layer.arc_container(); } - - CGAL::Qt_widget *widget; - CGAL::Qt_widget_standard_toolbar *stoolbar; - bool something_changed; - Qt_layer_show_ch testlayer; - Qt_layer_show_intersections show_intersections_layer; - CGAL::Qt_widget_get_segment *get_segment_layer; - CGAL::Qt_widget_get_arc *get_arc_layer; -}; - -#include "demo.moc" - -int -main(int argc, char **argv) -{ - QApplication app(argc, argv); - MyWindow widget(800, 700); - app.setMainWidget(&widget); - widget.setCaption(my_title_string); - widget.setMouseTracking(TRUE); -#if !defined (__POWERPC__) - QPixmap cgal_icon = QPixmap((const char**)demoicon_xpm); - widget.setIcon(cgal_icon); -#endif - widget.show(); - return app.exec(); -} - diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/get_arc.xpm b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/get_arc.xpm deleted file mode 100644 index 69e73962635..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/get_arc.xpm +++ /dev/null @@ -1,283 +0,0 @@ -/* XPM */ -static const char *get_arc[] = { -/* width height num_colors chars_per_pixel */ -" 33 33 243 2", -/* colors */ -".. c #ffffff", -".# c #04827e", -".a c #9c260c", -".b c #9c8230", -".c c #e4c22c", -".d c #44422c", -".e c #c49a2c", -".f c #0402fc", -".g c #440344", -".h c #c4c2c4", -".i c #446a6c", -".j c #042424", -".k c #046261", -".l c #e4e3e4", -".m c #84827a", -".n c #242424", -".o c #244644", -".p c #746637", -".q c #8c5614", -".r c #645224", -".s c #ecfab4", -".t c #849294", -".u c #045250", -".v c #243234", -".w c #6c7474", -".x c #c4b234", -".y c #d4d294", -".z c #9ca69c", -".A c #240224", -".B c #fcfe04", -".C c #f4f2f4", -".D c #9c9764", -".E c #ecd614", -".F c #840284", -".G c #043232", -".H c #047273", -".I c #b4b3b4", -".J c #041214", -".K c #544624", -".L c #646664", -".M c #34341c", -".N c #c41ac4", -".O c #e4bc34", -".P c #fcfedc", -".Q c #f4c634", -".R c #848e94", -".S c #4c5254", -".T c #343a24", -".U c #044a4a", -".V c #444b47", -".W c #542654", -".X c #847a24", -".Y c #9c927c", -".Z c #1c5a54", -".0 c #ccd2cc", -".1 c #4c7674", -".2 c #045c5b", -".3 c #acacac", -".4 c #645e44", -".5 c #dcdadc", -".6 c #ac8a34", -".7 c #dcca9c", -".8 c #1c3634", -".9 c #746d67", -"#. c #cc32cc", -"## c #04fe04", -"#a c #c4a834", -"#b c #c4ccc8", -"#c c #1c6a64", -"#d c #342214", -"#e c #3c4234", -"#f c #747a7c", -"#g c #bc9638", -"#h c #047d7b", -"#i c #141614", -"#j c #ecb654", -"#k c #f4faf8", -"#l c #1c021c", -"#m c #948250", -"#n c #74121c", -"#o c #546464", -"#p c #042b2b", -"#q c #046d6b", -"#r c #8c9a9c", -"#s c #0c5250", -"#t c #043c3b", -"#u c #343335", -"#v c #f4cd39", -"#w c #4c5e5c", -"#x c #84766c", -"#y c #0c0b0b", -"#z c #7c827c", -"#A c #044546", -"#B c #8c867e", -"#C c #a4aca5", -"#D c #bcbbbc", -"#E c #345654", -"#F c #ec02ec", -"#G c #948a7c", -"#H c #545353", -"#I c #4c4b4a", -"#J c #d4dad4", -"#K c #cccccc", -"#L c #fcfefc", -"#M c #dcce24", -"#N c #444442", -"#O c #e4eae4", -"#P c #7c6e4c", -"#Q c #fcf8ac", -"#R c #04565c", -"#S c #d4b25c", -"#T c #fcf6fa", -"#U c #ac9664", -"#V c #fcde24", -"#W c #ac02ac", -"#X c #041a14", -"#Y c #646a64", -"#Z c #f4ba2c", -"#0 c #8c8d8c", -"#1 c #343a3c", -"#2 c #847e4c", -"#3 c #d4d4d4", -"#4 c #047e84", -"#5 c #04fefc", -"#6 c #f422f4", -"#7 c #cc0a04", -"#8 c #7caaa4", -"#9 c #8c5a8c", -"a. c #b426b4", -"a# c #640264", -"aa c #2c1614", -"ab c #5c362c", -"ac c #2c8284", -"ad c #bcb254", -"ae c #2c7674", -"af c #dcb224", -"ag c #9c9c9c", -"ah c #dc1edc", -"ai c #342a1c", -"aj c #f40ef4", -"ak c #5c3a5c", -"al c #bcb684", -"am c #546a64", -"an c #6c6654", -"ao c #947624", -"ap c #f4b644", -"aq c #8c6e8c", -"ar c #94967c", -"as c #2c2d2c", -"at c #640e64", -"au c #ecd634", -"av c #7c8e8c", -"aw c #544a44", -"ax c #e4ca44", -"ay c #845e14", -"az c #344a49", -"aA c #fc02fc", -"aB c #bc02bc", -"aC c #142a2c", -"aD c #dcba3c", -"aE c #c4a22c", -"aF c #6c6e44", -"aG c #f4c244", -"aH c #5c5d5c", -"aI c #7c6e7c", -"aJ c #2c5e5f", -"aK c #1c1e1c", -"aL c #e4be4c", -"aM c #345e5c", -"aN c #645a14", -"aO c #dcdedc", -"aP c #bc9e2c", -"aQ c #8c5a2c", -"aR c #949294", -"aS c #8c7a24", -"aT c #0c1e24", -"aU c #1c3e3c", -"aV c #ecde2c", -"aW c #fcfeac", -"aX c #dcb23c", -"aY c #bca264", -"aZ c #e4ce34", -"a0 c #cca23c", -"a1 c #a4862c", -"a2 c #4c4634", -"a3 c #4c024c", -"a4 c #4c6664", -"a5 c #2c4848", -"a6 c #a4a6a4", -"a7 c #a49660", -"a8 c #bcb6bc", -"a9 c #3c3224", -"b. c #ecbe37", -"b# c #5c225c", -"ba c #547a7c", -"bb c #b48e3c", -"bc c #cca638", -"bd c #7c7d7c", -"be c #1c1a1c", -"bf c #5c625c", -"bg c #0c2e2c", -"bh c #3c3634", -"bi c #fcce34", -"bj c #a48e34", -"bk c #ececec", -"bl c #6c6d6c", -"bm c #3c3b3c", -"bn c #a49ea4", -"bo c #c49e3c", -"bp c #04666c", -"bq c #848284", -"br c #f4f6b4", -"bs c #747574", -"bt c #ecda24", -"bu c #04363c", -"bv c #b4acac", -"bw c #949c9c", -"bx c #54545c", -"by c #041e24", -"bz c #8c8e94", -"bA c #d4d6dc", -"bB c #8c7e34", -"bC c #ecc234", -"bD c #2c322c", -"bE c #8c028c", -"bF c #0c120c", -"bG c #f402f4", -"bH c #6c026c", -"bI c #fcc24c", -"bJ c #3c2e2c", -"bK c #544634", -"bL c #fcfeec", -"bM c #3c4244", -"bN c #5c4a44", -"bO c #e4dedc", -"bP c #04463c", -"bQ c #046664", -"bR c #244a4c", -"bS c #045653", -"bT c #f4f6f4", -"bU c #043634", -"bV c #047674", -"bW c #044e4b", -/* pixels */ -"...........................................f.f.f.f................", -"...........................................f.f.f.f................", -"...........................................f.f.f..................", -"...........................................f.f.f..................", -".........................................f.f......................", -".........................................f.f......................", -".........................................f.f......................", -".......................................f.f........................", -".......................................f.f........................", -".....................................f.f..........................", -".....................................f.f..........................", -"....................#################L.f..........................", -"..................#################L#L.B..........................", -"................######.............f#L.B.B...........f.f..........", -"..............####...............f.f.f...B.B.....f.f.f.f.f........", -"............######...............f.f.....B#L#5#5.f.f.f............", -"............####.................f.f...f.f#5#5#5.f................", -"............####.................f.f...f.f#5#5#5.f................", -"............####...............f.f.f.f.f.f#5####..................", -"............####...................f.f.f..######..................", -"............####...................f......######..................", -"............####..........................######..................", -"............####..........................######..................", -"............######......................########..................", -"..............####......................####......................", -"................######..............######........................", -"..................######################..........................", -"....................##################............................", -"..................................................................", -"..................................................................", -"..................................................................", -"..................................................................", -".................................................................." -}; diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/get_arc.jpeg b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/get_arc.jpeg deleted file mode 100644 index b532d3a097a..00000000000 Binary files a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/get_arc.jpeg and /dev/null differ diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/index.html b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/index.html deleted file mode 100644 index 330fc18c119..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/index.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - Circular Kernel 2D - - - -

How to use the

"Circular Kernel 2D"

Demo

-
-This demo illustrates the intersection functionality provided by the CGAL's Circular_kernel_2. -

-You can easily input circular arcs and segments using the mouse. The first click is the center -of the supporting circle, the second will select the radius, then you have -to enter two rays delimiting the arc. Pressing the 'c' key while entering -the second ray will take the opposite arc (the yellow part). -

- -Clicking in this icon will toggle the intersections visibility. -

- -To erase the content of the arcs container, just click on the trash. -

- -Toggling this button will change the object you are inserting between circular arcs and segments. -

- -This button toggles the display of the arcs container. -

- -
- Plus the Usual Functionality of a Qt_widget demo: -


- -

 

-

 

-

 

-

 

- -

-  

-

-  

-

- Reset application

- Press Ctrl+N combination keys or go to File menu and choose "New". - The triangulation will be erased, the window's viewport will be set - to default. (-1, 1, -1, 1) - -

-  

-

-  

-

- Create a new window

- Press Ctrl+W combination keys or go to File menu and choose "New Window". - A new window will appear, modifying the viewport to make the - triangulation fit in the new window. - -

-  

-

-  

-

- Print

- Press Ctrl+P combination keys or go to File menu and choose "Print". - The visible area on the screen will be outputed to the print device - of your choice. - - -

-  

-

-  

-

- Close the current window -

- Press Ctrl+X combination keys or go to File menu and choose "Close". - You may do it for any window other than the initial one, this operation - will close only the one you have choosen. If you do this for the initial - parent window, it will close the others too. - -

-  

-

-  

-

- Quit the application

- Press Ctrl+Q combination keys or go to File menu and choose "Quit". - When you quit the application, all the windows you have created will - be destroyed. - -
-
- - diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/planar_map_icon.jpeg b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/planar_map_icon.jpeg deleted file mode 100644 index fe39a1113b7..00000000000 Binary files a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/planar_map_icon.jpeg and /dev/null differ diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/sweeper.jpeg b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/sweeper.jpeg deleted file mode 100644 index d3517197a1a..00000000000 Binary files a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/sweeper.jpeg and /dev/null differ diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/trash.jpeg b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/trash.jpeg deleted file mode 100644 index 741c13b57dd..00000000000 Binary files a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/help/trash.jpeg and /dev/null differ diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/lines_icon.xpm b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/lines_icon.xpm deleted file mode 100644 index 9576eced83f..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/lines_icon.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static const char *lines_icon[]={ -"32 32 3 1", -"a c #00ff00", -"# c #ff0000", -". c #ffffff", -"................................", -"................................", -"..............##................", -"..............##................", -"...##........a..................", -"...##.......a...................", -".....a.....a.......##...........", -"......a...a........##...........", -".......a##.........a.......##...", -"........##........a........##...", -".......a.a.......a........a.....", -"......a...a.....a........a......", -".....a.....a...a........a.......", -"....a.......a##........a........", -"...a.........##.......a.........", -".##.........a.a......a..........", -".##........a...a....a...........", -"..........a.....a..a............", -".........a.......##.............", -"........a........##.............", -".......a........a..a............", -"......a........a....a...........", -".....##.......a......a..........", -".....##......a........a.........", -"............a..........##.......", -"...........##..........##.......", -"...........##...................", -"................................", -"................................", -"................................", -"................................", -"................................"}; diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/planar_map_icon.xpm b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/planar_map_icon.xpm deleted file mode 100644 index fc0ab607514..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/planar_map_icon.xpm +++ /dev/null @@ -1,43 +0,0 @@ -/* XPM */ -static const char *planar_map_icon[] = { -/* width height num_colors chars_per_pixel */ -" 33 33 3 1", -/* colors */ -". c #ffffff", -"# c #00ff00", -"a c #ff0000", -/* pixels */ -".................................", -".................................", -".................................", -".................................", -".................########........", -"................##.......aa......", -"...............#.........aa......", -".........######..................", -"........#.....###................", -".......#.....#..##...............", -".......#....aa...aa..............", -"......aa....aa...aa..............", -"......aa.....#...................", -"...........##########............", -"..........##..#.....##...........", -".........#....##......#...aa.....", -"........#......##......#.#aa.....", -".......#.........########........", -".......#................#........", -"......#..................#.......", -"......#.................aa.......", -".....aa.................aa.......", -".....aa..........................", -"......#..........................", -"......#..........................", -".......#.........................", -".......#.........................", -"........#........................", -".........aa......................", -".........aa......................", -".................................", -".................................", -"................................." -}; diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/sweeper.xpm b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/sweeper.xpm deleted file mode 100644 index 9be4d27e7ea..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/sweeper.xpm +++ /dev/null @@ -1,278 +0,0 @@ -/* XPM */ -static const char *sweeper_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 240 2", -" c #020100", -". c #01020a", -"X c #000b02", -"o c #0c0000", -"O c #0c0c02", -"+ c #0c0c0c", -"@ c #020013", -"# c #0e0d13", -"$ c #001300", -"% c #04150f", -"& c #051610", -"* c #0f1813", -"= c #130102", -"- c #110902", -"; c #140f0b", -": c #1a0000", -"> c #19060a", -", c #1d0a00", -"< c #1a0f0d", -"1 c #19120a", -"2 c #131313", -"3 c #1d1c1d", -"4 c #030224", -"5 c #09072f", -"6 c #121332", -"7 c #261d00", -"8 c #310000", -"9 c #2d1924", -"0 c #321f23", -"q c #23250f", -"w c #252316", -"e c #312c0f", -"r c #3b2d00", -"t c #232323", -"y c #282725", -"u c #212e34", -"i c #2f3833", -"p c #3c292d", -"a c #3e293a", -"s c #363022", -"d c gray20", -"f c #3c3b39", -"g c #334f1f", -"h c #394251", -"j c #412718", -"k c #473f1b", -"l c #4c3d14", -"z c #553d01", -"x c #433f22", -"c c #4d383f", -"v c #6c2900", -"b c #6b3e43", -"n c #554011", -"m c #65511f", -"M c #7e700d", -"N c #747323", -"B c #706343", -"V c #786c52", -"C c #608e50", -"Z c #a42200", -"A c #a92812", -"S c #876a0c", -"D c #82611c", -"F c #896f32", -"G c #8b7a36", -"H c #967027", -"J c #907f39", -"K c #aa6a09", -"L c #a0701b", -"P c #80724b", -"I c #96735f", -"U c #ce001e", -"Y c #f40000", -"T c #ff1200", -"R c #8a8200", -"E c #9a801f", -"W c #938022", -"Q c #9f8e36", -"! c #a88a06", -"~ c #b08713", -"^ c #a48020", -"/ c #a5812d", -"( c #a08d26", -") c #a58c2a", -"_ c #b69838", -"` c #bca32c", -"' c #baa43e", -"] c #b2b437", -"[ c #8d814d", -"{ c #8e8a40", -"} c #918150", -"| c #a68945", -" . c #ad9b47", -".. c #b6844f", -"X. c #a8956d", -"o. c #ac9b65", -"O. c #a59b77", -"+. c #b09c67", -"@. c #b3aa41", -"#. c #b4b54d", -"$. c #b2b84e", -"%. c #b8b147", -"&. c #b4ba58", -"*. c #bea565", -"=. c #c59620", -"-. c #c09d27", -";. c #c49b2f", -":. c #c39738", -">. c #c59e35", -",. c #cfa10d", -"<. c #cfb800", -"1. c #d8bd0c", -"2. c #c3a123", -"3. c #c3a32a", -"4. c #cba037", -"5. c #cfa43c", -"6. c #c8a831", -"7. c #c6b42c", -"8. c #c9b12b", -"9. c #cab133", -"0. c #dea524", -"q. c #dcaf2e", -"w. c #d1a835", -"e. c #deaf3b", -"r. c #ddb82c", -"t. c #e1a42f", -"y. c #e4b62f", -"u. c #e1ba30", -"i. c #e3bd3e", -"p. c #eebe38", -"a. c #f5b93f", -"s. c #c09840", -"d. c #c4a344", -"f. c #c4a04c", -"g. c #cda452", -"h. c #c0b752", -"j. c #c7b950", -"k. c #d4ad4e", -"l. c #d0ab51", -"z. c #dea558", -"x. c #d1be46", -"c. c #ddb345", -"v. c #d6b357", -"b. c #c1b971", -"n. c #d6ac7a", -"m. c #e7984b", -"M. c #e0aa46", -"N. c #e4ba41", -"B. c #ecb445", -"V. c #ffbc48", -"C. c #cfc818", -"Z. c #c2c633", -"A. c #cdc43b", -"S. c #eecd0e", -"D. c #eadc09", -"F. c #e9dc1e", -"G. c #f6c31c", -"H. c #fcc81d", -"J. c #f4dc00", -"K. c #fed112", -"L. c #e1c03b", -"P. c #e8c83f", -"I. c #e8d82d", -"U. c #f3c42e", -"Y. c #fbc421", -"T. c #ffc02f", -"R. c #ffc92f", -"E. c #f4c831", -"W. c #fac736", -"Q. c #ffce37", -"!. c #f1d124", -"~. c #fddc2d", -"^. c #f8d134", -"/. c #e3eb1c", -"(. c #ecf000", -"). c #f3fb00", -"_. c #fcff03", -"`. c #ffff0a", -"'. c #f6fe13", -"]. c #d3c34a", -"[. c #dbce4c", -"{. c #dbc45a", -"}. c #d0d04c", -"|. c #e1d34c", -" X c #f4c541", -".X c #f5c44a", -"XX c #f5c840", -"oX c #f1cb4c", -"OX c #fccc43", -"+X c #ffcf4d", -"@X c #ffc655", -"#X c #ffd340", -"$X c #ffd74b", -"%X c #e4c364", -"&X c #e6dd76", -"*X c #ffc466", -"=X c #ffe14e", -"-X c #ffe375", -";X c #8f8e8c", -":X c #8d9d93", -">X c #9d9181", -",X c #989292", -" :Xv. mXbXvXxXNXmXrXNXNXNX", -"NXNXxXmXNXNXxXNXfXNXMXaXNXNX X o ,Xl.X nXbXnXNXNXMXNXNXNXcXNX", -"rXNXNXvXNXNXxXMXNX7XjXNXbX3 x qX y l. 0 uXmXmXxXNXiXNXNXMXNXNX", -"NXrXNXNXxXNXNXNXmXhXMXNXNXO 0X&XMX- ;Xc bXnXvXmXNXNXNXNXxXMXNXNX", -"xX2 3 + + + O . @ dXr [.%XmX* X NXmXNXbXNXxXNXNXNXNXNXxX", -"tX5 zXnXmXzXNXmXmX6XmXh $ T Y 6 v !.F.= mXhXlXNXNXNXNXNXNXNXNXNX", -"lX Z.'.(.)._.)./.`.J.XXg : U A 8 -X].o mXMXzXpXNXNXNXNXNXNXNXNX", -"mXo A.8.c.~.Q.u.=X<.@Xz.` {.z Z b : , mXNXMXzXNXNXNXNXNXNXNXNXNX", -"NX= R D.S.Q.*X$XG.R.P.y.T.K s u : o mXmXrXNXMXNXNXNXNXNXNXNXNXNX", -"mXo *.2X3X.X0.Y.|.a.H.K.W.L D C NXmXxXMXNXNXmXNXNXNXNXNXNXNXNX", -"bXpX+ } ( l.1XXXW.}.+XoXN H Q I X NXNXNXzXNXmXNXNXNXNXNXNXNXNXNX", -"zXzXX 9 .I.i.I.M.,.C.B./ ] t._ . MXzXNXNXMXNXvXNXNXNXNXNXNXNXNX", -"mXmXmXa M 7.n.g.Q Q.V.m.u.1.x...4 hXzXNXmXNXMXMXNXNXNXNXNXNXNXNX", -"NXNXNX q O.o.F ! i.q.OXU.E.r.-. NXNXNXvXNXxXNXNXNXNXNXNXNXNXNX", -"NXNXxXbXX e l l 9.6.w..Xp.W.i.>.+ xXxXNXmXNXNXNXNXNXNXNXNXNXNXNX", -"NXNXNXNXhXw = V ) E ^ d.e.=.c.:. NXNXNXrXNXNXiXNXNXNXNXNXNXNXNX", -"vXvXNXiXNXNXf 1 G J | s.>.~ 5.4. NXNXNXxXMXNXNXNXNXNXNXNXNXNXNX", -"NXNXNXNXpXbXNX# 7 B X.*.S ` 3.3.t NXxXMXNXMXcXNXNXNXNXNXNXNXNXNX", -"NXMXxXNXNXNXNXcXMX1 O.V J W ' ) + NXNXcXNXNXxXNXNXNXNXNXNXNXNXNX", -"yXNXNXNXNXMXNXNXMXcX s k P o.m d rXNXxXMXNXNXNXNXNXNXNXNXNXNXNX", -"MXbXNXNXkXMXkXMXNXNXmXNXO o = o xXNXMXNXNXNXxXNXNXNXNXNXNXNXNXNX" -}; diff --git a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/trash.xpm b/Circular_kernel_2/demo/Circular_kernel_2/Qt3/trash.xpm deleted file mode 100644 index d31badbfc34..00000000000 --- a/Circular_kernel_2/demo/Circular_kernel_2/Qt3/trash.xpm +++ /dev/null @@ -1,194 +0,0 @@ -/* XPM */ -static const char *trash[] = { -/* width height num_colors chars_per_pixel */ -" 33 33 154 2", -/* colors */ -".. c #040204", -".# c #048274", -".a c #044234", -".b c #444244", -".c c #042624", -".d c #046654", -".e c #8c8284", -".f c #b4c2bc", -".g c #047264", -".h c #3c4a34", -".i c #242224", -".j c #a4a6a4", -".k c #04524c", -".l c #04767c", -".m c #040a04", -".n c #1c1a1c", -".o c #04322c", -".p c #041a1c", -".q c #e4e2e4", -".r c #044a3c", -".s c #646a64", -".t c #14120c", -".u c #047a6c", -".v c #140a0c", -".w c #046a64", -".x c #040a14", -".y c #043a24", -".z c #4c5254", -".A c #045a44", -".B c #047e7c", -".C c #048284", -".D c #ecf2ec", -".E c #0c0204", -".F c #bcbabc", -".G c #044244", -".H c #142224", -".I c #84929c", -".J c #0c120c", -".K c #3c3a34", -".L c #aca6a4", -".M c #044a4c", -".N c #f4fafc", -".O c #ccbebc", -".P c #0c1a1c", -".Q c #046a74", -".R c #94928c", -".S c #4c4a4c", -".T c #042e2c", -".U c #046264", -".V c #041214", -".W c #047274", -".X c #2c2a2c", -".Y c #04525c", -".Z c #04323c", -".0 c #043a3c", -".1 c #4c5a54", -".2 c #045a54", -".3 c #acaeac", -".4 c #9c9a9c", -".5 c #040604", -".6 c #048674", -".7 c #047a7c", -".8 c #040e04", -".9 c #041e1c", -"#. c #747674", -"## c #046e64", -"#a c #0c0e14", -"#b c #0c0604", -"#c c #bcbebc", -"#d c #044e4c", -"#e c #fcfafc", -"#f c #0c463c", -"#g c #04160c", -"#h c #bcc2bc", -"#i c #04766c", -"#j c #043634", -"#k c #04161c", -"#l c #043e34", -"#m c #b4bebc", -"#n c #047e8c", -"#o c #048684", -"#p c #f4f2f4", -"#q c #044644", -"#r c #b4aab4", -"#s c #0c0e0c", -"#t c #ccc2c4", -"#u c #949694", -"#v c #544a4c", -"#w c #046664", -"#x c #342e2c", -"#y c #5c5e5c", -"#z c #045e54", -"#A c #04020c", -"#B c #04827c", -"#C c #444644", -"#D c #042a2c", -"#E c #04120c", -"#F c #04726c", -"#G c #3c4e54", -"#H c #242624", -"#I c #9caea4", -"#J c #04564c", -"#K c #047684", -"#L c #040a0c", -"#M c #241a24", -"#N c #043234", -"#O c #eceeec", -"#P c #6c6e6c", -"#Q c #b4b2b4", -"#R c #1c221c", -"#S c #545a5c", -"#T c #545254", -"#U c #acaaac", -"#V c #c4bec4", -"#W c #2c2e24", -"#X c #043e44", -"#Y c #040e14", -"#Z c #0c7674", -"#0 c #f4fefc", -"#1 c #046e74", -"#2 c #4c4e4c", -"#3 c #041614", -"#4 c #047674", -"#5 c #04363c", -"#6 c #9c9e9c", -"#7 c #fcfefc", -"#8 c #f4f6f4", -"#9 c #041a24", -"a. c #044a44", -"a# c #047a74", -"aa c #046a6c", -"ab c #b4b6b4", -"ac c #045a4c", -"ad c #047e84", -"ae c #04828c", -"af c #bcbac4", -"ag c #3c3a3c", -"ah c #0c0a0c", -"ai c #044a54", -"aj c #c4c2c4", -"ak c #042e34", -"al c #04060c", -"am c #04867c", -"an c #047a84", -"ao c #040e0c", -"ap c #041e24", -"aq c #047e74", -"ar c #046e6c", -"as c #0c060c", -"at c #044e54", -"au c #041624", -"av c #04464c", -"aw c #04666c", -"ax c #045e5c", -/* pixels */ -"#7#7#7#7#7#7#7#7#7#7#7#7#7#e#U#y#2.S.z#c.q.K#8#7#7#7#7#7#7#7#7#7#7", -"#7#7#7#7#7#7#7#7#7#7#7.Dal#Y.Zawa##B#Ba.#R.F.b#e#7#7#7#7#7#7#7#7#7", -"#7#7#7#7#7#7#7#7#7#7#T.5.B.B.B.Bad.Bad.G#6#C#cah.s#7#7#7#7#7#7#7#7", -"#7#7#7#7#7#7#7#7#7#e#u#qad#Bad#B.B#Bad.7.W#N...f.E..#8#7#7#7#7#7#7", -"#7#7#7#7#7#7#7#7#7#T.F.9ad.B.B.Bad.B.B.B.B.B.B.8#V#L.5.h#7#7#7#7#7", -"#7#7#7#7#7#7#7#7#7.5.F#a.B.B.C.B#Bad#B.B.C.Bad.B#5.F#1.Y.t#7#7#7#7", -"#7#7#7#7#7#7#7#7#7.c#Maf#9#B.Bad.B.B.Bad.B.B.B.B#G.La#.B#4.v#7#7#7", -"#7#7#7#7#7#7#7#7#D#B.Bab.eak.C#B.B.C.B#B.B#B.C.B.d#1.B.B#B.7al#e#7", -"#7#7#7#7#7#7#7#7.G.B.C#E#h.H.5ad.Bad.Bad.B.B.Bad#B.B#Bad.B#Badas#e", -"#7#7#7#7#7#e.5...7.B.C.Bao#t#I#A.B#B#B.B#Bad#B.B.B.C.B.B.B.B#B#4#m", -"#7#7#7#7#7#T.X#maq.B.B.B.W..#h#Q..#D.Bad.B.B.Bad#B.Bad#Bad.Bad#B..", -"#7#7#7#7#7agah#S.0.C.B.C.Ca#.5#r#c.1...0.B.C#B.Bad#B.B.B.B#B.B#k#C", -"#7#7#7#7#7.Oap.P#c#lad.B.C.7aq#g.5#m#c#H..#Yai.B.B.B#n.C#4.V...b.3", -"#7#7#7#7#7.D.7.B#h.Had.Bad..alan#w#A#L#Qaj#m#v...5.....5.m#.ab#P.5", -"#7#7#7#7#7ap.B#4#c#f.C.B.B.B.9.B.5.5a##j.5....#g.8.t#b#b#A.5..#e#7", -"#7#7#7#e#O#x.B.7.E#k.B#B.Bar.y.W.7.Q.7acal#Ba#.Baq#B.B.7#B..#u#7#7", -"#7#7#7#7#s.R.#.W.M.gad#B.C#A.B#B.7.m.Balar.u.u.Z.B.#al.6.c.4#7#7#7", -"#7#7#7#u#r#A.x.m.uad#Bad.w##.B.C#3aa.C.B.Madatarawakaa#lah#7#7#7#7", -"#7#7#7#H.j#Z#B.Ma#.B.B.B#L.B.C#B.madad.7#A#B.C..aq#B....#7#7#7#7#7", -"#7#e.F#c..#B.7#L.C#Bad#F.M.Bad#Yadad.C.5#4.B.T.kad#j...j#7#7#7#7#7", -"#7#7.X.Eaq.B..#F.C.Bam#A#B#oax.A.Ban.T##.C#F.p.C#B..#8#7#7#7#7#7#7", -"#7#p.I.radax#d.C.B.Bau#ian.B.8ad.7.B.5.Bad...Ba#...J#7#7#7#7#7#7#7", -"#7as.5.C.B.5#B.B.B#X.5an#Bao#1.B.Calaqad.x#F#o.5..#7#7#7#7#7#7#7#7", -".s..acad.a.B.C.C.C...l#B.B.p#B.B#Y#k.C.kaoan#Y.m#7#7#7#7#7#7#7#7#7", -".n.a.B#Bal.Bad.B#k#wadad..#Bad.C.5.B.B#A#Baq...N#7#7#7#7#7#7#7#7#7", -"#2#w#jao.o.Bad.l...B.B#d.k.B.Bal.7.Cal.B.C..ah#7#7#7#7#7#7#7#7#7#7", -"#0.5.Bak.W.Ca#...C#Bad...Bad#q.y.C.o.0am.V..#7#7#7#7#7#7#7#7#7#7#7", -"#7#8al.C.m.5#A.w#1ar.5an#B.9..ae#Lao.B.5.E#7#7#7#7#7#7#7#7#7#7#7#7", -"#7#7.3#9#Bav#o#Y#J.E.d.W.7..#B.T#k.C.c...D#7#7#7#7#7#7#7#7#7#7#7#7", -"#7#7#7#W#L#4.B.B..#K#z.Walan.W...C##.5#e#7#7#7#7#7#7#7#7#7#7#7#7#7", -"#7#7#7#7#8#A.Wad.7.B#i..#d#Y...B.U...j#7#7#7#7#7#7#7#7#7#7#7#7#7#7", -"#7#7#7#7#7#7.5...2.B.Canan#N#F.....i#7#7#7#7#7#7#7#7#7#7#7#7#7#7#7", -"#7#7#7#7#7#7#7#7.K...5a.a#.Ba#.m#.#7#7#7#7#7#7#7#7#7#7#7#7#7#7#7#7" -}; diff --git a/Circular_kernel_2/doc_tex/Circular_kernel_2/PkgDescription.tex b/Circular_kernel_2/doc_tex/Circular_kernel_2/PkgDescription.tex index 136cf850e9d..4b3e378d66b 100644 --- a/Circular_kernel_2/doc_tex/Circular_kernel_2/PkgDescription.tex +++ b/Circular_kernel_2/doc_tex/Circular_kernel_2/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{2D Circular Geometry Kernel \label{Pkg:CircularKernel2}} -\ccPkgHowToCiteCgal{cgal:cpt-cgk2-11} +\ccPkgHowToCiteCgal{cgal:cpt-cgk2-11b} \ccPkgSummary{ This package is an extension of the linear \cgal\ kernel. It offers functionalities on circles, circular arcs and line segments in the diff --git a/Circular_kernel_2/dont_submit b/Circular_kernel_2/dont_submit index b24fd5929fe..7534b694e73 100644 --- a/Circular_kernel_2/dont_submit +++ b/Circular_kernel_2/dont_submit @@ -1,13 +1,5 @@ -Qt3 TODO changes -GNUmakefile -examples/Circular_kernel_2/makefile -bench -Benchmarks -include/CGAL/Filtered_hexagon_circular_kernel_2.h -include/CGAL/Filtered_hexagon_circular_kernel_2 -Lazy_circular_kernel_2.h -Lazy_circular_kernel_constructions.h -old_lazy +benchmark + diff --git a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2.h b/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2.h deleted file mode 100644 index 235e0e20298..00000000000 --- a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2.h +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - - -#ifndef CGAL_FILTERED_HEXAGON_CIRCULAR_KERNEL_2_H -#define CGAL_FILTERED_HEXAGON_CIRCULAR_KERNEL_2_H - -#include -#include -#include - -namespace CGAL { - -template - class Filtered_hexagon_circular_kernel_2 : public CK { - - public: - - typedef Filtered_hexagon_circular_kernel_2 Self; - typedef Circular_arc_with_hexagon_2 Circular_arc_2; - typedef Line_arc_with_hexagon_2 Line_arc_2; - typedef CK Circular_kernel; - typedef typename CK::Algebraic_kernel Algebraic_kernel; - typedef typename CK::RT RT; - typedef typename CK::FT FT; - typedef typename CK::Root_of_2 Root_of_2; - typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; -// typedef typename CK::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; -// typedef typename CK::Polynomial_1_2 Polynomial_1_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Conic_2 Conic_2; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Circular_arc_2 Rcirc_arc_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Rline_arc_2; - typedef typename CK::Construct_circle_2 Construct_circle_2; - typedef typename CK::Get_equation Get_equation; - - - - typedef typename CK::Compare_x_2 Compare_x_2; - typedef typename CK::Compare_y_2 Compare_y_2; - typedef typename CK::Compare_xy_2 Compare_xy_2; - typedef typename CK::Compute_circular_x_2 Compute_circular_x_2; - typedef typename CK::Compute_circular_y_2 Compute_circular_y_2; - typedef Hexagon_functors::Construct_circular_source_vertex_2 Construct_circular_source_vertex_2; - typedef Hexagon_functors::Construct_circular_target_vertex_2 Construct_circular_target_vertex_2; - typedef Hexagon_functors::Construct_circular_min_vertex_2 Construct_circular_min_vertex_2; - typedef Hexagon_functors::Construct_circular_max_vertex_2 Construct_circular_max_vertex_2; - typedef Hexagon_functors::Has_on_2 Has_on_2; - typedef Hexagon_functors::Compare_y_at_x_2 Compare_y_at_x_2; - typedef Hexagon_functors::Compare_y_to_right_2 Compare_y_to_right_2; - typedef Hexagon_functors::Do_overlap_2 Do_overlap_2; - typedef Hexagon_functors::Equal_2 Equal_2; - typedef Hexagon_functors::In_x_range_2 In_x_range_2; - typedef Hexagon_functors::Make_x_monotone_2 Make_x_monotone_2; - typedef Hexagon_functors::Intersect_2 Intersect_2; - typedef Hexagon_functors::Split_2 Split_2; - typedef Hexagon_functors::Is_vertical_2 Is_vertical_2; - - - - - - - Get_equation - get_equation_object() const - { return CK().get_equation_object(); } - - Construct_circle_2 - construct_circle_2_object() const - { return CK().construct_circle_2_object(); } - - Compare_x_2 - compare_x_2_object() const - { return CK().compare_x_2_object(); } - - Compare_y_2 - compare_y_2_object() const - { return CK().compare_y_2_object(); } - - Compare_xy_2 - compare_xy_2_object() const - { return CK().compare_xy_2_object(); } - - Construct_circular_source_vertex_2 - construct_circular_source_vertex_2_object() const - { return Construct_circular_source_vertex_2(); } - - Construct_circular_target_vertex_2 - construct_circular_target_vertex_2_object() const - { return Construct_circular_target_vertex_2(); } - - Construct_circular_min_vertex_2 - construct_circular_min_vertex_2_object() const - { return Construct_circular_min_vertex_2(); } - - Construct_circular_max_vertex_2 - construct_circular_max_vertex_2_object() const - { return Construct_circular_max_vertex_2(); } - - Has_on_2 - has_on_2_object() const - { return Has_on_2(); } - - - Compare_y_at_x_2 - compare_y_at_x_2_object() const - { return Compare_y_at_x_2(); } - - Compare_y_to_right_2 - compare_y_to_right_2_object() const - { return Compare_y_to_right_2(); } - - Do_overlap_2 - do_overlap_2_object() const - { return Do_overlap_2(); } - - Equal_2 - equal_2_object() const - { return Equal_2(); } - - In_x_range_2 - in_x_range_2_object() const - { return In_x_range_2(); } - - Make_x_monotone_2 - make_x_monotone_2_object() const - { return Make_x_monotone_2(); } - - Intersect_2 - intersect_2_object() const - { return Intersect_2(); } - - - Split_2 - split_2_object() const - { return Split_2(); } - - Is_vertical_2 - is_vertical_2_object() const - { return Is_vertical_2(); } -}; - -} //namespace CGAL - -#endif // CGAL_FILTERED_HEXAGON_CIRCULAR_KERNEL_2_H diff --git a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/Circular_arc_with_hexagon_2.h b/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/Circular_arc_with_hexagon_2.h deleted file mode 100644 index 53b4e548c40..00000000000 --- a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/Circular_arc_with_hexagon_2.h +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Constantinos Tsirogiannis , Pedro Machado - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - -#ifndef CGAL_CIRCULAR_ARC_WITH_HEXAGON_2_H -#define CGAL_CIRCULAR_ARC_WITH_HEXAGON_2_H - -#include -#include -#include -#include -#include -#include -#include - -namespace CGAL { - - -template < class HK, - class Container = std::vector > > > -class Circular_arc_with_hexagon_2 { - - typedef typename HK::Circular_kernel CK; - typedef typename CK::FT FT; - typedef typename CK::RT RT; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Root_of_2 Root_of_2; - typedef CK R; - typedef CGAL::Simple_cartesian > FK; - typedef CGAL::Circular_kernel_2< FK,CGAL::Algebraic_kernel_for_circles_2_2 > CK2; - typedef CGAL::Circular_kernel_converter Conv; - - -public: - - ///////////TYPE DEFINITIONS///////////// - - typedef typename Container::iterator Hexagon_iterator; - typedef typename Container::const_iterator Hexagon_const_iterator; - typedef Polygon_2< Simple_cartesian > Hexagon; - - - ///////////Construction///////////// - - Circular_arc_with_hexagon_2(){} - - Circular_arc_with_hexagon_2(const Circle_2 &c) - : P_arc(c) - {} - - Circular_arc_with_hexagon_2(const Circle_2 &support, - const Line_2 &l1, const bool b_l1, - const Line_2 &l2, const bool b_l2) - : P_arc(support,l1,b_l1,l2,b_l2) - {} - - - Circular_arc_with_hexagon_2(const Circle_2 &c, - const Circle_2 &c1, const bool b_1, - const Circle_2 &c2, const bool b_2) - : P_arc(c,c1,b_1,c2,b_2) - {} - - - Circular_arc_with_hexagon_2(const Circular_arc_2 &A, const bool b, - const Circle_2 &ccut, const bool b_cut) - : P_arc(A, b, ccut, b_cut) - {} - - - Circular_arc_with_hexagon_2(const Point_2 &start, - const Point_2 &middle, - const Point_2 &end) - : P_arc(start, middle, end) - {} - - - Circular_arc_with_hexagon_2(const Circle_2 &support, - const Point_2 &begin, - const Point_2 &end) - : P_arc(support, begin, end) - {} - - - Circular_arc_with_hexagon_2(const Circle_2 &support, - const Circular_arc_point_2 &begin, - const Circular_arc_point_2 &end) - : P_arc(support, begin, end) - {} - - Circular_arc_with_hexagon_2(const Circular_arc_2 &a) - : P_arc(a) - {} - - - - //////////Predicates////////// - - bool is_x_monotone() const - { return P_arc.is_x_monotone();} - - bool is_y_monotone() const - { return P_arc.is_y_monotone();} - - bool on_upper_part() const - { return P_arc.on_upper_part();} - - - //////////Accessors/////////// - - const Circular_arc_2& arc () const - { return P_arc ;} - - Hexagon_iterator hexagons_begin() - { return hexagons.begin();} - - Hexagon_iterator hexagons_end() - { return hexagons.end();} - - - Hexagon_const_iterator hexagons_begin() const - { return hexagons.begin();} - - Hexagon_const_iterator hexagons_end() const - { return hexagons.end();} - - unsigned hexagon_no() const - { return hexagons.size();} - - - ///Interface of the inner arc/// - - typename Qualified_result_of::type - left() const - { return typename HK::Construct_circular_min_vertex_2()(*this);} - - typename Qualified_result_of::type - right() const - { return typename HK::Construct_circular_max_vertex_2()(*this);} - - typename Qualified_result_of::type - source() const - {return typename HK::Construct_circular_source_vertex_2()(*this);} - - typename Qualified_result_of::type - target() const - {return typename HK::Construct_circular_target_vertex_2()(*this);} - - const Circle_2 & supporting_circle() const - { return P_arc.supporting_circle();} - - const Point_2 & center() const - { return P_arc.center();} - - const FT & squared_radius() const - { return P_arc.squared_radius();} - - Bbox_2 bbox() const - { return P_arc.bbox();} - - - ///Specific check used for hexagon construction/// - - bool has_no_hexagons() const - { return hexagons.empty();} - - - ///Hexagon construction/// - - void construct_hexagons() const - { - CGAL_assertion(has_no_hexagons()); - - typedef typename boost::mpl::if_, \ - Hexagon_construction_with_interval_2, \ - Hexagon_construction_on_lazy_kernel_2 >::type Construct; - - Construct()(P_arc,std::back_inserter(hexagons)); - } - - - private: - - Circular_arc_2 P_arc; - mutable Container hexagons; - - -}; // Circular_arc_with_hexagon_2 - - - - template < typename HK > - std::ostream & - operator<<(std::ostream & os, const Circular_arc_with_hexagon_2 &a) - { - // The output format is : - // - supporting circle - // - circle c1 - // - bool b1 - // - circle c2 - // - bool b2 - return os << a.arc() << " "; - } - - template < typename HK > - std::istream & - operator>>(std::istream & is, Circular_arc_with_hexagon_2 &a) - { - typedef typename HK::Circular_kernel CK; - typename CK::Circle_2 s; - typename CK::Circular_arc_point_2 p1; - typename CK::Circular_arc_point_2 p2; - is >> s >> p1 >> p2 ; - if (is) - a = Circular_arc_with_hexagon_2(s, p1, p2); - return is; - } - - template < typename HK > - std::ostream & - print(std::ostream & os, const Circular_arc_with_hexagon_2 &a) - { - return os << "Circular_arc_2( " << std::endl - << "left : " << a.arc().left() << " , " << std::endl - << "right : " << a.arc().right() << " , " << std::endl - << "upper part : " << a.arc().on_upper_part() << std::endl - << " [[ approximate circle is (x,y,r) : " - << to_double(a.arc().supporting_circle().center().x()) << " " - << to_double(a.arc().supporting_circle().center().y()) << " " - << std::sqrt(to_double(a.arc().supporting_circle() - .squared_radius())) - << " ]]" << std::endl; - } - -} //namespace CGAL - -#endif // CGAL_CIRCULAR_ARC_WITH_HEXAGON_2_H diff --git a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/Line_arc_with_hexagon_2.h b/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/Line_arc_with_hexagon_2.h deleted file mode 100644 index ac0b14f7272..00000000000 --- a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/Line_arc_with_hexagon_2.h +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Constantinos Tsirogiannis , Pedro Machado - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - -#ifndef CGAL_LINE_ARC_WITH_HEXAGON_2_H -#define CGAL_LINE_ARC_WITH_HEXAGON_2_H - -#include -#include -#include -#include -#include -#include - -namespace CGAL { - -template < class HK > -class Line_arc_with_hexagon_2 { - - typedef typename HK::Circular_kernel CK; - typedef typename CK::FT FT; - typedef typename CK::RT RT; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Segment_2 Segment_2; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; - typedef typename CK::Root_of_2 Root_of_2; - typedef CK R; - typedef CGAL::Simple_cartesian > FK; - typedef CGAL::Circular_kernel_2< FK,CGAL::Algebraic_kernel_for_circles_2_2 > CK2; - typedef CGAL::Circular_kernel_converter Conv; - - -public: - - ///////////TYPE DEFINITIONS///////////// - - typedef Line_arc_2 Encapsulated_arc_type; - typedef Polygon_2< Simple_cartesian > Hexagon; - typedef Hexagon* Hexagon_iterator; - typedef const Hexagon * Hexagon_const_iterator; - - - ///////////Construction///////////// - - Line_arc_with_hexagon_2(){} - - Line_arc_with_hexagon_2(const Line_2 &support, - const Circle_2 &l1, const bool b_l1, - const Circle_2 &l2, const bool b_l2) - : P_arc(support,l1,b_l1,l2,b_l2), hxgn(NULL) - {} - - - Line_arc_with_hexagon_2(const Line_2 &support, - const Line_2 &l1, - const Line_2 &l2) - : P_arc(support,l1,l2), hxgn(NULL) - {} - - Line_arc_with_hexagon_2(const Line_2 &support, - const Circular_arc_point_2 &begin, - const Circular_arc_point_2 &end) - : P_arc(support, begin, end) , hxgn(NULL) - {} - - - Line_arc_with_hexagon_2(const Segment_2 &s) - : P_arc(s) , hxgn(NULL) - {} - - - Line_arc_with_hexagon_2(const Point_2 &p1, - const Point_2 &p2) - : P_arc(p1,p2) , hxgn(NULL) - {} - - - Line_arc_with_hexagon_2(const Line_arc_2 &a) - : P_arc(a) , hxgn(NULL) - {} - - - - //////////Predicates////////// - - bool is_vertical() const - { return P_arc.is_vertical();} - - //////////Accessors/////////// - - const Line_arc_2& arc () const - { return P_arc ;} - - Hexagon_iterator hexagons_begin() - { return hxgn;} - - Hexagon_iterator hexagons_end() - { return ( (has_no_hexagons())? NULL: hxgn+1);} - - Hexagon_const_iterator hexagons_begin() const - { return hxgn;} - - Hexagon_const_iterator hexagons_end() const - { return ( (has_no_hexagons())? NULL: hxgn+1);} - - unsigned hexagon_no() const - { return ( (has_no_hexagons())? 0 : 1);} - - - ///Interface of the inner arc/// - - typename Qualified_result_of::type - left() const - { return P_arc.left();} - - typename Qualified_result_of::type - right() const - { return P_arc.right();} - - typename Qualified_result_of::type - source() const - { - return typename R::Construct_circular_source_vertex_2()(this->arc()); - } - - typename Qualified_result_of::type - target() const - { - return typename R::Construct_circular_target_vertex_2()(this->arc()); - } - - const Line_2 & supporting_line() const - { return P_arc.supporting_line();} - - Bbox_2 bbox() const - { return P_arc.bbox();} - - - ///Specific check used for hexagon construction/// - - bool has_no_hexagons() const - { return (hxgn==NULL);} - - - ///Hexagon construction/// - - void construct_hexagons() const - { - - typedef typename boost::mpl::if_, \ - Hexagon_construction_with_interval_2, \ - Hexagon_construction_on_lazy_kernel_2 >::type Construct; - hxgn = new Hexagon(Construct()(P_arc)); - } - - - private: - - Line_arc_2 P_arc; - mutable Hexagon *hxgn; - - -}; // Line_arc_with_hexagon_2 - - - - template < typename HK > - std::ostream & - operator<<(std::ostream & os, const Line_arc_with_hexagon_2 &a) - { - // The output format is : - // Supporting line - // Source endpoint - // Target endpoint - return os << a.arc() << " "; - } - - template < typename HK > - std::istream & - operator>>(std::istream & is, Line_arc_with_hexagon_2 &a) - { - typedef typename HK::Circular_kernel CK; - typename CK::Line_2 s; - typename CK::Circular_arc_point_2 p1; - typename CK::Circular_arc_point_2 p2; - is >> s >> p1 >> p2 ; - if (is) - a = Line_arc_with_hexagon_2(s, p1, p2); - return is; - } - -} //namespace CGAL - -#endif // CGAL_LINE_ARC_WITH_HEXAGON_2_H diff --git a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/hexagon_filtered_predicates.h b/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/hexagon_filtered_predicates.h deleted file mode 100644 index 3e0b589b485..00000000000 --- a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/hexagon_filtered_predicates.h +++ /dev/null @@ -1,708 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Constantinos Tsirogiannis , Pedro Machado - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - -#ifndef CGAL_HEXAGON_FILTERED_PREDICATES_H -#define CGAL_HEXAGON_FILTERED_PREDICATES_H - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace CGAL { - -namespace Hexagon_functors { - - -template -class In_x_range_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Line_arc_2 Line_arc_2; - - public: - - typedef bool result_type; - - private: - - template - result_type - _in_x_range_2(const Arc_2 &a, const Circular_arc_point_2 &p) const - { - std::pair pr; - - if(a.has_no_hexagons()) - a.construct_hexagons(); - - typename Arc_2::Hexagon_const_iterator hips; - - pr = to_interval(p.x()); - - hips=a.hexagons_begin(); - - while(hips!=a.hexagons_end()) - { - if( (pr.second >= (*(*hips).left_vertex()).x() && - pr.second <= (*(*hips).right_vertex()).x() ) || - (pr.first >= (*(*hips).left_vertex()).x() && - pr.first <= (*(*hips).right_vertex()).x() ) ) - return CK().in_x_range_2_object()( a.arc() ,p); - - hips++; - } - - return false; - } - - public: - - result_type - operator()( const Circular_arc_2 &a, const Circular_arc_point_2 &p) const - { - CGAL_precondition( a.arc().is_x_monotone()); - return _in_x_range_2(a,p); - } - - result_type - operator()( const Line_arc_2 &a, const Circular_arc_point_2 &p) const - {return _in_x_range_2(a,p);} - - - }; - -template -class Construct_circular_source_vertex_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - - public: - - typedef Circular_arc_point_2 result_type; - - template - result_type - operator()(const T& a) const - {return CK().construct_circular_source_vertex_2_object()(a.arc());} - - }; - - -template -class Construct_circular_target_vertex_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - - public: - - typedef Circular_arc_point_2 result_type; - - template - result_type - operator()(const T& a) const - {return CK().construct_circular_target_vertex_2_object()(a.arc());} - - }; - - - -template -class Construct_circular_min_vertex_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - - public: - - typedef Circular_arc_point_2 result_type; - - template - result_type - operator()(const T& a) const - { return CK().construct_circular_min_vertex_2_object()(a.arc());} - - }; - -template -class Construct_circular_max_vertex_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - - public: - - typedef Circular_arc_point_2 result_type; - - template - result_type - operator()(const T& a) const - { return CK().construct_circular_max_vertex_2_object()(a.arc()); } - - }; - - -template -class Has_on_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Line_arc_2 Line_arc_2; - - public: - - typedef bool result_type; - - private: - - template - result_type - _has_on_2(const Arc_2 &a, const Circular_arc_point_2 &p) const - { - //Just for the time being - return CK().has_on_2_object()(a.arc(),p); - } - - public: - - result_type - operator()( const Circular_arc_2 &a,const Circular_arc_point_2 &p ) const - { - CGAL_precondition( a.arc().is_x_monotone()); - return _has_on_2(a,p); - } - - result_type - operator()( const Line_arc_2 &a, const Circular_arc_point_2 &p ) const - {return _has_on_2(a,p);} - -}; - - -template -class Is_vertical_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - - public: - - typedef bool result_type; - - template - result_type - operator()(const T& a) const - { return CK().is_vertical_2_object()(a.arc()); } - }; - - - - -template -class Compare_y_at_x_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Line_arc_2 Line_arc_2; - typedef typename Circular_arc_2::Hexagon Hexagon; - typedef typename Simple_cartesian::Point_2 Point_2; //Attention!!! - typedef Exact_predicates_inexact_constructions_kernel EK; - - public: - - typedef Comparison_result result_type; - - private: - - template - result_type - _compare_y_at_x_2(const Circular_arc_point_2 &p,const Arc_2 &a) const - { - CGAL_precondition_code(bool tmp=In_x_range_2()(a,p)); - CGAL_precondition(tmp ); - - if(a.has_no_hexagons()) - a.construct_hexagons(); - - Comparison_result rel_pos=EQUAL; - Bbox_2 bb = p.bbox(); - - Hexagon pnt_vec; - - pnt_vec.push_back(Point_2(bb.xmin(),bb.ymin())); - pnt_vec.push_back(Point_2(bb.xmin(),bb.ymax())); - pnt_vec.push_back(Point_2(bb.xmax(),bb.ymax())); - pnt_vec.push_back(Point_2(bb.xmax(),bb.ymin())); - - typename Arc_2::Hexagon_const_iterator hips=a.hexagons_begin(); - - while(hips!=a.hexagons_end()) - { - if( !(bb.xmin() > hips->right_vertex()->x() || bb.xmax() < hips->left_vertex()->x()) ) - if(bb.ymin() > hips->top_vertex()->y()) - rel_pos=LARGER; - else if(bb.ymax() < hips->bottom_vertex()->y()) - rel_pos=SMALLER; - else - { - rel_pos=EQUAL; - Hexagon hxgn= *hips; - if(internal::_do_intersect_hexagon_2(hxgn,pnt_vec)) - return CK().compare_y_at_x_2_object()(p,a.arc()); - - - EK::Point_2 a1(hxgn[0].x(),hxgn[0].y()), - a2(hxgn[1].x(),hxgn[1].y()), - a3(pnt_vec[0].x(),pnt_vec[0].y()); - - if ( EK().orientation_2_object()(a1,a2,a3)==RIGHT_TURN) - rel_pos=SMALLER; - else - rel_pos=LARGER; - - } - - hips++; - } - - return rel_pos; - } - - public: - - result_type - operator()( const Circular_arc_point_2 &p,const Circular_arc_2 &a ) const - { - CGAL_kernel_precondition( a.arc().is_x_monotone()); - return _compare_y_at_x_2(p,a); - } - - result_type - operator()( const Circular_arc_point_2 &p,const Line_arc_2 &a ) const - {return _compare_y_at_x_2(p,a);} - -}; - - - -template -class Equal_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename HK::Line_arc_2 Line_arc_2; - - public: - - typedef bool result_type; - - private: - - template - result_type - _equal_2(const Arc_2 &a,const Arc_2 &b) const - { - if(a.has_no_hexagons()) - a.construct_hexagons(); - - if(b.has_no_hexagons()) - b.construct_hexagons(); - - if(a.hexagon_no() != b.hexagon_no()) - return false; - - typename Arc_2::Hexagon_const_iterator hips=a.hexagons_begin(), - bips=b.hexagons_begin(); - - while(hips!=a.hexagons_end()) - { - if(hips->size()!=bips->size()) - return false; - - for(int j=0;j< hips->size() ;j++) - if( (*hips)[j]!=(*bips)[j] ) - return false; - - hips++; - bips++; - } - - return CK().equal_2_object()( a.arc(),b.arc() ); - - } - - public: - - result_type - operator()( const Circular_arc_point_2 &a , - const Circular_arc_point_2 &b ) const - { return CK().equal_2_object()(a,b);} - - result_type - operator()( const Circular_arc_2 &a , const Circular_arc_2 &b ) const - { - CGAL_precondition( a.arc().is_x_monotone()); - CGAL_precondition( b.arc().is_x_monotone()); - return _equal_2(a,b); - } - - result_type - operator()( const Line_arc_2 &a , - const Line_arc_2 &b ) const - { return _equal_2(a,b);} - - result_type - operator()( const Circular_arc_2 &a , - const Line_arc_2 &b ) const - { return false;} - - result_type - operator()( const Line_arc_2 &a , - const Circular_arc_2 &b ) const - { return false;} - -}; - - -template -class Do_overlap_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Line_arc_2 Line_arc_2; - - public: - - typedef bool result_type; - - private: - - template - result_type - _do_overlap_2(const Arc_2 &a, const Arc_2 &b) const - { - if(a.has_no_hexagons()) - a.construct_hexagons(); - - if(b.has_no_hexagons()) - b.construct_hexagons(); - - if(internal::do_intersect_hexagons_2( a.hexagons_begin(),a.hexagons_end(),b.hexagons_begin(),b.hexagons_end() ) ) - return CK().do_overlap_2_object()(a.arc(),b.arc()); - - return false; - } - - - public: - - result_type - operator()( const Circular_arc_2 &a , const Circular_arc_2 &b ) const - { - CGAL_precondition( a.arc().is_x_monotone()); - CGAL_precondition( b.arc().is_x_monotone()); - return _do_overlap_2(a,b); - } - - result_type - operator()( const Line_arc_2 &a , - const Line_arc_2 &b ) const - { return _do_overlap_2(a,b);} - - result_type - operator()( const Circular_arc_2 &a , - const Line_arc_2 &b ) const - { return false;} - - result_type - operator()( const Line_arc_2 &a , - const Circular_arc_2 &b ) const - { return false;} - -}; - - -// This predicate cannot be filtered - - template < class HK > - class Compare_y_to_right_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - - public: - typedef Comparison_result result_type; - - template - result_type - operator()(const T1 &a1, - const T2 &a2, - const Circular_arc_point_2 &p) const - { return CK().compare_y_to_right_2_object()(a1.arc(), a2.arc(), p); } - - }; - - - - - - template < class HK > - class Make_x_monotone_2 - { - typedef typename HK::Circular_kernel CK; - typedef typename HK::Rcirc_arc_2 Rcirc_arc_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Line_arc_2 Line_arc_2; - - public: - // typedef OutputIterator result_type; - - template < class OutputIterator > - OutputIterator - operator()(const Circular_arc_2 &A, OutputIterator res) - { - std::vector vec; - - CK().make_x_monotone_2_object()(A.arc(), std::back_inserter(vec) ); - - for(unsigned i=0; i(&vec.at(i)); - - CGAL_assertion(tmp_arc!=NULL); - - *res++ = make_object( Circular_arc_2(*tmp_arc) ); - } - - return res; - } - - template < class OutputIterator > - OutputIterator - operator()(const Line_arc_2 &A, OutputIterator res) - { - *res++ = make_object(A); - return res; - } - }; - - - template < class HK > - class Intersect_2 - { - public: - - typedef typename HK::Circular_kernel CK; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Rcirc_arc_2 Rcirc_arc_2; - typedef typename HK::Rline_arc_2 Rline_arc_2; - typedef typename HK::Circle_2 Circle; - typedef typename HK::Line_arc_2 Line_arc_2; - - template < class OutputIterator > - OutputIterator - operator()(const Circle & c1, const Circle & c2, OutputIterator res) - { return CK().intersect_2_object()(c1,c2,res); } - - template < class OutputIterator > - OutputIterator - operator()(const Circular_arc_2 & c1, const Circular_arc_2 & c2, - OutputIterator res) - { - if(c1.has_no_hexagons()) - c1.construct_hexagons(); - - if(c2.has_no_hexagons()) - c2.construct_hexagons(); - - if(!internal::do_intersect_hexagons_2(c1.hexagons_begin(),c1.hexagons_end(), - c2.hexagons_begin(),c2.hexagons_end()) ) - return res; - - std::vector vec; - - CK().intersect_2_object()(c1.arc(),c2.arc(),std::back_inserter(vec)); - - for(unsigned i=0; i(&vec.at(i)) )!=NULL ) - *res++ = make_object( Circular_arc_2(*tmp_arc) ); - else - *res++ = vec.at(i); - } - - return res; - - - } - - template < class OutputIterator > - OutputIterator - operator()(const Line_arc_2 & c1, const Line_arc_2 & c2, - OutputIterator res) - { - if(c1.has_no_hexagons()) - c1.construct_hexagons(); - - if(c2.has_no_hexagons()) - c2.construct_hexagons(); - - if(!internal::do_intersect_hexagons_2(c1.hexagons_begin(),c1.hexagons_end(),c2.hexagons_begin(),c2.hexagons_end()) ) - return res; - - - std::vector vec; - - CK().intersect_2_object()(c1.arc(),c2.arc(),std::back_inserter(vec)); - - for(unsigned i=0; i(&vec.at(i)) )!=NULL ) - *res++ = make_object( Line_arc_2(*tmp_arc) ); - else - *res++ = vec.at(i); - } - - return res; - } - - template < class OutputIterator > - OutputIterator - operator()(const Circular_arc_2 & c1, const Line_arc_2 & c2, - OutputIterator res) - { - if(c1.has_no_hexagons()) - c1.construct_hexagons(); - - if(c2.has_no_hexagons()) - c2.construct_hexagons(); - - if(!internal::do_intersect_hexagons_2(c1.hexagons_begin(),c1.hexagons_end(),c2.hexagons_begin(),c2.hexagons_end()) ) - return res; - - - std::vector vec; - - CK().intersect_2_object()(c1.arc(),c2.arc(),std::back_inserter(vec)); - - for(unsigned i=0; i(&vec.at(i)) )!=NULL ) - *res++ = make_object( Circular_arc_2(*tmp_arc) ); - else if ( (tmp_line=object_cast(&vec.at(i)) )!=NULL ) - *res++ = make_object( Line_arc_2(*tmp_line) ); - else - *res++ = vec.at(i); - } - - return res; - - } - - template < class OutputIterator > - OutputIterator - operator()(const Line_arc_2 & c1, const Circular_arc_2 & c2, - OutputIterator res) - { - return operator()(c2,c1,res); - } - - - }; - - - template < class HK > - class Split_2 - { - - typedef typename HK::Circular_kernel CK; - typedef typename HK::Rcirc_arc_2 Rcirc_arc_2; - typedef typename HK::Rline_arc_2 Rline_arc_2; - typedef typename HK::Circular_arc_2 Circular_arc_2; - typedef typename HK::Line_arc_2 Line_arc_2; - typedef typename HK::Circular_arc_point_2 Circular_arc_point_2; - - public: - typedef void result_type; - - result_type - operator()(const Circular_arc_2 &A, - const Circular_arc_point_2 &p, - Circular_arc_2 &ha1, Circular_arc_2 &ha2) const - { - Rcirc_arc_2 ca1 , ca2; - - CK().split_2_object()(A.arc(), p, ca1, ca2); - - ha1=Circular_arc_2(ca1); - ha2=Circular_arc_2(ca2); - } - - result_type - operator()(const Line_arc_2 &A, - const Circular_arc_point_2 &p, - Line_arc_2 &ha1, Line_arc_2 &ha2) const - { - Rline_arc_2 ca1 , ca2; - - CK().split_2_object()(A.arc(), p, ca1, ca2); - - ha1=Line_arc_2(ca1); - ha2=Line_arc_2(ca2); - } - - }; - - - -} //Hexagon_functors - -} //namespace CGAL - -#endif // CGAL_HEXAGON_FILTERED_PREDICATES_H diff --git a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/hexagon_primitives.h b/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/hexagon_primitives.h deleted file mode 100644 index 224471dbdae..00000000000 --- a/Circular_kernel_2/include/CGAL/Filtered_hexagon_circular_kernel_2/hexagon_primitives.h +++ /dev/null @@ -1,575 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Constantinos Tsirogiannis , Pedro Machado - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - -#ifndef CGAL_HEXAGON_PRIMITIVES_H -#define CGAL_HEXAGON_PRIMITIVES_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace CGAL{ - namespace internal{ - -using CGAL::CircularFunctors::advanced_make_xy_monotone; - -CGAL::Polygon_2 < CGAL::Simple_cartesian< double > > - construct_polygon_from_bbox(const CGAL::Bbox_2& bb ) - { - typedef CGAL::Simple_cartesian< double > dK; - typedef dK::Point_2 Point_2; - - CGAL::Polygon_2 < dK > pgn; - - - pgn.insert(pgn.vertices_end(),Point_2(bb.xmin(), bb.ymin())); - pgn.insert(pgn.vertices_end(),Point_2(bb.xmax(), bb.ymin())); - pgn.insert(pgn.vertices_end(),Point_2(bb.xmax(), bb.ymax())); - pgn.insert(pgn.vertices_end(),Point_2(bb.xmin(), bb.ymax())); - - return pgn; - } - - -template -CGAL::Polygon_2 < CGAL::Simple_cartesian< double > > - construct_bounding_hexagon_for_line_arc_2( const typename CK::Line_arc_2 &a) - { - typedef typename CK::Line_arc_2 Line_arc_2; - typedef CGAL::Simple_cartesian dK; - typedef dK::Point_2 Point_2; - typedef CGAL::Polygon_2 Polygon_2; - - CGAL::Bbox_2 src_bb= a.source().bbox(), - trgt_bb= a.target().bbox(); - - if( (src_bb.xmin()<=trgt_bb.xmin() && src_bb.xmax()>=trgt_bb.xmax()) || - (src_bb.ymin()<=trgt_bb.ymin() && src_bb.ymax()>=trgt_bb.ymax()) || - (src_bb.xmin()>=trgt_bb.xmin() && src_bb.xmax()<=trgt_bb.xmax()) || - (src_bb.ymin()>=trgt_bb.ymin() && src_bb.ymax()<=trgt_bb.ymax()) ) - - return construct_polygon_from_bbox(src_bb+trgt_bb); - - Polygon_2 pgn; - - bool tmp; - - if( (tmp=(src_bb.xmin()trgt_bb.ymax())) || - (trgt_bb.xmin()src_bb.ymax())) - { - CGAL::Bbox_2 bb1=(tmp)? src_bb : trgt_bb, - bb2=(tmp)? trgt_bb : src_bb; - - pgn.push_back(Point_2(bb1.xmin(),bb1.ymin())); - pgn.push_back(Point_2(bb2.xmin(),bb2.ymin())); - pgn.push_back(Point_2(bb2.xmax(),bb2.ymin())); - pgn.push_back(Point_2(bb2.xmax(),bb2.ymax())); - pgn.push_back(Point_2(bb1.xmax(),bb1.ymax())); - pgn.push_back(Point_2(bb1.xmin(),bb1.ymax())); - } - else if( ( tmp=(src_bb.xmin() -CGAL::Polygon_2 < CGAL::Simple_cartesian< double > > - construct_bounding_hexagon_2( const Nested_pair &n) - { - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef CGAL::Simple_cartesian dK; - typedef dK::Point_2 Point_2; - typedef CGAL::Polygon_2 Polygon_2; - typedef dK::Line_2 Line_2; - typedef dK::Direction_2 Direction_2; - typedef dK::Vector_2 Vector_2; - typedef typename CK::Root_of_2 Root_of_2; - typedef typename CK::FT FT; - - - Polygon_2 plgn; - - const Circular_arc_2 *a=CGAL::object_cast(&n.first); - - - // For these and the is_on_ booleans it is required to use a lazy nt - CGAL_assertion(a->is_x_monotone()); - CGAL_assertion(a->is_y_monotone()); - - - CGAL::Bbox_2 left_bb(a->left().bbox()), - right_bb(a->right().bbox()); - - - double ymin=(left_bb.ymin()right_bb.ymax())?left_bb.ymax():right_bb.ymax(); - - - bool is_on_upper_part=n.second.first; - bool is_on_left_side =n.second.second ; - - - // Define a hypothetical worst case center (_a,_b) - double _a= (is_on_left_side)? right_bb.xmin() : left_bb.xmax() , _b; - - if(is_on_upper_part) - _b= (is_on_left_side)? left_bb.ymax(): right_bb.ymax(); - else - _b= (is_on_left_side)? left_bb.ymin(): right_bb.ymin(); - - - //Define a worst case radius - double r1= (is_on_left_side)? right_bb.xmin()-left_bb.xmin(): - right_bb.xmax()-left_bb.xmax(); - double r2= (is_on_upper_part)? right_bb.ymax()-left_bb.ymax(): - left_bb.ymin()-right_bb.ymin(); - - if(!is_on_left_side) - r2=-r2; - - Interval_nt<> rad= CGAL::max(r1,r2); - Interval_nt<> sqr2=sqrt(Interval_nt<>(2)); - Interval_nt<> _tngx= (is_on_left_side)? Interval_nt<>(_a)-rad/sqr2: - Interval_nt<>(_a)+rad/sqr2; - Interval_nt<> _tngy= (is_on_upper_part)? Interval_nt<>(_b)+rad/sqr2: - Interval_nt<>(_b)-rad/sqr2; - - double tngx= (is_on_left_side)? to_interval(_tngx).first: - to_interval(_tngx).second; - double tngy= (is_on_upper_part)? to_interval(_tngy).second: - to_interval(_tngy).first; - - // Indicate direction - double dir= ((is_on_upper_part==is_on_left_side)? 1:-1); - CGAL::Interval_nt<> space(to_interval(tngy-dir*tngx).first,to_interval(tngy-dir*tngx).second); - - double x1= (is_on_left_side)?left_bb.xmin():right_bb.xmax(); - double y2; - - if(is_on_upper_part) - y2= (is_on_left_side)? right_bb.ymax(): left_bb.ymax(); - else - y2= (is_on_left_side)? right_bb.ymin(): left_bb.ymin(); - - - CGAL::Interval_nt<> _y1= dir*x1+space; - CGAL::Interval_nt<> _x2= (y2-space)*dir; - - double y1=(is_on_upper_part)? to_interval(_y1).second: to_interval(_y1).first; - double x2=(is_on_left_side)? to_interval(_x2).first: to_interval(_x2).second; - - - //Points 1 & 2 or just the 1st one - - if (x2right_bb.xmax()||y1ymax) - plgn.push_back(Point_2(((is_on_left_side)?left_bb.xmin():right_bb.xmax()), - ((is_on_upper_part)? ymax : ymin))); - else if (is_on_left_side){ - plgn.push_back(Point_2(x1,y1)); - plgn.push_back(Point_2(x2,y2)); - } else{ - plgn.push_back(Point_2(x2,y2)); - plgn.push_back(Point_2(x1,y1)); - } - - //Point 3 -- we get it through the righmost endpoint - if(is_on_upper_part==is_on_left_side) - plgn.push_back(Point_2(right_bb.xmax(),right_bb.ymax())); - else - plgn.push_back(Point_2(right_bb.xmax(),right_bb.ymin())); - - - if(is_on_upper_part && is_on_left_side && - (right_bb.ymin()<=left_bb.ymin() || left_bb.xmax()>=right_bb.xmax() ) ) - plgn.push_back(Point_2(right_bb.xmax(), left_bb.ymin())); - else if(is_on_upper_part && !is_on_left_side && - (left_bb.ymin()<=right_bb.ymin() || right_bb.xmin()<= left_bb.xmin())) - plgn.push_back(Point_2(left_bb.xmin(), right_bb.ymin())); - else if(!is_on_upper_part && is_on_left_side && - (right_bb.ymax()>=left_bb.ymax() || left_bb.xmax()>=right_bb.xmax())) - plgn.push_back(Point_2(right_bb.xmax(), left_bb.ymax())); - else if(!is_on_upper_part && !is_on_left_side && - (left_bb.ymax()>=right_bb.ymax() || right_bb.xmin()<= left_bb.xmin())) - plgn.push_back(Point_2(left_bb.xmin(), right_bb.ymax())); - else - { - - // Point 4 - double _x1,_y1; - if(is_on_left_side) - _x1=right_bb.xmax(); - else - _x1=right_bb.xmin(); - - if(is_on_upper_part) - _y1=right_bb.ymin(); - else - _y1=right_bb.ymax(); - - plgn.push_back(Point_2(_x1,_y1)); - - - //Point 5 - - if(is_on_left_side) - _x1=left_bb.xmax(); - else - _x1=left_bb.xmin(); - - if(is_on_upper_part) - _y1=left_bb.ymin(); - else - _y1=left_bb.ymax(); - - plgn.push_back(Point_2(_x1,_y1)); - } - - - //Point 6 - if(is_on_upper_part==is_on_left_side) - plgn.push_back(Point_2(left_bb.xmin(),left_bb.ymin())); - else - plgn.push_back(Point_2(left_bb.xmin(),left_bb.ymax())); - - - //Reverse (except the last one) the order of the vertices if the hexagon - //is on the upper part , so that all the hexagons - //appear with their vertices in counterclockwise order - - if(is_on_upper_part) - { - std::stack stck; - int siz=plgn.size(); - - for(int i=0;i -Output_iterator construct_bounding_hexagons_2(const typename CK::Circular_arc_2 &a, Output_iterator res) - { - - typedef std::pair< bool,bool > Position; - typedef std::pair Verbose_type; - typedef std::vector Xy_mon_vector; - typedef CGAL::Simple_cartesian K; - typedef std::vector< CGAL::Polygon_2 > Polygon_vector; - - Xy_mon_vector xy_arcs; - Polygon_vector polygons; - - advanced_make_xy_monotone(a,std::back_inserter(xy_arcs)); - - - for(unsigned int i=0;i(xy_arcs.at(i)); - - return res; - - } - - bool _inner_intersect_hexagon_predicate(const CGAL::Polygon_2 > &a, - const CGAL::Polygon_2 > &b) - { - - typedef Simple_cartesian CK; - typedef CK::RT RT; - typedef CK::Point_2 Point_2; - typedef CGAL::Polygon_2 Polygon_2; - typedef Simple_cartesian > intrv_CK; - typedef intrv_CK::Line_2 intrv_Line_2; - typedef intrv_CK::Point_2 intrv_Point_2; - - - bool pred=(a[0].x()!=a[1].x() && a[0].y()!=a[1].y()); - - Interval_nt<> d1=a[0].x(),d2=a[0].y(); - Interval_nt<> e1=a[1].x(),e2=a[1].y(); - intrv_Point_2 a0( d1, d2 ); - intrv_Point_2 a1( e1, e2 ); - - intrv_Line_2 tmp_ln(a0,a1); - - - if(pred && !tmp_ln.is_vertical()) - { - int i; - - for(i=0;i app_y=tmp_ln.y_at_x(b[i].x()).pair(); - - if(b[i].y()>=app_y.first ) - if(i==0) - break; - else - return true; - } - - if(i!=0) - return false; - - } - - - //Condition implied: the segment used for testing is vertical - if(a[2+pred].x()==a[3+pred].x()) - return true; - - Interval_nt<> d12=a[2+pred].x(),d22=a[2+pred].y(); - Interval_nt<> e12=a[3+pred].x(),e22=a[3+pred].y(); - intrv_Point_2 a2( d12, d22 ); - intrv_Point_2 a3( e12, e22 ); - - intrv_Line_2 tmp_ln2(a2,a3); - - for(int i=0;i app_y=tmp_ln2.y_at_x(b[i].x()).pair(); - - if(b[i].y()<=app_y.second ) - return true; - } - - return false; - -} - - -bool _do_intersect_hexagon_2(const CGAL::Polygon_2 > &p1, - const CGAL::Polygon_2 > &p2) - { - typedef Simple_cartesian CK; - typedef CK::RT RT; - typedef CK::Point_2 Point_2; - typedef CGAL::Polygon_2 Polygon_2; - typedef Simple_cartesian > intrv_CK; - typedef intrv_CK::Line_2 intrv_Line_2; - typedef intrv_CK::Point_2 intrv_Point_2; - - Polygon_2 a,b; - bool intersect,tmp=0; - Point_2 frst,scnd; - - int size1=p1.size(), - size2=p2.size(); - - if(size1==4 && size2==4) - return true; - - if(size1==4) - { - a=p2; - b=p1; - } else if (size2==4) - { - a=p1; - b=p2; - } else - { - - CGAL::Bbox_2 test1(p1.left_vertex()->x(),p1.bottom_vertex()->y(), - p1.right_vertex()->x() ,p1.top_vertex()->y()); - - for(int i=0;i=test1.xmin() && p2[i].x()<=test1.xmax() && - p2[i].y()>=test1.ymin() && p2[i].y()<=test1.ymax())) - break; - - if(tmp) - { - a=p1; - b=p2; - }else - { - a=p2; - b=p1; - } - - } - - intersect=_inner_intersect_hexagon_predicate(a,b); - - if(intersect==false || b.size()==4) - return intersect; - else - return _inner_intersect_hexagon_predicate(b,a); - - } - -// This is meant for x_monotone and for non-x_monotone cases -template < typename Hex_iterator1, typename Hex_iterator2 > -bool do_intersect_hexagons_2(Hex_iterator1 a_begin, Hex_iterator1 a_end, Hex_iterator2 b_begin, Hex_iterator2 b_end) - { - - for(Hex_iterator1 it1=a_begin;it1!=a_end;it1++) - for(Hex_iterator2 it2=b_begin;it2!=b_end;it2++) - if( !(it2->top_vertex()->y() < it1->bottom_vertex()->y() || - it2->bottom_vertex()->y() > it1->top_vertex()->y() || - it2->right_vertex()->x() < it1->left_vertex()->x() || - it2->left_vertex()->x() > it1->right_vertex()->x() )) - { - bool tmp = _do_intersect_hexagon_2(*it1,*it2); - if (tmp) - return true; - - } - - return false; - - }// do_intersect_hexagons_2 - - - }//namespace internal - - -//Lazy like functors that there is no use to be included in the kernel - -template < class CK, class Hexagon> - class Hexagon_construction_with_interval_2 { - - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Line_arc_2 Line_arc_2; - typedef CGAL::Simple_cartesian > FK; - typedef CGAL::Circular_kernel_2< FK,CGAL::Algebraic_kernel_for_circles_2_2 > CK2; - typedef CGAL::Circular_kernel_converter Conv; - - public: - - template < class OutputIterator> - OutputIterator - operator()(const Circular_arc_2 &a, OutputIterator res) const - { - Conv cnv; - static const bool Protection = true; - try{return internal::construct_bounding_hexagons_2(cnv(a),res);} - catch (Uncertain_conversion_exception) - { - CGAL::Protect_FPU_rounding P(CGAL_FE_TONEAREST); - return internal::construct_bounding_hexagons_2(a,res); - } - - } - - Hexagon operator()(const Line_arc_2 &a) const - { - Conv cnv; - static const bool Protection = true; - try{return internal::construct_bounding_hexagon_for_line_arc_2(cnv(a));} - catch (Uncertain_conversion_exception) - { - CGAL::Protect_FPU_rounding P(CGAL_FE_TONEAREST); - return internal::construct_bounding_hexagon_for_line_arc_2(a); - } - - } - -}; - - -template < class CK, class Hexagon> - class Hexagon_construction_on_lazy_kernel_2 { - - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Line_arc_2 Line_arc_2; - - public: - - template < class OutputIterator> - OutputIterator - operator()(const Circular_arc_2 &a, OutputIterator res) const - { - static const bool Protection = true; - try{return internal::construct_bounding_hexagons_2(a.approx(),res);} - catch (Uncertain_conversion_exception) - { - CGAL::Protect_FPU_rounding P(CGAL_FE_TONEAREST); - return internal::construct_bounding_hexagons_2(a.exact(),res); - } - - } - - Hexagon operator()(const Line_arc_2 &a) const - { - static const bool Protection = true; - try{return internal::construct_bounding_hexagon_for_line_arc_2(a.approx());} - catch (Uncertain_conversion_exception) - { - CGAL::Protect_FPU_rounding P(CGAL_FE_TONEAREST); - return internal::construct_bounding_hexagon_for_line_arc_2(a.exact()); - } - - } -}; - - -}// namespace CGAL - -#endif // CGAL_HEXAGON_PRIMITIVES_H diff --git a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_2.h b/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_2.h deleted file mode 100644 index 42bc808ba36..00000000000 --- a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_2.h +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Andreas Fabri, Constantinos Tsirogiannis - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - - -#ifndef CGAL_LAZY_CIRCULAR_KERNEL_H -#define CGAL_LAZY_CIRCULAR_KERNEL_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace CGAL { - -// Some specializations (move to another file ?) -template < typename K1, typename K2 > -struct Type_mapper < typename K1::Circular_arc_2, K1, K2 > -{ - typedef typename K2::Circular_arc_2 type; -}; - -template < typename K1, typename K2 > -struct Type_mapper < typename K1::Circular_arc_point_2, K1, K2 > -{ - typedef typename K2::Circular_arc_point_2 type; -}; - -template < typename K1, typename K2 > -struct Type_mapper < typename K1::Line_arc_2, K1, K2 > -{ - typedef typename K2::Line_arc_2 type; -}; - - -// EK = exact kernel that will be made lazy -// Kernel = lazy kernel -template < typename EK_, typename AK_, typename E2A_, typename Kernel > -class Lazy_circular_kernel_base -// : public EK::template Base::Type -#if 1 - : public Lazy_kernel_base< EK_, AK_, E2A_, - Lazy_kernel > -#endif -{ - // typedef typename EK::template Base::Type Kernel_base; - // Hardcoded for now. - // typedef Simple_cartesian AK; // An optimiser -public: - typedef AK_ AK; - typedef typename EK_::Algebraic_kernel Algebraic_kernel; - // typedef Simple_cartesian > AK; - typedef EK_ EK; - typedef E2A_ E2A; - - typedef Approx_converter C2F; - typedef Exact_converter C2E; - -#if 0 - typedef typename EK::Algebraic_kernel Al_EK; - typedef typename AK::Algebraic_kernel Al_AK; - typedef Algebraic_kernel_converter, - To_interval > Al_K_converter; - - typedef typename EK::Linear_kernel Ln_EK; - typedef typename AK::Linear_kernel Ln_AK; - typedef Cartesian_converter > Ln_converter; - - // typedef Circular_kernel_converter E2A; - - //typedef Lazy_kernel Linear_kernel; - typedef Lazy_kernel Linear_kernel0; - typedef typename Linear_kernel0::template Base::Type Linear_kernel; // should not be needed. - -#endif - - template < typename Kernel2 > - struct Base { typedef Lazy_circular_kernel_base Type; }; - - // What to do with the tag ? - // Probably this should not exist, should it ? - // struct filter_tag{}; - // typedef filter_tag Kernel_tag; - // typedef typename CK::Kernel_tag Kernel_tag; - // typedef typename CK::Rep_tag Rep_tag; - - - //Please remove this if you consider it to be sloppy - struct Lazy_tag{}; - typedef Lazy_tag Definition_tag; - typedef typename EK::Definition_tag Circular_tag; - //////////////////////////////////////////////////// - - // Types - typedef CGAL::Lazy_exact_nt FT; - typedef FT RT; - typedef typename Root_of_traits::RootOf_2 Root_of_2; - -// typedef Lazy Root_of_2; - - typedef FT Cartesian_coordinate_type; - typedef RT Homogeneous_coordinate_type; //Nothing to do with the circular_k - //just for the time being - - typedef CGAL::Object Object_2; - typedef CGAL::Object Object_3; - - typedef Lazy Circular_arc_2; - - typedef Lazy Circular_arc_point_2; - - typedef Lazy Line_arc_2; - - // typedef Root_for_circles_2_2 Root_for_circles_2_2; - typedef int Root_for_circles_2_2; // should AK be filtered ? - - // We don't touch the predicates. -#define CGAL_Circular_Kernel_pred(P, Pf) \ - typedef Filtered_predicate< typename EK::P, typename AK::P, C2E, C2F> P; \ - P Pf() const { return P(); } - - - // We change the constructions. - -#define CGAL_Circular_Kernel_cons(C, Cf) \ - typedef typename boost::mpl::if_, \ - Lazy_construct_intersections_2 , \ - typename boost::mpl::if_, \ - Lazy_make_x_monotone_2 , \ - typename boost::mpl::if_, \ - Lazy_make_x_monotone_2 , \ - typename boost::mpl::if_, \ - Lazy_functor_2_2 , \ - typename boost::mpl::if_, \ - Lazy_construction_bbox, \ - typename boost::mpl::if_,\ - Lazy_construction_nt,\ - typename boost::mpl::if_,\ - Lazy_construction_object,\ - Lazy_construction >::type >::type >::type >::type >::type >::type >::type C; \ - C Cf() const { return C(); } - - - -#include - -}; - -template -struct Lazy_circular_kernel_adaptor - : public Lazy_circular_kernel_base< EK, AK, E2A, Lazy_circular_kernel_adaptor > -{}; - -template -struct Lazy_circular_kernel_without_type_equality - : public Lazy_circular_kernel_base< EK, AK, E2A, Lazy_circular_kernel_without_type_equality > -{}; - -template , - // Algebraic_kernel_2_2 >, - class E2A = Circular_kernel_converter >, - Algebraic_kernel_converter< typename EK::Algebraic_kernel, typename AK::Algebraic_kernel, - To_interval, To_interval > > > -struct Lazy_circular_kernel_2 - : public Circular_kernel_type_equality_wrapper< - Lazy_circular_kernel_base< EK, AK, E2A, Lazy_circular_kernel_2 >, - Lazy_circular_kernel_2 > -{}; - -} //namespace CGAL - -#endif // CGAL_LAZY_CIRCULAR_KERNEL_H diff --git a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_constructions.h b/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_constructions.h deleted file mode 100644 index c62e6d005b9..00000000000 --- a/Circular_kernel_2/include/CGAL/Lazy_circular_kernel_constructions.h +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Monique Teillaud, Sylvain Pion, Andreas Fabri, Constantinos Tsirogiannis - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - -#ifndef CGAL_LAZY_CIRCULAR_KERNEL_CONSTRUCTIONS_H -#define CGAL_LAZY_CIRCULAR_KERNEL_CONSTRUCTIONS_H - -#include -#include - -//TODO : More if-else's with object cast for all the possible -// types that could be returned by object-returning functions - -namespace CGAL { - -template -Object -make_lazy_CK(const Object& eto) -{ - typedef typename LK::AK AK; - typedef typename LK::EK EK; - typedef typename LK::E2A E2A; - - const std::pair *ptr; - - if(( ptr = - object_cast >(&eto))){ - return make_object(std::make_pair(typename LK::Circular_arc_point_2( - typename LK::Circular_arc_point_2::Rep( - new Lazy_rep_0(ptr->first))),ptr->second)); - } else if(const typename EK::Circular_arc_2* ptr = - object_cast(&eto)){ - return make_object(typename LK::Circular_arc_2(typename LK::Circular_arc_2::Rep( - new Lazy_rep_0(*ptr)))); - } else if(const typename EK::Line_arc_2* ptr = - object_cast(&eto)){ - return make_object(typename LK::Line_arc_2(typename LK::Line_arc_2::Rep( - new Lazy_rep_0(*ptr)))); - } else{ - std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's" << std::endl; - } - return Object(); -} - - -// This is the magic functor for functors that write their result as Objects into an output iterator - -template -struct Lazy_construct_intersections_2 { - - static const bool Protection = true; - - typedef typename LK::AK AK; - typedef typename LK::EK EK; - typedef typename EK::FT EFT; - typedef typename LK::E2A E2A; - typedef void result_type; - typedef Lazy Lazy_object; - typedef Lazy, std::vector, EFT, E2A> Lazy_vector; - AC ac; - EC ec; - -public: - - // In the example we intersect two Lazys - // and write into a back_inserter(list,Lazy]) >) - template - OutputIterator - operator()(const L1& l1, const L2& l2, OutputIterator it) const - { - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - try { - Protect_FPU_rounding P; - Lazy_vector lv(new Lazy_rep_with_vector_2(ac, ec, l1, l2)); - - for(unsigned int i = 0; i < lv.approx().size(); i++){ - - const std::pair *temp_p; - - if((temp_p=object_cast >(& (lv.approx()[i])))){ - *it = make_object(std::make_pair(typename LK::Circular_arc_point_2( - typename LK::Circular_arc_point_2::Rep( - new Lazy_rep_1, - Ith, E2A, - Lazy_vector>(Ith(i,false), - Ith(i,false), lv))),temp_p->second)); - ++it; - } else if(object_cast(& (lv.approx()[i]))){ - *it = make_object(typename LK::Circular_arc_2( typename LK::Circular_arc_2::Rep( - new Lazy_rep_1, - Ith,E2A, - Lazy_vector>(Ith(i), - Ith(i), lv)))); - ++it; - } else if(object_cast(& (lv.approx()[i]))){ - *it = make_object(typename LK::Line_arc_2( typename LK::Line_arc_2::Rep( - new Lazy_rep_1, - Ith,E2A, - Lazy_vector>(Ith(i), - Ith(i), lv)))); - ++it; - } else{ - std::cout << "UNEXPECTED CONSTRUCT_INTERSECTIONS_2 PRODUCT" << std::endl; - std::cout << lv.approx()[i].type().name() << std::endl; - CGAL_error(); - } - } - - } catch (Uncertain_conversion_exception) { - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding P(CGAL_FE_TONEAREST); - // TODO: Instead of using a vector, write an iterator adapter - std::vector exact_objects; - ec(CGAL::exact(l1), CGAL::exact(l2), std::back_inserter(exact_objects)); - for (std::vector::iterator oit = exact_objects.begin(); - oit != exact_objects.end(); - oit++){ - *it = make_lazy_CK(*oit); - ++it; - } - } - return it; - } -}; - -template -struct Lazy_make_x_monotone_2 { - - static const bool Protection = true; - - typedef typename LK::AK AK; - typedef typename LK::EK EK; - typedef typename EK::FT EFT; - typedef typename LK::E2A E2A; - typedef void result_type; - typedef Lazy Lazy_object; - typedef Lazy, std::vector, EFT, E2A> Lazy_vector; - AC ac; - EC ec; - -public: - - // In the example we intersect two Lazys - // and write into a back_inserter(list,Lazy]) >) - template - OutputIterator - operator()(const L1& l1,OutputIterator it) const - { - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - try { - Protect_FPU_rounding P; - Lazy_vector lv(new Lazy_rep_with_vector_1(ac, ec, l1)); - // lv.approx() is a std::vector - // that is, when we get here we have constructed all approximate results - for(unsigned int i = 0; i < lv.approx().size(); i++){ - if(object_cast(& (lv.approx()[i]))){ - *it = make_object(typename LK::Circular_arc_2( - typename LK::Circular_arc_2::Rep( - new Lazy_rep_1, - Ith,E2A, - Lazy_vector>(Ith(i), - Ith(i), lv)))); - ++it; - } else if(object_cast(& (lv.approx()[i]))){ - *it = make_object(typename LK::Line_arc_2(typename LK::Line_arc_2::Rep( - new Lazy_rep_1, - Ith,E2A, - Lazy_vector>(Ith(i), - Ith(i), lv)))); - ++it; - } - else { - CGAL_error_msg( "UNEXPECTED MAKE_X_MONOTONE PRODUCT"); - } - } - - } catch (Uncertain_conversion_exception) { - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding P(CGAL_FE_TONEAREST); - // TODO: Instead of using a vector, write an iterator adapter - std::vector exact_objects; - ec(CGAL::exact(l1), std::back_inserter(exact_objects)); - for (std::vector::iterator oit = exact_objects.begin(); - oit != exact_objects.end(); - oit++){ - *it = make_lazy_CK(*oit); - ++it; - } - } - return it; - } -}; - - -template -struct Lazy_advanced_make_x_monotone_2 { - - static const bool Protection = true; - - typedef typename LK::AK AK; - typedef typename LK::EK EK; - typedef typename EK::FT EFT; - typedef typename LK::E2A E2A; - typedef void result_type; - typedef Lazy Lazy_object; - typedef Lazy, std::vector, EFT, E2A> Lazy_vector; - AC ac; - EC ec; - -public: - - // In the example we intersect two Lazys - // and write into a back_inserter(list,Lazy]) >) - template - OutputIterator - operator()(const L1& l1,OutputIterator it) const - { - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - try { - Protect_FPU_rounding P; - Lazy_vector lv(new Lazy_rep_with_vector_1(ac, ec, l1)); - // lv.approx() is a std::vector - // that is, when we get here we have constructed all approximate results - for(unsigned int i = 0; i < lv.approx().size(); i++){ - if(object_cast(& (lv.approx()[i].first))){ - *it = std::make_pair(make_object(typename LK::Circular_arc_2(typename LK::Circular_arc_2::Rep( - new Lazy_rep_1, - Ith,E2A, - Lazy_vector>(Ith(i), - Ith(i), lv)))),lv.approx()[i].second); - ++it; - } else if(object_cast(& (lv.approx()[i].first))){ - *it = std::make_pair(make_object(typename LK::Line_arc_2(typename LK::Line_arc_2::Rep( - new Lazy_rep_1, - Ith,E2A, - Lazy_vector>(Ith(i), - Ith(i), lv)))),lv.approx()[i].second); - ++it; - } - else{ - CGAL_error_msg( "UNEXPECTED ADVANCED_MAKE_X_MONOTONE PRODUCT"); - } - } - - } catch (Uncertain_conversion_exception) { - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding P(CGAL_FE_TONEAREST); - // TODO: Instead of using a vector, write an iterator adapter - std::vector exact_objects; - ec(CGAL::exact(l1), std::back_inserter(exact_objects)); - for (std::vector::iterator oit = exact_objects.begin(); - oit != exact_objects.end(); - ++oit){ - CGAL_error_msg( "Unfinished code !!!"); - //*it = std::make_pair(make_lazy_CK((*oit).first),(*oit).second); - ++it; - } - } - return it; - } -}; - -// The following functor returns an Object with a Lazy inside -// As the nested kernels return Objects of AK::Something and EK::Something -// we have to unwrap them from the Object, and wrap them in a Lazy -// -// TODO: write operators for more than two arguments. For the current kernel we only need two for -// Construct_intersections_2 and one for Make_x_monotone_2 - -template -struct Lazy_construction_object_CK { - - static const bool Protection = true; - typedef typename LK::AK AK; - typedef typename LK::EK EK; - typedef typename EK::FT EFT; - typedef typename LK::E2A E2A; - typedef typename AC::result_type AT; - typedef typename EC::result_type ET; - typedef Object result_type; - - typedef Lazy Lazy_object; - AC ac; - EC ec; - -public: - - -template - result_type - operator()(const L1& l1) const - { - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - try { - Protect_FPU_rounding P; - Lazy_object lo(new Lazy_rep_1(ac, ec, l1)); - - std::pair *temp_p; - - if((temp_p=object_cast >(& (lo.approx())))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(std::make_pair(typename LK::Circular_arc_point_2( - typename LK::Circular_arc_point_2::Rep(lcr)),temp_p->second)); - } else if(object_cast(& (lo.approx()))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(typename LK::Circular_arc_point_2(typename LK::Circular_arc_point_2::Rep(lcr))); - } else if(object_cast(& (lo.approx()))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(typename LK::Circular_arc_2(typename LK::Circular_arc_2::Rep(lcr)));} - else if(object_cast(& (lo.approx()))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(typename LK::Line_arc_2(typename LK::Line_arc_2::Rep(lcr)));} - else { - std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's" << std::endl; - } - } catch (Uncertain_conversion_exception) { - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding P(CGAL_FE_TONEAREST); - ET eto = ec(CGAL::exact(l1)); - return make_lazy_CK(eto); - } - return Object(); - } - - - - template - result_type - operator()(const L1& l1, const L2& l2) const - { - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - try { - Protect_FPU_rounding P; - Lazy_object lo(new Lazy_rep_2(ac, ec, l1, l2)); - - std::pair *temp_p; - - - if((temp_p=object_cast >(& (lo.approx())))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(std::make_pair(typename LK::Circular_arc_point_2( - typename LK::Circular_arc_point_2::Rep(lcr)),temp_p->second)); - } else if(object_cast(& (lo.approx()))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(typename LK::Circular_arc_point_2(typename LK::Circular_arc_point_2::Rep(lcr))); - } else if(object_cast(& (lo.approx()))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(typename LK::Circular_arc_2(typename LK::Circular_arc_2::Rep(lcr)));} - else if(object_cast(& (lo.approx()))){ - typedef Lazy_rep_1, - Object_cast, E2A, Lazy_object> Lcr; - Lcr * lcr = new Lcr(Object_cast(), - Object_cast(), lo); - return make_object(typename LK::Line_arc_2(typename LK::Line_arc_2::Rep(lcr)));} - else { - std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's" << std::endl; - } - } catch (Uncertain_conversion_exception) { - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding P(CGAL_FE_TONEAREST); - ET eto = ec(CGAL::exact(l1), CGAL::exact(l2)); - return make_lazy_CK(eto); - } - return Object(); - } - -}; - -} //namespace CGAL - -#endif // CGAL_LAZY_CIRCULAR_KERNEL_CONSTRUCTIONS_H diff --git a/Circular_kernel_2/test/Circular_kernel_2/old_lazy/test_Lazy_Line_arc.cpp b/Circular_kernel_2/test/Circular_kernel_2/old_lazy/test_Lazy_Line_arc.cpp deleted file mode 100644 index 1b2be546c19..00000000000 --- a/Circular_kernel_2/test/Circular_kernel_2/old_lazy/test_Lazy_Line_arc.cpp +++ /dev/null @@ -1,1079 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -template -void _test_Line_arc(CK ck) -{ - typedef typename CK::FT FT; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Intersect_2 Intersect_2; - typedef typename CK::Split_2 Split_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; - typedef typename CK::Do_overlap_2 Do_overlap_2; - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - //int random_max = 127; - //int random_min = -127; - Point_2 center_circle1(0, 0); - int circle1_r = 5; - Circle_2 circle1(center_circle1, circle1_r * circle1_r); - Circle_2 circle2(center_circle1, circle1_r * circle1_r * 4); - Point_2 p2_line_horizontal(1, 0); - - Line_arc_2 line_arc_horizontal(Line_2(center_circle1, p2_line_horizontal), - circle1, - true, - circle2, - false); - assert(line_arc_horizontal.source().x() == -5); - assert(line_arc_horizontal.source().y() == 0); - assert(line_arc_horizontal.target().x() == 10); - assert(line_arc_horizontal.target().y() == 0); - Point_2 p2_line_vertical(0, 1); - Line_arc_2 line_arc_vertical(Line_2(center_circle1, p2_line_vertical), - circle1, - true, - Circle_2(center_circle1, circle1_r * circle1_r * 4), - false); - assert(line_arc_vertical.source().x() == 0); - assert(line_arc_vertical.source().y() == -5); - assert(line_arc_vertical.target().x() == 0); - assert(line_arc_vertical.target().y() == 10); - Point_2 p2_line_diagonal(3, 4); - Line_arc_2 line_arc_diagonal(Line_2(center_circle1, p2_line_diagonal), - circle1, - true, - Circle_2(center_circle1, circle1_r * circle1_r * 4), - false); - Circular_arc_2(circle1, line_arc_diagonal.source(), line_arc_diagonal.source()); - Circular_arc_2(circle2, line_arc_diagonal.target(), line_arc_diagonal.target()); - - Line_arc_2 line_arc_2(Line_2(center_circle1, p2_line_horizontal), - Line_2(Point_2(0, -1), Point_2(1,0)), - Line_2(Point_2(0, -1), Point_2(-1, 0))); - - //////////////Intersection Line_arc Line_arc////////////////// - - Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); - - std::vector< CGAL::Object > - vector_for_intersection_1; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_vertical, - std::back_inserter(vector_for_intersection_1)); - std::pair the_pair; - assert(assign(the_pair, vector_for_intersection_1[0])); - Circular_arc_point_2 first = the_pair.first; - assert(first.x() == 0); - assert(first.y() == 0); - - Line_arc_2 line_arc_3(Point_2(-1, -2), Point_2(2,1)); - std::vector< CGAL::Object > - vector_for_intersection_2; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_3, - std::back_inserter(vector_for_intersection_2)); - assert(assign(the_pair, vector_for_intersection_2[0])); - first = the_pair.first; - assert(first.x() == 1); - assert(first.y() == 0); - - std::vector< CGAL::Object > - vector_for_intersection_3; - theConstruct_intersect_2(line_arc_vertical, - line_arc_3, - std::back_inserter(vector_for_intersection_3)); - assert(assign(the_pair, vector_for_intersection_3[0])); - first = the_pair.first; - assert(first.x() == 0); - assert(first.y() == -1); - - Line_arc_2 line_arc_4(Point_2(20, -2), Point_2(20,10)); - std::vector< CGAL::Object > - vector_for_intersection_4; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_4, - std::back_inserter(vector_for_intersection_4)); - assert(vector_for_intersection_4.size() == 0); - - - - ////////////intersection in overlap/////////////// - std::vector< CGAL::Object > - vector_for_intersection_5; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_horizontal, - std::back_inserter(vector_for_intersection_5)); - Line_arc_2 line_arc_tmp; - assert(vector_for_intersection_5.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_5[0])); - assert(line_arc_tmp == line_arc_horizontal); - - Line_arc_2 line_arc_horizontal2(Line_2(center_circle1, p2_line_horizontal), - circle1, - true, - circle1, - false); - std::vector< CGAL::Object > - vector_for_intersection_6; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_horizontal2, - std::back_inserter(vector_for_intersection_6)); - assert(vector_for_intersection_6.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_6[0])); - assert(line_arc_tmp.source() == line_arc_horizontal.source()); - assert(line_arc_tmp.target() == line_arc_horizontal2.target()); - - - - std::vector< CGAL::Object > - vector_for_intersection_6_reverse; - theConstruct_intersect_2(line_arc_horizontal2, - line_arc_horizontal, - std::back_inserter(vector_for_intersection_6_reverse)); - assert(vector_for_intersection_6_reverse.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_6_reverse[0])); - assert(line_arc_tmp.source() == line_arc_horizontal.source()); - assert(line_arc_tmp.target() == line_arc_horizontal2.target()); - - - - Line_arc_2 line_arc_horizontal3(Line_2(center_circle1, p2_line_horizontal), - circle2, - true, - circle1, - false); - std::vector< CGAL::Object > - vector_for_intersection_7; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_horizontal3, - std::back_inserter(vector_for_intersection_7)); - assert(vector_for_intersection_7.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_7[0])); - assert(line_arc_tmp.source() == line_arc_horizontal.source()); - assert(line_arc_tmp.target() == line_arc_horizontal3.target()); - - std::vector< CGAL::Object > - vector_for_intersection_8; - theConstruct_intersect_2(line_arc_horizontal3, - line_arc_horizontal, - std::back_inserter(vector_for_intersection_8)); - assert(vector_for_intersection_8.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_8[0])); - assert(line_arc_tmp.source() == line_arc_horizontal.source()); - assert(line_arc_tmp.target() == line_arc_horizontal3.target()); - - std::vector< CGAL::Object > - vector_for_intersection_8_bis_1; - theConstruct_intersect_2(line_arc_horizontal3, - line_arc_horizontal2, - std::back_inserter(vector_for_intersection_8_bis_1)); - assert(vector_for_intersection_8_bis_1.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_8_bis_1[0])); - assert(line_arc_tmp.source() == line_arc_horizontal2.source()); - assert(line_arc_tmp.target() == line_arc_horizontal3.target()); - - std::vector< CGAL::Object > - vector_for_intersection_8_bis_2; - theConstruct_intersect_2(line_arc_horizontal2, - line_arc_horizontal3, - std::back_inserter(vector_for_intersection_8_bis_2)); - assert(vector_for_intersection_8_bis_2.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_8_bis_2[0])); - assert(line_arc_tmp.source() == line_arc_horizontal2.source()); - assert(line_arc_tmp.target() == line_arc_horizontal3.target()); - - - Line_arc_2 line_arc_horizontal4(Line_2(center_circle1, p2_line_horizontal), - circle2, - true, - circle1, - true); - std::vector< CGAL::Object > - vector_for_intersection_9; - theConstruct_intersect_2(line_arc_horizontal4, - line_arc_horizontal, - std::back_inserter(vector_for_intersection_9)); - assert(vector_for_intersection_9.size() == 1); - assert(assign(the_pair, vector_for_intersection_9[0])); - assert(the_pair.second == 1); - assert(the_pair.first == line_arc_horizontal.source()); - - std::vector< CGAL::Object > - vector_for_intersection_10; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_horizontal4, - std::back_inserter(vector_for_intersection_10)); - assert(vector_for_intersection_10.size() == 1); - assert(assign(the_pair, vector_for_intersection_10[0])); - assert(the_pair.second == 1); - assert(the_pair.first == line_arc_horizontal.source()); - - - std::vector< CGAL::Object > - vector_for_intersection_11; - theConstruct_intersect_2(Line_arc_2(Point_2(-1, -1),Point_2(2, 2)), - Line_arc_2(Point_2(0, 0), Point_2(1, 1)), - std::back_inserter(vector_for_intersection_11)); - assert(vector_for_intersection_11.size() == 1); - assert(assign(line_arc_tmp, vector_for_intersection_11[0])); - assert(line_arc_tmp == Line_arc_2(Point_2(0, 0), Point_2(1, 1))); - - - //////Split///////////// - - std::vector< CGAL::Object > - vector_for_intersection_split_1; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_3, - std::back_inserter(vector_for_intersection_split_1)); - assert(assign(the_pair, vector_for_intersection_split_1[0])); - Circular_arc_point_2 point_of_split = the_pair.first; - Split_2 theSplit_2 = ck.split_2_object(); - Line_arc_2 first_part_line_arc_horizontal; - Line_arc_2 second_part_line_arc_horizontal; - theSplit_2(line_arc_horizontal, point_of_split, first_part_line_arc_horizontal, second_part_line_arc_horizontal); - assert(first_part_line_arc_horizontal.source() == line_arc_horizontal.source()); - assert(first_part_line_arc_horizontal.target() == point_of_split); - assert(second_part_line_arc_horizontal.source() == point_of_split); - assert(second_part_line_arc_horizontal.target() == line_arc_horizontal.target()); - - ////Overlap////// - - Do_overlap_2 theDo_overlap_2 = ck.do_overlap_2_object(); - assert(theDo_overlap_2(line_arc_horizontal, line_arc_horizontal)); - assert(theDo_overlap_2(line_arc_horizontal, line_arc_horizontal2)); - assert(!theDo_overlap_2(line_arc_horizontal, line_arc_vertical)); - -} - - -template -void _test_intersection_Line_arc_Circle(CK ck) -{ - typedef typename CK::FT FT; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Intersect_2 Intersect_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - - Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); - Point_2 center_circle1(0, 0); - int circle1_r = 5; - Circle_2 circle1(center_circle1, circle1_r * circle1_r); - Circle_2 circle2(center_circle1, circle1_r * circle1_r * 4); - Point_2 p2_line_horizontal(1, 0); - Point_2 p2_high_circle2(0, circle1_r * 2); - Point_2 p2_low_circle2(0, circle1_r * -2); - Point_2 p2_left_circle2(circle1_r * -2, 0); - Point_2 p2_right_circle2(circle1_r * 2, 0); - Point_2 p2_high_right_circle2(circle1_r * 2, circle1_r * 2); - Point_2 p2_high_left_circle2(circle1_r * -2, circle1_r * 2); - Point_2 p2_low_right_circle2(circle1_r * 2, circle1_r * -2); - Point_2 p2_low_left_circle2(circle1_r * -2, circle1_r * -2); - Line_arc_2 line_arc_horizontal(Line_2(center_circle1, - p2_line_horizontal), - circle1, - true, - circle2, - false); - Line_arc_2 line_arc_horizontal2(Line_2(center_circle1, - p2_line_horizontal), - circle1, - true, - circle1, - false); - Line_arc_2 line_arc_horizontal3(Line_2(center_circle1, - p2_line_horizontal), - circle2, - true, - circle1, - false); - Point_2 p2_line_vertical(0, 1); - Line_arc_2 line_arc_vertical(Line_2(center_circle1, - p2_line_vertical), - circle1, - true, - circle2, - false); - Line_arc_2 line_arc_vertical2(Line_2(center_circle1, - p2_line_vertical), - circle1, - true, - circle1, - false); - Line_arc_2 line_arc_vertical3(Line_2(center_circle1, - p2_line_vertical), - circle2, - true, - circle1, - false); - Point_2 p2_line_diagonal(2, -2); - Line_arc_2 line_arc_diagonal(Line_2(center_circle1, - p2_line_diagonal), - circle1, - true, - circle2, - false); - Line_arc_2 line_arc_diagonal2(Line_2(center_circle1, - p2_line_diagonal), - circle1, - true, - circle1, - false); - Line_arc_2 line_arc_diagonal3(Line_2(center_circle1, - p2_line_diagonal), - circle2, - true, - circle1, - false); - - ////////test horizontal////// - std::vector< CGAL::Object > - vector_for_intersection_1; - theConstruct_intersect_2(line_arc_horizontal, - circle1, - std::back_inserter(vector_for_intersection_1)); - std::pair the_pair; - assert(vector_for_intersection_1.size() == 2); - assert(assign(the_pair, vector_for_intersection_1[0])); - Circular_arc_point_2 first = the_pair.first; - assert(first == line_arc_horizontal.source()); - assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_1[1])); - first = the_pair.first; - assert(first == line_arc_horizontal2.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_2; - theConstruct_intersect_2(line_arc_horizontal, - circle2, - std::back_inserter(vector_for_intersection_2)); - assert(vector_for_intersection_2.size() == 1); - assert(assign(the_pair, vector_for_intersection_2[0])); - first = the_pair.first; - assert(first == line_arc_horizontal.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_3; - theConstruct_intersect_2(line_arc_horizontal2, - circle2, - std::back_inserter(vector_for_intersection_3)); - assert(vector_for_intersection_3.size() == 0); - - std::vector< CGAL::Object > - vector_for_intersection_4; - theConstruct_intersect_2(line_arc_horizontal3, - circle2, - std::back_inserter(vector_for_intersection_4)); - assert(vector_for_intersection_4.size() == 1); - assert(assign(the_pair, vector_for_intersection_4[0])); - first = the_pair.first; - assert(first == line_arc_horizontal3.source()); - assert(the_pair.second == 1); - - Line_arc_2 line_arc_aux(p2_high_circle2,p2_high_right_circle2); - std::vector< CGAL::Object > - vector_for_intersection_5; - theConstruct_intersect_2(Line_arc_2(p2_high_left_circle2,p2_high_right_circle2), - circle2, - std::back_inserter(vector_for_intersection_5)); - assert(vector_for_intersection_5.size() == 1); - theConstruct_intersect_2(line_arc_aux, - circle2, - std::back_inserter(vector_for_intersection_5)); - assert(vector_for_intersection_5.size() == 2); - assert(assign(the_pair, vector_for_intersection_5[0])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_5[1])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - - line_arc_aux = Line_arc_2(p2_low_circle2,p2_low_right_circle2); - std::vector< CGAL::Object > - vector_for_intersection_6; - theConstruct_intersect_2(Line_arc_2(p2_low_left_circle2,p2_low_right_circle2), - circle2, - std::back_inserter(vector_for_intersection_6)); - assert(vector_for_intersection_6.size() == 1); - theConstruct_intersect_2(line_arc_aux, - circle2, - std::back_inserter(vector_for_intersection_6)); - assert(vector_for_intersection_6.size() == 2); - assert(assign(the_pair, vector_for_intersection_6[0])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_6[1])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - - ////////test vertical////// - std::vector< CGAL::Object > - vector_for_intersection_7; - theConstruct_intersect_2(line_arc_vertical, - circle1, - std::back_inserter(vector_for_intersection_7)); - assert(vector_for_intersection_7.size() == 2); - assert(assign(the_pair, vector_for_intersection_7[0])); - first = the_pair.first; - assert(first == line_arc_vertical.source()); - assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_7[1])); - first = the_pair.first; - assert(first == line_arc_vertical2.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_8; - theConstruct_intersect_2(line_arc_vertical, - circle2, - std::back_inserter(vector_for_intersection_8)); - std::cout << vector_for_intersection_8.size() << std::endl; - assert(vector_for_intersection_8.size() == 1); - assert(assign(the_pair, vector_for_intersection_8[0])); - first = the_pair.first; - assert(first == line_arc_vertical.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_9; - theConstruct_intersect_2(line_arc_vertical2, - circle2, - std::back_inserter(vector_for_intersection_9)); - assert(vector_for_intersection_9.size() == 0); - - std::vector< CGAL::Object > - vector_for_intersection_10; - theConstruct_intersect_2(line_arc_vertical3, - circle2, - std::back_inserter(vector_for_intersection_10)); - assert(vector_for_intersection_10.size() == 1); - assert(assign(the_pair, vector_for_intersection_10[0])); - first = the_pair.first; - assert(first == line_arc_vertical3.source()); - assert(the_pair.second == 1); - - line_arc_aux = Line_arc_2(p2_right_circle2,p2_high_right_circle2); - std::vector< CGAL::Object > - vector_for_intersection_11; - theConstruct_intersect_2(Line_arc_2(p2_low_right_circle2,p2_high_right_circle2), - circle2, - std::back_inserter(vector_for_intersection_11)); - assert(vector_for_intersection_11.size() == 1); - theConstruct_intersect_2(line_arc_aux, - circle2, - std::back_inserter(vector_for_intersection_11)); - assert(vector_for_intersection_11.size() == 2); - assert(assign(the_pair, vector_for_intersection_11[0])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_11[1])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - - line_arc_aux = Line_arc_2(p2_left_circle2,p2_high_left_circle2); - std::vector< CGAL::Object > - vector_for_intersection_12; - theConstruct_intersect_2(Line_arc_2(p2_low_left_circle2,p2_high_left_circle2), - circle2, - std::back_inserter(vector_for_intersection_12)); - assert(vector_for_intersection_12.size() == 1); - theConstruct_intersect_2(line_arc_aux, - circle2, - std::back_inserter(vector_for_intersection_12)); - assert(vector_for_intersection_12.size() == 2); - assert(assign(the_pair, vector_for_intersection_12[0])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - assert(assign(the_pair, vector_for_intersection_12[1])); - first = the_pair.first; - assert(first == line_arc_aux.source()); - assert(the_pair.second == 2); - - //test diagonal - std::vector< CGAL::Object > - vector_for_intersection_13; - theConstruct_intersect_2(line_arc_diagonal, - circle1, - std::back_inserter(vector_for_intersection_13)); - assert(vector_for_intersection_13.size() == 2); - assert(assign(the_pair, vector_for_intersection_13[0])); - first = the_pair.first; - assert(first == line_arc_diagonal.source()); - assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_13[1])); - first = the_pair.first; - assert(first == line_arc_diagonal2.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_14; - theConstruct_intersect_2(line_arc_diagonal, - circle2, - std::back_inserter(vector_for_intersection_14)); - assert(vector_for_intersection_14.size() == 1); - assert(assign(the_pair, vector_for_intersection_14[0])); - first = the_pair.first; - assert(first == line_arc_diagonal.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_15; - theConstruct_intersect_2(line_arc_diagonal2, - circle2, - std::back_inserter(vector_for_intersection_15)); - assert(vector_for_intersection_15.size() == 0); - - std::vector< CGAL::Object > - vector_for_intersection_16; - theConstruct_intersect_2(line_arc_diagonal3, - circle2, - std::back_inserter(vector_for_intersection_16)); - assert(vector_for_intersection_16.size() == 1); - assert(assign(the_pair, vector_for_intersection_16[0])); - first = the_pair.first; - assert(first == line_arc_diagonal3.source()); - assert(the_pair.second == 1); - - - //Diagonal tangent - - std::vector< CGAL::Object > - vector_for_intersection_17; - theConstruct_intersect_2(Line_arc_2(Point_2(-10, -5), Point_2(5, 15)), - circle1, - std::back_inserter(vector_for_intersection_17)); - assert(vector_for_intersection_17.size() == 1); - assert(assign(the_pair, vector_for_intersection_17[0])); - assert(the_pair.second == 2); - - - std::vector< CGAL::Object > - vector_for_intersection_18; - theConstruct_intersect_2(Line_arc_2(Point_2(10, -5), Point_2(-5, 15)), - circle1, - std::back_inserter(vector_for_intersection_18)); - assert(vector_for_intersection_18.size() == 1); - assert(assign(the_pair, vector_for_intersection_18[0])); - assert(the_pair.second == 2); - - - std::vector< CGAL::Object > - vector_for_intersection_19; - theConstruct_intersect_2(Line_arc_2(Point_2(10, 5), Point_2(-5, -15)), - circle1, - std::back_inserter(vector_for_intersection_19)); - assert(vector_for_intersection_19.size() == 1); - assert(assign(the_pair, vector_for_intersection_19[0])); - assert(the_pair.second == 2); - - std::vector< CGAL::Object > - vector_for_intersection_20; - theConstruct_intersect_2(Line_arc_2(Point_2(-10, 5), Point_2(5, -15)), - circle1, - std::back_inserter(vector_for_intersection_20)); - assert(vector_for_intersection_20.size() == 1); - assert(assign(the_pair, vector_for_intersection_20[0])); - assert(the_pair.second == 2); - -} - -template -void _test_intersection_Line_arc_Circular_arc(CK ck) -{ - typedef typename CK::FT FT; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Intersect_2 Intersect_2; - typedef typename CK::Make_x_monotone_2 Make_x_monotone_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - - Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); - Point_2 center_circle1(0, 0); - int circle1_r = 5; - Circle_2 circle1(center_circle1, circle1_r * circle1_r); - Circle_2 circle2(center_circle1, circle1_r * circle1_r * 4); - Point_2 p2_line_horizontal(1, 0); - - Line_arc_2 line_arc_horizontal(Line_2(center_circle1, - p2_line_horizontal), - circle1, - true, - circle2, - false); - Line_arc_2 line_arc_horizontal2(Line_2(center_circle1, - p2_line_horizontal), - circle1, - true, - circle1, - false); - Line_arc_2 line_arc_horizontal3(Line_2(center_circle1, - p2_line_horizontal), - circle2, - true, - circle2, - false); - Point_2 p2_line_vertical(0, 1); - Line_arc_2 line_arc_vertical(Line_2(center_circle1, - p2_line_vertical), - circle1, - true, - Circle_2(center_circle1, - circle1_r * circle1_r * 4), - false); - Point_2 p2_line_diagonal(3, 4); - Line_arc_2 line_arc_diagonal(Line_2(center_circle1, - p2_line_diagonal), - circle1, - true, - Circle_2(center_circle1, - circle1_r * circle1_r * 4), - false); - Circular_arc_2 arc_1(circle2, - Line_2(center_circle1, - p2_line_horizontal), - true, - Line_2(center_circle1, - p2_line_vertical), - false); - Circular_arc_2 arc_2(circle1, - Line_2(center_circle1, - p2_line_horizontal), - true, - Line_2(center_circle1, - p2_line_vertical), - false); - std::vector< CGAL::Object > - vector_for_intersection_1; - theConstruct_intersect_2(line_arc_horizontal3, - arc_1, - std::back_inserter(vector_for_intersection_1)); - std::pair the_pair; - assert(vector_for_intersection_1.size() == 2); - assert(assign(the_pair, vector_for_intersection_1[0])); - Circular_arc_point_2 first = the_pair.first; - assert(first == line_arc_horizontal3.source()); - assert(the_pair.second == 1); - assert(assign(the_pair, vector_for_intersection_1[1])); - first = the_pair.first; - assert(first == line_arc_horizontal3.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_2; - theConstruct_intersect_2(line_arc_horizontal, - arc_1, - std::back_inserter(vector_for_intersection_2)); - assert(vector_for_intersection_2.size() == 1); - assert(assign(the_pair, vector_for_intersection_2[0])); - first = the_pair.first; - assert(first == line_arc_horizontal.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_3; - theConstruct_intersect_2(line_arc_vertical, - arc_1, - std::back_inserter(vector_for_intersection_3)); - assert(vector_for_intersection_3.size() == 1); - assert(assign(the_pair, vector_for_intersection_3[0])); - first = the_pair.first; - assert(first == arc_1.target()); - assert(the_pair.second == 1); - - std::vector< CGAL::Object > - vector_for_intersection_4; - theConstruct_intersect_2(Line_arc_2(Point_2(-10, -5), Point_2(5, 15)), - arc_2, - std::back_inserter(vector_for_intersection_4)); - assert(vector_for_intersection_4.size() == 0); - - std::vector< CGAL::Object > - vector_for_intersection_5; - theConstruct_intersect_2(Line_arc_2(Point_2(10, -5), Point_2(-5, 15)), - arc_2, - std::back_inserter(vector_for_intersection_5)); - assert(vector_for_intersection_5.size() == 1); - assert(assign(the_pair, vector_for_intersection_5[0])); - assert(the_pair.second == 2); - - //random - int random_max = 127; - int random_min = -127; - Point_2 center_circle_random1(0,0); - int circle_random1_r = theRandom.get_int(1, random_max); - Point_2 p_random1; - do{ - p_random1 = Point_2(theRandom.get_int(random_min, random_max) * circle_random1_r, - theRandom.get_int(random_min, random_max) * circle_random1_r); - }while(p_random1 == center_circle_random1); - Point_2 p_random2; - do{ - p_random2 = Point_2(theRandom.get_int(random_min, random_max) * circle_random1_r, - theRandom.get_int(random_min, random_max) * circle_random1_r); - }while(p_random2 == center_circle_random1); - Circle_2 circle_random1(center_circle_random1, circle_random1_r * circle_random1_r); - Circular_arc_2 arc_random_1(circle_random1, - Line_2(center_circle_random1, - p_random1), - true, - Line_2(center_circle_random1, - p_random2), - false); - - Circular_arc_point_2 first2; - std::vector< CGAL::Object > - vector_for_intersection_random1; - theConstruct_intersect_2(Line_arc_2(Point_2(-p_random1.x(),-p_random1.y()), - p_random1), - arc_random_1, - std::back_inserter(vector_for_intersection_random1)); - assert(vector_for_intersection_random1.size() > 0); - assert(assign(the_pair, vector_for_intersection_random1[0])); - first = the_pair.first; - assert(the_pair.second == 1); - assert(first == arc_random_1.source()); - - - - std::vector< CGAL::Object > - vector_for_intersection_random2; - theConstruct_intersect_2(Line_arc_2(Point_2(-p_random2.x(),-p_random2.y()),p_random2), - arc_random_1, - std::back_inserter(vector_for_intersection_random2)); - assert(vector_for_intersection_random2.size() > 0); - assert(assign(the_pair, vector_for_intersection_random2[0])); - first = the_pair.first; - assert(the_pair.second == 1); - if(vector_for_intersection_random2.size() == 2){ - assert(assign(the_pair, vector_for_intersection_random2[1])); - first2 = the_pair.first; - assert(the_pair.second == 1); - assert((first == arc_random_1.target()) || (first2 == arc_random_1.target())); - } - else{ - assert(first == arc_random_1.target()); - } - - - for (int loop = 0; loop < 200; loop++){ - Make_x_monotone_2 theMake_x_monotone = ck.make_x_monotone_2_object(); - Point_2 p_random3; - do{ - p_random3 = Point_2(theRandom.get_int(random_min, random_max), - theRandom.get_int(random_min, random_max)); - }while(p_random3 == center_circle_random1); - Point_2 p_random4; - do{ - p_random4 = Point_2(theRandom.get_int(random_min, random_max), - theRandom.get_int(random_min, random_max)); - }while(p_random4 == center_circle_random1 || - p_random4 == p_random3); - - std::vector< CGAL::Object > vector_for_intersection_random3; - theConstruct_intersect_2(Line_arc_2(p_random3,p_random4), - arc_random_1, - std::back_inserter(vector_for_intersection_random3)); - for( std::size_t i = 0; i < vector_for_intersection_random3.size(); i++){ - assert(assign(the_pair, vector_for_intersection_random3[i])); - first = the_pair.first; - std::vector objects_x_monotone; - theMake_x_monotone( arc_random_1, std::back_inserter(objects_x_monotone)); - bool is_on_arc = false; - for(std::size_t j = 0; j < objects_x_monotone.size(); j++){ - Circular_arc_2 aux; - assign(aux, objects_x_monotone[j]); - if(ck.has_on_2_object()(aux, first)){ - is_on_arc = true; - break; - } - } - assert(is_on_arc); - } - } -} - -template -void _test_compare_y_to_right(CK ck) -{ - typedef typename CK::FT FT; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Intersect_2 Intersect_2; - typedef typename CK::Make_x_monotone_2 Make_x_monotone_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; - CGAL::Random generatorOfgenerator; - int random_seed = generatorOfgenerator.get_int(0, 123456); - std::cout << "random_seed = " << random_seed << std::endl; - CGAL::Random theRandom(random_seed); - - Intersect_2 theConstruct_intersect_2 = ck.intersect_2_object(); - Point_2 center_circle1(0, 0); - int circle1_r = 5; - Circle_2 circle1(center_circle1, circle1_r * circle1_r); - Circle_2 circle2(center_circle1, circle1_r * circle1_r * 4); - Point_2 p2_line_horizontal(1, 0); - Point_2 p2_line_diagonal(1, 1); - Line_arc_2 line_arc_horizontal(Line_2(center_circle1, - p2_line_horizontal), - circle1, - true, - circle2, - false); - Line_arc_2 line_arc_diagonal(Line_2(center_circle1, - p2_line_diagonal), - circle1,true, - circle2,false); - std::vector< CGAL::Object > - vector_for_intersection_1; - theConstruct_intersect_2(line_arc_horizontal, - line_arc_diagonal, - std::back_inserter(vector_for_intersection_1)); - std::pair the_pair; - assert(assign(the_pair, vector_for_intersection_1[0])); - Circular_arc_point_2 first = the_pair.first; - - assert(ck.compare_y_to_right_2_object()(line_arc_horizontal, - line_arc_diagonal, - first) == CGAL::SMALLER); - - assert(ck.compare_y_to_right_2_object()(line_arc_diagonal, - line_arc_horizontal, - first) == CGAL::LARGER); - assert(ck.compare_y_to_right_2_object()(line_arc_diagonal, - line_arc_diagonal, - first) == CGAL::EQUAL); - - - Circular_arc_2 part_high(circle1, - line_arc_horizontal.supporting_line(), false, - line_arc_horizontal.supporting_line(), true); - - Circular_arc_2 part_low(circle1, - line_arc_horizontal.supporting_line(), true, - line_arc_horizontal.supporting_line(), false); - - assert(ck.compare_y_to_right_2_object()(line_arc_horizontal, - part_high, - part_high.target()) == CGAL::SMALLER); - assert(ck.compare_y_to_right_2_object()(line_arc_horizontal, - part_low, - part_low.source()) == CGAL::LARGER); - Point_2 p2_high(0, circle1_r); - Point_2 p2_high_right(circle1_r, circle1_r); - Line_arc_2 line_arc_horizontal_high(p2_high, - p2_high_right); - assert(ck.compare_y_to_right_2_object()(line_arc_horizontal_high, - part_high, - line_arc_horizontal_high.source()) == CGAL::LARGER); - Point_2 p2_low(0, -circle1_r); - Point_2 p2_low_right(circle1_r, -circle1_r); - Line_arc_2 line_arc_horizontal_low(p2_low, - p2_low_right - ); - assert(ck.compare_y_to_right_2_object()(line_arc_horizontal_low, - part_low, - line_arc_horizontal_low.source()) == CGAL::SMALLER); - - std::vector< CGAL::Object > - vector_for_intersection_2; - theConstruct_intersect_2(part_high, - line_arc_diagonal, - std::back_inserter(vector_for_intersection_2)); - assert(assign(the_pair, vector_for_intersection_2[0])); - first = the_pair.first; - assert(ck.compare_y_to_right_2_object()(line_arc_diagonal, - part_high, - first) == CGAL::LARGER); - std::vector< CGAL::Object > - vector_for_intersection_3; - theConstruct_intersect_2(part_low, - line_arc_diagonal, - std::back_inserter(vector_for_intersection_3)); - assert(assign(the_pair, vector_for_intersection_3[0])); - first = the_pair.first; - assert(ck.compare_y_to_right_2_object()(line_arc_diagonal, - part_low, - first) == CGAL::LARGER); - Point_2 p2_line_diagonal2(1, -1); - Line_arc_2 line_arc_diagonal2(Line_2(center_circle1, - p2_line_diagonal2), - circle1,true, - circle2,false); - std::vector< CGAL::Object > - vector_for_intersection_4; - theConstruct_intersect_2(part_high, - line_arc_diagonal2, - std::back_inserter(vector_for_intersection_4)); - assert(assign(the_pair, vector_for_intersection_4[0])); - first = the_pair.first; - assert(ck.compare_y_to_right_2_object()(line_arc_diagonal2, - part_high, - first) == CGAL::SMALLER); - std::vector< CGAL::Object > - vector_for_intersection_5; - theConstruct_intersect_2(part_low, - line_arc_diagonal2, - std::back_inserter(vector_for_intersection_5)); - assert(assign(the_pair, vector_for_intersection_5[0])); - first = the_pair.first; - assert(ck.compare_y_to_right_2_object()(line_arc_diagonal2, - part_low, - first) == CGAL::SMALLER); -} - -template -void _test_compare_y_at_x(CK ck) -{ - typedef typename CK::FT FT; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Intersect_2 Intersect_2; - typedef typename CK::Make_x_monotone_2 Make_x_monotone_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; - typedef typename CK::Compare_y_at_x_2 Compare_y_at_x_2; - - Line_arc_2 line_arc_horizontal(Point_2(-1, 0), Point_2(1, 0)); - Line_arc_2 line_arc_vertical(Point_2(0, 0), Point_2(0, 1)); - Line_arc_2 line_arc_vertical2(Point_2(0, -1), Point_2(0, 1)); - Line_arc_2 line_arc_diagonal(Point_2(-1, -1), Point_2(1, 1)); - Line_arc_2 line_arc_diagonal2(Point_2(-1, 1), Point_2(1, -1)); - Line_arc_2 line_arc_vertical3(Point_2(0, -1), Point_2(0, 2)); - Compare_y_at_x_2 theCompare_y_at_x_2 = ck.compare_y_at_x_2_object(); - assert(theCompare_y_at_x_2(line_arc_vertical.target(), - line_arc_horizontal) == CGAL::LARGER); - assert(theCompare_y_at_x_2(line_arc_vertical2.source(), - line_arc_horizontal) == CGAL::SMALLER); - assert(theCompare_y_at_x_2(line_arc_vertical.source(), - line_arc_horizontal) == CGAL::EQUAL); - assert(theCompare_y_at_x_2(line_arc_vertical2.source(), - line_arc_vertical) == CGAL::SMALLER); - assert(theCompare_y_at_x_2(line_arc_vertical2.target(), - line_arc_vertical) == CGAL::EQUAL); - assert(theCompare_y_at_x_2(line_arc_vertical3.target(), - line_arc_vertical) == CGAL::LARGER); - assert(theCompare_y_at_x_2(line_arc_vertical2.target(), - line_arc_diagonal) == CGAL::LARGER); - assert(theCompare_y_at_x_2(line_arc_vertical2.source(), - line_arc_diagonal) == CGAL::SMALLER); - assert(theCompare_y_at_x_2(line_arc_vertical2.target(), - line_arc_diagonal2) == CGAL::LARGER); - assert(theCompare_y_at_x_2(line_arc_vertical2.source(), - line_arc_diagonal2) == CGAL::SMALLER); - assert(theCompare_y_at_x_2(line_arc_vertical.source(), - line_arc_diagonal) == CGAL::EQUAL); - assert(theCompare_y_at_x_2(line_arc_diagonal.source(), - line_arc_diagonal) == CGAL::EQUAL); - assert(theCompare_y_at_x_2(line_arc_diagonal.target(), - line_arc_diagonal) == CGAL::EQUAL); - -} - - - -template -void _test_has_on(CK ck) -{ - typedef typename CK::FT FT; - typedef typename CK::Circle_2 Circle_2; - typedef typename CK::Circular_arc_2 Circular_arc_2; - typedef typename CK::Point_2 Point_2; - typedef typename CK::Line_2 Line_2; - typedef typename CK::Intersect_2 Intersect_2; - typedef typename CK::Make_x_monotone_2 Make_x_monotone_2; - typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; - typedef typename CK::Line_arc_2 Line_arc_2; - typedef typename CK::Compare_y_at_x_2 Compare_y_at_x_2; - - Line_arc_2 line_arc_horizontal(Point_2(-1, 0), Point_2(1, 0)); - Line_arc_2 line_arc_vertical(Point_2(0, 0), Point_2(0, 1)); - Line_arc_2 line_arc_vertical2(Point_2(0, -1), Point_2(0, 1)); - Line_arc_2 line_arc_diagonal(Point_2(-1, -1), Point_2(1, 1)); - Line_arc_2 line_arc_diagonal2(Point_2(-1, 1), Point_2(1, -1)); - Line_arc_2 line_arc_vertical3(Point_2(0, -1), Point_2(0, 2)); - assert(ck.has_on_2_object()(line_arc_horizontal, - line_arc_vertical.source())); - assert(!ck.has_on_2_object()(line_arc_horizontal, - line_arc_vertical.target())); - assert(!ck.has_on_2_object()(line_arc_vertical, - line_arc_vertical2.source())); - assert(ck.has_on_2_object()(line_arc_vertical, - line_arc_vertical2.target())); - assert(ck.has_on_2_object()(line_arc_diagonal, - line_arc_vertical.source())); - -} - - - - - -int main() -{ - typedef CGAL::Quotient NT1; - typedef CGAL::Cartesian Linear_k1; - typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k1; - typedef CGAL::Circular_kernel_2 CK1; - - typedef CGAL::Interval_nt_advanced NT2; - typedef CGAL::Cartesian Linear_k2; - typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k2; - typedef CGAL::Circular_kernel_2 CK2; - typedef CGAL::Lazy_circular_kernel_2 Circular_kernel; - Circular_kernel ck; - - - _test_Line_arc(ck); - _test_intersection_Line_arc_Circle(ck); - _test_intersection_Line_arc_Circular_arc(ck); - _test_compare_y_to_right(ck); - _test_compare_y_at_x(ck); - _test_has_on(ck); -} diff --git a/Circular_kernel_2/test/Circular_kernel_2/old_lazy/test_Lazy_circular_kernel.cpp b/Circular_kernel_2/test/Circular_kernel_2/old_lazy/test_Lazy_circular_kernel.cpp deleted file mode 100644 index 2a7038dcbec..00000000000 --- a/Circular_kernel_2/test/Circular_kernel_2/old_lazy/test_Lazy_circular_kernel.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -typedef CGAL::Quotient NT3; -typedef CGAL::Cartesian Linear_k3; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k3; -typedef CGAL::Circular_kernel_2 CK1_2; - -typedef CGAL::Interval_nt_advanced NT4; -typedef CGAL::Cartesian Linear_k4; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k4; -typedef CGAL::Circular_kernel_2 CK2_2; -typedef CGAL::Lazy_circular_kernel_2 CK2; - -CK2 ck2; - -#include -#include -#include - -int main() { - - _test_circle_predicat(ck2); - _test_circle_construct(ck2); - _test_circle_bbox(ck2); - _test_circular_arc_bbox(ck2); - _test_has_on(ck2); - - return 0; -} diff --git a/Circular_kernel_3/doc_tex/Circular_kernel_3/PkgDescription.tex b/Circular_kernel_3/doc_tex/Circular_kernel_3/PkgDescription.tex index 00e8dc04fda..e61fc9dd510 100644 --- a/Circular_kernel_3/doc_tex/Circular_kernel_3/PkgDescription.tex +++ b/Circular_kernel_3/doc_tex/Circular_kernel_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{3D Spherical Geometry Kernel \label{Pkg:SphericalKernel3}} -\ccPkgHowToCiteCgal{cgal:cclt-sgk3-11} +\ccPkgHowToCiteCgal{cgal:cclt-sgk3-11b} \ccPkgSummary{ This package is an extension of the linear \cgal\ Kernel. It offers functionalities on spheres, circles, circular arcs and line segments, diff --git a/Circulator/doc_tex/Circulator/PkgDescription.tex b/Circulator/doc_tex/Circulator/PkgDescription.tex index 7dfa749be2a..d7d0b31177c 100644 --- a/Circulator/doc_tex/Circulator/PkgDescription.tex +++ b/Circulator/doc_tex/Circulator/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Handles and Circulators\label{Pkg:HandlesAndCirculators}} -\ccPkgHowToCiteCgal{cgal:dksy-hc-11} +\ccPkgHowToCiteCgal{cgal:dksy-hc-11b} \ccPkgSummary{This package descibes handles and circulators. They are related to iterators. Handles allow to dereference but neither to increment nor to decrement. diff --git a/Convex_decomposition_3/doc_tex/Convex_decomposition_3/PkgDescription.tex b/Convex_decomposition_3/doc_tex/Convex_decomposition_3/PkgDescription.tex index 210cba8f7ac..bc1cd60ef54 100644 --- a/Convex_decomposition_3/doc_tex/Convex_decomposition_3/PkgDescription.tex +++ b/Convex_decomposition_3/doc_tex/Convex_decomposition_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Convex Decomposition of Polyhedra\label{Pkg:ConvexDecomposition3}} -\ccPkgHowToCiteCgal{cgal:h-emspe-11} +\ccPkgHowToCiteCgal{cgal:h-emspe-11b} \ccPkgSummary{ This packages provides a function for decomposing a bounded polyhedron into convex sub-polyhedra. The decomposition yields $O(r^2)$ convex diff --git a/Convex_hull_3/benchmark/Convex_hull_3/compare_different_approach.cpp b/Convex_hull_3/benchmark/Convex_hull_3/compare_different_approach.cpp new file mode 100644 index 00000000000..8094e016e7d --- /dev/null +++ b/Convex_hull_3/benchmark/Convex_hull_3/compare_different_approach.cpp @@ -0,0 +1,96 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Exact_predicates_exact_constructions_kernel EK; +typedef CGAL::Polyhedron_3 Polyhedron_3; +typedef CGAL::Polyhedron_3 EK_Polyhedron_3; +typedef K::Segment_3 Segment_3; +typedef CGAL::Delaunay_triangulation_3 Delaunay; + +// define point creator +typedef K::Point_3 Point_3; +typedef CGAL::Creator_uniform_3 PointCreator; + +void load_from_file(const char* path,std::vector& points) +{ + std::ifstream infile (path); + std::size_t nbpt; + infile >> nbpt; + points.reserve(nbpt); + Point_3 p; + do + { + infile >> p; + points.push_back(p); + } + while (--nbpt>0); +} + +int main(int argc,char** argv) +{ + std::vector points; + if (argc==1){ + CGAL::Random_points_in_sphere_3 gen(1.0); + int nbpt=1000000; + CGAL::copy_n( gen, nbpt, std::back_inserter(points) ); + std::cout << "Using " << 1000000 << " random points in the unit ball\n"; + } + else{ + load_from_file(argv[1],points); + std::cout << "Using a model with " << points.size() << " points.\n"; + } + + Polyhedron_3 poly; + + // compute convex hull + CGAL::Timer time; + time.start(); + CGAL::convex_hull_3(points.begin(), points.end(), poly); + time.stop(); + std::cout << "Static " << time.time() <<" "<< poly.size_of_vertices() << std::endl; + + poly.clear(); + + time.reset(); + time.start(); + Delaunay T(points.begin(), points.end()); + time.stop(); + std::cout << "Delaunay " << time.time() << std::endl; + time.start(); + CGAL::convex_hull_3_to_polyhedron_3(T,poly); + time.stop(); + std::cout << "Delaunay+to_poly " << time.time() <<" "<< poly.size_of_vertices() << std::endl; + poly.clear(); + + time.reset(); + time.start(); + CGAL::convex_hull_incremental_3( points.begin(), points.end(), poly, false); + time.stop(); + std::cout << "incremental EPIC " << time.time() <<" "<< poly.size_of_vertices() << std::endl; + + EK_Polyhedron_3 poly2; + std::vector ek_points; + ek_points.reserve(points.size()); + CGAL::Cartesian_converter convert; + for (std::vector::iterator it=points.begin();it!=points.end();++it){ + ek_points.push_back(convert(*it)); + } + time.reset(); + time.start(); + CGAL::convex_hull_incremental_3( ek_points.begin(), ek_points.end(), poly2, false); + time.stop(); + std::cout << "incremental EPEC " << time.time() <<" "<< poly2.size_of_vertices() << std::endl; + + return 0; +} diff --git a/Convex_hull_3/benchmark/Convex_hull_3/is_on_positive_side.cpp b/Convex_hull_3/benchmark/Convex_hull_3/is_on_positive_side.cpp new file mode 100644 index 00000000000..a9e37bcdd28 --- /dev/null +++ b/Convex_hull_3/benchmark/Convex_hull_3/is_on_positive_side.cpp @@ -0,0 +1,182 @@ +#include +#include +#include +#include +#include + + +#include + +namespace CGAL{ + +template +struct Is_on_positive_side_of_plane_3; + +template +struct Is_on_positive_side_of_plane_3{ + typedef typename Kernel::Point_3 Point_3; + Point_3 p,q,r; + typename Kernel::Orientation_3 orientation; +public: + Is_on_positive_side_of_plane_3(const Kernel& kernel,const Point_3& p_,const Point_3& q_,const Point_3& r_) + :p(p_),q(q_),r(r_),orientation(kernel.orientation_3_object()) {} + + bool operator() (const Point_3& s) const + { + return orientation(p,q,r,s) == CGAL::POSITIVE; + } +}; + +template +struct Is_on_positive_side_of_plane_3{ + typedef typename Kernel::Point_3 Point_3; + double m10,m20,m21,Maxx,Maxy,Maxz; + const Point_3& p_; + + int static_filtered(double psx,double psy, double psz) const{ + using std::fabs; + + // Then semi-static filter. + double maxx = Maxx; + if (maxx < fabs(psx)) maxx = fabs(psx); + double maxy = Maxy; + if (maxy < fabs(psy)) maxy = fabs(psy); + double maxz = Maxz; + if (maxz < fabs(psz)) maxz = fabs(psz); + double det = psx*m10 - m20*psy + m21*psz; + + // Sort maxx < maxy < maxz. + if (maxx > maxz) + std::swap(maxx, maxz); + if (maxy > maxz) + std::swap(maxy, maxz); + else if (maxy < maxx) + std::swap(maxx, maxy); + + // Protect against underflow in the computation of eps. + if (maxx < 1e-97) /* cbrt(min_double/eps) */ { + if (maxx == 0) + return 0; + } + // Protect against overflow in the computation of det. + else if (maxz < 1e102) /* cbrt(max_double [hadamard]/4) */ { + double eps = 5.1107127829973299e-15 * maxx * maxy * maxz; + if (det > eps) return 1; + if (det < -eps) return -1; + } + return 555; + } +public: + Is_on_positive_side_of_plane_3(const Kernel&,const Point_3& p,const Point_3& q,const Point_3& r):p_(p) + { + double pqx = q.x() - p.x(); + double pqy = q.y() - p.y(); + double pqz = q.z() - p.z(); + double prx = r.x() - p.x(); + double pry = r.y() - p.y(); + double prz = r.z() - p.z(); + + m10 = pqy*prz - pry*pqz; + m20 = pqx*prz - prx*pqz; + m21 = pqx*pry - prx*pqy; + + Maxx = fabs(pqx); + if (Maxx < fabs(prx)) Maxx = fabs(prx); + Maxy = fabs(pqy); + if (Maxy < fabs(pry)) Maxy = fabs(pry); + Maxz = fabs(pqz); + if (Maxz < fabs(prz)) Maxz = fabs(prz); + } + + bool operator() (const Point_3& s) const + { + double psx = s.x() - p_.x(); + double psy = s.y() - p_.y(); + double psz = s.z() - p_.z(); + + int static_res = static_filtered(psx,psy,psz); + if (static_res != 555) + return static_res == 1; + + std::cerr << "ERROR static predicate failure!!!\n"; + exit(EXIT_FAILURE); + } +}; + + +template +struct Is_on_positive_side_of_plane_3{ + typedef Simple_cartesian CK; + typedef typename Kernel::Point_3 Point_3; + + Cartesian_converter to_CK; + typename CK::Plane_3 ck_plane; + + Is_on_positive_side_of_plane_3(const Kernel&,const Point_3& p,const Point_3& q,const Point_3& r): + ck_plane(to_CK(p),to_CK(q),to_CK(r)) + {} + + bool operator() (const Point_3& s) const + { + try{ + return ck_plane.has_on_positive_side(to_CK(s)); + } + catch (Uncertain_conversion_exception){ + std::cerr << "ERROR Interval filtering failure\n"; + exit(EXIT_FAILURE); + } + } +}; + +}//namespace CGAL + + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Is_on_positive_side_of_plane_3 Pred_using_kernel; +typedef CGAL::Is_on_positive_side_of_plane_3 Pred_using_optimized_static; +typedef CGAL::Is_on_positive_side_of_plane_3 Pred_using_intervals; + + +template +void run(const K::Point_3& p,const K::Point_3& q,const K::Point_3& r,const std::vector& queries,Outputiterator out){ + CGAL::Timer time; time.start(); + Predicate predicate(K(),p,q,r); + for (std::vector::const_iterator it=queries.begin();it!=queries.end();++it) + *out++=predicate(*it); + time.stop(); + std::cout << time.time() << std::endl; +} + +int main() +{ + std::size_t nb_pts=20000000; + typedef CGAL::Creator_uniform_3 Creator; + CGAL::Random_points_in_sphere_3 gen(1); + + std::vector points; + points.reserve(nb_pts); + + K::Point_3 p=*gen++,q=*gen++,r=*gen++; + CGAL::copy_n(gen,nb_pts,std::back_inserter(points)); + + std::vector res0; res0.reserve(nb_pts); + std::vector res1; res1.reserve(nb_pts); + std::vector res2; res2.reserve(nb_pts); + + std::cout << "Running kernel predicates: "; + run(p,q,r,points,std::back_inserter(res0)); + std::cout << "Running static optimized predicates: "; + run(p,q,r,points,std::back_inserter(res1)); + std::cout << "Running predicates with intervals: "; + run(p,q,r,points,std::back_inserter(res2)); + + for (std::size_t k=0;k} should be used +(\ccc{R} being the input kernel). Note that the default traits class takes this into +account. \subsection{Convexity Checking} @@ -33,8 +36,11 @@ point set or not. This function is used in postcondition testing for \subsection{Example} The following program computes the convex hull of a set of 250 random -points chosen from a sphere of radius 100. It then determines if the -resulting hull is a segment or a polyhedron. +points chosen from a sphere of radius 100. We assume that the points are +not all identical and not all collinear, thus we directly use a polyhedron +as output. Note the usage of the functor \ccc{Plane_from_facet} together with +\ccc{std::transform} to compute the equations of the plane of each facet +of the convex hull. \ccIncludeExampleCode{Convex_hull_3/quickhull_3.cpp} @@ -45,7 +51,7 @@ resulting hull is a segment or a polyhedron. The function \ccc{convex_hull_incremental_3} % \ccIndexMainItem[C]{convex_hull_incremental_3} provides an interface similar to \ccc{convex_hull_3} for the $d$-dimensional -incremental construction algorithm \cite{cms-frric-93}. +incremental construction algorithm \cite{cms-frric-93} implemented by the class \ccc{CGAL::Convex_hull_d} that is specialized to three dimensions. This function accepts an iterator range over a set of input points and returns a polyhedron, but it does not have a traits class @@ -53,9 +59,13 @@ in its interface. It uses the kernel class \ccc{Kernel} used in the polyhedron type to define an instance of the adapter traits class \ccc{CGAL::Convex_hull_d_traits_3}. -In most cases, the function \ccc{convex_hull_3} will be faster than -\ccc{convex_hull_incremental_3}. The latter is provided mainly -for comparison purposes. +In almost all cases, the static and the dynamic version will +be faster than the incremental convex hull algorithm (mainly +because of the lack of efficient filtering and the overhead +of the general d-dimension). The incremental version is provided for +completeness and educational purposes. You should use the dynamic +version when you need an efficient incremental convex hull algorithm. + To use the full functionality available with the $d$-dimensional class \ccc{CGAL::Convex_hull_d} in three dimensions (\textit{e.g.}, the ability @@ -66,7 +76,7 @@ example. \subsection{Example} -\ccIncludeExampleCode{Convex_hull_3/incremental_hull_3_demo.cpp} +\ccIncludeExampleCode{Convex_hull_3/incremental_hull_class_3.cpp} \section{Dynamic Convex Hull Construction} \ccIndexSubitem{convex hull, 3D}{dynamic} @@ -87,4 +97,18 @@ not all of them are vertices of the hull. \subsection{Example} \ccIncludeExampleCode{Convex_hull_3/dynamic_hull_3.cpp} +\section{Performance} +In the following, we compare the running times of the three approaches to compute 3D convex hulls. +For the static version (using \ccc{CGAL::convex_hull_3}) and the dynamic version +(using \ccc{CGAL::Delaunay_triangulation_3} and \ccc{CGAL::convex_hull_3_to_polyhedron_3}), the kernel +used was \ccc{CGAL::Exact_predicates_inexact_constructions_kernel}. For the incremental version +(using \ccc{CGAL::convex_hull_incremental_3}), the kernel used was \ccc{CGAL::Exact_predicates_exact_constructions_kernel}. + +To compute the convex hull of a million of random points in a unit ball the static approach needed 1.63s, while +the dynamic and incremental approaches needed 9.50s and 11.54s respectively. +To compute the convex hull of the model of Figure \ref{fig-ch-bimba} featuring 192135 points, +the static approach needed 0.18s, while the dynamic and incremental approaches needed 1.90s and 6.80s respectively. + +The measurements have been performed using \cgal\ 3.9, using the \gnu\ \CC\ compiler version 4.3.5, under Linux (Debian distribution), +with the compilation options \texttt{-O3 -DCGAL\_NDEBUG}. The computer used was equipped with a 64bit Intel Xeon 2.27GHz processor and 12GB of RAM. \ No newline at end of file diff --git a/Convex_hull_3/doc_tex/Convex_hull_3/convex_hull_def_3.tex b/Convex_hull_3/doc_tex/Convex_hull_3/convex_hull_def_3.tex index d4e667e2ab2..2ed906f957e 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3/convex_hull_def_3.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3/convex_hull_def_3.tex @@ -1,3 +1,18 @@ +\begin{figure} +\begin{ccTexOnly} +\begin{center} +\includegraphics[width=12cm]{Convex_hull_3/chull_bimba.png} +\end{center} +\end{ccTexOnly} +\begin{ccHtmlOnly} +
+the convex hull of the bimba model +
+\end{ccHtmlOnly} +\caption{The convex hull of a model made of 192135 points. +\label{fig-ch-bimba}} +\end{figure} + \section{Introduction} A subset $S \subseteq \R^3$ is convex if for any two points $p$ and $q$ diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/ConvexHullTraits_3.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/ConvexHullTraits_3.tex index e32d7ea1830..efd62c4723c 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3_ref/ConvexHullTraits_3.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/ConvexHullTraits_3.tex @@ -63,26 +63,26 @@ provides \ccc{bool operator()(Plane_3 p, Point_3 q, Point_3 r)}, which returns true iff the signed distance from \ccc{q} to \ccc{p} is smaller than the signed distance from \ccc{r} to \ccc{p}} -To handle the degenerate case when all points are coplanar, the following -three types that are default-constructable are necessary: +%To handle the degenerate case when all points are coplanar, the following +%three types that are default-constructable are necessary: +% +%\ccNestedType{Traits_xy}{A model of \ccc{ConvexHullTraits_2} for points projected +% into the $xy$-plane} +%\ccNestedType{Traits_xz}{A model of \ccc{ConvexHullTraits_2} for points projected +% into the $xz$-plane} +%\ccNestedType{Traits_yz}{A model of \ccc{ConvexHullTraits_2} for points projected +% into the $yz$-plane} -\ccNestedType{Traits_xy}{A model of \ccc{ConvexHullTraits_2} for points projected - into the $xy$-plane} -\ccNestedType{Traits_xz}{A model of \ccc{ConvexHullTraits_2} for points projected - into the $xz$-plane} -\ccNestedType{Traits_yz}{A model of \ccc{ConvexHullTraits_2} for points projected - into the $yz$-plane} +%One also needs the following function object to help choose which of the above +%traits classes to use: +% +%\ccNestedType{Max_coordinate_3}{Function object type that provides +%\ccc{int operator()(Vector_3 v)}, which returns the index (0, 1, or 2 for +%$x$, $y$, or $z$, respectively) of the coordinate of $v$ with maximum absolute +%value.} -One also needs the following function object to help choose which of the above -traits classes to use: - -\ccNestedType{Max_coordinate_3}{Function object type that provides -\ccc{int operator()(Vector_3 v)}, which returns the index (0, 1, or 2 for -$x$, $y$, or $z$, respectively) of the coordinate of $v$ with maximum absolute -value.} - -These types need not be provided when it is known that the points are -not all coplanar. +%These types need not be provided when it is known that the points are +%not all coplanar. \ccCreation \ccCreationVariable{traits} @@ -103,7 +103,8 @@ predicate object type. For example: \ccAutoIndexingOn \ccHasModels -\ccRefIdfierPage{CGAL::Convex_hull_traits_3} +\ccRefIdfierPage{CGAL::Convex_hull_traits_3}\\ +All kernels of CGAL %\ccSeeAlso diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/Convex_hull_traits_3.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/Convex_hull_traits_3.tex index 1a86a05ac8d..63af9466c22 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3_ref/Convex_hull_traits_3.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/Convex_hull_traits_3.tex @@ -16,7 +16,8 @@ The class \ccRefName\ serves as a traits class for the function \ccc{convex_hull_3}. This is the default traits class for this -function. +function when \ccc{R} is a kernel with exact predicates but inexact constructions +(note below that the type \ccc{Plane_3} is a triple of \ccc{Point_3} and not \ccc{R::Plane_3}). \ccInclude{CGAL/Convex_hull_traits_3.h} @@ -101,7 +102,7 @@ function. \ccCreation \ccCreationVariable{traits} %% choose variable name -\ccConstructor{Convex_hull_traits_3(Convex_hull_traits_2& t);}% +\ccConstructor{Convex_hull_traits_3(Convex_hull_traits_3& t);}% {copy constructor.} \ccOperations diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/IsStronglyConvexTraits_3.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/IsStronglyConvexTraits_3.tex index ba2da15fa49..f9504e0244a 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3_ref/IsStronglyConvexTraits_3.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/IsStronglyConvexTraits_3.tex @@ -62,6 +62,7 @@ predicate object type. For example: \ccHasModels \ccRefIdfierPage{CGAL::Convex_hull_traits_3} \\ +All kernels of CGAL %\ccc{CGAL::Kernel_traits_3} \ccSeeAlso diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3.tex index d7839bcd4e3..83c43c98932 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3.tex @@ -24,7 +24,7 @@ void convex_hull_3(InputIterator first, InputIterator last, computes the convex hull of the set of points in the range [\ccc{first}, \ccc{last}). The polyhedron \ccc{P} is cleared, then the convex hull is stored in \ccc{P} -and the plane equations of each face are computed. +and the plane equations of each face are not computed. \ccPrecond: There are at least four points in the range [\ccc{first}, \ccc{last}) not all of which are collinear. } @@ -39,7 +39,7 @@ void convex_hull_3(InputIterator first, InputIterator last, computes the convex hull of the set of points in the range [\ccc{first}, \ccc{last}). The result, which may be a point, a segment, a triangle, or a polyhedron, is stored in \ccc{ch_object}. When -the result is a polyhedron, the plane equations of each face are computed. +the result is a polyhedron, the plane equations of each face are not computed. } \ccHeading{Requirements} @@ -47,9 +47,10 @@ Both functions require the following: \begin{enumerate} \item \ccc{InputIterator::value_type} is equivalent to \ccc{Traits::Point_3}. \item \ccc{Traits} is a model of the concept \ccc{ConvexHullTraits_3} - \ccIndexMainItem[c]{ConvexHullTraits_3}. When it is known that - the input points are not all coplanar, the types \ccc{Traits_xy}, - \ccc{Traits_yx}, and \ccc{Traits_yz} need not be provided. + \ccIndexMainItem[c]{ConvexHullTraits_3}. + %When it is known that + %the input points are not all coplanar, the types \ccc{Traits_xy}, + %\ccc{Traits_yx}, and \ccc{Traits_yz} need not be provided. For the purposes of checking the postcondition that the convex hull is valid, \ccc{Traits} should also be a model of the concept \ccc{IsStronglyConvexTraits_3}. @@ -67,9 +68,11 @@ and for the second, it is required that \ccc{ConvexHullPolyhedron_3}. \end{itemize} -The default traits class for both versions of \ccc{convex_hull_3} is -\ccc{Convex_hull_traits_3},% -with the representation \ccc{R} determined by \ccc{InputIterator::value_type}. +For both versions, if the kernel \ccc{R} of the points determined by \ccc{InputIterator::value_type} +is a kernel with exact predicates but inexact constructions +(in practice we check \ccc{R::Has_filtered_predicates_tag} is \ccc{Tag_true} and \ccc{R::FT} is a floating point type), +then the default traits class of \ccc{convex_hull_3} is \ccc{Convex_hull_traits_3}, and \ccc{R} otherwise. + \ccSeeAlso diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3_to_polyhedron_3.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3_to_polyhedron_3.tex new file mode 100644 index 00000000000..8a0e83f2fcd --- /dev/null +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_3_to_polyhedron_3.tex @@ -0,0 +1,34 @@ +\begin{ccRefFunction}{convex_hull_3_to_polyhedron_3} + +\ccDefinition + +The function \ccRefName\ fills a polyhedron with the convex hull +of a set of 3D points contained into a 3D triangulation of \cgal. + +\ccInclude{CGAL/convex_hull_3_to_polyhedron_3.h} + +\ccFunction{ +template +void convex_hull_3_to_polyhedron_3(const Triangulation_3& T,Polyhedron_3& P); +} +{ +The polyhedron \ccc{P} is cleared and the convex hull of the set of 3D points is stored in \ccc{P}. +The plane equations of each face are not computed. +\ccPrecond{\ccc{T.dimension()}==3}. +} + + +\ccHeading{Requirements} +This function requires the following: +\begin{enumerate} + \item \ccc{Triangulation_3} is a CGAL 3D triangulation. + \item \ccc{Polyhedron_3} is an instantiation of \ccc{CGAL::Polyhedron_3}. +\end{enumerate} + + + +\ccSeeAlso + +\ccRefIdfierPage{CGAL::convex_hull_3} + +\end{ccRefFunction} diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_incremental_3.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_incremental_3.tex index 2b4b5ee163e..613c7ff19d8 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_incremental_3.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/convex_hull_incremental_3.tex @@ -14,8 +14,12 @@ \ccDefinition The function \ccRefName\ computes the convex hull polyhedron from a set -of given three-dimensional points. +of given three-dimensional points. +This function is provided for completeness and educational +purposes. When an efficient incremental implementation is needed, +using \ccc{CGAL::Delaunay_triangulation_3} together with +\ccc{CGAL::convex_hull_3_to_polyhedron_3} is highly recommended. \ccInclude{CGAL/convex_hull_incremental_3.h} diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/intro.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/intro.tex index c1086a63c9e..acee79a62a3 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3_ref/intro.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/intro.tex @@ -58,7 +58,8 @@ defining \ccc{CGAL_CH_CHECK_EXPENSIVE}% \ccHeading{Convex Hull Functions} \ccRefIdfierPage{CGAL::convex_hull_3} \\ -\ccRefIdfierPage{CGAL::convex_hull_incremental_3} +\ccRefIdfierPage{CGAL::convex_hull_incremental_3}\\ +\ccRefIdfierPage{CGAL::convex_hull_3_to_polyhedron_3} \ccHeading{Convexity Checking Function} diff --git a/Convex_hull_3/doc_tex/Convex_hull_3_ref/main.tex b/Convex_hull_3/doc_tex/Convex_hull_3_ref/main.tex index 77b9c7ea0c4..b9bb833e6c9 100644 --- a/Convex_hull_3/doc_tex/Convex_hull_3_ref/main.tex +++ b/Convex_hull_3/doc_tex/Convex_hull_3_ref/main.tex @@ -15,6 +15,7 @@ \input{Convex_hull_3_ref/ConvexHullPolyhedron_3.tex} \input{Convex_hull_3_ref/ConvexHullTraits_3.tex} \input{Convex_hull_3_ref/Convex_hull_traits_3.tex} +\input{Convex_hull_3_ref/convex_hull_3_to_polyhedron_3.tex} \input{Convex_hull_3_ref/is_strongly_convex_3.tex} \input{Convex_hull_3_ref/IsStronglyConvexTraits_3.tex} diff --git a/Convex_hull_3/examples/Convex_hull_3/dynamic_hull_3.cpp b/Convex_hull_3/examples/Convex_hull_3/dynamic_hull_3.cpp index 6da2c4e83f5..46585091a6d 100644 --- a/Convex_hull_3/examples/Convex_hull_3/dynamic_hull_3.cpp +++ b/Convex_hull_3/examples/Convex_hull_3/dynamic_hull_3.cpp @@ -1,14 +1,17 @@ #include #include #include +#include +#include #include #include -typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef K::Point_3 Point_3; -typedef CGAL::Delaunay_triangulation_3 Delaunay; -typedef Delaunay::Vertex_handle Vertex_handle; +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_3 Point_3; +typedef CGAL::Delaunay_triangulation_3 Delaunay; +typedef Delaunay::Vertex_handle Vertex_handle; +typedef CGAL::Polyhedron_3 Polyhedron_3; int main() { @@ -34,9 +37,15 @@ int main() v_set_it++; } - vertices.clear(); - T.incident_vertices(T.infinite_vertex(), std::back_inserter(vertices)); + //copy the convex hull of points into a polyhedron and use it + //to get the number of points on the convex hull + Polyhedron_3 chull; + CGAL::convex_hull_3_to_polyhedron_3(T,chull); + std::cout << "After removal of 25 points, there are " - << vertices.size() << " points on the convex hull." << std::endl; + << chull.size_of_vertices() << " points on the convex hull." << std::endl; + + + return 0; } diff --git a/Convex_hull_3/examples/Convex_hull_3/incremental_hull_class_3.cpp b/Convex_hull_3/examples/Convex_hull_3/incremental_hull_class_3.cpp new file mode 100644 index 00000000000..afafdb95e43 --- /dev/null +++ b/Convex_hull_3/examples/Convex_hull_3/incremental_hull_class_3.cpp @@ -0,0 +1,68 @@ +// Copyright (c) 2002-2011 Max Planck Institut fuer Informatik (Germany). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL: svn+ssh://sloriot@scm.gforge.inria.fr/svn/cgal/branches/experimental-packages/Faster_static_convex_hull_3/demo/Convex_hull_3/incremental_hull_3_demo.cpp $ +// $Id: incremental_hull_3_demo.cpp 44910 2008-08-12 12:58:18Z spion $ +// +// +// Author(s) : Susan Hert +// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CGAL_USE_GMP +#include +typedef CGAL::Gmpq RT; +#else +#include +typedef CGAL::Quotient RT; +#endif + +typedef CGAL::Cartesian K; +typedef K::Point_3 Point_3; +typedef CGAL::Polyhedron_3< K> Polyhedron_3; + +typedef CGAL::Convex_hull_d_traits_3 Hull_traits_3; +typedef CGAL::Convex_hull_d< Hull_traits_3 > Convex_hull_3; +typedef CGAL::Creator_uniform_3 Creator; + +int main () +{ + Convex_hull_3 CH(3); // create instance of the class with dimension == 3 + + // generate 250 points randomly on a sphere of radius 100 + // and insert them into the convex hull + CGAL::Random_points_in_sphere_3 gen(100); + + for (int i = 0; i < 250 ; i++, ++gen) + CH.insert(*gen); + + assert(CH.is_valid()); + + // define polyhedron to hold convex hull and create it + Polyhedron_3 P; + CGAL::convex_hull_d_to_polyhedron_3(CH,P); + + std::cout << "The convex hull has " << P.size_of_vertices() + << " vertices" << std::endl; + return 0; +} diff --git a/Convex_hull_3/examples/Convex_hull_3/quickhull_3.cpp b/Convex_hull_3/examples/Convex_hull_3/quickhull_3.cpp index a8946950c8b..56551ca1bc8 100644 --- a/Convex_hull_3/examples/Convex_hull_3/quickhull_3.cpp +++ b/Convex_hull_3/examples/Convex_hull_3/quickhull_3.cpp @@ -1,20 +1,29 @@ #include #include #include -#include +#include #include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef CGAL::Convex_hull_traits_3 Traits; -typedef Traits::Polyhedron_3 Polyhedron_3; +typedef CGAL::Polyhedron_3 Polyhedron_3; typedef K::Segment_3 Segment_3; // define point creator typedef K::Point_3 Point_3; typedef CGAL::Creator_uniform_3 PointCreator; +//a functor computing the plane containing a triangular facet +struct Plane_from_facet { + Polyhedron_3::Plane_3 operator()(Polyhedron_3::Facet& f) { + Polyhedron_3::Halfedge_handle h = f.halfedge(); + return Polyhedron_3::Plane_3( h->vertex()->point(), + h->next()->vertex()->point(), + h->opposite()->vertex()->point()); + } +}; + int main() { @@ -25,19 +34,17 @@ int main() std::vector points; CGAL::copy_n( gen, 250, std::back_inserter(points) ); - // define object to hold convex hull - CGAL::Object ch_object; + // define polyhedron to hold convex hull + Polyhedron_3 poly; + + // compute convex hull of non-collinear points + CGAL::convex_hull_3(points.begin(), points.end(), poly); - // compute convex hull - CGAL::convex_hull_3(points.begin(), points.end(), ch_object); + std::cout << "The convex hull contains " << poly.size_of_vertices() << " vertices" << std::endl; + + // assign a plane equation to each polyhedron facet using functor Plane_from_facet + std::transform( poly.facets_begin(), poly.facets_end(), poly.planes_begin(),Plane_from_facet()); - // determine what kind of object it is - if (CGAL::object_cast(&ch_object) ) - std::cout << "convex hull is a segment " << std::endl; - else if (CGAL::object_cast(&ch_object) ) - std::cout << "convex hull is a polyhedron " << std::endl; - else - std::cout << "convex hull error!" << std::endl; return 0; } diff --git a/Convex_hull_3/include/CGAL/Convex_hull_face_base_2.h b/Convex_hull_3/include/CGAL/Convex_hull_face_base_2.h new file mode 100644 index 00000000000..be6aa77454f --- /dev/null +++ b/Convex_hull_3/include/CGAL/Convex_hull_face_base_2.h @@ -0,0 +1,70 @@ +// Copyright (c) 2003,2011 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Mariette Yvinec,Sylvain Pion + +// face of a triangulation of any dimension <=3 + +#ifndef CGAL_CONVEX_HULL_FACE_BASE_2_H +#define CGAL_CONVEX_HULL_FACE_BASE_2_H + +#include + +namespace CGAL { + +template < typename Info_, typename GT, + typename Fb = Triangulation_face_base_2 > +class Convex_hull_face_base_2 + : public Fb +{ + Info_ _info; +public: + typedef typename Fb::Vertex_handle Vertex_handle; + typedef typename Fb::Face_handle Face_handle; + typedef Info_ Info; + + typename std::list::iterator it; + std::list points; + template < typename TDS2 > + struct Rebind_TDS { + typedef typename Fb::template Rebind_TDS::Other Fb2; + typedef Convex_hull_face_base_2 Other; + }; + + Convex_hull_face_base_2() + : Fb(), _info(0) {} + + Convex_hull_face_base_2(Vertex_handle v0, + Vertex_handle v1, + Vertex_handle v2) + : Fb(v0, v1, v2), _info(0) {} + + Convex_hull_face_base_2(Vertex_handle v0, + Vertex_handle v1, + Vertex_handle v2, + Face_handle n0, + Face_handle n1, + Face_handle n2 ) + : Fb(v0, v1, v2, n0, n1, n2), _info(0) {} + + const Info& info() const { return _info; } + Info& info() { return _info; } +}; + +} //namespace CGAL + +#endif // CGAL_CONVEX_HULL_FACE_BASE_2_H diff --git a/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h b/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h index c8dc3a07be1..13f164b528c 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_traits_3.h @@ -1,4 +1,4 @@ -// Copyright (c) 2001 Max-Planck-Institute Saarbruecken (Germany). +// Copyright (c) 2001,2011 Max-Planck-Institute Saarbruecken (Germany). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -21,9 +21,11 @@ #define CGAL_CONVEX_HULL_TRAITS_3_H #include +#include #include #include #include +#include namespace CGAL { template < class R_ > @@ -34,7 +36,7 @@ protected: typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; - Point_3 p_, q_, r_; + Point_3 p_, q_, r_; public: typedef R_ R; @@ -115,9 +117,15 @@ public: const Point_3& hp = h.p(); const Point_3& hq = h.q(); const Point_3& hr = h.r(); - typename OldK::Less_signed_distance_to_plane_3 - less_signed_distance_to_plane_3; - return less_signed_distance_to_plane_3(hp, hq, hr, p, q); + //typename OldK::Less_signed_distance_to_plane_3 + // less_signed_distance_to_plane_3; + // return less_signed_distance_to_plane_3(hp, hq, hr, p, q); + return has_smaller_signed_dist_to_planeC3(hp.x(), hp.y(), hp.z(), + hq.x(), hq.y(), hq.z(), + hr.x(), hr.y(), hr.z(), + p.x(), p.y(), p.z(), + q.x(), q.y(), q.z()); + } }; @@ -143,6 +151,14 @@ public: } }; + +template +struct GT3_for_CH3 { + typedef typename GT::Point_3 Point_2; +}; + + + template class Convex_hull_traits_3 { @@ -157,7 +173,6 @@ class Convex_hull_traits_3 typedef CGAL::Polyhedron_3 Polyhedron_3; - typedef typename R::Construct_segment_3 Construct_segment_3; typedef typename R::Construct_ray_3 Construct_ray_3; @@ -186,9 +201,6 @@ class Convex_hull_traits_3 Less_signed_distance_to_plane_3; // required for degenerate case of all points coplanar - typedef Projection_traits_xy_3 Traits_xy; - typedef Projection_traits_xz_3 Traits_xz; - typedef Projection_traits_yz_3 Traits_yz; typedef CGAL::Max_coordinate_3 Max_coordinate_3; // for postcondition checking diff --git a/Convex_hull_3/include/CGAL/convex_hull_3.h b/Convex_hull_3/include/CGAL/convex_hull_3.h index f6e521297b3..bd7ecd34c68 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_3.h @@ -1,4 +1,4 @@ -// Copyright (c) 2001 Max-Planck-Institute Saarbruecken (Germany). +// Copyright (c) 2001,2011 Max-Planck-Institute Saarbruecken (Germany). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -17,23 +17,34 @@ // // Author(s) : Susan Hert // : Amol Prakash +// : Andreas Fabri #ifndef CGAL_CONVEX_HULL_3_H #define CGAL_CONVEX_HULL_3_H - #include -#include #include #include #include +#include +#include +#include #include #include +#include +#include +#include +#include #include #include #include #include +#include #include #include +#include +#include +#include + #ifndef CGAL_CH_NO_POSTCONDITIONS #include @@ -42,21 +53,185 @@ namespace CGAL { - -namespace internal{ namespace CH3 { - - struct Plane_equation { - template - typename Facet::Plane_3 operator()( Facet& f) { - typename Facet::Halfedge_handle h = f.halfedge(); - typedef typename Facet::Plane_3 Plane; - return Plane( h->vertex()->point(), - h->next()->vertex()->point(), - h->next()->next()->vertex()->point()); - } +namespace internal{ namespace Convex_hull_3{ + +//struct to select the default traits class for computing convex hull +template< class Point_3, + class Is_floating_point=typename boost::is_floating_point::Kernel::FT>::type, + class Has_filtered_predicates_tag=typename Kernel_traits::Kernel::Has_filtered_predicates_tag > +struct Default_traits_for_Chull_3{ + typedef typename Kernel_traits::Kernel type; +}; + +//FT is a floating point type and Kernel is a filtered kernel +template +struct Default_traits_for_Chull_3{ + typedef Convex_hull_traits_3< typename Kernel_traits::Kernel > type; +}; + +template +struct Default_polyhedron_for_Chull_3{ + typedef CGAL::Polyhedron_3 type; +}; + +template +struct Default_polyhedron_for_Chull_3 >{ + typedef typename Convex_hull_traits_3::Polyhedron_3 type; }; -} } //namespace internal::CH3 +//utility class to select the right version of internal predicate Is_on_positive_side_of_plane_3 +template ::Kernel::FT>::type, + class Has_filtered_predicates_tag=typename Kernel_traits::Kernel::Has_filtered_predicates_tag, + class Has_cartesian_tag=typename Kernel_traits::Kernel::Kernel_tag > +struct Use_advanced_filtering{ + typedef CGAL::Tag_false type; +}; + +template +struct Use_advanced_filtering{ + typedef typename Kernel_traits::Kernel K; + typedef CGAL::Boolean_tag type; +}; + +//Predicates internally used +template ::type > +class Is_on_positive_side_of_plane_3{ + typedef typename Traits::Point_3 Point_3; + typename Traits::Plane_3 plane; + typename Traits::Has_on_positive_side_3 has_on_positive_side; +public: + typedef Protect_FPU_rounding Protector; + + Is_on_positive_side_of_plane_3(const Traits& traits,const Point_3& p,const Point_3& q,const Point_3& r) + :plane(traits.construct_plane_3_object()(p,q,r)),has_on_positive_side(traits.has_on_positive_side_3_object()) {} + + bool operator() (const Point_3& s) const + { + return has_on_positive_side(plane,s); + } +}; + + +//This predicate uses copy of the code from the statically filtered version of +//Orientation_3. The rational is that the plane is a member of the functor +//so optimization are done to avoid doing several time operations on the plane. +//The main operator() first tries the static version of the predicate, then uses +//interval arithmetic (the protector must be created before using this predicate) +//and in case of failure, exact arithmetic is used. +template +class Is_on_positive_side_of_plane_3,Tag_true>{ + typedef Simple_cartesian::Type> PK; + typedef Simple_cartesian CK; + typedef Convex_hull_traits_3 Traits; + typedef typename Traits::Point_3 Point_3; + + Cartesian_converter to_CK; + Cartesian_converter to_PK; + + const Point_3& p,q,r; + mutable typename CK::Plane_3* ck_plane; + mutable typename PK::Plane_3* pk_plane; + + double m10,m20,m21,Maxx,Maxy,Maxz; + + static const int STATIC_FILTER_FAILURE = 555; + + //this function is a made from the statically filtered version of Orientation_3 + int static_filtered(double psx,double psy, double psz) const{ + + // Then semi-static filter. + double apsx = CGAL::abs(psx); + double apsy = CGAL::abs(psy); + double apsz = CGAL::abs(psz); + + double maxx = (Maxx < apsx)? apsx : Maxx; + double maxy = (Maxy < apsy)? apsy : Maxy; + double maxz = (Maxz < apsz)? apsz : Maxz; + + double det = psx*m10 - m20*psy + m21*psz; + + // Sort maxx < maxy < maxz. + if (maxx > maxz) + std::swap(maxx, maxz); + if (maxy > maxz) + std::swap(maxy, maxz); + else if (maxy < maxx) + std::swap(maxx, maxy); + + // Protect against underflow in the computation of eps. + if (maxx < 1e-97) /* cbrt(min_double/eps) */ { + if (maxx == 0) + return 0; + } + // Protect against overflow in the computation of det. + else if (maxz < 1e102) /* cbrt(max_double [hadamard]/4) */ { + double eps = 5.1107127829973299e-15 * maxx * maxy * maxz; + if (det > eps) return 1; + if (det < -eps) return -1; + } + return STATIC_FILTER_FAILURE; + } + +public: + typedef typename Interval_nt_advanced::Protector Protector; + + Is_on_positive_side_of_plane_3(const Traits&,const Point_3& p_,const Point_3& q_,const Point_3& r_) + :p(p_),q(q_),r(r_),ck_plane(NULL),pk_plane(NULL) + { + double pqx = q.x() - p.x(); + double pqy = q.y() - p.y(); + double pqz = q.z() - p.z(); + double prx = r.x() - p.x(); + double pry = r.y() - p.y(); + double prz = r.z() - p.z(); + + + m10 = pqy*prz - pry*pqz; + m20 = pqx*prz - prx*pqz; + m21 = pqx*pry - prx*pqy; + + double aprx = CGAL::abs(prx); + double apry = CGAL::abs(pry); + double aprz = CGAL::abs(prz); + + Maxx = CGAL::abs(pqx); + if (Maxx < aprx) Maxx = aprx; + Maxy = CGAL::abs(pqy); + if (Maxy < apry) Maxy = apry; + Maxz = CGAL::abs(pqz); + if (Maxz < aprz) Maxz = aprz; + } + + ~Is_on_positive_side_of_plane_3(){ + if (ck_plane!=NULL) delete ck_plane; + if (pk_plane!=NULL) delete pk_plane; + } + + bool operator() (const Point_3& s) const + { + double psx = s.x() - p.x(); + double psy = s.y() - p.y(); + double psz = s.z() - p.z(); + + int static_res = static_filtered(psx,psy,psz); + if (static_res != STATIC_FILTER_FAILURE) + return static_res == 1; + + try{ + if (ck_plane==NULL) + ck_plane=new typename CK::Plane_3(to_CK(p),to_CK(q),to_CK(r)); + return ck_plane->has_on_positive_side(to_CK(s)); + } + catch (Uncertain_conversion_exception){ + if (pk_plane==NULL) + pk_plane=new typename PK::Plane_3(to_PK(p),to_PK(q),to_PK(r)); + return pk_plane->has_on_positive_side(to_PK(s)); + } + } +}; + template class Build_coplanar_poly : public Modifier_base { @@ -98,27 +273,21 @@ class Build_coplanar_poly : public Modifier_base { ForwardIterator end; }; - template void coplanar_3_hull(InputIterator first, InputIterator beyond, Plane_3 plane, Polyhedron_3& P, const Traits& traits) { - typedef typename Traits::R R; typedef typename Traits::Point_3 Point_3; + typedef typename Kernel_traits::Kernel R; typedef typename Traits::Vector_3 Vector_3; - typedef typename Traits::Max_coordinate_3 Max_coordinate_3; - - typedef typename Traits::Traits_xy Traits_xy; - typedef typename Traits::Traits_xz Traits_xz; - typedef typename Traits::Traits_yz Traits_yz; - + typedef Max_coordinate_3 Max_coordinate_3; typedef Polyhedron_3 Polyhedron; std::list CH_2; typedef typename std::list::iterator CH_2_iterator; typedef typename Traits::Construct_orthogonal_vector_3 Construct_normal_vec; - Max_coordinate_3 max_coordinate = traits.max_coordinate_3_object(); + Max_coordinate_3 max_coordinate; Construct_normal_vec c_normal = traits.construct_orthogonal_vector_3_object(); @@ -129,19 +298,19 @@ void coplanar_3_hull(InputIterator first, InputIterator beyond, case 0: { convex_hull_points_2(first, beyond, std::back_inserter(CH_2), - Traits_yz()); + Projection_traits_yz_3()); break; } case 1: { convex_hull_points_2(first, beyond, std::back_inserter(CH_2), - Traits_xz()); + Projection_traits_xz_3()); break; } case 2: { convex_hull_points_2(first, beyond, std::back_inserter(CH_2), - Traits_xy()); + Projection_traits_xy_3()); break; } default: @@ -158,340 +327,341 @@ void coplanar_3_hull(InputIterator first, InputIterator beyond, // visible is the set of facets visible from point and reachable from // start_facet. // -template +template void -find_visible_set(const typename Traits::Point_3& point, - Facet_handle start_facet, - std::list& visible, +find_visible_set(TDS_2& tds, + const typename Traits::Point_3& point, + typename TDS_2::Face_handle start, + std::list& visible, + std::map& outside, const Traits& traits) { - typedef typename Facet_handle::value_type Facet; - typedef typename Facet::Halfedge_around_facet_circulator Halfedge_circ; - typedef typename Facet::Halfedge_handle Halfedge_handle; typedef typename Traits::Plane_3 Plane_3; - + typedef typename TDS_2::Face_handle Face_handle; + typedef typename TDS_2::Vertex_handle Vertex_handle; typename Traits::Has_on_positive_side_3 has_on_positive_side = traits.has_on_positive_side_3_object(); + std::vector vertices; + vertices.reserve(10); + int VISITED=1, BORDER=2; visible.clear(); - typename std::list::iterator vis_it; - CGAL::Unique_hash_map visited(false); - visible.push_back(start_facet); - visited[start_facet] = true; - Facet_handle current; + typename std::list::iterator vis_it; + visible.push_back(start); + start->info() = VISITED; + vertices.push_back(start->vertex(0)); + vertices.push_back(start->vertex(1)); + vertices.push_back(start->vertex(2)); + start->vertex(0)->info() = start->vertex(1)->info() = start->vertex(2)->info() = VISITED; + for (vis_it = visible.begin(); vis_it != visible.end(); vis_it++) { - // check all the neighbors of the current facet to see if they have + // check all the neighbors of the current face to see if they have // already been visited or not and if not whether they are visible // or not. - current = *vis_it; - Halfedge_circ hdl_init = (*current).facet_begin(); - Halfedge_circ hdl_curr = hdl_init; - do - { - // the facet on the other side of the current halfedge - Facet_handle f = (*(*hdl_curr).opposite()).facet(); - // if haven't already seen this facet - if ( !visited[f] ) - { - visited[f] = true; - Plane_3 plane; - get_plane(plane,f); - if ( has_on_positive_side(plane, point) ) // is visible - { - visible.push_back(f); - } + + for(int i=0; i < 3; i++) { + // the facet on the other side of the current halfedge + Face_handle f = (*vis_it)->neighbor(i); + // if haven't already seen this facet + if (f->info() == 0) { + f->info() = VISITED; + Plane_3 plane(f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point()); + int ind = f->index(*vis_it); + if ( has_on_positive_side(plane, point) ){ // is visible + visible.push_back(f); + Vertex_handle vh = f->vertex(ind); + if(vh->info() == 0){ vertices.push_back(vh); vh->info() = VISITED;} + } else { + f->info() = BORDER; + f->vertex(TDS_2::cw(ind))->info() = BORDER; + f->vertex(TDS_2::ccw(ind))->info() = BORDER; + outside.insert(std::make_pair(f->vertex(TDS_2::cw(ind)), + typename TDS_2::Edge(f,ind))); } - hdl_curr++; + } else if(f->info() == BORDER) { + int ind = f->index(*vis_it); + f->vertex(TDS_2::cw(ind))->info() = BORDER; + f->vertex(TDS_2::ccw(ind))->info() = BORDER; + outside.insert(std::make_pair(f->vertex(TDS_2::cw(ind)), + typename TDS_2::Edge(f,ind))); + } } - while (hdl_curr != hdl_init); } + + for(typename std::vector::iterator vit = vertices.begin(); + vit != vertices.end(); + ++vit){ + if((*vit)->info() != BORDER){ + tds.delete_vertex(*vit); + } else { + (*vit)->info() = 0; + } + } + } // using a third template parameter for the point instead of getting it from // the traits class as it should be is required by M$VC6 -template -Point -farthest_outside_point(Facet_handle f_handle, std::list& outside_set, +template +typename std::list::iterator +farthest_outside_point(Face_handle f, std::list& outside_set, const Traits& traits) { - typedef typename std::list::iterator Outside_set_iterator; - typename Traits::Plane_3 plane; - get_plane(plane, f_handle); + typedef typename std::list::iterator Outside_set_iterator; CGAL_ch_assertion(!outside_set.empty()); + + typename Traits::Plane_3 plane(f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point()); + typename Traits::Less_signed_distance_to_plane_3 less_dist_to_plane = traits.less_signed_distance_to_plane_3_object(); Outside_set_iterator farthest_it = std::max_element(outside_set.begin(), outside_set.end(), boost::bind(less_dist_to_plane, plane, _1, _2)); - - return *farthest_it; + return farthest_it; } -template -void compute_plane_equation(Facet_handle f) -{ - typedef typename Facet_handle::value_type Facet; - typedef typename Facet::Halfedge_handle Halfedge_handle; - typedef typename Facet::Plane_3 Plane_3; - - Halfedge_handle h = (*f).halfedge(); - (*f).plane() = Plane_3(h->opposite()->vertex()->point(), - h->vertex()->point(), - h->next()->vertex()->point()); -} - - -template -void get_plane(Plane& plane, Facet_handle f) -{ - typedef typename Facet_handle::value_type Facet; - typedef typename Facet::Halfedge_handle Halfedge_handle; - - Halfedge_handle h = (*f).halfedge(); - plane = Plane(h->opposite()->vertex()->point(), - h->vertex()->point(), - h->next()->vertex()->point()); -} - -// using a template for the Unique_hash_map is required by M$VC7 -// using a template for the Point type instead of getting it from -// the traits class as it should be is required by M$VC6 -template +template void -partition_outside_sets(const std::list& new_facets, - std::list& vis_outside_set, - UHM& outside_sets, - std::list& pending_facets, - const Traits& traits) +partition_outside_sets(const std::list& new_facets, + std::list& vis_outside_set, + std::list& pending_facets, + const Traits& traits) { - typedef typename UHM::Data Data; - typedef typename Traits::Plane_3 Plane_3; - typename std::list::const_iterator f_list_it; - typename std::list::iterator point_it; - - typename Traits::Has_on_positive_side_3 has_on_positive_side = - traits.has_on_positive_side_3_object(); - - // walk through all the new facets and check each unassigned outside point - // to see if it belongs to the outside set of this new facet. - for (f_list_it = new_facets.begin(); f_list_it != new_facets.end(); - f_list_it++) - { - Plane_3 plane; - get_plane(plane, *f_list_it); - Data& point_list = outside_sets[(*f_list_it)]; - for (point_it = vis_outside_set.begin(); - point_it != vis_outside_set.end();) - { - if ( has_on_positive_side(plane, *point_it) ) - { - point_list.push_back(*point_it); - point_it = vis_outside_set.erase(point_it); - } - else - point_it++; - } - } - // put all the new facets with non-empty outside sets in the pending facets - // list. - for (f_list_it = new_facets.begin(); f_list_it != new_facets.end(); - f_list_it++) - { - if (!outside_sets[*f_list_it].empty()) - pending_facets.push_back(*f_list_it); - } + typename std::list::const_iterator f_list_it; + typename std::list::iterator point_it, to_splice; + // walk through all the new facets and check each unassigned outside point + // to see if it belongs to the outside set of this new facet. + for (f_list_it = new_facets.begin(); (f_list_it != new_facets.end()) && (! vis_outside_set.empty()); + ++f_list_it) + { + Face_handle f = *f_list_it; + Is_on_positive_side_of_plane_3 is_on_positive_side( + traits,f->vertex(0)->point(),f->vertex(1)->point(),f->vertex(2)->point()); + std::list& point_list = f->points; + + for (point_it = vis_outside_set.begin();point_it != vis_outside_set.end();){ + if( is_on_positive_side(*point_it) ) { + to_splice = point_it; + ++point_it; + point_list.splice(point_list.end(), vis_outside_set, to_splice); + } else { + ++point_it; + } + } + if(! point_list.empty()){ + pending_facets.push_back(f); + f->it = boost::prior(pending_facets.end()); + } else { + f->it = pending_facets.end(); + } + } + + + for (; f_list_it != new_facets.end();++f_list_it) + (*f_list_it)->it = pending_facets.end(); } -template +template void -ch_quickhull_3_scan( - Polyhedron_3& P, - std::list& pending_facets, - CGAL::Unique_hash_map >& outside_sets, - const Traits& traits) +ch_quickhull_3_scan(TDS_2& tds, + std::list& pending_facets, + const Traits& traits) { - typedef Polyhedron_3 Polyhedron; - typedef typename Polyhedron::Halfedge_handle Halfedge_handle; - typedef typename Polyhedron::Halfedge_iterator Halfedge_iterator; - typedef typename Polyhedron::Facet_handle Facet_handle; + typedef typename TDS_2::Edge Edge; + typedef typename TDS_2::Face_circulator Face_circulator; + typedef typename TDS_2::Face_handle Face_handle; + typedef typename TDS_2::Vertex_handle Vertex_handle; typedef typename Traits::Point_3 Point_3; typedef std::list Outside_set; typedef typename std::list::iterator Outside_set_iterator; + typedef std::map Border_edges; - typedef typename CGAL::Unique_hash_map >::Data Data; - - std::list visible_set; - typename std::list::iterator vis_set_it; - Outside_set vis_outside_set; - Halfedge_iterator hole_halfedge; - Halfedge_handle new_pt_halfedge; - + std::list visible_set; + typename std::list::iterator vis_set_it; + Outside_set vis_outside_set; + Border_edges border; while (!pending_facets.empty()) { vis_outside_set.clear(); - Facet_handle f_handle = pending_facets.back(); - pending_facets.pop_back(); - Point_3 farthest_pt = - farthest_outside_point(f_handle, outside_sets[f_handle], traits); -#ifdef CGAL_CH_3_WINDOW_DEBUG - window << CGAL::RED; - window << farthest_pt; - cout << "farthest point is in red" << endl; - char ch; - cin >> ch; - CGAL_ch_assertion(P.is_valid(true)); - window.clear(); -#endif + Face_handle f_handle = pending_facets.front(); + + Outside_set_iterator farthest_pt_it = farthest_outside_point(f_handle, f_handle->points, traits); + Point_3 farthest_pt = *farthest_pt_it; + f_handle->points.erase(farthest_pt_it); + find_visible_set(tds, farthest_pt, f_handle, visible_set, border, traits); - find_visible_set(farthest_pt, f_handle, visible_set, traits); // for each visible facet for (vis_set_it = visible_set.begin(); vis_set_it != visible_set.end(); vis_set_it++) { + // add its outside set to the global outside set list - Data& point_list = outside_sets[*vis_set_it]; - vis_outside_set.splice(vis_outside_set.end(), point_list, point_list.begin(), point_list.end()); - // delete this visible facet - P.erase_facet((*(*vis_set_it)).halfedge()); - } -#ifdef CGAL_CH_3_WINDOW_DEBUG - window << CGAL::RED; - window << farthest_pt; - window << CGAL::BLUE; - window << P; - cout << "farthest point is in red" << endl; - cout << "after erasing visibile facets"; - cin >> ch; -#endif - for (hole_halfedge = P.halfedges_begin(); - hole_halfedge != P.halfedges_end() && !(*hole_halfedge).is_border(); - hole_halfedge++) - {} - CGAL_ch_assertion(hole_halfedge->is_border()); - CGAL_ch_assertion(hole_halfedge->next()->is_border()); - // add a new facet and vertex to the surface. This is the first - // new facet to be added. - new_pt_halfedge = P.add_vertex_and_facet_to_border(hole_halfedge, - (*hole_halfedge).next()); - // associate the farthest point with the new vertex. - (*(*new_pt_halfedge).vertex()).point() = farthest_pt; - CGAL_ch_assertion( !new_pt_halfedge->is_border() ); - CGAL_ch_assertion( new_pt_halfedge->opposite()->is_border() ); - - std::list new_facets; - new_facets.push_back(new_pt_halfedge->facet()); - Halfedge_handle start_hole_halfedge = new_pt_halfedge->opposite()->prev(); - CGAL_ch_assertion( start_hole_halfedge->is_border() ); - CGAL_ch_assertion( start_hole_halfedge->vertex()->point() == farthest_pt); - - // need to move to second next halfedge to get to a point where a - // triangular facet can be created - Halfedge_handle curr_halfedge = start_hole_halfedge->next()->next(); - CGAL_ch_assertion( curr_halfedge->is_border() ); - - Halfedge_handle new_halfedge; - - // now walk around all the border halfedges and add a facet incident to - // each one to connect it to the farthest point - while (curr_halfedge->next() != start_hole_halfedge) - { - new_halfedge = - P.add_facet_to_border(start_hole_halfedge, curr_halfedge); - CGAL_ch_assertion( !new_halfedge->is_border() ); - CGAL_ch_assertion( new_halfedge->opposite()->is_border() ); - new_facets.push_back(new_halfedge->facet()); - - // once the new facet is added curr->next() will be the next halfedge - // on this facet (i.e., not a border halfedge), so the next border - // halfedge will be the one after the opposite of the new halfedge - curr_halfedge = new_halfedge->opposite()->next(); - CGAL_ch_assertion( curr_halfedge->is_border() ); - } - // fill in the last triangular hole with a facet - new_halfedge = P.fill_hole(curr_halfedge); - new_facets.push_back(new_halfedge->facet()); -#ifdef CGAL_CH_3_WINDOW_DEBUG - window << CGAL::BLUE; - window << P; - cout << "after filling hole" << endl; - char c; - cin >> c; - CGAL_ch_assertion(P.is_valid(true)); -#endif - - // now partition the set of outside set points among the new facets. - partition_outside_sets(new_facets, vis_outside_set, outside_sets, - pending_facets, traits); - } - -} - -template -void non_coplanar_quickhull_3(std::list& points, - Polyhedron_3& P, const Traits& traits) -{ - typedef Polyhedron_3 Polyhedron; - - typedef typename Polyhedron::Facet_handle Facet_handle; - typedef typename Polyhedron::Facet_iterator Facet_iterator; - - typedef typename Traits::Point_3 Point_3; - typedef typename Traits::Plane_3 Plane_3; - typedef CGAL::Unique_hash_map > - Outside_set_map; - typedef typename std::list::iterator P3_iterator; - - std::list pending_facets; - - Facet_iterator f_it; - - typename Traits::Has_on_positive_side_3 has_on_positive_side = - traits.has_on_positive_side_3_object(); - - Outside_set_map outside_sets; - - // for each facet, look at each unassigned point and decide if it belongs - // to the outside set of this facet. - - for (f_it = P.facets_begin(); f_it != P.facets_end(); f_it++) - { - Plane_3 plane; - get_plane(plane, f_it); - for (P3_iterator point_it = points.begin() ; point_it != points.end(); ) - { - if ( has_on_positive_side(plane, *point_it) ){ - outside_sets[f_it].push_back(*point_it); - point_it = points.erase(point_it); - } else { - ++point_it; + std::list& point_list = (*vis_set_it)->points; + if(! point_list.empty()){ + vis_outside_set.splice(vis_outside_set.end(), point_list, point_list.begin(), point_list.end()); } - + if((*vis_set_it)->it != pending_facets.end()){ + pending_facets.erase((*vis_set_it)->it); + } + (*vis_set_it)->info() = 0; } + + std::vector edges; + edges.reserve(border.size()); + typename Border_edges::iterator it = border.begin(); + Edge e = it->second; + e.first->info() = 0; + edges.push_back(e); + border.erase(it); + while(! border.empty()){ + it = border.find(e.first->vertex(TDS_2::ccw(e.second))); + assert(it != border.end()); + e = it->second; + e.first->info() = 0; + edges.push_back(e); + border.erase(it); + } + + // If we want to reuse the faces we must only pass |edges| many, and call delete_face for the others. + // Also create facets if necessary + std::ptrdiff_t diff = visible_set.size() - edges.size(); + if(diff < 0){ + for(int i = 0; i<-diff;i++){ + visible_set.push_back(tds.create_face()); + } + } else { + for(int i = 0; ipoint() = farthest_pt; + vh->info() = 0; + + // now partition the set of outside set points among the new facets. + + partition_outside_sets(visible_set, vis_outside_set, + pending_facets, traits); + + } +} + +template +void non_coplanar_quickhull_3(std::list& points, + TDS_2& tds, const Traits& traits) +{ + typedef typename Traits::Point_3 Point_3; + typedef typename Traits::Plane_3 Plane_3; + + typedef typename TDS_2::Vertex_handle Vertex_handle; + typedef typename TDS_2::Face_handle Face_handle; + typedef typename TDS_2::Face_iterator Face_iterator; + typedef typename std::list::iterator P3_iterator; + + std::list pending_facets; + + typename Is_on_positive_side_of_plane_3::Protector p; + + // for each facet, look at each unassigned point and decide if it belongs + // to the outside set of this facet. + for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){ + Is_on_positive_side_of_plane_3 is_on_positive_side( + traits,fit->vertex(0)->point(),fit->vertex(1)->point(),fit->vertex(2)->point() ); + for (P3_iterator point_it = points.begin() ; point_it != points.end(); ) + { + if( is_on_positive_side(*point_it) ) { + P3_iterator to_splice = point_it; + ++point_it; + fit->points.splice(fit->points.end(), points, to_splice); + } else { + ++point_it; + } + } } // add all the facets with non-empty outside sets to the set of facets for // further consideration - for (f_it = P.facets_begin(); f_it != P.facets_end(); f_it++) - if (!outside_sets[f_it].empty()) - pending_facets.push_back(f_it); - ch_quickhull_3_scan(P, pending_facets, outside_sets, traits); + for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){ + if (! fit->points.empty()){ + pending_facets.push_back(fit); + fit->it = boost::prior(pending_facets.end()); + } else { + fit->it = pending_facets.end(); + } + } - CGAL_ch_expensive_postcondition(all_points_inside(points.begin(), - points.end(),P,traits)); - CGAL_ch_postcondition(is_strongly_convex_3(P, traits)); + + ch_quickhull_3_scan(tds, pending_facets, traits); + + //std::cout << "|V(tds)| = " << tds.number_of_vertices() << std::endl; +// CGAL_ch_expensive_postcondition(all_points_inside(points.begin(), +// points.end(),P,traits)); +// CGAL_ch_postcondition(is_strongly_convex_3(P, traits)); } +namespace internal{ + +template +class Build_convex_hull_from_TDS_2 : public CGAL::Modifier_base { + typedef std::map Vertex_map; + + const TDS& t; + template + static unsigned get_vertex_index( Vertex_map& vertex_map, + typename TDS::Vertex_handle vh, + Builder& builder, + unsigned& vindex) + { + std::pair + res=vertex_map.insert(std::make_pair(vh,vindex)); + if (res.second){ + builder.add_vertex(vh->point()); + ++vindex; + } + return res.first->second; + } + +public: + Build_convex_hull_from_TDS_2(const TDS& t_):t(t_) + { + CGAL_assertion(t.dimension()==2); + } + void operator()( HDS& hds) { + // Postcondition: `hds' is a valid polyhedral surface. + typedef typename HDS::Vertex Vertex; + typedef typename Vertex::Point Point; + + CGAL::Polyhedron_incremental_builder_3 B( hds, true); + Vertex_map vertex_map; + //start the surface + B.begin_surface( t.number_of_vertices(), t.number_of_faces()); + unsigned vindex=0; + for (typename TDS::Face_iterator it=t.faces_begin();it!=t.faces_end();++it) + { + unsigned i0=get_vertex_index(vertex_map,it->vertex(0),B,vindex); + unsigned i1=get_vertex_index(vertex_map,it->vertex(1),B,vindex); + unsigned i2=get_vertex_index(vertex_map,it->vertex(2),B,vindex); + B.begin_facet(); + B.add_vertex_to_facet( i0 ); + B.add_vertex_to_facet( i1 ); + B.add_vertex_to_facet( i2 ); + B.end_facet(); + } + B.end_surface(); + } +}; + +} //namespace internal template void @@ -504,6 +674,13 @@ ch_quickhull_polyhedron_3(std::list& points, typedef typename Traits::Plane_3 Plane_3; typedef typename std::list::iterator P3_iterator; + typedef typename Kernel_traits::Kernel R; + typedef Triangulation_data_structure_2< + Triangulation_vertex_base_with_info_2 >, + Convex_hull_face_base_2 > Tds; + typedef typename Tds::Vertex_handle Vertex_handle; + typedef typename Tds::Face_handle Face_handle; + // found three points that are not collinear, so construct the plane defined // by these points and then find a point that has maximum distance from this // plane. @@ -515,7 +692,7 @@ ch_quickhull_polyhedron_3(std::list& points, typename Traits::Coplanar_3 coplanar = traits.coplanar_3_object(); // find both min and max here since using signed distance. If all points - // are on the negative side of ths plane, the max element will be on the + // are on the negative side of the plane, the max element will be on the // plane. std::pair min_max; min_max = CGAL::min_max_element(points.begin(), points.end(), @@ -532,34 +709,45 @@ ch_quickhull_polyhedron_3(std::list& points, } else max_it = min_max.second; -#ifdef CGAL_CH_3_WINDOW_DEBUG - window << CGAL::GREEN; - window << *point1_it; - window << *point2_it; - window << *point3_it; - window << CGAL::RED; - window << *max_it; - char ch; - cin >> ch; -#endif // if the maximum distance point is on the plane then all are coplanar if (coplanar(*point1_it, *point2_it, *point3_it, *max_it)) { coplanar_3_hull(points.begin(), points.end(), plane, P, traits); } else { - P.make_tetrahedron(*point1_it, *point2_it, *point3_it, *max_it); - points.erase(point1_it); - points.erase(point2_it); - points.erase(point3_it); - points.erase(max_it); - if (!points.empty()) - non_coplanar_quickhull_3(points, P, traits); + Tds tds; + Vertex_handle v0 = tds.create_vertex(); v0->set_point(*point1_it); + Vertex_handle v1 = tds.create_vertex(); v1->set_point(*point2_it); + Vertex_handle v2 = tds.create_vertex(); v2->set_point(*point3_it); + Vertex_handle v3 = tds.create_vertex(); v3->set_point(*max_it); + + v0->info() = v1->info() = v2->info() = v3->info() = 0; + Face_handle f0 = tds.create_face(v0,v1,v2); + Face_handle f1 = tds.create_face(v3,v1,v0); + Face_handle f2 = tds.create_face(v3,v2,v1); + Face_handle f3 = tds.create_face(v3,v0,v2); + tds.set_dimension(2); + f0->set_neighbors(f2, f3, f1); + f1->set_neighbors(f0, f3, f2); + f2->set_neighbors(f0, f1, f3); + f3->set_neighbors(f0, f2, f1); + + points.erase(point1_it); + points.erase(point2_it); + points.erase(point3_it); + points.erase(max_it); + if (!points.empty()){ + non_coplanar_quickhull_3(points, tds, traits); + internal::Build_convex_hull_from_TDS_2 builder(tds); + P.delegate(builder); + } + else + P.make_tetrahedron(v0->point(),v1->point(),v2->point(),v3->point()); } - std::transform( P.facets_begin(), P.facets_end(), P.planes_begin(),internal::CH3::Plane_equation()); - } +} } //namespace internal::Convex_hull_3 + template void convex_hull_3(InputIterator first, InputIterator beyond, @@ -643,21 +831,45 @@ convex_hull_3(InputIterator first, InputIterator beyond, return; } - typename Traits::Polyhedron_3 P; - // result will be a polyhedron - ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it, - P, traits); - ch_object = make_object(P); + typename internal::Convex_hull_3::Default_polyhedron_for_Chull_3::type P; + + P3_iterator minx, maxx, miny, it; + minx = maxx = miny = it = points.begin(); + ++it; + for(; it != points.end(); ++it){ + if(it->x() < minx->x()) minx = it; + if(it->x() > maxx->x()) maxx = it; + if(it->y() < miny->y()) miny = it; + } + if(! collinear(*minx, *maxx, *miny) ){ + internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, minx, maxx, miny, P, traits); + } else { + internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it, P, traits); + } + CGAL_assertion(P.size_of_vertices()>=3); + if (boost::next(P.vertices_begin(),3) == P.vertices_end()){ + typedef typename Traits::Triangle_3 Triangle_3; + typename Traits::Construct_triangle_3 construct_triangle = + traits.construct_triangle_3_object(); + Triangle_3 tri = construct_triangle(P.halfedges_begin()->vertex()->point(), + P.halfedges_begin()->next()->vertex()->point(), + P.halfedges_begin()->opposite()->vertex()->point()); + ch_object = make_object(tri); + } + else + ch_object = make_object(P); } + template void convex_hull_3(InputIterator first, InputIterator beyond, Object& ch_object) { typedef typename std::iterator_traits::value_type Point_3; typedef typename Kernel_traits::Kernel K; - convex_hull_3(first, beyond, ch_object, Convex_hull_traits_3()); + typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3::type Traits; + convex_hull_3(first, beyond, ch_object, Traits()); } @@ -703,8 +915,8 @@ void convex_hull_3(InputIterator first, InputIterator beyond, polyhedron.clear(); // result will be a polyhedron - ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it, - polyhedron, traits); + internal::Convex_hull_3::ch_quickhull_polyhedron_3(points, point1_it, point2_it, point3_it, + polyhedron, traits); } @@ -714,8 +926,8 @@ void convex_hull_3(InputIterator first, InputIterator beyond, Polyhedron_3& polyhedron) { typedef typename std::iterator_traits::value_type Point_3; - typedef typename Kernel_traits::Kernel K; - convex_hull_3(first, beyond, polyhedron, Convex_hull_traits_3()); + typedef typename internal::Convex_hull_3::Default_traits_for_Chull_3::type Traits; + convex_hull_3(first, beyond, polyhedron, Traits()); } } // namespace CGAL diff --git a/Convex_hull_3/include/CGAL/convex_hull_3_to_polyhedron_3.h b/Convex_hull_3/include/CGAL/convex_hull_3_to_polyhedron_3.h new file mode 100644 index 00000000000..2bcc402e200 --- /dev/null +++ b/Convex_hull_3/include/CGAL/convex_hull_3_to_polyhedron_3.h @@ -0,0 +1,93 @@ +// Copyright (c) 2011 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Sebastien Loriot +// + +#include + +#ifndef CGAL_CONVEX_HULL_3_TO_POLYHEDRON_3_H +#define CGAL_CONVEX_HULL_3_TO_POLYHEDRON_3_H + +namespace CGAL { + +template +class Convex_hull_modifier_from_triangulation_3 : public CGAL::Modifier_base { + typedef std::map Vertex_map; + + const Triangulation& t; + template + static unsigned get_vertex_index( Vertex_map& vertex_map, + typename Triangulation::Vertex_handle vh, + Builder& builder, + unsigned& vindex) + { + std::pair + res=vertex_map.insert(std::make_pair(vh,vindex)); + if (res.second){ + builder.add_vertex(vh->point()); + ++vindex; + } + return res.first->second; + } + +public: + Convex_hull_modifier_from_triangulation_3(const Triangulation& t_):t(t_) + { + CGAL_assertion(t.dimension()==3); + } + void operator()( HDS& hds) { + // Postcondition: `hds' is a valid polyhedral surface. + typedef typename HDS::Vertex Vertex; + typedef typename Vertex::Point Point; + + CGAL::Polyhedron_incremental_builder_3 B( hds, true); + std::vector ch_facets; + Vertex_map vertex_map; + t.incident_cells(t.infinite_vertex(),std::back_inserter(ch_facets)); + std::size_t nb_facets=ch_facets.size(); + //start the surface + B.begin_surface( nb_facets, nb_facets); + unsigned vindex=0; + for (typename std::vector::const_iterator it= + ch_facets.begin();it!=ch_facets.end();++it) + { + unsigned ifv_index= (*it)->index(t.infinite_vertex()); + bool is_odd=ifv_index%2==0; + unsigned i0=get_vertex_index(vertex_map,(*it)->vertex((ifv_index + (is_odd?3:1) )%4),B,vindex); + unsigned i1=get_vertex_index(vertex_map,(*it)->vertex((ifv_index + 2 )%4),B,vindex); + unsigned i2=get_vertex_index(vertex_map,(*it)->vertex((ifv_index + (is_odd?1:3) )%4),B,vindex); + B.begin_facet(); + B.add_vertex_to_facet( i0 ); + B.add_vertex_to_facet( i1 ); + B.add_vertex_to_facet( i2 ); + B.end_facet(); + } + B.end_surface(); + } +}; + +template +void convex_hull_3_to_polyhedron_3(const Triangulation_3& T,Polyhedron_3& P){ + P.clear(); + Convex_hull_modifier_from_triangulation_3 modifier(T); + P.delegate(modifier); +} + +} //namespace CGAL + +#endif //CGAL_CONVEX_HULL_3_TO_POLYHEDRON_3_H diff --git a/Convex_hull_3/include/CGAL/convex_hull_incremental_3.h b/Convex_hull_3/include/CGAL/convex_hull_incremental_3.h index e80ca9d7236..b24d59891a4 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_incremental_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_incremental_3.h @@ -1,4 +1,4 @@ -// Copyright (c) 2001 Max-Planck-Institute Saarbruecken (Germany). +// Copyright (c) 2001,2011 Max-Planck-Institute Saarbruecken (Germany). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -41,6 +41,7 @@ convex_hull_incremental_3(InputIterator first, InputIterator beyond, ChullType CH(3); for ( ; first != beyond ; ++first) CH.insert(*first); if ( test_correctness ) CGAL_ch_assertion(CH.is_valid()); + P.clear(); CGAL::convex_hull_d_to_polyhedron_3(CH,P); } diff --git a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp new file mode 100644 index 00000000000..a5a1ea0573d --- /dev/null +++ b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include + +#include +#include + +#ifdef CGAL_USE_LEDA +# include +typedef leda_rational Precise_rational; +#elif defined CGAL_USE_GMP +# include +# include +typedef CGAL::Quotient Precise_rational; +#else +# include +# include +typedef CGAL::Quotient Precise_rational; +#endif + +typedef CGAL::Exact_predicates_exact_constructions_kernel EPEC; +typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC; +typedef CGAL::Simple_cartesian SCD; +typedef CGAL::Simple_cartesian SCR; + +using namespace CGAL::internal::Convex_hull_3; + +int main() +{ + BOOST_STATIC_ASSERT( (boost::is_same::type>::value) ); + BOOST_STATIC_ASSERT( (boost::is_same::type>::value) ); + BOOST_STATIC_ASSERT( (boost::is_same::type>::value) ); + BOOST_STATIC_ASSERT( (boost::is_same::type>::value) ); + BOOST_STATIC_ASSERT( (boost::is_same,Default_traits_for_Chull_3::type>::value) ); + BOOST_STATIC_ASSERT( (boost::is_same >::Protector,CGAL::Protect_FPU_rounding >::value) ); + return 0; +} diff --git a/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp b/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp index 187ccc45d2a..9f98304a4c8 100644 --- a/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp +++ b/Convex_hull_3/test/Convex_hull_3/quickhull_degenerate_test_3.cpp @@ -87,6 +87,21 @@ void test_coplanar_yz() assert( CGAL::assign(P, ch_object) ); } +void test_coplanar_triangle(){ + std::list points; + points.push_back(Point_3(0,0,0)); + points.push_back(Point_3(0,4,0)); + points.push_back(Point_3(4,0,0)); + points.push_back(Point_3(1,1,0)); + points.push_back(Point_3(1,2,0)); + points.push_back(Point_3(2,1,0)); + + CGAL::Object ch_object; + CGAL::convex_hull_3(points.begin(), points.end(), ch_object, Traits()); + Triangle_3 T; + assert( CGAL::assign(T, ch_object) ); +} + void test_coplanar_arbitrary() { typedef CGAL::Creator_uniform_3 Creator; @@ -181,6 +196,14 @@ int main() Triangle_3 ch_triangle; assert(CGAL::assign(ch_triangle, ch_object)); + std::cout << "Testing hull of four points " << std::endl; + Point_3 p4(1, 1, 1); + points.push_back(p4); + CGAL::convex_hull_3(points.begin(), points.end(), ch_object, ch_traits); + Polyhedron_3 poly; + assert(CGAL::assign(poly, ch_object)); + assert(poly.size_of_vertices()==4); + std::cout << "Testing hull of collinear points " << std::endl; test_collinear(); @@ -192,6 +215,10 @@ int main() test_coplanar_yz(); std::cout << "Testing hull of points in arbitrary plane " << std::endl; test_coplanar_arbitrary(); + std::cout << "Testing hull of points in arbitrary plane " << std::endl; + test_coplanar_arbitrary(); + std::cout << "Testing hull of coplanar points which convex hull is a triangle " << std::endl; + test_coplanar_triangle(); return 0; } diff --git a/Convex_hull_3/test/Convex_hull_3/quickhull_test_3.cpp b/Convex_hull_3/test/Convex_hull_3/quickhull_test_3.cpp index 1aaa4b8130d..ed6fbaedf50 100644 --- a/Convex_hull_3/test/Convex_hull_3/quickhull_test_3.cpp +++ b/Convex_hull_3/test/Convex_hull_3/quickhull_test_3.cpp @@ -33,6 +33,33 @@ typedef CGAL::Random_points_in_sphere_3 Generator; const unsigned int num = 40; +template +void compute_plane_equation(Facet_handle f) +{ + typedef typename Facet_handle::value_type Facet; + typedef typename Facet::Halfedge_handle Halfedge_handle; + typedef typename Facet::Plane_3 Plane_3; + + Halfedge_handle h = (*f).halfedge(); + (*f).plane() = Plane_3(h->opposite()->vertex()->point(), + h->vertex()->point(), + h->next()->vertex()->point()); +} + + +template +void get_plane(Plane& plane, Facet_handle f) +{ + typedef typename Facet_handle::value_type Facet; + typedef typename Facet::Halfedge_handle Halfedge_handle; + + Halfedge_handle h = (*f).halfedge(); + plane = Plane(h->opposite()->vertex()->point(), + h->vertex()->point(), + h->next()->vertex()->point()); +} + + void test_tetrahedron_convexity() { Polyhedron_3 P; @@ -45,7 +72,7 @@ void test_tetrahedron_convexity() for( Polyhedron_3::Facet_iterator f = P.facets_begin(); f != P.facets_end(); ++f ) { - CGAL::compute_plane_equation(f); + compute_plane_equation(f); } assert( CGAL::is_strongly_convex_3(P) ); @@ -62,7 +89,7 @@ void test_triangle_convexity() for( Polyhedron_3::Facet_iterator f = P.facets_begin(); f != P.facets_end(); ++f ) { - CGAL::compute_plane_equation(f); + compute_plane_equation(f); } assert( CGAL::is_strongly_convex_3(P) ); diff --git a/Convex_hull_d/doc_tex/Convex_hull_d/PkgDescription.tex b/Convex_hull_d/doc_tex/Convex_hull_d/PkgDescription.tex index bd7afdbc972..bf9edd3dfbd 100644 --- a/Convex_hull_d/doc_tex/Convex_hull_d/PkgDescription.tex +++ b/Convex_hull_d/doc_tex/Convex_hull_d/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{dD Convex Hulls and Delaunay Triangulations\label{Pkg:ConvexHullD}} -\ccPkgHowToCiteCgal{cgal:hs-chdt3-11} +\ccPkgHowToCiteCgal{cgal:hs-chdt3-11b} \ccPkgSummary{This package provides functions for computing convex hulls and Delaunay triangulations in $d$-dimensional Euclidean space.} diff --git a/Core/include/CGAL/CORE/Expr.h b/Core/include/CGAL/CORE/Expr.h index d10dbe13292..e71cd102e8a 100644 --- a/Core/include/CGAL/CORE/Expr.h +++ b/Core/include/CGAL/CORE/Expr.h @@ -74,7 +74,7 @@ public: */ Expr(float f) : RCExpr(NULL) { // check for valid numbers // (i.e., not infinite and not NaN) - if (!finite(f)) { + if (! CGAL_CORE_finite(f)) { std::cerr << " ERROR : constructed an invalid float! " << std::endl; if (AbortFlag) abort(); @@ -85,7 +85,7 @@ public: /// constructor for double Expr(double d) : RCExpr(NULL) { // check for valid numbers // (i.e., not infinite and not NaN) - if (!finite(d)) { + if (! CGAL_CORE_finite(d)) { std::cerr << " ERROR : constructed an invalid double! " << std::endl; if (AbortFlag) abort(); diff --git a/Core/include/CGAL/CORE/Filter.h b/Core/include/CGAL/CORE/Filter.h index d0142504e6a..e5c02227d70 100644 --- a/Core/include/CGAL/CORE/Filter.h +++ b/Core/include/CGAL/CORE/Filter.h @@ -42,10 +42,12 @@ #include #if !defined CGAL_CFG_NO_CPP0X_ISFINITE - #define finite(x) std::isfinite(x) + #define CGAL_CORE_finite(x) std::isfinite(x) #elif defined (_MSC_VER) || defined (__MINGW32__) // add support for MinGW - #define finite(x) _finite(x) + #define CGAL_CORE_finite(x) _finite(x) #define ilogb(x) (int)_logb(x) +#else + #define CGAL_CORE_finite(x) finite(x) #endif #if defined(sun) || defined(__sun) @@ -100,7 +102,7 @@ public: /// check whether the sign (!) of the filtered value is OK bool isOK() const { return (fpFilterFlag && // To disable filter - finite(fpVal) && // Test for infinite and NaNs + CGAL_CORE_finite(fpVal) && // Test for infinite and NaNs (core_abs(fpVal) >= maxAbs*ind*CORE_EPS)); } /// return the sign of fitered value. diff --git a/Core/src/CGALCore/Expr.cpp b/Core/src/CGALCore/Expr.cpp index b5f35634a92..368f6a3eeb3 100644 --- a/Core/src/CGALCore/Expr.cpp +++ b/Core/src/CGALCore/Expr.cpp @@ -75,7 +75,7 @@ const Expr& Expr::getOne() { // void Expr::doubleInterval(double & lb, double & ub) const { double d = doubleValue(); - if (!finite(d)) { // if overflow, underflow or NaN + if (! CGAL_CORE_finite(d)) { // if overflow, underflow or NaN lb = ub = d; return; } diff --git a/Distance_2/test/Distance_2/test_distance_2.cpp b/Distance_2/test/Distance_2/test_distance_2.cpp index aeb59c983f8..d9eba7d1899 100644 --- a/Distance_2/test/Distance_2/test_distance_2.cpp +++ b/Distance_2/test/Distance_2/test_distance_2.cpp @@ -1,5 +1,9 @@ // 2D distance tests. +#ifdef NDEBUG +#undef NDEBUG //this testsuite requires NDEBUG to be not defined +#endif + #include #include #include @@ -15,10 +19,6 @@ #include #include -#ifdef NDEBUG -# error The test-suite needs no NDEBUG defined -#endif - const double epsilon = 0.001; struct randomint { diff --git a/Distance_3/test/Distance_3/test_distance_3.cpp b/Distance_3/test/Distance_3/test_distance_3.cpp index c34b6306055..c6d8c6581b8 100644 --- a/Distance_3/test/Distance_3/test_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_distance_3.cpp @@ -1,5 +1,9 @@ // 3D distance tests. +#ifdef NDEBUG +#undef NDEBUG //this testsuite requires NDEBUG to be not defined +#endif + #include #include #include @@ -15,10 +19,6 @@ #include #include -#ifdef NDEBUG -# error The test-suite needs no NDEBUG defined -#endif - const double epsilon = 0.001; struct randomint { diff --git a/Envelope_2/doc_tex/Envelope_2/PkgDescription.tex b/Envelope_2/doc_tex/Envelope_2/PkgDescription.tex index 9c8462e2761..544af95212f 100644 --- a/Envelope_2/doc_tex/Envelope_2/PkgDescription.tex +++ b/Envelope_2/doc_tex/Envelope_2/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{2D Envelopes\label{Pkg:Envelope2}} -\ccPkgHowToCiteCgal{cgal:w-e2-11} +\ccPkgHowToCiteCgal{cgal:w-e2-11b} \ccPkgSummary{ This package consits of functions that computes the lower (or upper) envelope of a set of arbitrary curves in 2D. The output is diff --git a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h index 40d4dde61a9..febfa69a511 100644 --- a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h +++ b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h @@ -491,7 +491,7 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, { // Compare the relative position of the curves at x boundary. return (traits->compare_y_near_boundary_2_object() - (xcv1, xcv2, curve_end)); + (xcv1, xcv2, curve_end)); } // Check if the left end of xcv2 lies at y boundary. @@ -549,21 +549,21 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, // we readily know their relative position (recall that they do not // instersect). if (ps_y1 == ARR_BOTTOM_BOUNDARY && ps_y2 == ARR_TOP_BOUNDARY) - return (SMALLER); + return (SMALLER); else if (ps_y1 == ARR_TOP_BOUNDARY && ps_y2 == ARR_BOTTOM_BOUNDARY) - return (LARGER); + return (LARGER); // Both curves have vertical asymptotes with the same sign in y. // Check which asymptote is the rightmost. Note that in this case // the vertical asymptotes cannot be equal. - l_res = traits->compare_x_curve_ends_2_object() - (xcv1, curve_end, xcv2, curve_end); + l_res = traits->compare_x_near_boundary_2_object() + (xcv1, curve_end, xcv2, curve_end); CGAL_assertion (l_res != EQUAL); if (ps_y1 == ARR_TOP_BOUNDARY) - return (l_res); + return (l_res); else - return CGAL::opposite(l_res); + return CGAL::opposite(l_res); } // xcv1 has a vertical asymptote and xcv2 has a normal left endpoint. @@ -571,7 +571,7 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, const Point_2& left2 = (curve_end == ARR_MIN_END) ? min_vertex(xcv2) : max_vertex(xcv2); - l_res = traits->compare_x_point_curve_end_2_object() + l_res = traits->compare_x_near_boundary_2_object() (left2, xcv1, curve_end); if (l_res == LARGER) @@ -584,9 +584,9 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, else { if (ps_y1 == ARR_BOTTOM_BOUNDARY) - return (SMALLER); // xcv1 is obviously below xcv2. + return (SMALLER); // xcv1 is obviously below xcv2. else - return (LARGER); // xcv2 is obviously above xcv1. + return (LARGER); // xcv2 is obviously above xcv1. } } else if (ps_y2 != ARR_INTERIOR) @@ -596,7 +596,7 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, const Point_2& left1 = (curve_end == ARR_MIN_END) ? min_vertex(xcv1) : max_vertex(xcv1); - l_res = traits->compare_x_point_curve_end_2_object() + l_res = traits->compare_x_near_boundary_2_object() (left1, xcv2, curve_end); if (l_res == LARGER) diff --git a/Envelope_3/doc_tex/Envelope_3/PkgDescription.tex b/Envelope_3/doc_tex/Envelope_3/PkgDescription.tex index 676d2d991de..089d6f71632 100644 --- a/Envelope_3/doc_tex/Envelope_3/PkgDescription.tex +++ b/Envelope_3/doc_tex/Envelope_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{3D Envelopes\label{Pkg:Envelope3}} -\ccPkgHowToCiteCgal{cgal:mwz-e3-11} +\ccPkgHowToCiteCgal{cgal:mwz-e3-11b} \ccPkgSummary{ This package consits of functions that compute the lower (or upper) envelope of a set of arbitrary surfaces in 3D. The output is diff --git a/Envelope_3/include/CGAL/Env_plane_traits_3.h b/Envelope_3/include/CGAL/Env_plane_traits_3.h index bd69dddc9b8..55cdd1ba699 100644 --- a/Envelope_3/include/CGAL/Env_plane_traits_3.h +++ b/Envelope_3/include/CGAL/Env_plane_traits_3.h @@ -54,10 +54,10 @@ public: typedef typename Kernel::Object_3 Object_3; typedef std::pair Intersection_curve; - typedef typename Base::Left_side_category Left_side_category; - typedef typename Base::Bottom_side_category Bottom_side_category; - typedef typename Base::Top_side_category Top_side_category; - typedef typename Base::Right_side_category Right_side_category; + typedef typename Base::Arr_left_side_category Arr_left_side_category; + typedef typename Base::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Base::Arr_top_side_category Arr_top_side_category; + typedef typename Base::Arr_right_side_category Arr_right_side_category; class Is_vertical_3 { diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h index b4f76202b4b..c503e4e6955 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h @@ -2154,10 +2154,10 @@ protected: typedef typename Minimization_diagram_2::Ccb_halfedge_circulator Ccb_halfedge_circulator; - typedef typename Traits::Left_side_category Left_side_category; - typedef typename Traits::Right_side_category Right_side_category; - typedef typename Traits::Top_side_category Top_side_category; - typedef typename Traits::Bottom_side_category Bottom_side_category; + typedef typename Traits::Arr_left_side_category Arr_left_side_category; + typedef typename Traits::Arr_right_side_category Arr_right_side_category; + typedef typename Traits::Arr_top_side_category Arr_top_side_category; + typedef typename Traits::Arr_bottom_side_category Arr_bottom_side_category; Copy_observer(Minimization_diagram_2& small_, Minimization_diagram_2& big, @@ -2210,17 +2210,17 @@ protected: // This is the case of create boundary vertex. CGAL_assertion((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR)); - if (ps_x == ARR_LEFT_BOUNDARY && !is_bounded_impl(Left_side_category())) + if (ps_x == ARR_LEFT_BOUNDARY && !is_bounded_impl(Arr_left_side_category())) return false; - if (ps_x == ARR_RIGHT_BOUNDARY && !is_bounded_impl(Right_side_category())) + if (ps_x == ARR_RIGHT_BOUNDARY && !is_bounded_impl(Arr_right_side_category())) return false; - if (ps_y == ARR_TOP_BOUNDARY && !is_bounded_impl(Top_side_category())) + if (ps_y == ARR_TOP_BOUNDARY && !is_bounded_impl(Arr_top_side_category())) return false; if (ps_y == ARR_BOTTOM_BOUNDARY && - !is_bounded_impl(Bottom_side_category())) + !is_bounded_impl(Arr_bottom_side_category())) return false; return true; diff --git a/Generator/doc_tex/Generator/PkgDescription.tex b/Generator/doc_tex/Generator/PkgDescription.tex index 775f51d261a..3a1f8854ae1 100644 --- a/Generator/doc_tex/Generator/PkgDescription.tex +++ b/Generator/doc_tex/Generator/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Geometric Object Generators\label{Pkg:Generators}} -\ccPkgHowToCiteCgal{cgal:hhk-gog-11} +\ccPkgHowToCiteCgal{cgal:hhk-gog-11b} \ccPkgSummary{This package provides a variety of generators for geometric objects. They are useful as synthetic test data sets, e.g.~for testing diff --git a/Geomview/demo/Geomview/CMakeLists.txt b/Geomview/demo/Geomview/CMakeLists.txt index fdb18029be6..1e75a7a3843 100644 --- a/Geomview/demo/Geomview/CMakeLists.txt +++ b/Geomview/demo/Geomview/CMakeLists.txt @@ -23,7 +23,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "input.cpp" ) create_single_source_cgal_program( "kernel.cpp" ) - create_single_source_cgal_program( "terrain.cpp" ) + create_single_source_cgal_program( "gv_terrain.cpp" ) else() diff --git a/Geomview/doc_tex/Geomview/PkgDescription.tex b/Geomview/doc_tex/Geomview/PkgDescription.tex index 1fb9fe02792..2ddd479a69b 100644 --- a/Geomview/doc_tex/Geomview/PkgDescription.tex +++ b/Geomview/doc_tex/Geomview/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Geomview\label{Pkg:Geomview}} -\ccPkgHowToCiteCgal{cgal:fp-gv-11} +\ccPkgHowToCiteCgal{cgal:fp-gv-11b} \ccPkgSummary{ This package implements an interface to Geomview, an interactive 3D viewing program, diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h index 1e6f3aa3fe1..9d27c843144 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h @@ -50,10 +50,10 @@ public: typedef typename Kernel::Direction_2 Direction_2; typedef std::pair Intersection_curve; - typedef typename Base::Left_side_category Left_side_category; - typedef typename Base::Bottom_side_category Bottom_side_category; - typedef typename Base::Top_side_category Top_side_category; - typedef typename Base::Right_side_category Right_side_category; + typedef typename Base::Arr_left_side_category Arr_left_side_category; + typedef typename Base::Arr_bottom_side_category Arr_bottom_side_category; + typedef typename Base::Arr_top_side_category Arr_top_side_category; + typedef typename Base::Arr_right_side_category Arr_right_side_category; typedef Point_2 Xy_monotone_surface_3; typedef Point_2 Surface_3; diff --git a/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex b/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex index 332c4b12d9f..551afa1e8d1 100644 --- a/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex +++ b/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{CGAL and the Qt Graphics View Framework \label{Pkg:GraphicsView}} -\ccPkgHowToCiteCgal{cgal:fr-cqgvf-11} +\ccPkgHowToCiteCgal{cgal:fr-cqgvf-11b} \ccPkgSummary{This package provides classes for displaying \cgal\ objects and data structures in the \ccAnchor{http://doc.qt.nokia.com/latest/graphicsview.html}{Qt 4 Graphics View Framework}.} diff --git a/GraphicsView/include/CGAL/Qt/AlphaShapeGraphicsItem.h b/GraphicsView/include/CGAL/Qt/AlphaShapeGraphicsItem.h index 7fad0319670..6debfeb9496 100644 --- a/GraphicsView/include/CGAL/Qt/AlphaShapeGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/AlphaShapeGraphicsItem.h @@ -277,7 +277,7 @@ AlphaShapeGraphicsItem::paintVertex(typename T::Vertex_handle vh) template void AlphaShapeGraphicsItem::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { painter->setPen(this->edgesPen()); diff --git a/GraphicsView/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h b/GraphicsView/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h index 3d9d1ee534b..7533d5c1931 100644 --- a/GraphicsView/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/ApolloniusGraphGraphicsItem.h @@ -99,7 +99,7 @@ ApolloniusGraphGraphicsItem::boundingRect() const template void -ApolloniusGraphGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget */*w*/) +ApolloniusGraphGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * /*w*/) { painter->setPen(this->sitesPen()); diff --git a/GraphicsView/include/CGAL/Qt/CircularArcGraphicsItem.h b/GraphicsView/include/CGAL/Qt/CircularArcGraphicsItem.h index f6754ae8061..ad2c95baf61 100644 --- a/GraphicsView/include/CGAL/Qt/CircularArcGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/CircularArcGraphicsItem.h @@ -123,7 +123,7 @@ CircularArcGraphicsItem::boundingRect() const template void CircularArcGraphicsItem::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { painter->setPen(this->edgesPen()); diff --git a/GraphicsView/include/CGAL/Qt/LineGraphicsItem.h b/GraphicsView/include/CGAL/Qt/LineGraphicsItem.h index e0aba5d7e7b..c01e7bb16fc 100644 --- a/GraphicsView/include/CGAL/Qt/LineGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/LineGraphicsItem.h @@ -112,7 +112,7 @@ LineGraphicsItem::boundingRect() const template void LineGraphicsItem::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { painter->setPen(this->Pen()); diff --git a/GraphicsView/include/CGAL/Qt/PointsGraphicsItem.h b/GraphicsView/include/CGAL/Qt/PointsGraphicsItem.h index 189591b1393..a49ea519356 100644 --- a/GraphicsView/include/CGAL/Qt/PointsGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/PointsGraphicsItem.h @@ -112,7 +112,7 @@ PointsGraphicsItem

::boundingRect() const template void PointsGraphicsItem

::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { if(drawVertices()) { diff --git a/GraphicsView/include/CGAL/Qt/PolygonGraphicsItem.h b/GraphicsView/include/CGAL/Qt/PolygonGraphicsItem.h index 0b8c47a9dd6..f17b1fda5bf 100644 --- a/GraphicsView/include/CGAL/Qt/PolygonGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/PolygonGraphicsItem.h @@ -131,7 +131,7 @@ PolygonGraphicsItem

::boundingRect() const template void PolygonGraphicsItem

::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { painter->setPen(this->edgesPen()); diff --git a/GraphicsView/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h b/GraphicsView/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h index e6806f5e9fc..8c81797f3c8 100644 --- a/GraphicsView/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/PolygonWithHolesGraphicsItem.h @@ -135,7 +135,7 @@ PolygonWithHolesGraphicsItem

::boundingRect() const template void PolygonWithHolesGraphicsItem

::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { Converter convert; diff --git a/GraphicsView/include/CGAL/Qt/PolylinesGraphicsItem.h b/GraphicsView/include/CGAL/Qt/PolylinesGraphicsItem.h index 263df5e8738..6cda9b46e1f 100644 --- a/GraphicsView/include/CGAL/Qt/PolylinesGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/PolylinesGraphicsItem.h @@ -124,7 +124,7 @@ PolylinesGraphicsItem

::boundingRect() const template void PolylinesGraphicsItem

::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { diff --git a/GraphicsView/include/CGAL/Qt/PowerdiagramGraphicsItem.h b/GraphicsView/include/CGAL/Qt/PowerdiagramGraphicsItem.h index 2d13537b9c4..53e480a03d5 100644 --- a/GraphicsView/include/CGAL/Qt/PowerdiagramGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/PowerdiagramGraphicsItem.h @@ -99,7 +99,7 @@ PowerdiagramGraphicsItem::boundingRect() const template void -PowerdiagramGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget */*w*/) +PowerdiagramGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * /*w*/) { QRectF rect = option->exposedRect; PainterOstream pos(painter, rect); diff --git a/GraphicsView/include/CGAL/Qt/RegularGridGraphicsItem.h b/GraphicsView/include/CGAL/Qt/RegularGridGraphicsItem.h index a8f4ebf84b7..bd06694ce74 100644 --- a/GraphicsView/include/CGAL/Qt/RegularGridGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/RegularGridGraphicsItem.h @@ -141,7 +141,7 @@ QRectF template void RegularGridGraphicsItem::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { QRectF rect = boundingRect(); diff --git a/GraphicsView/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h b/GraphicsView/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h index c064dd82f46..09075b056f2 100644 --- a/GraphicsView/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/RegularGridVectorFieldGraphicsItem.h @@ -136,7 +136,7 @@ QRectF template void RegularGridVectorFieldGraphicsItem::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { diff --git a/GraphicsView/include/CGAL/Qt/RegularTriangulationGraphicsItem.h b/GraphicsView/include/CGAL/Qt/RegularTriangulationGraphicsItem.h index 93ebdad90a8..4c3d9337a47 100644 --- a/GraphicsView/include/CGAL/Qt/RegularTriangulationGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/RegularTriangulationGraphicsItem.h @@ -232,7 +232,7 @@ RegularTriangulationGraphicsItem::paintOneVertex(const typename T::Point& poi template void RegularTriangulationGraphicsItem::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { painter->setPen(this->edgesPen()); diff --git a/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h b/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h index e8ccc4395b8..7578139a9e0 100644 --- a/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/SegmentDelaunayGraphGraphicsItem.h @@ -113,7 +113,7 @@ protected: template void -SegmentDelaunayGraphGraphicsItem::drawDualEdge(QPainter */*painter*/, typename T::Edge e) +SegmentDelaunayGraphGraphicsItem::drawDualEdge(QPainter * /*painter*/, typename T::Edge e) { CGAL_precondition( ! t->is_infinite(e) ); diff --git a/GraphicsView/include/CGAL/Qt/SegmentsGraphicsItem.h b/GraphicsView/include/CGAL/Qt/SegmentsGraphicsItem.h index 53799fad451..83bd51bac49 100644 --- a/GraphicsView/include/CGAL/Qt/SegmentsGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/SegmentsGraphicsItem.h @@ -112,7 +112,7 @@ SegmentsGraphicsItem

::boundingRect() const template void SegmentsGraphicsItem

::paint(QPainter *painter, - const QStyleOptionGraphicsItem */*option*/, + const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) { diff --git a/GraphicsView/include/CGAL/Qt/StreamLinesGraphicsItem.h b/GraphicsView/include/CGAL/Qt/StreamLinesGraphicsItem.h index f754199416f..3727eab0916 100644 --- a/GraphicsView/include/CGAL/Qt/StreamLinesGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/StreamLinesGraphicsItem.h @@ -95,7 +95,7 @@ StreamLinesGraphicsItem::boundingRect() const template void -StreamLinesGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget */*w*/) +StreamLinesGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * /*w*/) { painter->setPen(this->edgesPen()); QRectF rect = option->exposedRect; diff --git a/GraphicsView/include/CGAL/Qt/VoronoiGraphicsItem.h b/GraphicsView/include/CGAL/Qt/VoronoiGraphicsItem.h index 740b38b7309..231af0b6c0f 100644 --- a/GraphicsView/include/CGAL/Qt/VoronoiGraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/VoronoiGraphicsItem.h @@ -91,7 +91,7 @@ VoronoiGraphicsItem

::boundingRect() const template void -VoronoiGraphicsItem
::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget */*w*/) +VoronoiGraphicsItem
::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * /*w*/) { QRectF rect = option->exposedRect; PainterOstream pos(painter, rect); diff --git a/HalfedgeDS/doc_tex/HalfedgeDS/PkgDescription.tex b/HalfedgeDS/doc_tex/HalfedgeDS/PkgDescription.tex index 261152bf0b9..e70e2ea67c3 100644 --- a/HalfedgeDS/doc_tex/HalfedgeDS/PkgDescription.tex +++ b/HalfedgeDS/doc_tex/HalfedgeDS/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Halfedge Data Structures \label{Pkg:HDS}} -\ccPkgHowToCiteCgal{cgal:k-hds-11} +\ccPkgHowToCiteCgal{cgal:k-hds-11b} \ccPkgSummary{A halfedge data structure is an edge-centered data structure capable of maintaining incidence information of vertices, edges and faces, for example for planar maps, polyhedra, or other orientable, diff --git a/HalfedgeDS/doc_tex/HalfedgeDS_ref/HalfedgeDS.tex b/HalfedgeDS/doc_tex/HalfedgeDS_ref/HalfedgeDS.tex index d6ff3e568e4..091d09732f8 100644 --- a/HalfedgeDS/doc_tex/HalfedgeDS_ref/HalfedgeDS.tex +++ b/HalfedgeDS/doc_tex/HalfedgeDS_ref/HalfedgeDS.tex @@ -115,7 +115,7 @@ and their meaning are mandatory. We distinguish between the template \ccc{Traits} is a traits class that will be passed to the item types in \ccc{Items}. It will not be used in \ccRefName\ itself. \ccc{Items} is a model of the \ccc{HalfedgeDSItems} concept. -\ccc{Alloc} is a standard allocator that fulfills all requirements +\ccc{Alloc} is an allocator that fulfills all requirements of allocators for \stl\ container classes. The \ccc{rebind} mechanism from \ccc{Alloc} will be used to create appropriate allocators internally. A default argument is mandatory for diff --git a/Installation/changes.html b/Installation/changes.html index ac6d049fffa..f4662056130 100644 --- a/Installation/changes.html +++ b/Installation/changes.html @@ -130,30 +130,35 @@ CGAL 3.9 offers the following improvements and new functionality :

  • Using a property map, sorting on keys instead of points is now easier
  • +

    dD Spatial Searching (major new feature added)

    +
      +
    • A traits-class and distance adapter that together with a point property map, + allow to make nearest neighbor queries on keys instead of points have been added.
    • +
    • Few bug fixes in the documentation have revealed some inconsistencies + that have been corrected. Two traits class concept are now documented (RangeSearchTraits + and SearchTraits). Most other changes concerns only classes documented as advanced. + One issue that user can encounter is due to an additional requirement on the nested + class Construct_cartesian_const_iterator_d defined in the concept SearchTraits that must + provide a nested type result_type.
    • +
    + +

    3D Convex Hull (major performance improvement)

    +
      +
    • The quickhull implementation of CGAL (CGAL::convex_hull_3) + has been worked out to provide very better performances.
    • +
    • The function CGAL::convex_hull_3 no longer computes the plane + equations of the facets of the output polyhedron. However an example is + provided to show how to compute them easily.
    • +
    • A global function convex_hull_3_to_polyhedron_3 is now provided to extract + the convex hull of a 3D points set from a triangulation of these points.
    • +
    +

    dD Kernel

    • The d-dimensional kernel concept and models have been modified to additionally provide two new functors Less_coordinate_d and Point_dimension_d.
    -

    2D Arrangements

    -
      -
    • A new geometry-traits class that handles rational arcs, namely - Arr_rational_function_traits_2, has been introduced. - It replaced an old traits class, which handled the same family of - curves, but it was less efficient. The new traits exploits CGAL - algebraic kernels and polynomials, which were not available at - the time the old traits class was developed.
    • -
    • A new geometry traits concept called - ArrangementOpenBoundaryTraits_2 has been introduced. - A model of this concept suports curves that approach the open - boundary of an iso-rectangular area called parameter space, which can - be unbounded or bounded. The general code of the package, however, - supports only the unbounded parameter space. We intend to enhance the - general code to support also bounded parameter spaces in a future - release.
    • -
    -

    Release 3.8

    Release date: April 2011

    @@ -291,30 +296,6 @@ CGAL 3.8 offers the following improvements and new functionality :

  • Fix several bugs in the traits class Arr_Bezier_curve_traits_2 for arrangement of Bezier curves. - - - -

    Arrangements

    - -

    2D Arrangements

    -
      -
    • The deprecated member function is_at_infinity() of - Arrangement_2::Vertex has been removed. It has been previously - replaced new function is_at_open_boundary(). - -
    • The tags in the geometry traits that indicate the type of boundary of - the embedding surface were replaced by the following new tags: - Left_side_category - Bottom_side_category - Top_side_category - Right_side_category - It is still possible not to indicate the tags at all. Default values are assumed. This however will - produce warning messages, and should be avoided.
    • - -
    - - -

    2D Minkowski Sums

    • A bug in the convolution method was fixed. diff --git a/Installation/cmake/modules/FindQGLViewer.cmake b/Installation/cmake/modules/FindQGLViewer.cmake index 9fc8955902b..65723d675cc 100644 --- a/Installation/cmake/modules/FindQGLViewer.cmake +++ b/Installation/cmake/modules/FindQGLViewer.cmake @@ -25,7 +25,7 @@ find_library(QGLVIEWER_LIBRARY_RELEASE ) find_library(QGLVIEWER_LIBRARY_DEBUG - NAMES dqglviewer dQGLViewer dQGLViewer2 + NAMES dqglviewer dQGLViewer dQGLViewer2 QGLViewerd2 PATHS /usr/lib /usr/local/lib ENV QGLVIEWERROOT diff --git a/Installation/doc_tex/Installation/PkgDescription.tex b/Installation/doc_tex/Installation/PkgDescription.tex index 173c79f3882..aab7330fd07 100644 --- a/Installation/doc_tex/Installation/PkgDescription.tex +++ b/Installation/doc_tex/Installation/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Installation\label{Pkg:Installation}} -\ccPkgHowToCiteCgal{cgal:cr-i-11} +\ccPkgHowToCiteCgal{cgal:cr-i-11b} \ccPkgSummary{ This chapter describes how to install \cgal, and lists the third party libraries on which \cgal\ depends, or for which \cgal\ provides interfaces. diff --git a/Installation/doc_tex/Installation/installation.tex b/Installation/doc_tex/Installation/installation.tex index c264ba396ef..fa4a01f4f51 100644 --- a/Installation/doc_tex/Installation/installation.tex +++ b/Installation/doc_tex/Installation/installation.tex @@ -30,7 +30,7 @@ %% macro for Microsoft Visual C++ \newcommand{\msvc}[1]{\textsc{MS}~Visual~\texttt{C++}~{\rm #1}} -\newcommand{\msvcurl}{\path'http://msdn.microsoft.com/visualc/'} +\newcommand{\msvcurl}{\path'http://msdn.microsoft.com/en-us/visualc/'} %% macro for Intel C++ Compiler \newcommand{\icl}[1]{\textsc{Intel}~\texttt{C++}~{\rm #1}} diff --git a/Interpolation/doc_tex/Interpolation/PkgDescription.tex b/Interpolation/doc_tex/Interpolation/PkgDescription.tex index 85e2041a64b..3641d2c9133 100644 --- a/Interpolation/doc_tex/Interpolation/PkgDescription.tex +++ b/Interpolation/doc_tex/Interpolation/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D and Surface Function Interpolation\label{Pkg:Interpolation2}} -\ccPkgHowToCiteCgal{cgal:f-i-11} +\ccPkgHowToCiteCgal{cgal:f-i-11b} \ccPkgSummary{ This package implements different methods for scattered data interpolation: Given measures of a function on a set of discrete data diff --git a/Intersections_3/include/CGAL/Triangle_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Triangle_3_Segment_3_do_intersect.h index 10f2e9924e1..bd101ba6cf1 100644 --- a/Intersections_3/include/CGAL/Triangle_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Triangle_3_Segment_3_do_intersect.h @@ -25,6 +25,12 @@ namespace CGAL { namespace internal { +template +bool do_intersect_coplanar( const typename K::Point_3& A, + const typename K::Point_3& B, + const typename K::Point_3& C, + const typename K::Point_3 & p, + const typename K::Point_3 & q, const K & k ); template bool do_intersect_coplanar(const typename K::Triangle_3 &t, @@ -44,10 +50,6 @@ bool do_intersect_coplanar(const typename K::Triangle_3 &t, typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); - typename K::Coplanar_orientation_3 coplanar_orientation = - k.coplanar_orientation_3_object(); - - const Point_3 & p = point_on(s,0); const Point_3 & q = point_on(s,1); @@ -55,7 +57,22 @@ bool do_intersect_coplanar(const typename K::Triangle_3 &t, const Point_3 & B = vertex_on(t,1); const Point_3 & C = vertex_on(t,2); + return do_intersect_coplanar(A,B,C,p,q,k); +} + +template +bool do_intersect_coplanar( const typename K::Point_3& A, + const typename K::Point_3& B, + const typename K::Point_3& C, + const typename K::Point_3 & p, + const typename K::Point_3 & q, const K & k ) +{ + typedef typename K::Point_3 Point_3; + + typename K::Coplanar_orientation_3 coplanar_orientation = + k.coplanar_orientation_3_object(); + const Point_3 * a = &A; const Point_3 * b = &B; const Point_3 * c = &C; diff --git a/Interval_skip_list/doc_tex/Interval_skip_list/PkgDescription.tex b/Interval_skip_list/doc_tex/Interval_skip_list/PkgDescription.tex index 28bedf23ec2..3ff37313681 100644 --- a/Interval_skip_list/doc_tex/Interval_skip_list/PkgDescription.tex +++ b/Interval_skip_list/doc_tex/Interval_skip_list/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Interval Skip List\label{Pkg:IntervalSkipList}} -\ccPkgHowToCiteCgal{cgal:f-isl-11} +\ccPkgHowToCiteCgal{cgal:f-isl-11b} \ccPkgSummary{An interval skip list is a data structure for finding all intervals that contain a point, and for stabbing queries, that is for answering the question whether a given point is contained in an diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex index cf60176fbc3..b73cb366842 100644 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex +++ b/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Estimation of Local Differential Properties \label{Pkg:Jet_fitting_3}} -\ccPkgHowToCiteCgal{cgal:pc-eldp-11} +\ccPkgHowToCiteCgal{cgal:pc-eldp-11b} \ccPkgSummary{For a surface discretized as a point cloud or a mesh, it is desirable to estimate pointwise differential quantities. More diff --git a/Kernel_d/doc_tex/Kernel_d/PkgDescription.tex b/Kernel_d/doc_tex/Kernel_d/PkgDescription.tex index 5224e3375ca..5f69ab91fa8 100644 --- a/Kernel_d/doc_tex/Kernel_d/PkgDescription.tex +++ b/Kernel_d/doc_tex/Kernel_d/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{dD Geometry Kernel\label{Pkg:KernelD}} -\ccPkgHowToCiteCgal{cgal:s-gkd-11} +\ccPkgHowToCiteCgal{cgal:s-gkd-11b} \ccPkgSummary{The dD Kernel contains objects of constant size, such as point, vector, direction, line, ray, segment, circle in d dimensional Euclidean space, as well as predicates and constructions for these objects.} diff --git a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h index e5babbce09b..dec5bede8b2 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Vector_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Vector_d.h @@ -97,11 +97,11 @@ class Vector_d : public pR::Vector_d_base template Point_d operator+ (const Origin& o, const Vector_d& v) -{ return Point_d( o + static_cast::Base>(v) ); } +{ return Point_d( o + static_cast::Base&>(v) ); } template Vector_d operator*(const NT& n, const Vector_d& v) -{ return Vector_d( n * static_cast::Base>(v) ); } +{ return Vector_d( n * static_cast::Base&>(v) ); } } //namespace CGAL #endif //CGAL_VECTOR_D_H diff --git a/Kinetic_data_structures/doc_tex/Kinetic_data_structures/PkgDescription.tex b/Kinetic_data_structures/doc_tex/Kinetic_data_structures/PkgDescription.tex index 89d675befc8..33b14390475 100644 --- a/Kinetic_data_structures/doc_tex/Kinetic_data_structures/PkgDescription.tex +++ b/Kinetic_data_structures/doc_tex/Kinetic_data_structures/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Kinetic Data Structures\label{Pkg:Kds}} -\ccPkgHowToCiteCgal{cgal:r-kds-11} +\ccPkgHowToCiteCgal{cgal:r-kds-11b} \ccPkgSummary{ Kinetic data structures allow combinatorial structures to be maintained as the primitives move. The package provides implementations of kinetic data structures for Delaunay triangulations diff --git a/Kinetic_data_structures/doc_tex/Kinetic_framework/PkgDescription.tex b/Kinetic_data_structures/doc_tex/Kinetic_framework/PkgDescription.tex index 335ed6e58d9..63d1385fc18 100644 --- a/Kinetic_data_structures/doc_tex/Kinetic_framework/PkgDescription.tex +++ b/Kinetic_data_structures/doc_tex/Kinetic_framework/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Kinetic Framework\label{Pkg:KdsFramework}} -\ccPkgHowToCiteCgal{cgal:r-kdsf-11} +\ccPkgHowToCiteCgal{cgal:r-kdsf-11b} \ccPkgSummary{ Kinetic data structures allow combinatorial geometric structures to be maintained as the primitives move. The package provides a framework to diff --git a/Largest_empty_rect_2/include/CGAL/Largest_empty_iso_rectangle_2.h b/Largest_empty_rect_2/include/CGAL/Largest_empty_iso_rectangle_2.h index 10b575748d2..945b7bfd6bb 100644 --- a/Largest_empty_rect_2/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Largest_empty_rect_2/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -548,21 +548,21 @@ private: --iter; } - void determine_first_two_iters(typename Point_data_set_of_y::iterator& iter1, - typename Point_data_set_of_y::iterator& iter2, - typename Point_data_set_of_y::iterator& iter3, - bool& first_iter_is_right, - bool& second_iter_is_right, - bool& third_iter_is_right) + void determine_first_two_iters(typename Point_data_set_of_y::iterator &iter1, + typename Point_data_set_of_y::iterator &iter2, + typename Point_data_set_of_y::iterator &iter3, + bool &first_iter_is_right, + bool &second_iter_is_right, + bool &third_iter_is_right) { - if (first_iter_is_right) { - if (second_iter_is_right) { + if(first_iter_is_right) { + if(second_iter_is_right) { iter1 = iter2; iter2 = iter3; first_iter_is_right = second_iter_is_right; second_iter_is_right = third_iter_is_right; } else { - if (third_iter_is_right) { + if(third_iter_is_right) { iter1 = iter2; iter2 = iter3; first_iter_is_right = second_iter_is_right; @@ -573,8 +573,8 @@ private: } } } else { - if (second_iter_is_right) { - if (third_iter_is_right) { + if(second_iter_is_right) { + if(third_iter_is_right) { iter2 = iter3; second_iter_is_right = third_iter_is_right; } else { @@ -1180,14 +1180,8 @@ template void Largest_empty_iso_rectangle_2::phase_3() { - // init for compiler warning - bool first_iter_is_right(true); - bool second_iter_is_right(true); - bool third_iter_is_right(true); - bool first_exist(true); - bool second_exist(true); - bool third_exist(true); - + bool first_iter_is_right = true, second_iter_is_right = true; // init for compiler warning + bool third_iter_is_right, first_exist,second_exist,third_exist; typename Point_data_set_of_y::iterator iter, last_iter = y_sorted.end(); typename Point_data_set_of_y::iterator iter1, iter2, iter3, right_iter, left_iter, last = last_iter; diff --git a/Maintenance/infrastructure/matisse.geometryfactory.com/.autocgalrc b/Maintenance/infrastructure/matisse.geometryfactory.com/.autocgalrc index 6396b8c1ef5..5c054d7f2ef 100644 --- a/Maintenance/infrastructure/matisse.geometryfactory.com/.autocgalrc +++ b/Maintenance/infrastructure/matisse.geometryfactory.com/.autocgalrc @@ -18,7 +18,7 @@ LOCK_FILE="${CGAL_ROOT}/autotest_cgal_with_cmake.lock" #COMPILERS_localhost="i686_Linux-2.6_g++-4.1.2_CentOS-5.1-cmake" #COMPILERS_localhost=essai #COMPILERS_localhost="x86-64_Linux-2.6_g++-4.4.4_F13 x86-64_Linux-2.6_g++-4.4.0_Release-F13 x86-64_Linux-2.6_IntelCompiler-11.0-with-g++-4.4.0_F13 x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.4.1_F13 x86-64_Linux-2.6_g++-4.4.1_F13-ansi x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.4.1_F13-strict-ansi x86-64_Linux-2.6_g++-4.5-branch_Release-F13 x86-64_Linux-2.6_g++-4.5-branch_CXX0X-F13 x86-64_Linux-2.6_g++-trunk_CXX0X-F13 x86-64_Linux-2.6_llvm-clang-with-g++-4.4.1_F13 x86-64_Linux-2.6_g++-4.4.4_F13-MATCHING-BUG-6" -COMPILERS_localhost="x86-64_Linux-2.6_g++-4.5.1_F14 x86-64_Linux-2.6_g++-4.5.1_F14-ansi x86-64_Linux-2.6_g++-4.5.1_F14-m32 x86-64_Linux-2.6_g++-4.5.1_F14-MATCHING-BUG-6 x86-64_Linux-2.6_g++-4.5.1_Release-F14 x86-64_Linux-2.6_g++-4.5-branch_CXX0X-F14 x86-64_Linux-2.6_g++-4.5-branch_Release-F14 x86-64_Linux-2.6_g++-trunk_CXX0X-F14 x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14-strict-ansi x86-64_Linux-2.6_llvm-clang-with-g++-4.5.1_F14" +COMPILERS_localhost="x86-64_Linux-2.6_g++-4.5.1_F14 x86-64_Linux-2.6_g++-4.5.1_F14-ansi x86-64_Linux-2.6_g++-4.5.1_F14-m32 x86-64_Linux-2.6_g++-4.5.1_F14-MATCHING-BUG-6 x86-64_Linux-2.6_g++-4.5.1_Release-F14 x86-64_Linux-2.6_g++-4.5-branch_CXX0X-F14 x86-64_Linux-2.6_g++-4.5-branch_Release-F14 x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14 x86-64_Linux-2.6_g++-trunk_CXX0X-F14 x86-64_Linux-2.6_llvm-clang-with-g++-4.5.1_F14" BUILD_ON_localhost=all REFERENCE_PLATFORMS_DIR=$HOME/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms diff --git a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.0-with-g++-4.5.1_F14/CMakeCache.txt b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.0-with-g++-4.5.1_F14/CMakeCache.txt index 7b706cc3af8..b3904cd1d17 100644 --- a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.0-with-g++-4.5.1_F14/CMakeCache.txt +++ b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.0-with-g++-4.5.1_F14/CMakeCache.txt @@ -64,7 +64,7 @@ CGAL_INSTALL_CMAKE_DIR:STRING=lib/CGAL //The folder where CGAL documentation and license files will be // installed, relative to CMAKE_INSTALL_PREFIX -CGAL_INSTALL_DOC_DIR:STRING=share/doc/CGAL-3.5-I-140 +CGAL_INSTALL_DOC_DIR:STRING=share/doc/CGAL-3.8.1-I //The folder where CGAL header files will be installed, relative // to CMAKE_INSTALL_PREFIX diff --git a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14-strict-ansi/CMakeCache.txt b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14-strict-ansi/CMakeCache.txt index 938afcdf41a..7de5caedf27 100644 --- a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14-strict-ansi/CMakeCache.txt +++ b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14-strict-ansi/CMakeCache.txt @@ -64,7 +64,7 @@ CGAL_INSTALL_CMAKE_DIR:STRING=lib/CGAL //The folder where CGAL documentation and license files will be // installed, relative to CMAKE_INSTALL_PREFIX -CGAL_INSTALL_DOC_DIR:STRING=share/doc/CGAL-3.6-I-187 +CGAL_INSTALL_DOC_DIR:STRING=share/doc/CGAL-3.8.1-I //The folder where CGAL header files will be installed, relative // to CMAKE_INSTALL_PREFIX diff --git a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/CMakeCache.txt b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/CMakeCache.txt index 3a50f623cc5..322b96e16cc 100644 --- a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/CMakeCache.txt +++ b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-11.1-with-g++-4.5.1_F14/CMakeCache.txt @@ -64,7 +64,7 @@ CGAL_INSTALL_CMAKE_DIR:STRING=lib/CGAL //The folder where CGAL documentation and license files will be // installed, relative to CMAKE_INSTALL_PREFIX -CGAL_INSTALL_DOC_DIR:STRING=share/doc/CGAL-3.5-I-140 +CGAL_INSTALL_DOC_DIR:STRING=share/doc/CGAL-3.8.1-I //The folder where CGAL header files will be installed, relative // to CMAKE_INSTALL_PREFIX diff --git a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/CMakeCache.txt b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/CMakeCache.txt new file mode 100644 index 00000000000..b21b77ad724 --- /dev/null +++ b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/CMakeCache.txt @@ -0,0 +1,2025 @@ +# This is the CMakeCache file. +# For build in directory: /home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14 +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a file. +Boost_INCLUDE_DIR:PATH=/usr/include + +//Boost library directory +Boost_LIBRARY_DIRS:FILEPATH=/usr/lib64 + +//The Boost THREAD library +Boost_THREAD_LIBRARY:FILEPATH=/usr/lib64/libboost_thread-mt.so + +//Path to a library. +Boost_THREAD_LIBRARY_DEBUG:FILEPATH=Boost_THREAD_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +Boost_THREAD_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libboost_thread-mt.so + +//Value Computed by CMake +CGAL_BINARY_DIR:STATIC=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14 + +//User-defined flags +CGAL_CXX_FLAGS:STRING=-fp-model strict -strict-ansi -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1 -DBOOST_NO_HASH -diag-disable 980 -w1 -O3 + +//Value Computed by CMake +CGAL_Core_BINARY_DIR:STATIC=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/src/CGALCore + +//The CGAL_Core library +CGAL_Core_LIBRARY:STRING=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL_Core.so + +//Dependencies for the target +CGAL_Core_LIB_DEPENDS:STATIC=general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so; + +//Value Computed by CMake +CGAL_Core_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-3.8.1-I/src/CGALCore + +//Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. +// When this is FALSE, all the CMAKE_*_FLAGS flags are overriden +// with the values used when building the CGAL libs. For CGAL_*_flags +// (used for ADDITIONAL flags) , there is no need to set this to +// TRUE. +CGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=TRUE + +//The folder where CGAL user-side scripts will be installed, relative +// to CMAKE_INSTALL_PREFIX +CGAL_INSTALL_BIN_DIR:STRING=bin + +//The folder where CGAL CMake modules will be installed, relative +// to CMAKE_INSTALL_PREFIX +CGAL_INSTALL_CMAKE_DIR:STRING=lib/CGAL + +//The folder where CGAL documentation and license files will be +// installed, relative to CMAKE_INSTALL_PREFIX +CGAL_INSTALL_DOC_DIR:STRING=share/doc/CGAL-3.8.1-I-217 + +//The folder where CGAL header files will be installed, relative +// to CMAKE_INSTALL_PREFIX +CGAL_INSTALL_INC_DIR:STRING=include + +//The folder where CGAL libraries will be installed, relative to +// CMAKE_INSTALL_PREFIX +CGAL_INSTALL_LIB_DIR:STRING=lib + +//The folder where manual pages for CGAL scripts will be installed, +// relative to CMAKE_INSTALL_PREFIX +CGAL_INSTALL_MAN_DIR:STRING=share/man/man1 + +//Value Computed by CMake +CGAL_ImageIO_BINARY_DIR:STATIC=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/src/CGALimageIO + +//The CGAL_ImageIO library +CGAL_ImageIO_LIBRARY:STRING=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL_ImageIO.so + +//Dependencies for the target +CGAL_ImageIO_LIB_DEPENDS:STATIC=general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;general;/usr/lib64/libz.so;general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so; + +//Value Computed by CMake +CGAL_ImageIO_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-3.8.1-I/src/CGALimageIO + +//Dependencies for the target +CGAL_LIB_DEPENDS:STATIC=general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so; + +//Value Computed by CMake +CGAL_Qt3_BINARY_DIR:STATIC=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/src/CGALQt + +//The CGAL_Qt3 library +CGAL_Qt3_LIBRARY:STRING=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL_Qt3.so + +//Dependencies for the target +CGAL_Qt3_LIB_DEPENDS:STATIC=general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;general;/usr/lib64/qt-3.3/lib/libqassistantclient.a;general;/usr/lib64/qt-3.3/lib/libqt-mt.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so;general;dl;general;-lpthread;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so; + +//Value Computed by CMake +CGAL_Qt3_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-3.8.1-I/src/CGALQt + +//Value Computed by CMake +CGAL_Qt4_BINARY_DIR:STATIC=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/src/CGALQt4 + +//The CGAL_Qt4 library +CGAL_Qt4_LIBRARY:STRING=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL_Qt4.so + +//Dependencies for the target +CGAL_Qt4_LIB_DEPENDS:STATIC=general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;general;/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so;general;/usr/lib64/libgmpxx.so;general;/usr/lib64/libmpfr.so;general;/usr/lib64/libgmp.so;general;/usr/lib64/libboost_thread-mt.so;optimized;/usr/lib64/libQtOpenGL.so;debug;/usr/lib64/libQtOpenGL_debug.so;optimized;/usr/lib64/libQtGui.so;debug;/usr/lib64/libQtGui_debug.so;optimized;/usr/lib64/libQtCore.so;debug;/usr/lib64/libQtCore_debug.so;general;/usr/lib64/libGLU.so;general;/usr/lib64/libGL.so;general;/usr/lib64/libSM.so;general;/usr/lib64/libICE.so;general;/usr/lib64/libX11.so;general;/usr/lib64/libXext.so; + +//Value Computed by CMake +CGAL_Qt4_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-3.8.1-I/src/CGALQt4 + +//soname-version +CGAL_SONAME_VERSION:STRING=7 + +//Value Computed by CMake +CGAL_SOURCE_DIR:STATIC=/home/lrineau/CGAL/CGAL-3.8.1-I + +//soversion +CGAL_SOVERSION:STRING=7.0.0 + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//For backwards compatibility, what version of CMake commands and +// syntax should this version of CMake try to support. +CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4 + +//Build type: Release or Debug +CMAKE_BUILD_TYPE:STRING=Release + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler. +CMAKE_CXX_COMPILER:FILEPATH=/opt/intel/composerxe-2011.4.191/bin/intel64/icpc + +//User-defined flags +CMAKE_CXX_FLAGS:STRING= -fp-model strict -strict-ansi -D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1 -DBOOST_NO_HASH -diag-disable 980 -diag-disable 11 -w1 -O3 + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release minsize builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds (/MD /Ob1 /Oi +// /Ot /Oy /Gs will produce slightly less optimized but smaller +// files). +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during Release with Debug Info builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g + +//C compiler. +CMAKE_C_COMPILER:FILEPATH=/opt/intel/composerxe-2011.4.191/bin/intel64/icc + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release minsize builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds (/MD /Ob1 /Oi +// /Ot /Oy /Gs will produce slightly less optimized but smaller +// files). +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during Release with Debug Info builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=CGAL + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=OFF + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If true, cmake will use relative paths in makefiles and projects. +CMAKE_USE_RELATIVE_PATHS:BOOL=OFF + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=OFF + +//The directory containing the GMPXX include files +GMPXX_INCLUDE_DIR:PATH=/usr/include + +//Path to the GMPXX library +GMPXX_LIBRARIES:FILEPATH=/usr/lib64/libgmpxx.so + +//The directory containing the GMP header files +GMP_INCLUDE_DIR:PATH=/usr/include + +//Path to the GMP library +GMP_LIBRARIES:FILEPATH=/usr/lib64/libgmp.so + +GMP_LIBRARIES_DIR:FILEPATH=/usr/lib64 + +//The directory containing the MPFR header files +MPFR_INCLUDE_DIR:PATH=/usr/include + +//Path to the MPFR library +MPFR_LIBRARIES:FILEPATH=/usr/lib64/libmpfr.so + +MPFR_LIBRARIES_DIR:FILEPATH=/usr/lib64 + +//Path to a file. +OPENGL_INCLUDE_DIR:PATH=/usr/include + +//Path to a library. +OPENGL_gl_LIBRARY:FILEPATH=/usr/lib64/libGL.so + +//Path to a library. +OPENGL_glu_LIBRARY:FILEPATH=/usr/lib64/libGLU.so + +//Path to a file. +OPENGL_xmesa_INCLUDE_DIR:PATH=OPENGL_xmesa_INCLUDE_DIR-NOTFOUND + +//Path to a file. +QT3_INCLUDE_DIR:PATH=/usr/lib64/qt-3.3/include + +//Path to a program. +QT3_MOC_EXECUTABLE:FILEPATH=/usr/lib64/qt-3.3/bin/moc + +//Path to a library. +QT3_QASSISTANTCLIENT_LIBRARY:FILEPATH=/usr/lib64/qt-3.3/lib/libqassistantclient.a + +//Path to a library. +QT3_QT_LIBRARY:FILEPATH=/usr/lib64/qt-3.3/lib/libqt-mt.so + +//Path to a program. +QT3_UIC_EXECUTABLE:FILEPATH=/usr/lib64/qt-3.3/bin/uic + +//Path to a library. +QT_ARTHURPLUGIN_PLUGIN_DEBUG:FILEPATH=QT_ARTHURPLUGIN_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_ARTHURPLUGIN_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libarthurplugin.so + +//Path to a library. +QT_CONTAINEREXTENSION_PLUGIN_DEBUG:FILEPATH=QT_CONTAINEREXTENSION_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_CONTAINEREXTENSION_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libcontainerextension.so + +//Path to a library. +QT_CUSTOMWIDGETPLUGIN_PLUGIN_DEBUG:FILEPATH=QT_CUSTOMWIDGETPLUGIN_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_CUSTOMWIDGETPLUGIN_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libcustomwidgetplugin.so + +//Path to a program. +QT_DBUSCPP2XML_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/qdbuscpp2xml + +//Path to a program. +QT_DBUSXML2CPP_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/qdbusxml2cpp + +//Path to a program. +QT_DESIGNER_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/designer-qt4 + +//The location of the Qt docs +QT_DOC_DIR:PATH=/usr/share/doc/qt4 + +//The location of the Qt imports +QT_IMPORTS_DIR:PATH=/usr/lib64/qt4/imports + +//Path to a program. +QT_LINGUIST_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/linguist-qt4 + +//Path to a program. +QT_LRELEASE_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/lrelease-qt4 + +//Path to a program. +QT_LUPDATE_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/lupdate-qt4 + +//The location of the Qt mkspecs containing qconfig.pri +QT_MKSPECS_DIR:PATH=/usr/lib64/qt4/mkspecs + +//Path to a program. +QT_MOC_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/moc-qt4 + +//Path to a library. +QT_PHONONWIDGETS_PLUGIN_DEBUG:FILEPATH=QT_PHONONWIDGETS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_PHONONWIDGETS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libphononwidgets.so + +//Path to a file. +QT_PHONON_INCLUDE_DIR:PATH=/usr/include/phonon + +//The Qt PHONON library +QT_PHONON_LIBRARY:STRING=/usr/lib64/libphonon.so + +//Path to a library. +QT_PHONON_LIBRARY_DEBUG:FILEPATH=QT_PHONON_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +QT_PHONON_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libphonon.so + +//Path to a library. +QT_PHONON_QT7_PLUGIN_DEBUG:FILEPATH=QT_PHONON_QT7_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_PHONON_QT7_PLUGIN_RELEASE:FILEPATH=QT_PHONON_QT7_PLUGIN_RELEASE-NOTFOUND + +//The location of the Qt plugins +QT_PLUGINS_DIR:PATH=/usr/lib64/qt4/plugins + +//Path to a library. +QT_QCNCODECS_PLUGIN_DEBUG:FILEPATH=QT_QCNCODECS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QCNCODECS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/codecs/libqcncodecs.so + +//Path to a program. +QT_QCOLLECTIONGENERATOR_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/qcollectiongenerator + +//Path to a library. +QT_QCOREWLANBEARER_PLUGIN_DEBUG:FILEPATH=QT_QCOREWLANBEARER_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QCOREWLANBEARER_PLUGIN_RELEASE:FILEPATH=QT_QCOREWLANBEARER_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QDECLARATIVEVIEW_PLUGIN_DEBUG:FILEPATH=QT_QDECLARATIVEVIEW_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QDECLARATIVEVIEW_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libqdeclarativeview.so + +//Path to a library. +QT_QDECORATIONDEFAULT_PLUGIN_DEBUG:FILEPATH=QT_QDECORATIONDEFAULT_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QDECORATIONDEFAULT_PLUGIN_RELEASE:FILEPATH=QT_QDECORATIONDEFAULT_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QDECORATIONWINDOWS_PLUGIN_DEBUG:FILEPATH=QT_QDECORATIONWINDOWS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QDECORATIONWINDOWS_PLUGIN_RELEASE:FILEPATH=QT_QDECORATIONWINDOWS_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QGENERICBEARER_PLUGIN_DEBUG:FILEPATH=QT_QGENERICBEARER_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QGENERICBEARER_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/bearer/libqgenericbearer.so + +//Path to a library. +QT_QGIF_PLUGIN_DEBUG:FILEPATH=QT_QGIF_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QGIF_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/imageformats/libqgif.so + +//Path to a library. +QT_QGLGRAPHICSSYSTEM_PLUGIN_DEBUG:FILEPATH=QT_QGLGRAPHICSSYSTEM_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QGLGRAPHICSSYSTEM_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/graphicssystems/libqglgraphicssystem.so + +//Path to a library. +QT_QICO_PLUGIN_DEBUG:FILEPATH=QT_QICO_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QICO_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/imageformats/libqico.so + +//Path to a library. +QT_QIMSW_MULTI_PLUGIN_DEBUG:FILEPATH=QT_QIMSW_MULTI_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QIMSW_MULTI_PLUGIN_RELEASE:FILEPATH=QT_QIMSW_MULTI_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QJPCODECS_PLUGIN_DEBUG:FILEPATH=QT_QJPCODECS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QJPCODECS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/codecs/libqjpcodecs.so + +//Path to a library. +QT_QJPEG_PLUGIN_DEBUG:FILEPATH=QT_QJPEG_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QJPEG_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/imageformats/libqjpeg.so + +//Path to a library. +QT_QKRCODECS_PLUGIN_DEBUG:FILEPATH=QT_QKRCODECS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QKRCODECS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/codecs/libqkrcodecs.so + +//Where can one of the qmake4 or qmake-qt4 libraries be found +QT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake-qt4 + +//Path to a library. +QT_QMNG_PLUGIN_DEBUG:FILEPATH=QT_QMNG_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QMNG_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/imageformats/libqmng.so + +//Path to a library. +QT_QSQLDB2_PLUGIN_DEBUG:FILEPATH=QT_QSQLDB2_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLDB2_PLUGIN_RELEASE:FILEPATH=QT_QSQLDB2_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QSQLIBASE_PLUGIN_DEBUG:FILEPATH=QT_QSQLIBASE_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLIBASE_PLUGIN_RELEASE:FILEPATH=QT_QSQLIBASE_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QSQLITE2_PLUGIN_DEBUG:FILEPATH=QT_QSQLITE2_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLITE2_PLUGIN_RELEASE:FILEPATH=QT_QSQLITE2_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QSQLITE_PLUGIN_DEBUG:FILEPATH=QT_QSQLITE_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLITE_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/sqldrivers/libqsqlite.so + +//Path to a library. +QT_QSQLMYSQL_PLUGIN_DEBUG:FILEPATH=QT_QSQLMYSQL_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLMYSQL_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/sqldrivers/libqsqlmysql.so + +//Path to a library. +QT_QSQLOCI_PLUGIN_DEBUG:FILEPATH=QT_QSQLOCI_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLOCI_PLUGIN_RELEASE:FILEPATH=QT_QSQLOCI_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QSQLODBC_PLUGIN_DEBUG:FILEPATH=QT_QSQLODBC_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLODBC_PLUGIN_RELEASE:FILEPATH=QT_QSQLODBC_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QSQLPSQL_PLUGIN_DEBUG:FILEPATH=QT_QSQLPSQL_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLPSQL_PLUGIN_RELEASE:FILEPATH=QT_QSQLPSQL_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QSQLTDS_PLUGIN_DEBUG:FILEPATH=QT_QSQLTDS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSQLTDS_PLUGIN_RELEASE:FILEPATH=QT_QSQLTDS_PLUGIN_RELEASE-NOTFOUND + +//Path to a library. +QT_QSVGICON_PLUGIN_DEBUG:FILEPATH=QT_QSVGICON_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSVGICON_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/iconengines/libqsvgicon.so + +//Path to a library. +QT_QSVG_PLUGIN_DEBUG:FILEPATH=QT_QSVG_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QSVG_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/imageformats/libqsvg.so + +//Path to a library. +QT_QT3SUPPORTWIDGETS_PLUGIN_DEBUG:FILEPATH=QT_QT3SUPPORTWIDGETS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QT3SUPPORTWIDGETS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libqt3supportwidgets.so + +//Path to a file. +QT_QT3SUPPORT_INCLUDE_DIR:PATH=/usr/include/Qt3Support + +//The Qt QT3SUPPORT library +QT_QT3SUPPORT_LIBRARY:STRING=optimized;/usr/lib64/libQt3Support.so;debug;/usr/lib64/libQt3Support_debug.so + +//Path to a library. +QT_QT3SUPPORT_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQt3Support_debug.so + +//Path to a library. +QT_QT3SUPPORT_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQt3Support.so + +//Path to a library. +QT_QTACCESSIBLECOMPATWIDGETS_PLUGIN_DEBUG:FILEPATH=QT_QTACCESSIBLECOMPATWIDGETS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QTACCESSIBLECOMPATWIDGETS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/accessible/libqtaccessiblecompatwidgets.so + +//Path to a library. +QT_QTACCESSIBLEWIDGETS_PLUGIN_DEBUG:FILEPATH=QT_QTACCESSIBLEWIDGETS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QTACCESSIBLEWIDGETS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/accessible/libqtaccessiblewidgets.so + +//Path to a file. +QT_QTASSISTANTCLIENT_INCLUDE_DIR:PATH=QT_QTASSISTANTCLIENT_INCLUDE_DIR-NOTFOUND + +//The Qt QTASSISTANTCLIENT library +QT_QTASSISTANTCLIENT_LIBRARY:STRING= + +//Path to a library. +QT_QTASSISTANTCLIENT_LIBRARY_DEBUG:FILEPATH=QT_QTASSISTANTCLIENT_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +QT_QTASSISTANTCLIENT_LIBRARY_RELEASE:FILEPATH=QT_QTASSISTANTCLIENT_LIBRARY_RELEASE-NOTFOUND + +//Path to a file. +QT_QTASSISTANT_INCLUDE_DIR:PATH=QT_QTASSISTANT_INCLUDE_DIR-NOTFOUND + +//The Qt QTASSISTANT library +QT_QTASSISTANT_LIBRARY:STRING= + +//Path to a library. +QT_QTASSISTANT_LIBRARY_DEBUG:FILEPATH=QT_QTASSISTANT_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +QT_QTASSISTANT_LIBRARY_RELEASE:FILEPATH=QT_QTASSISTANT_LIBRARY_RELEASE-NOTFOUND + +//The Qt QTCLUCENE library +QT_QTCLUCENE_LIBRARY:STRING=optimized;/usr/lib64/libQtCLucene.so;debug;/usr/lib64/libQtCLucene_debug.so + +//Path to a library. +QT_QTCLUCENE_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtCLucene_debug.so + +//Path to a library. +QT_QTCLUCENE_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtCLucene.so + +//(This variable does not exist and should not be used) +QT_QTCORE_INCLUDE_DIR:PATH=/usr/include/QtCore + +//The Qt QTCORE library +QT_QTCORE_LIBRARY:STRING=optimized;/usr/lib64/libQtCore.so;debug;/usr/lib64/libQtCore_debug.so + +//Path to a library. +QT_QTCORE_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtCore_debug.so + +//Path to a library. +QT_QTCORE_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtCore.so + +//Path to a file. +QT_QTDBUS_INCLUDE_DIR:PATH=/usr/include/QtDBus + +//The Qt QTDBUS library +QT_QTDBUS_LIBRARY:STRING=optimized;/usr/lib64/libQtDBus.so;debug;/usr/lib64/libQtDBus_debug.so + +//Path to a library. +QT_QTDBUS_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtDBus_debug.so + +//Path to a library. +QT_QTDBUS_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtDBus.so + +//Path to a file. +QT_QTDECLARATIVE_INCLUDE_DIR:PATH=/usr/include/QtDeclarative + +//The Qt QTDECLARATIVE library +QT_QTDECLARATIVE_LIBRARY:STRING=optimized;/usr/lib64/libQtDeclarative.so;debug;/usr/lib64/libQtDeclarative_debug.so + +//Path to a library. +QT_QTDECLARATIVE_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtDeclarative_debug.so + +//Path to a library. +QT_QTDECLARATIVE_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtDeclarative.so + +//Path to a file. +QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR:PATH=/usr/include/QtDesigner + +//The Qt QTDESIGNERCOMPONENTS library +QT_QTDESIGNERCOMPONENTS_LIBRARY:STRING=optimized;/usr/lib64/libQtDesignerComponents.so;debug;/usr/lib64/libQtDesignerComponents_debug.so + +//Path to a library. +QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtDesignerComponents_debug.so + +//Path to a library. +QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtDesignerComponents.so + +//Path to a file. +QT_QTDESIGNER_INCLUDE_DIR:PATH=/usr/include/QtDesigner + +//The Qt QTDESIGNER library +QT_QTDESIGNER_LIBRARY:STRING=optimized;/usr/lib64/libQtDesigner.so;debug;/usr/lib64/libQtDesigner_debug.so + +//Path to a library. +QT_QTDESIGNER_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtDesigner_debug.so + +//Path to a library. +QT_QTDESIGNER_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtDesigner.so + +//Path to a file. +QT_QTGUI_INCLUDE_DIR:PATH=/usr/include/QtGui + +//The Qt QTGUI library +QT_QTGUI_LIBRARY:STRING=optimized;/usr/lib64/libQtGui.so;debug;/usr/lib64/libQtGui_debug.so + +//Path to a library. +QT_QTGUI_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtGui_debug.so + +//Path to a library. +QT_QTGUI_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtGui.so + +//Path to a file. +QT_QTHELP_INCLUDE_DIR:PATH=/usr/include/QtHelp + +//The Qt QTHELP library +QT_QTHELP_LIBRARY:STRING=optimized;/usr/lib64/libQtHelp.so;debug;/usr/lib64/libQtHelp_debug.so + +//Path to a library. +QT_QTHELP_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtHelp_debug.so + +//Path to a library. +QT_QTHELP_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtHelp.so + +//Path to a library. +QT_QTIFF_PLUGIN_DEBUG:FILEPATH=QT_QTIFF_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QTIFF_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/imageformats/libqtiff.so + +//Path to a file. +QT_QTMOTIF_INCLUDE_DIR:PATH=QT_QTMOTIF_INCLUDE_DIR-NOTFOUND + +//The Qt QTMOTIF library +QT_QTMOTIF_LIBRARY:STRING= + +//Path to a library. +QT_QTMOTIF_LIBRARY_DEBUG:FILEPATH=QT_QTMOTIF_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +QT_QTMOTIF_LIBRARY_RELEASE:FILEPATH=QT_QTMOTIF_LIBRARY_RELEASE-NOTFOUND + +//Path to a file. +QT_QTMULTIMEDIA_INCLUDE_DIR:PATH=/usr/include/QtMultimedia + +//The Qt QTMULTIMEDIA library +QT_QTMULTIMEDIA_LIBRARY:STRING=optimized;/usr/lib64/libQtMultimedia.so;debug;/usr/lib64/libQtMultimedia_debug.so + +//Path to a library. +QT_QTMULTIMEDIA_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtMultimedia_debug.so + +//Path to a library. +QT_QTMULTIMEDIA_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtMultimedia.so + +//Path to a file. +QT_QTNETWORK_INCLUDE_DIR:PATH=/usr/include/QtNetwork + +//The Qt QTNETWORK library +QT_QTNETWORK_LIBRARY:STRING=optimized;/usr/lib64/libQtNetwork.so;debug;/usr/lib64/libQtNetwork_debug.so + +//Path to a library. +QT_QTNETWORK_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtNetwork_debug.so + +//Path to a library. +QT_QTNETWORK_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtNetwork.so + +//Path to a file. +QT_QTNSPLUGIN_INCLUDE_DIR:PATH=QT_QTNSPLUGIN_INCLUDE_DIR-NOTFOUND + +//The Qt QTNSPLUGIN library +QT_QTNSPLUGIN_LIBRARY:STRING= + +//Path to a library. +QT_QTNSPLUGIN_LIBRARY_DEBUG:FILEPATH=QT_QTNSPLUGIN_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +QT_QTNSPLUGIN_LIBRARY_RELEASE:FILEPATH=QT_QTNSPLUGIN_LIBRARY_RELEASE-NOTFOUND + +//Path to a file. +QT_QTOPENGL_INCLUDE_DIR:PATH=/usr/include/QtOpenGL + +//The Qt QTOPENGL library +QT_QTOPENGL_LIBRARY:STRING=optimized;/usr/lib64/libQtOpenGL.so;debug;/usr/lib64/libQtOpenGL_debug.so + +//Path to a library. +QT_QTOPENGL_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtOpenGL_debug.so + +//Path to a library. +QT_QTOPENGL_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtOpenGL.so + +//Path to a library. +QT_QTRACEGRAPHICSSYSTEM_PLUGIN_DEBUG:FILEPATH=QT_QTRACEGRAPHICSSYSTEM_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QTRACEGRAPHICSSYSTEM_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/graphicssystems/libqtracegraphicssystem.so + +//Path to a library. +QT_QTSCRIPTDBUS_PLUGIN_DEBUG:FILEPATH=QT_QTSCRIPTDBUS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QTSCRIPTDBUS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/script/libqtscriptdbus.so + +//Path to a file. +QT_QTSCRIPTTOOLS_INCLUDE_DIR:PATH=/usr/include/QtScriptTools + +//The Qt QTSCRIPTTOOLS library +QT_QTSCRIPTTOOLS_LIBRARY:STRING=optimized;/usr/lib64/libQtScriptTools.so;debug;/usr/lib64/libQtScriptTools_debug.so + +//Path to a library. +QT_QTSCRIPTTOOLS_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtScriptTools_debug.so + +//Path to a library. +QT_QTSCRIPTTOOLS_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtScriptTools.so + +//Path to a file. +QT_QTSCRIPT_INCLUDE_DIR:PATH=/usr/include/QtScript + +//The Qt QTSCRIPT library +QT_QTSCRIPT_LIBRARY:STRING=optimized;/usr/lib64/libQtScript.so;debug;/usr/lib64/libQtScript_debug.so + +//Path to a library. +QT_QTSCRIPT_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtScript_debug.so + +//Path to a library. +QT_QTSCRIPT_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtScript.so + +//Path to a file. +QT_QTSQL_INCLUDE_DIR:PATH=/usr/include/QtSql + +//The Qt QTSQL library +QT_QTSQL_LIBRARY:STRING=optimized;/usr/lib64/libQtSql.so;debug;/usr/lib64/libQtSql_debug.so + +//Path to a library. +QT_QTSQL_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtSql_debug.so + +//Path to a library. +QT_QTSQL_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtSql.so + +//Path to a file. +QT_QTSVG_INCLUDE_DIR:PATH=/usr/include/QtSvg + +//The Qt QTSVG library +QT_QTSVG_LIBRARY:STRING=optimized;/usr/lib64/libQtSvg.so;debug;/usr/lib64/libQtSvg_debug.so + +//Path to a library. +QT_QTSVG_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtSvg_debug.so + +//Path to a library. +QT_QTSVG_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtSvg.so + +//Path to a file. +QT_QTTEST_INCLUDE_DIR:PATH=/usr/include/QtTest + +//The Qt QTTEST library +QT_QTTEST_LIBRARY:STRING=optimized;/usr/lib64/libQtTest.so;debug;/usr/lib64/libQtTest_debug.so + +//Path to a library. +QT_QTTEST_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtTest_debug.so + +//Path to a library. +QT_QTTEST_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtTest.so + +//Path to a file. +QT_QTUITOOLS_INCLUDE_DIR:PATH=/usr/include/QtUiTools + +//The Qt QTUITOOLS library +QT_QTUITOOLS_LIBRARY:STRING=optimized;/usr/lib64/libQtUiTools.a;debug;/usr/lib64/libQtUiTools_debug.a + +//Path to a library. +QT_QTUITOOLS_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtUiTools_debug.a + +//Path to a library. +QT_QTUITOOLS_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtUiTools.a + +//Path to a library. +QT_QTWCODECS_PLUGIN_DEBUG:FILEPATH=QT_QTWCODECS_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QTWCODECS_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/codecs/libqtwcodecs.so + +//Path to a file. +QT_QTWEBKIT_INCLUDE_DIR:PATH=/usr/include/QtWebKit + +//The Qt QTWEBKIT library +QT_QTWEBKIT_LIBRARY:STRING=optimized;/usr/lib64/libQtWebKit.so;debug;/usr/lib64/libQtWebKit_debug.so + +//Path to a library. +QT_QTWEBKIT_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtWebKit_debug.so + +//Path to a library. +QT_QTWEBKIT_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtWebKit.so + +//Path to a file. +QT_QTXMLPATTERNS_INCLUDE_DIR:PATH=/usr/include/QtXmlPatterns + +//The Qt QTXMLPATTERNS library +QT_QTXMLPATTERNS_LIBRARY:STRING=optimized;/usr/lib64/libQtXmlPatterns.so;debug;/usr/lib64/libQtXmlPatterns_debug.so + +//Path to a library. +QT_QTXMLPATTERNS_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtXmlPatterns_debug.so + +//Path to a library. +QT_QTXMLPATTERNS_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtXmlPatterns.so + +//Path to a file. +QT_QTXML_INCLUDE_DIR:PATH=/usr/include/QtXml + +//The Qt QTXML library +QT_QTXML_LIBRARY:STRING=optimized;/usr/lib64/libQtXml.so;debug;/usr/lib64/libQtXml_debug.so + +//Path to a library. +QT_QTXML_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtXml_debug.so + +//Path to a library. +QT_QTXML_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libQtXml.so + +//Path to a library. +QT_QWEBVIEW_PLUGIN_DEBUG:FILEPATH=QT_QWEBVIEW_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QWEBVIEW_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libqwebview.so + +//Path to a library. +QT_QWSTSLIBMOUSEHANDLER_PLUGIN_DEBUG:FILEPATH=QT_QWSTSLIBMOUSEHANDLER_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_QWSTSLIBMOUSEHANDLER_PLUGIN_RELEASE:FILEPATH=QT_QWSTSLIBMOUSEHANDLER_PLUGIN_RELEASE-NOTFOUND + +//Path to a program. +QT_RCC_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/rcc + +//Path to a library. +QT_TASKMENUEXTENSION_PLUGIN_DEBUG:FILEPATH=QT_TASKMENUEXTENSION_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_TASKMENUEXTENSION_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libtaskmenuextension.so + +//The location of the Qt translations +QT_TRANSLATIONS_DIR:PATH=/usr/share/qt4/translations + +//Path to a program. +QT_UIC3_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/uic3 + +//Path to a program. +QT_UIC_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/uic-qt4 + +//Path to a library. +QT_WORLDTIMECLOCKPLUGIN_PLUGIN_DEBUG:FILEPATH=QT_WORLDTIMECLOCKPLUGIN_PLUGIN_DEBUG-NOTFOUND + +//Path to a library. +QT_WORLDTIMECLOCKPLUGIN_PLUGIN_RELEASE:FILEPATH=/usr/lib64/qt4/plugins/designer/libworldtimeclockplugin.so + +//Enable CGAL component Core +WITH_CGAL_Core:BOOL=ON + +//Enable CGAL component ImageIO +WITH_CGAL_ImageIO:BOOL=ON + +//Enable CGAL component Qt3 +WITH_CGAL_Qt3:BOOL=ON + +//Enable CGAL component Qt4 +WITH_CGAL_Qt4:BOOL=ON + +//Use the GMP number types if available. +WITH_GMP:BOOL=ON + +//Search for GMPXX +WITH_GMPXX:BOOL=ON + +//Use the LEDA number types if available. +WITH_LEDA:BOOL=OFF + +//Select demos +WITH_demos:BOOL=OFF + +//Select examples +WITH_examples:BOOL=OFF + +//Path to a file. +X11_ICE_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_ICE_LIB:FILEPATH=/usr/lib64/libICE.so + +//Path to a library. +X11_SM_LIB:FILEPATH=/usr/lib64/libSM.so + +//Path to a file. +X11_X11_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_X11_LIB:FILEPATH=/usr/lib64/libX11.so + +//Path to a file. +X11_XShm_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_XTest_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_XTest_LIB:FILEPATH=/usr/lib64/libXtst.so + +//Path to a file. +X11_Xaccessrules_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xaccessstr_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xau_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xau_LIB:FILEPATH=/usr/lib64/libXau.so + +//Path to a file. +X11_Xcomposite_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xcomposite_LIB:FILEPATH=/usr/lib64/libXcomposite.so + +//Path to a file. +X11_Xcursor_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xcursor_LIB:FILEPATH=/usr/lib64/libXcursor.so + +//Path to a file. +X11_Xdamage_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xdamage_LIB:FILEPATH=/usr/lib64/libXdamage.so + +//Path to a file. +X11_Xdmcp_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xdmcp_LIB:FILEPATH=/usr/lib64/libXdmcp.so + +//Path to a library. +X11_Xext_LIB:FILEPATH=/usr/lib64/libXext.so + +//Path to a file. +X11_Xfixes_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xfixes_LIB:FILEPATH=/usr/lib64/libXfixes.so + +//Path to a file. +X11_Xft_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xft_LIB:FILEPATH=/usr/lib64/libXft.so + +//Path to a file. +X11_Xi_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xi_LIB:FILEPATH=/usr/lib64/libXi.so + +//Path to a file. +X11_Xinerama_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xinerama_LIB:FILEPATH=/usr/lib64/libXinerama.so + +//Path to a file. +X11_Xinput_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xinput_LIB:FILEPATH=/usr/lib64/libXi.so + +//Path to a file. +X11_Xkb_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xkblib_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xlib_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xpm_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xpm_LIB:FILEPATH=/usr/lib64/libXpm.so + +//Path to a file. +X11_Xrandr_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xrandr_LIB:FILEPATH=/usr/lib64/libXrandr.so + +//Path to a file. +X11_Xrender_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xrender_LIB:FILEPATH=/usr/lib64/libXrender.so + +//Path to a file. +X11_Xscreensaver_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xscreensaver_LIB:FILEPATH=/usr/lib64/libXss.so + +//Path to a file. +X11_Xshape_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xt_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xt_LIB:FILEPATH=/usr/lib64/libXt.so + +//Path to a file. +X11_Xutil_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_Xv_INCLUDE_PATH:PATH=/usr/include + +//Path to a library. +X11_Xv_LIB:FILEPATH=/usr/lib64/libXv.so + +//Path to a library. +X11_Xxf86misc_LIB:FILEPATH=/usr/lib64/libXxf86misc.so + +//Path to a file. +X11_dpms_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_xf86misc_INCLUDE_PATH:PATH=/usr/include + +//Path to a file. +X11_xf86vmode_INCLUDE_PATH:PATH=/usr/include + +//Path to a program. +XIAR:FILEPATH=/opt/intel/composerxe-2011.4.191/bin/intel64/xiar + +//Path to a file. +ZLIB_INCLUDE_DIR:PATH=/usr/include + +//Path to a library. +ZLIB_LIBRARY:FILEPATH=/usr/lib64/libz.so + + +######################## +# INTERNAL cache entries +######################## + +//Name of all CGAL libraries. +ALL_CGAL_LIBRARIES:INTERNAL=CGAL;CGAL_Core;CGAL_ImageIO;CGAL_Qt3;CGAL_Qt4 +//ADVANCED property for variable: Boost_INCLUDE_DIR +Boost_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: Boost_LIBRARY_DIRS +Boost_LIBRARY_DIRS-ADVANCED:INTERNAL=1 +//The library version string for boost libraries +Boost_LIB_VERSION:INTERNAL=1_44 +//Whether the Boost THREAD library found +Boost_THREAD_FOUND:INTERNAL=ON +//ADVANCED property for variable: Boost_THREAD_LIBRARY +Boost_THREAD_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: Boost_THREAD_LIBRARY_DEBUG +Boost_THREAD_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: Boost_THREAD_LIBRARY_RELEASE +Boost_THREAD_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//The version number for boost libraries +Boost_VERSION:INTERNAL=104400 +CGAL_3RD_PARTY_DEFINITIONS:INTERNAL= +CGAL_3RD_PARTY_INCLUDE_DIRS:INTERNAL=/usr/include;/usr/include;/usr/include;/usr/include +CGAL_3RD_PARTY_LIBRARIES:INTERNAL=/usr/lib64/libgmpxx.so;/usr/lib64/libmpfr.so;/usr/lib64/libgmp.so;/usr/lib64/libboost_thread-mt.so +CGAL_3RD_PARTY_LIBRARIES_DIRS:INTERNAL=/usr/lib64;/usr/lib64;/usr/lib64;/usr/lib64 +CGAL_CFG_ARRAY_MEMBER_INITIALIZATION_BUG:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_ARRAY_MEMBER_INITIALIZATION_BUG_COMPILED:INTERNAL=FALSE +CGAL_CFG_DENORMALS_COMPILE_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_DENORMALS_COMPILE_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_IEEE_754_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_IEEE_754_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_ISTREAM_INT_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_ISTREAM_INT_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_LONGNAME_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_LONGNAME_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_MATCHING_BUG_5:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_MATCHING_BUG_5_COMPILED:INTERNAL=TRUE +CGAL_CFG_MATCHING_BUG_6:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_MATCHING_BUG_6_COMPILED:INTERNAL=TRUE +CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_ARRAY:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_ARRAY_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_AUTO:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_AUTO_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_DECLTYPE:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_DECLTYPE_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_DELEGATING_CONSTRUCTORS:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_DELEGATING_CONSTRUCTORS_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_INITIALIZER_LISTS:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_INITIALIZER_LISTS_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_ISFINITE:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_ISFINITE_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_CPP0X_LAMBDAS:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_LAMBDAS_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_LONG_LONG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_LONG_LONG_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_TUPLE:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_TUPLE_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_LIMITS:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_LIMITS_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_LOGICAL_OPERATORS_ALTERNATIVES:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_LOGICAL_OPERATORS_ALTERNATIVES_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_MESSAGE_PRAGMA_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_MESSAGE_PRAGMA_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_NEXTAFTER:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_NEXTAFTER_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_STATEMENT_EXPRESSIONS:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_STATEMENT_EXPRESSIONS_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_STL:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_STL_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_TMPL_IN_TMPL_PARAM:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_TMPL_IN_TMPL_PARAM_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_TR1_ARRAY:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_TR1_ARRAY_COMPILED:INTERNAL=TRUE +CGAL_CFG_NO_TR1_TUPLE:INTERNAL=1 +//Result of TRY_COMPILE +CGAL_CFG_NO_TR1_TUPLE_COMPILED:INTERNAL=FALSE +CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_NUMERIC_LIMITS_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_NUMERIC_LIMITS_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG_COMPILED:INTERNAL=TRUE +CGAL_CFG_USING_BASE_MEMBER_BUG_2:INTERNAL=0 +//Result of TRY_COMPILE +CGAL_CFG_USING_BASE_MEMBER_BUG_2_COMPILED:INTERNAL=TRUE +CGAL_Core_3RD_PARTY_DEFINITIONS:INTERNAL= +CGAL_Core_3RD_PARTY_INCLUDE_DIRS:INTERNAL= +CGAL_Core_3RD_PARTY_LIBRARIES:INTERNAL= +CGAL_Core_3RD_PARTY_LIBRARIES_DIRS:INTERNAL= +//ADVANCED property for variable: CGAL_Core_LIBRARY +CGAL_Core_LIBRARY-ADVANCED:INTERNAL=1 +//Variable hidden from user +CGAL_Core_LIBRARY_NAME:INTERNAL=libCGAL_Core.so +CGAL_EXECUTABLE_TARGETS:INTERNAL= +CGAL_ImageIO_3RD_PARTY_DEFINITIONS:INTERNAL=-DCGAL_USE_ZLIB +CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS:INTERNAL=/usr/include;/usr/include +CGAL_ImageIO_3RD_PARTY_LIBRARIES:INTERNAL=/usr/lib64/libGLU.so;/usr/lib64/libGL.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libz.so +CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS:INTERNAL= +//ADVANCED property for variable: CGAL_ImageIO_LIBRARY +CGAL_ImageIO_LIBRARY-ADVANCED:INTERNAL=1 +//Variable hidden from user +CGAL_ImageIO_LIBRARY_NAME:INTERNAL=libCGAL_ImageIO.so +CGAL_ImageIO_USE_ZLIB:INTERNAL=ON +//Variable hidden from user +CGAL_LIBRARY:INTERNAL=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib/libCGAL.so +//Variable hidden from user +CGAL_LIBRARY_NAME:INTERNAL=libCGAL.so +CGAL_Qt3_3RD_PARTY_DEFINITIONS:INTERNAL=-DQT_SHARED;-DQT_NO_DEBUG;-DQT_THREAD_SUPPORT;-D_REENTRANT +CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS:INTERNAL=/usr/lib64/qt-3.3/include;/usr/include +CGAL_Qt3_3RD_PARTY_LIBRARIES:INTERNAL=/usr/lib64/qt-3.3/lib/libqassistantclient.a;/usr/lib64/qt-3.3/lib/libqt-mt.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so;dl;-lpthread;/usr/lib64/libGLU.so;/usr/lib64/libGL.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so +CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS:INTERNAL= +//ADVANCED property for variable: CGAL_Qt3_LIBRARY +CGAL_Qt3_LIBRARY-ADVANCED:INTERNAL=1 +//Variable hidden from user +CGAL_Qt3_LIBRARY_NAME:INTERNAL=libCGAL_Qt3.so +CGAL_Qt4_3RD_PARTY_DEFINITIONS:INTERNAL= +CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS:INTERNAL=/usr/include;/usr/include +CGAL_Qt4_3RD_PARTY_LIBRARIES:INTERNAL=optimized;/usr/lib64/libQtOpenGL.so;debug;/usr/lib64/libQtOpenGL_debug.so;optimized;/usr/lib64/libQtGui.so;debug;/usr/lib64/libQtGui_debug.so;optimized;/usr/lib64/libQtCore.so;debug;/usr/lib64/libQtCore_debug.so;/usr/lib64/libGLU.so;/usr/lib64/libGL.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so +CGAL_Qt4_3RD_PARTY_LIBRARIES_DIRS:INTERNAL= +//ADVANCED property for variable: CGAL_Qt4_LIBRARY +CGAL_Qt4_LIBRARY-ADVANCED:INTERNAL=1 +//Variable hidden from user +CGAL_Qt4_LIBRARY_NAME:INTERNAL=libCGAL_Qt4.so +//ADVANCED property for variable: CGAL_SONAME_VERSION +CGAL_SONAME_VERSION-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CGAL_SOVERSION +CGAL_SOVERSION-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_BACKWARDS_COMPATIBILITY +CMAKE_BACKWARDS_COMPATIBILITY-ADVANCED:INTERNAL=1 +//What is the target build tool cmake is generating for. +CMAKE_BUILD_TOOL:INTERNAL=/usr/bin/gmake +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14 +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=8 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=4 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_CXX_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_C_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Result of TRY_COMPILE +CMAKE_DETERMINE_CXX_ABI_COMPILED:INTERNAL=TRUE +//Result of TRY_COMPILE +CMAKE_DETERMINE_C_ABI_COMPILED:INTERNAL=TRUE +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Have function connect +CMAKE_HAVE_CONNECT:INTERNAL=1 +//Have function gethostbyname +CMAKE_HAVE_GETHOSTBYNAME:INTERNAL=1 +//Have library pthreads +CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= +//Have library pthread +CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 +//Have include CMAKE_HAVE_PTHREAD_H +CMAKE_HAVE_PTHREAD_H:INTERNAL=1 +//Have function remove +CMAKE_HAVE_REMOVE:INTERNAL=1 +//Have function shmat +CMAKE_HAVE_SHMAT:INTERNAL=1 +//Start directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/lrineau/CGAL/CGAL-3.8.1-I +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0 +//Have library ICE +CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=7 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//Suppress Warnings that are meant for the author of the CMakeLists.txt +// files. +CMAKE_SUPPRESS_DEVELOPER_WARNINGS:INTERNAL=TRUE +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS +CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//Variable hidden from user +EXECUTABLE_OUTPUT_PATH:INTERNAL= +//Details about finding OpenGL +FIND_PACKAGE_MESSAGE_DETAILS_OpenGL:INTERNAL=[/usr/lib64/libGL.so][v()] +//Details about finding Threads +FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()] +//Details about finding X11 +FIND_PACKAGE_MESSAGE_DETAILS_X11:INTERNAL=[/usr/lib64/libX11.so][/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include] +//Details about finding ZLIB +FIND_PACKAGE_MESSAGE_DETAILS_ZLIB:INTERNAL=[/usr/include][/usr/lib64/libz.so][v1.2.5()] +//Result of TRY_COMPILE +GMP_COMPILE_RES:INTERNAL=TRUE +//Result of TRY_RUN +GMP_RUN_RES:INTERNAL=0 +//Result of TRY_COMPILE +IntelCompiler_COMPILE_RES:INTERNAL=TRUE +//Result of TRY_RUN +IntelCompiler_RUN_RES:INTERNAL=0 +//Variable hidden from user +LIBRARY_OUTPUT_PATH:INTERNAL=/home/lrineau/trunk/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/lib +//Result of TRY_COMPILE +MPFR_COMPILE_RES:INTERNAL=TRUE +//Result of TRY_RUN +MPFR_RUN_RES:INTERNAL=0 +//Result of TRY_COMPILE +OPENGL_COMPILE_RES:INTERNAL=TRUE +//ADVANCED property for variable: OPENGL_INCLUDE_DIR +OPENGL_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//Result of TRY_RUN +OPENGL_RUN_RES:INTERNAL=0 +//ADVANCED property for variable: OPENGL_gl_LIBRARY +OPENGL_gl_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: OPENGL_glu_LIBRARY +OPENGL_glu_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: OPENGL_xmesa_INCLUDE_DIR +OPENGL_xmesa_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT3_INCLUDE_DIR +QT3_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT3_MOC_EXECUTABLE +QT3_MOC_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT3_QASSISTANTCLIENT_LIBRARY +QT3_QASSISTANTCLIENT_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT3_QT_LIBRARY +QT3_QT_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT3_UIC_EXECUTABLE +QT3_UIC_EXECUTABLE-ADVANCED:INTERNAL=1 +//Result of TRY_COMPILE +QT4_COMPILE_RES:INTERNAL=TRUE +//Result of TRY_RUN +QT4_RUN_RES:INTERNAL=0 +//ADVANCED property for variable: QT_ARTHURPLUGIN_PLUGIN_DEBUG +QT_ARTHURPLUGIN_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_ARTHURPLUGIN_PLUGIN_RELEASE +QT_ARTHURPLUGIN_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +QT_BINARY_DIR:INTERNAL=/usr/lib64/qt4/bin +//Result of TRY_COMPILE +QT_COMPILE_RES:INTERNAL=TRUE +//ADVANCED property for variable: QT_CONTAINEREXTENSION_PLUGIN_DEBUG +QT_CONTAINEREXTENSION_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_CONTAINEREXTENSION_PLUGIN_RELEASE +QT_CONTAINEREXTENSION_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_CUSTOMWIDGETPLUGIN_PLUGIN_DEBUG +QT_CUSTOMWIDGETPLUGIN_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_CUSTOMWIDGETPLUGIN_PLUGIN_RELEASE +QT_CUSTOMWIDGETPLUGIN_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_DBUSCPP2XML_EXECUTABLE +QT_DBUSCPP2XML_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_DBUSXML2CPP_EXECUTABLE +QT_DBUSXML2CPP_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_DESIGNER_EXECUTABLE +QT_DESIGNER_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_DOC_DIR +QT_DOC_DIR-ADVANCED:INTERNAL=1 +QT_HEADERS_DIR:INTERNAL=/usr/include +//ADVANCED property for variable: QT_IMPORTS_DIR +QT_IMPORTS_DIR-ADVANCED:INTERNAL=1 +//Qt library dir +QT_LIBRARY_DIR:INTERNAL=/usr/lib64 +//ADVANCED property for variable: QT_LINGUIST_EXECUTABLE +QT_LINGUIST_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_LRELEASE_EXECUTABLE +QT_LRELEASE_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_LUPDATE_EXECUTABLE +QT_LUPDATE_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_MKSPECS_DIR +QT_MKSPECS_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_MOC_EXECUTABLE +QT_MOC_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONONWIDGETS_PLUGIN_DEBUG +QT_PHONONWIDGETS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONONWIDGETS_PLUGIN_RELEASE +QT_PHONONWIDGETS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONON_INCLUDE_DIR +QT_PHONON_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONON_LIBRARY +QT_PHONON_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONON_LIBRARY_DEBUG +QT_PHONON_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONON_LIBRARY_RELEASE +QT_PHONON_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONON_QT7_PLUGIN_DEBUG +QT_PHONON_QT7_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PHONON_QT7_PLUGIN_RELEASE +QT_PHONON_QT7_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_PLUGINS_DIR +QT_PLUGINS_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QCNCODECS_PLUGIN_DEBUG +QT_QCNCODECS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QCNCODECS_PLUGIN_RELEASE +QT_QCNCODECS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QCOLLECTIONGENERATOR_EXECUTABLE +QT_QCOLLECTIONGENERATOR_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QCOREWLANBEARER_PLUGIN_DEBUG +QT_QCOREWLANBEARER_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QCOREWLANBEARER_PLUGIN_RELEASE +QT_QCOREWLANBEARER_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QDECLARATIVEVIEW_PLUGIN_DEBUG +QT_QDECLARATIVEVIEW_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QDECLARATIVEVIEW_PLUGIN_RELEASE +QT_QDECLARATIVEVIEW_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QDECORATIONDEFAULT_PLUGIN_DEBUG +QT_QDECORATIONDEFAULT_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QDECORATIONDEFAULT_PLUGIN_RELEASE +QT_QDECORATIONDEFAULT_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QDECORATIONWINDOWS_PLUGIN_DEBUG +QT_QDECORATIONWINDOWS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QDECORATIONWINDOWS_PLUGIN_RELEASE +QT_QDECORATIONWINDOWS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QGENERICBEARER_PLUGIN_DEBUG +QT_QGENERICBEARER_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QGENERICBEARER_PLUGIN_RELEASE +QT_QGENERICBEARER_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QGIF_PLUGIN_DEBUG +QT_QGIF_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QGIF_PLUGIN_RELEASE +QT_QGIF_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QGLGRAPHICSSYSTEM_PLUGIN_DEBUG +QT_QGLGRAPHICSSYSTEM_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QGLGRAPHICSSYSTEM_PLUGIN_RELEASE +QT_QGLGRAPHICSSYSTEM_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QICO_PLUGIN_DEBUG +QT_QICO_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QICO_PLUGIN_RELEASE +QT_QICO_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QIMSW_MULTI_PLUGIN_DEBUG +QT_QIMSW_MULTI_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QIMSW_MULTI_PLUGIN_RELEASE +QT_QIMSW_MULTI_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QJPCODECS_PLUGIN_DEBUG +QT_QJPCODECS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QJPCODECS_PLUGIN_RELEASE +QT_QJPCODECS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QJPEG_PLUGIN_DEBUG +QT_QJPEG_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QJPEG_PLUGIN_RELEASE +QT_QJPEG_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QKRCODECS_PLUGIN_DEBUG +QT_QKRCODECS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QKRCODECS_PLUGIN_RELEASE +QT_QKRCODECS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +QT_QMAKE_EXECUTABLE_LAST:INTERNAL=/usr/bin/qmake-qt4 +//ADVANCED property for variable: QT_QMNG_PLUGIN_DEBUG +QT_QMNG_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QMNG_PLUGIN_RELEASE +QT_QMNG_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLDB2_PLUGIN_DEBUG +QT_QSQLDB2_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLDB2_PLUGIN_RELEASE +QT_QSQLDB2_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLIBASE_PLUGIN_DEBUG +QT_QSQLIBASE_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLIBASE_PLUGIN_RELEASE +QT_QSQLIBASE_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLITE2_PLUGIN_DEBUG +QT_QSQLITE2_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLITE2_PLUGIN_RELEASE +QT_QSQLITE2_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLITE_PLUGIN_DEBUG +QT_QSQLITE_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLITE_PLUGIN_RELEASE +QT_QSQLITE_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLMYSQL_PLUGIN_DEBUG +QT_QSQLMYSQL_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLMYSQL_PLUGIN_RELEASE +QT_QSQLMYSQL_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLOCI_PLUGIN_DEBUG +QT_QSQLOCI_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLOCI_PLUGIN_RELEASE +QT_QSQLOCI_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLODBC_PLUGIN_DEBUG +QT_QSQLODBC_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLODBC_PLUGIN_RELEASE +QT_QSQLODBC_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLPSQL_PLUGIN_DEBUG +QT_QSQLPSQL_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLPSQL_PLUGIN_RELEASE +QT_QSQLPSQL_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLTDS_PLUGIN_DEBUG +QT_QSQLTDS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSQLTDS_PLUGIN_RELEASE +QT_QSQLTDS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSVGICON_PLUGIN_DEBUG +QT_QSVGICON_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSVGICON_PLUGIN_RELEASE +QT_QSVGICON_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSVG_PLUGIN_DEBUG +QT_QSVG_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QSVG_PLUGIN_RELEASE +QT_QSVG_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QT3SUPPORTWIDGETS_PLUGIN_DEBUG +QT_QT3SUPPORTWIDGETS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QT3SUPPORTWIDGETS_PLUGIN_RELEASE +QT_QT3SUPPORTWIDGETS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QT3SUPPORT_INCLUDE_DIR +QT_QT3SUPPORT_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QT3SUPPORT_LIBRARY +QT_QT3SUPPORT_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QT3SUPPORT_LIBRARY_DEBUG +QT_QT3SUPPORT_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QT3SUPPORT_LIBRARY_RELEASE +QT_QT3SUPPORT_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTACCESSIBLECOMPATWIDGETS_PLUGIN_DEBUG +QT_QTACCESSIBLECOMPATWIDGETS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTACCESSIBLECOMPATWIDGETS_PLUGIN_RELEASE +QT_QTACCESSIBLECOMPATWIDGETS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTACCESSIBLEWIDGETS_PLUGIN_DEBUG +QT_QTACCESSIBLEWIDGETS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTACCESSIBLEWIDGETS_PLUGIN_RELEASE +QT_QTACCESSIBLEWIDGETS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANTCLIENT_INCLUDE_DIR +QT_QTASSISTANTCLIENT_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANTCLIENT_LIBRARY +QT_QTASSISTANTCLIENT_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANTCLIENT_LIBRARY_DEBUG +QT_QTASSISTANTCLIENT_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANTCLIENT_LIBRARY_RELEASE +QT_QTASSISTANTCLIENT_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANT_INCLUDE_DIR +QT_QTASSISTANT_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANT_LIBRARY +QT_QTASSISTANT_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANT_LIBRARY_DEBUG +QT_QTASSISTANT_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTASSISTANT_LIBRARY_RELEASE +QT_QTASSISTANT_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTCLUCENE_LIBRARY +QT_QTCLUCENE_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTCLUCENE_LIBRARY_DEBUG +QT_QTCLUCENE_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTCLUCENE_LIBRARY_RELEASE +QT_QTCLUCENE_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTCORE_INCLUDE_DIR +QT_QTCORE_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTCORE_LIBRARY +QT_QTCORE_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTCORE_LIBRARY_DEBUG +QT_QTCORE_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTCORE_LIBRARY_RELEASE +QT_QTCORE_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDBUS_INCLUDE_DIR +QT_QTDBUS_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDBUS_LIBRARY +QT_QTDBUS_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDBUS_LIBRARY_DEBUG +QT_QTDBUS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDBUS_LIBRARY_RELEASE +QT_QTDBUS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDECLARATIVE_INCLUDE_DIR +QT_QTDECLARATIVE_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDECLARATIVE_LIBRARY +QT_QTDECLARATIVE_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDECLARATIVE_LIBRARY_DEBUG +QT_QTDECLARATIVE_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDECLARATIVE_LIBRARY_RELEASE +QT_QTDECLARATIVE_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR +QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNERCOMPONENTS_LIBRARY +QT_QTDESIGNERCOMPONENTS_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG +QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE +QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNER_INCLUDE_DIR +QT_QTDESIGNER_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNER_LIBRARY +QT_QTDESIGNER_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNER_LIBRARY_DEBUG +QT_QTDESIGNER_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTDESIGNER_LIBRARY_RELEASE +QT_QTDESIGNER_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTGUI_INCLUDE_DIR +QT_QTGUI_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTGUI_LIBRARY +QT_QTGUI_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTGUI_LIBRARY_DEBUG +QT_QTGUI_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTGUI_LIBRARY_RELEASE +QT_QTGUI_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTHELP_INCLUDE_DIR +QT_QTHELP_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTHELP_LIBRARY +QT_QTHELP_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTHELP_LIBRARY_DEBUG +QT_QTHELP_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTHELP_LIBRARY_RELEASE +QT_QTHELP_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTIFF_PLUGIN_DEBUG +QT_QTIFF_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTIFF_PLUGIN_RELEASE +QT_QTIFF_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMOTIF_INCLUDE_DIR +QT_QTMOTIF_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMOTIF_LIBRARY +QT_QTMOTIF_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMOTIF_LIBRARY_DEBUG +QT_QTMOTIF_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMOTIF_LIBRARY_RELEASE +QT_QTMOTIF_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMULTIMEDIA_INCLUDE_DIR +QT_QTMULTIMEDIA_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMULTIMEDIA_LIBRARY +QT_QTMULTIMEDIA_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMULTIMEDIA_LIBRARY_DEBUG +QT_QTMULTIMEDIA_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTMULTIMEDIA_LIBRARY_RELEASE +QT_QTMULTIMEDIA_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNETWORK_INCLUDE_DIR +QT_QTNETWORK_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNETWORK_LIBRARY +QT_QTNETWORK_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNETWORK_LIBRARY_DEBUG +QT_QTNETWORK_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNETWORK_LIBRARY_RELEASE +QT_QTNETWORK_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNSPLUGIN_INCLUDE_DIR +QT_QTNSPLUGIN_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNSPLUGIN_LIBRARY +QT_QTNSPLUGIN_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNSPLUGIN_LIBRARY_DEBUG +QT_QTNSPLUGIN_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTNSPLUGIN_LIBRARY_RELEASE +QT_QTNSPLUGIN_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTOPENGL_INCLUDE_DIR +QT_QTOPENGL_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTOPENGL_LIBRARY +QT_QTOPENGL_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTOPENGL_LIBRARY_DEBUG +QT_QTOPENGL_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTOPENGL_LIBRARY_RELEASE +QT_QTOPENGL_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTRACEGRAPHICSSYSTEM_PLUGIN_DEBUG +QT_QTRACEGRAPHICSSYSTEM_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTRACEGRAPHICSSYSTEM_PLUGIN_RELEASE +QT_QTRACEGRAPHICSSYSTEM_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPTDBUS_PLUGIN_DEBUG +QT_QTSCRIPTDBUS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPTDBUS_PLUGIN_RELEASE +QT_QTSCRIPTDBUS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPTTOOLS_INCLUDE_DIR +QT_QTSCRIPTTOOLS_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPTTOOLS_LIBRARY +QT_QTSCRIPTTOOLS_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPTTOOLS_LIBRARY_DEBUG +QT_QTSCRIPTTOOLS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPTTOOLS_LIBRARY_RELEASE +QT_QTSCRIPTTOOLS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPT_INCLUDE_DIR +QT_QTSCRIPT_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPT_LIBRARY +QT_QTSCRIPT_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPT_LIBRARY_DEBUG +QT_QTSCRIPT_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSCRIPT_LIBRARY_RELEASE +QT_QTSCRIPT_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSQL_INCLUDE_DIR +QT_QTSQL_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSQL_LIBRARY +QT_QTSQL_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSQL_LIBRARY_DEBUG +QT_QTSQL_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSQL_LIBRARY_RELEASE +QT_QTSQL_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSVG_INCLUDE_DIR +QT_QTSVG_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSVG_LIBRARY +QT_QTSVG_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSVG_LIBRARY_DEBUG +QT_QTSVG_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTSVG_LIBRARY_RELEASE +QT_QTSVG_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTTEST_INCLUDE_DIR +QT_QTTEST_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTTEST_LIBRARY +QT_QTTEST_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTTEST_LIBRARY_DEBUG +QT_QTTEST_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTTEST_LIBRARY_RELEASE +QT_QTTEST_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTUITOOLS_INCLUDE_DIR +QT_QTUITOOLS_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTUITOOLS_LIBRARY +QT_QTUITOOLS_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTUITOOLS_LIBRARY_DEBUG +QT_QTUITOOLS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTUITOOLS_LIBRARY_RELEASE +QT_QTUITOOLS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTWCODECS_PLUGIN_DEBUG +QT_QTWCODECS_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTWCODECS_PLUGIN_RELEASE +QT_QTWCODECS_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTWEBKIT_INCLUDE_DIR +QT_QTWEBKIT_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTWEBKIT_LIBRARY +QT_QTWEBKIT_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTWEBKIT_LIBRARY_DEBUG +QT_QTWEBKIT_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTWEBKIT_LIBRARY_RELEASE +QT_QTWEBKIT_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXMLPATTERNS_INCLUDE_DIR +QT_QTXMLPATTERNS_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXMLPATTERNS_LIBRARY +QT_QTXMLPATTERNS_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXMLPATTERNS_LIBRARY_DEBUG +QT_QTXMLPATTERNS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXMLPATTERNS_LIBRARY_RELEASE +QT_QTXMLPATTERNS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXML_INCLUDE_DIR +QT_QTXML_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXML_LIBRARY +QT_QTXML_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXML_LIBRARY_DEBUG +QT_QTXML_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QTXML_LIBRARY_RELEASE +QT_QTXML_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QWEBVIEW_PLUGIN_DEBUG +QT_QWEBVIEW_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QWEBVIEW_PLUGIN_RELEASE +QT_QWEBVIEW_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QWSTSLIBMOUSEHANDLER_PLUGIN_DEBUG +QT_QWSTSLIBMOUSEHANDLER_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_QWSTSLIBMOUSEHANDLER_PLUGIN_RELEASE +QT_QWSTSLIBMOUSEHANDLER_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_RCC_EXECUTABLE +QT_RCC_EXECUTABLE-ADVANCED:INTERNAL=1 +//Result of TRY_RUN +QT_RUN_RES:INTERNAL=0 +//ADVANCED property for variable: QT_TASKMENUEXTENSION_PLUGIN_DEBUG +QT_TASKMENUEXTENSION_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_TASKMENUEXTENSION_PLUGIN_RELEASE +QT_TASKMENUEXTENSION_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_TRANSLATIONS_DIR +QT_TRANSLATIONS_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_UIC3_EXECUTABLE +QT_UIC3_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_UIC_EXECUTABLE +QT_UIC_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_WORLDTIMECLOCKPLUGIN_PLUGIN_DEBUG +QT_WORLDTIMECLOCKPLUGIN_PLUGIN_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: QT_WORLDTIMECLOCKPLUGIN_PLUGIN_RELEASE +QT_WORLDTIMECLOCKPLUGIN_PLUGIN_RELEASE-ADVANCED:INTERNAL=1 +//Have symbol Q_WS_MAC +Q_WS_MAC:INTERNAL= +//Have symbol Q_WS_QWS +Q_WS_QWS:INTERNAL= +//Have symbol Q_WS_WIN +Q_WS_WIN:INTERNAL= +//Have symbol Q_WS_X11 +Q_WS_X11:INTERNAL=1 +//hide this +Qt_help_window_h:INTERNAL=/home/lrineau/CGAL/CGAL-3.8.1-I/include/CGAL/IO/Qt_help_window.h +//hide this +Qt_widget_OpenGL_h:INTERNAL=/home/lrineau/CGAL/CGAL-3.8.1-I/include/CGAL/IO/Qt_widget_OpenGL.h +//hide this +Qt_widget_h:INTERNAL=/home/lrineau/CGAL/CGAL-3.8.1-I/include/CGAL/IO/Qt_widget.h +//hide this +Qt_widget_history_h:INTERNAL=/home/lrineau/CGAL/CGAL-3.8.1-I/include/CGAL/IO/Qt_widget_history.h +//hide this +Qt_widget_layer_h:INTERNAL=/home/lrineau/CGAL/CGAL-3.8.1-I/include/CGAL/IO/Qt_widget_layer.h +//hide this +Qt_widget_standard_toolbar_h:INTERNAL=/home/lrineau/CGAL/CGAL-3.8.1-I/include/CGAL/IO/Qt_widget_standard_toolbar.h +//ADVANCED property for variable: X11_ICE_INCLUDE_PATH +X11_ICE_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_ICE_LIB +X11_ICE_LIB-ADVANCED:INTERNAL=1 +//Have library /usr/lib64/libX11.so;/usr/lib64/libXext.so +X11_LIB_X11_SOLO:INTERNAL=1 +//ADVANCED property for variable: X11_SM_LIB +X11_SM_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_X11_INCLUDE_PATH +X11_X11_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_X11_LIB +X11_X11_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XShm_INCLUDE_PATH +X11_XShm_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XTest_INCLUDE_PATH +X11_XTest_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_XTest_LIB +X11_XTest_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xaccessrules_INCLUDE_PATH +X11_Xaccessrules_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xaccessstr_INCLUDE_PATH +X11_Xaccessstr_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xau_INCLUDE_PATH +X11_Xau_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xau_LIB +X11_Xau_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcomposite_INCLUDE_PATH +X11_Xcomposite_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcomposite_LIB +X11_Xcomposite_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcursor_INCLUDE_PATH +X11_Xcursor_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xcursor_LIB +X11_Xcursor_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdamage_INCLUDE_PATH +X11_Xdamage_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdamage_LIB +X11_Xdamage_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdmcp_INCLUDE_PATH +X11_Xdmcp_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xdmcp_LIB +X11_Xdmcp_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xext_LIB +X11_Xext_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xfixes_INCLUDE_PATH +X11_Xfixes_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xfixes_LIB +X11_Xfixes_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xft_INCLUDE_PATH +X11_Xft_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xft_LIB +X11_Xft_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xi_INCLUDE_PATH +X11_Xi_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xi_LIB +X11_Xi_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinerama_INCLUDE_PATH +X11_Xinerama_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinerama_LIB +X11_Xinerama_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinput_INCLUDE_PATH +X11_Xinput_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xinput_LIB +X11_Xinput_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xkb_INCLUDE_PATH +X11_Xkb_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xkblib_INCLUDE_PATH +X11_Xkblib_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xlib_INCLUDE_PATH +X11_Xlib_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xpm_INCLUDE_PATH +X11_Xpm_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xpm_LIB +X11_Xpm_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrandr_INCLUDE_PATH +X11_Xrandr_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrandr_LIB +X11_Xrandr_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrender_INCLUDE_PATH +X11_Xrender_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xrender_LIB +X11_Xrender_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xscreensaver_INCLUDE_PATH +X11_Xscreensaver_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xscreensaver_LIB +X11_Xscreensaver_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xshape_INCLUDE_PATH +X11_Xshape_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xt_INCLUDE_PATH +X11_Xt_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xt_LIB +X11_Xt_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xutil_INCLUDE_PATH +X11_Xutil_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xv_INCLUDE_PATH +X11_Xv_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xv_LIB +X11_Xv_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_Xxf86misc_LIB +X11_Xxf86misc_LIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_dpms_INCLUDE_PATH +X11_dpms_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_xf86misc_INCLUDE_PATH +X11_xf86misc_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: X11_xf86vmode_INCLUDE_PATH +X11_xf86vmode_INCLUDE_PATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: XIAR +XIAR-ADVANCED:INTERNAL=1 +//Result of TRY_COMPILE +ZLIB_COMPILE_RES:INTERNAL=TRUE +//ADVANCED property for variable: ZLIB_INCLUDE_DIR +ZLIB_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ZLIB_LIBRARY +ZLIB_LIBRARY-ADVANCED:INTERNAL=1 +//Result of TRY_RUN +ZLIB_RUN_RES:INTERNAL=0 + diff --git a/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/setup b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/setup new file mode 100644 index 00000000000..3f51308d814 --- /dev/null +++ b/Maintenance/infrastructure/matisse.geometryfactory.com/reference-platforms/x86-64_Linux-2.6_IntelCompiler-12.0-with-g++-4.5.1_F14/setup @@ -0,0 +1,7 @@ +source /opt/intel/composerxe-2011.4.191/bin/compilervars.sh intel64 +CXX=icpc +CC=icc +export CXX CC +export QTDIR=/usr/lib64/qt-3.3 +source /home/lrineau/CGAL/MPFI-RS/setup-rs +source /home/lrineau/CGAL/CGAL-I-REF/cmake/platforms/setup-common diff --git a/Maintenance/public_release/announcement/CGAL-3.8.1 b/Maintenance/public_release/announcement/CGAL-3.8.1 new file mode 100644 index 00000000000..98be3611722 --- /dev/null +++ b/Maintenance/public_release/announcement/CGAL-3.8.1 @@ -0,0 +1,10 @@ +Subject: CGAL 3.8.1 Released, Computational Geometry Algorithms Library +Body: + +The CGAL Open Source Project is pleased to announce the release 3.8.1 of +CGAL, the Computational Geometry Algorithms Library. + +Version 3.8.1 is a bug-fix release for version 3.8. No new feature has +been added in 3.8.1. The following corrections have been made: + +[...] diff --git a/Maintenance/public_release/announcement/CGAL-3.9 b/Maintenance/public_release/announcement/CGAL-3.9 new file mode 100644 index 00000000000..4696801eb5e --- /dev/null +++ b/Maintenance/public_release/announcement/CGAL-3.9 @@ -0,0 +1,53 @@ +Subject: CGAL 3.9 Released, Computational Geometry Algorithms Library +Body: + +The CGAL Open Source Project is pleased to announce the Release 3.9 +of CGAL, the Computational Geometry Algorithms Library. + +Besides fixes to existing packages major features where added +in the following packages. + +[...] + +See http://www.cgal.org/releases.html for a complete list of changes. + + +The CGAL project is a collaborative effort to develop a robust, +easy-to-use, and efficient C++ software library of geometric data +structures and algorithms, like +- triangulations (2D constrained triangulations and Delaunay + triangulations in 2D and 3D, periodic triangulations), +- Voronoi diagrams (for 2D and 3D points, 2D additively weighted + Voronoi diagrams, and segment Voronoi diagrams), +- Boolean operations on polygons and polyhedra, +- Regularized Boolean operations on polygons with curved arcs +- arrangements of curves, +- mesh algorithms (2D Delaunay mesh generation and 3D surface mesh + generation, surface mesh subdivision and parameterization), +- alpha shapes (in 2D and 3D), +- convex hull algorithms (in 2D, 3D and dD), +- operations on polygons (straight skeleton and offset polygon), +- search structures (kd trees for nearest neighbor search, and + range and segment trees), +- interpolation (natural neighbor interpolation and placement of + streamlines), +- optimization algorithms (smallest enclosing sphere of points or + spheres, smallest enclosing ellipsoid of points, principal + component analysis), +- kinetic data structures + + + + +Some modules are distributed under the terms of the LGPL Open Source +license (GNU Lesser General Public License v2.1). +Most modules are distributed under the terms of the QPL Open Source +license (Q Public License v1.0). +If your intended usage does not meet the criteria of the +aforementioned licenses, a commercial license can be purchased from +GeometryFactory (http://www.geometryfactory.com/). + + +For further information and for downloading the library and its +documentation, please visit the CGAL web site: http://www.cgal.org/ + diff --git a/Manual/developer_scripts/cgal_manual b/Manual/developer_scripts/cgal_manual index 042d9172df1..9b9825294d6 100755 --- a/Manual/developer_scripts/cgal_manual +++ b/Manual/developer_scripts/cgal_manual @@ -247,8 +247,8 @@ Sum=0 # Read the resource file ReturnStatus=0 -if [ -r $ResourceFile ] ; then - source $ResourceFile +if [ -r "$ResourceFile" ] ; then + source "$ResourceFile" fi if [ $ReturnStatus -ne 0 ] ; then exit $ReturnStatus diff --git a/Manual/doc_tex/Introduction/PkgDescription.tex b/Manual/doc_tex/Introduction/PkgDescription.tex index 53680bc2411..fb70a08814e 100644 --- a/Manual/doc_tex/Introduction/PkgDescription.tex +++ b/Manual/doc_tex/Introduction/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Introduction\label{Pkg:GeneralIntroduction}} -\ccPkgHowToCiteCgal{cgal:eb-gi-11} +\ccPkgHowToCiteCgal{cgal:eb-gi-11b} \ccPkgSummary{ This chapter explains how the manual is organized, presents a ``Hello World'' program, and gives recommendations for further readings.} diff --git a/Manual/doc_tex/Manual/cgal_manual.bib b/Manual/doc_tex/Manual/cgal_manual.bib index 819e9f66341..ada8e65a6d1 100644 --- a/Manual/doc_tex/Manual/cgal_manual.bib +++ b/Manual/doc_tex/Manual/cgal_manual.bib @@ -2120,7 +2120,7 @@ url = "http://www.boost.org/more/generic_exception_safety.html" author = {Michael Kazhdan and M. Bolitho and Hugues Hoppe}, title = "{Poisson Surface Reconstruction}", booktitle = {Symp. on Geometry Processing}, - year = {2005}, + year = {2006}, pages = "61--70", } diff --git a/Manual/doc_tex/Manual/cgal_manual.sty b/Manual/doc_tex/Manual/cgal_manual.sty index 81611c1370d..8a77d8acfa0 100644 --- a/Manual/doc_tex/Manual/cgal_manual.sty +++ b/Manual/doc_tex/Manual/cgal_manual.sty @@ -280,7 +280,7 @@ \newcommand{\cgaldownloadpage}{\path'http://www.cgal.org/download.html'} \newcommand{\gmppage}{\path'http://gmplib.org/'} \newcommand{\mpfrpage}{\path'http://www.mpfr.org/'} -\newcommand{\mpfipage}{\path'http://gforge.inria.fr/projects/mpfi/'} +\newcommand{\mpfipage}{\path'http://mpfi.gforge.inria.fr/'} \newcommand{\boostpage}{\path'http://www.boost.org/'} \newcommand{\boostprodownloadpage}{\path'http://www.boostpro.com/download/'} \newcommand{\corepage}{\path'http://www.cs.nyu.edu/exact/'} diff --git a/Manual/doc_tex/Manual/manual-3.9.bib b/Manual/doc_tex/Manual/manual-3.9.bib new file mode 100644 index 00000000000..bc0069dc03f --- /dev/null +++ b/Manual/doc_tex/Manual/manual-3.9.bib @@ -0,0 +1,828 @@ +% please dont't modify the "arobase" string commands +% they are used by the scripts to create the "How to cite CGAL" web page +% thanks - Monique + +@string{ author_create_page = 0 } +@string{ category_create_page = 0 } +@string{ reduced_year_create_page = 0 } +@string{ complete_year_create_page = 0 } + +@string{ index_file_title = "How to cite CGAL" } +@string{ index_page_title = "How to cite CGAL" } + +@string{ complete_biblio_file_title = "CGAL Publications sorted by year" } +@string{ complete_biblio_page_title = "CGAL Publications sorted by year" } +@string{ filename_complete_biblio = "how_to_cite_cgal" } + +@string{ head_tag.end = "layout.html" } +%@string{ header_of_contents = "header_of_contents" } + +@string{ keyword_build_initials_index = 0 } +@string{ keyword_put_initials_in_index = 0 } + +@string{ keyword_write_bibtex_abstract = 0 } +@string{ complete_biblio_write_bibtex_abstract = 0 } + +@string{ disclaimer_2 = ""} +@STRING{ default_header_of_body = "" } +@STRING{ default_footer_of_contents = ""} +@string{ index_write_author = 0 } +@string{ keyword_write_author = 0 } +@string{ complete_biblio_write_author = 0 } + +@string{ index_write_date = 0 } +@string{ keyword_write_date = 0 } +@string{ complete_biblio_write_date = 0 } + + + +@book{ cgal:eb-11b +, title = "{CGAL} User and Reference Manual" +, author = "{The CGAL Project}" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, year = 2011 +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html" +} + + +@incollection{cgal:h-af-11b +, author = "Michael Hemmer" +, title = "Algebraic Foundations" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:AlgebraicFoundations" +, year = 2011 +} + +@incollection{cgal:bht-ak-11b +, author = "Eric Berberich and Michael Hemmer and Sylvain Lazard and Luis Pe\~{n}aranda and Monique Teillaud" +, title = "Algebraic Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:AlgebraicKerneld" +, year = 2011 +} + +@incollection{cgal:hhkps-nt-11b +, author = "Michael Hemmer and Susan Hert and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "Number Types" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:NumberTypes" +, year = 2011 +} + +@incollection{cgal:h-p-11b +, author = "Michael Hemmer" +, title = "Polynomial" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Polynomial" +, year = 2011 +} + +@incollection{cgal:h-ma-11b +, author = "Michael Hemmer" +, title = "Modular Arithmetic" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:ModularArithmetic" +, year = 2011 +} + +@incollection{cgal:bfghhkps-lgk23-11b +, author = "Herv{\'e} Br{\"o}nnimann and Andreas Fabri and Geert-Jan Giezeman and Susan Hert and Michael Hoffmann and Lutz Kettner and Sylvain Pion and Stefan Schirra" +, title = "{2D} and {3D} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Kernel23" +, year = 2011 +} + +@incollection{cgal:s-gkd-11b +, author = "Michael Seel" +, title = "{dD} Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:KernelD" +, year = 2011 +} + +@incollection{cgal:cpt-cgk2-11b +, author = "Pedro Machado Manh\~{a}es de Castro and Sylvain Pion and Monique Teillaud" +, title = "{2D} Circular Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:CircularKernel2" +, year = 2011 +} + +@incollection{cgal:cclt-sgk3-11b +, author = "Pedro Machado Manh\~{a}es de Castro and Fr{\'e}d{\'e}ric Cazals and S{\'e}bastien Loriot and Monique Teillaud" +, title = "{3D} Spherical Geometry Kernel" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SphericalKernel3" +, year = 2011 +} + +@incollection{cgal:hs-chep2-11b +, author = "Susan Hert and Stefan Schirra" +, title = "{2D} Convex Hulls and Extreme Points" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:ConvexHull2" +, year = 2011 +} + +@incollection{cgal:hs-ch3-11b +, author = "Susan Hert and Stefan Schirra" +, title = "{3D} Convex Hulls" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:ConvexHull3" +, year = 2011 +} + +@incollection{cgal:gw-p2-11b +, author = "Geert-Jan Giezeman and Wieger Wesselink" +, title = "{2D} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Polygon2" +, year = 2011 +} + +@incollection{cgal:h-pp2-11b +, author = "Susan Hert" +, title = "{2D} Polygon Partitioning" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:PolygonPartitioning2" +, year = 2011 +} + +@incollection{cgal:hs-chdt3-11b +, author = "Susan Hert and Michael Seel" +, title = "{dD} Convex Hulls and {Delaunay} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:ConvexHullD" +, year = 2011 +} + +@incollection{cgal:k-ps-11b +, author = "Lutz Kettner" +, title = "{3D} Polyhedral Surfaces" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Polyhedron" +, year = 2011 +} + +@incollection{cgal:k-hds-11b +, author = "Lutz Kettner" +, title = "Halfedge Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:HDS" +, year = 2011 +} + +@incollection{cgal:d-cm-11b +, author = "Guillaume Damiand" +, title = "Combinatorial Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:CombinatorialMaps +, year = 2011 +} + +@incollection{cgal:fwzh-rbso2-11b +, author = "Efi Fogel and Ron Wein and Baruch Zukerman and Dan Halperin" +, title = "{2D} Regularized {Boolean} Set-Operations" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:BooleanSetOperations2" +, year = 2011 +} + +@incollection{cgal:w-rms2-11b +, author = "Ron Wein" +, title = "{2D} {Minkowski} Sums" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:MinkowskiSum2" +, year = 2011 +} + +@incollection{cgal:s-bonp2-11b +, author = "Michael Seel" +, title = "{2D} {Boolean} Operations on {Nef} Polygons" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Nef2" +, year = 2011 +} + +@incollection{cgal:hk-bonpes2-11b +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{2D} {Boolean} Operations on {Nef} Polygons Embedded on the Sphere" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:NefS2" +, year = 2011 +} + +@incollection{cgal:hk-bonp3-11b +, author = "Peter Hachenberger and Lutz Kettner" +, title = "{3D} {Boolean} Operations on {Nef} Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Nef3" +, year = 2011 +} + +@incollection{cgal:h-emspe-11b +, author = "Peter Hachenberger" +, title = "Convex Decomposition of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:ConvexDecomposition3" +, year = 2011 +} + +@incollection{cgal:h-msp3-11b +, author = "Peter Hachenberger" +, title = "{3D} {Minkowski} Sum of Polyhedra" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:MinkowskiSum3" +, year = 2011 +} + +@incollection{cgal:c-sspo2-11b +, author = "Fernando Cacciola" +, title = "{2D} Straight Skeleton and Polygon Offsetting" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:StraightSkeleton2" +, year = 2011 +} + +@incollection{cgal:wfzh-a2-11b +, author = "Ron Wein and Efi Fogel and Baruch Zukerman and Dan Halperin" +, title = "{2D} Arrangements" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Arrangement2" +, year = 2011 +} + +@incollection{cgal:wfz-ic2-11b +, author = "Baruch Zukerman and Ron Wein and Efi Fogel" +, title = "{2D} Intersection of Curves" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:IntersectionOfCurves2" +, year = 2011 +} + +@incollection{cgal:p-sr2-11b +, author = "Eli Packer" +, title = "{2D} Snap Rounding" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SnapRounding2" +, year = 2011 +} + +@incollection{cgal:w-e2-11b +, author = "Ron Wein" +, title = "{2D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Envelope2" +, year = 2011 +} + +@incollection{cgal:mwz-e3-11b +, author = "Michal Meyerovitch and Ron Wein and Baruch Zukerman" +, title = "{3D} Envelopes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Envelope3" +, year = 2011 +} + +@incollection{cgal:y-t2-11b +, author = "Mariette Yvinec" +, title = "{2D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Triangulation2" +, year = 2011 +} + +@incollection{cgal:py-tds2-11b +, author = "Sylvain Pion and Mariette Yvinec" +, title = "{2D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:TDS2" +, year = 2011 +} + +@incollection{cgal:pt-t3-11b +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Triangulation3" +, year = 2011 +} + +@incollection{cgal:pt-tds3-11b +, author = "Sylvain Pion and Monique Teillaud" +, title = "{3D} Triangulation Data Structure" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:TDS3" +, year = 2011 +} + +@incollection{cgal:ct-pt3-11b +, author = "Manuel Caroli and Monique Teillaud" +, title = "{3D} Periodic Triangulations" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Periodic3Triangulation3" +, year = 2011 +} + +@incollection{cgal:d-as2-11b +, author = "Tran Kai Frank Da" +, title = "{2D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:AlphaShape2" +, year = 2011 +} + +@incollection{cgal:dy-as3-11b +, author = "Tran Kai Frank Da and Mariette Yvinec" +, title = "{3D} Alpha Shapes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:AlphaShapes3" +, year = 2011 +} + +@incollection{cgal:k-sdg2-11b +, author = "Menelaos Karavelas" +, title = "{2D} Segment {Delaunay} Graphs" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SegmentDelaunayGraph2" +, year = 2011 +} + +@incollection{cgal:ky-ag2-11b +, author = "Menelaos Karavelas and Mariette Yvinec" +, title = "{2D} {Apollonius} Graphs ({Delaunay} Graphs of Disks)" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:ApolloniusGraph2" +, year = 2011 +} + +@incollection{cgal:k-vda2-11b +, author = "Menelaos Karavelas" +, title = "{2D} {Voronoi} Diagram Adaptor" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:VoronoiDiagramAdaptor2" +, Year = 2011 +} + +@incollection{cgal:r-ctm2-11b +, author = "Laurent Rineau" +, title = "{2D} Conforming Triangulations and Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Mesh2" +, year = 2011 +} + +@incollection{cgal:ry-smg-11b +, author = "Laurent Rineau and Mariette Yvinec" +, title = "{3D} Surface Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SurfaceMesher3" +, year = 2011 +} + +@incollection{cgal:asg-srps-11b +, author = "Pierre Alliez and Laurent Saboret and Gael Guennebaud" +, title = "Surface Reconstruction from Point Sets" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SurfaceReconstructionFromPointSets" +, year = 2011 +} + +@incollection{cgal:k-ssm3-11b +, author = "Nico Kruithof" +, title = "{3D} Skin Surface Meshing" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SkinSurface3" +, year = 2011 +} + +@incollection{cgal:rty-m3-11b +, author = "Pierre Alliez and Laurent Rineau and St\'ephane Tayeb and Jane Tournois and Mariette Yvinec" +, title = "{3D} Mesh Generation" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Mesh_3" +, year = 2011 +} + +@incollection{cgal:s-ssm2-11b +, author = "Le-Jeng Andy Shiue" +, title = "{3D} Surface Subdivision Methods" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SurfaceSubdivisionMethods3" +, year = 2011 +} + +@incollection{cgal:c-tsms-11b +, author = "Fernando Cacciola" +, title = "Triangulated Surface Mesh Simplification" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SurfaceMeshSimplification" +, year = 2011 +} + +@incollection{cgal:sal-pptsm2-11b +, author = "Laurent Saboret and Pierre Alliez and Bruno L\'evy" +, title = "Planar Parameterization of Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SurfaceParameterization" +, year = 2011 +} + +@incollection{cgal:b-ss2-11b +, author = "Matthias B\"asken" +, title = "{2D} Range and Neighbor Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:PointSet2" +, year = 2011 +} + +@incollection{cgal:n-rstd-11b +, author = "Gabriele Neyer" +, title = "{dD} Range and Segment Trees" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:RangeSegmentTreesD" +, year = 2011 +} + +@incollection{cgal:f-isl-11b +, author = "Andreas Fabri" +, title = "Interval Skip List" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:IntervalSkipList" +, year = 2011 +} + +@incollection{cgal:tf-ssd-11b +, author = "Hans Tangelder and Andreas Fabri" +, title = "{dD} Spatial Searching" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SpatialSearchingD" +, year = 2011 +} + +@incollection{cgal:kmz-isiobd-11b +, author = "Lutz Kettner and Andreas Meyer and Afra Zomorodian" +, title = "Intersecting Sequences of {dD} Iso-oriented Boxes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:BoxIntersectionD" +, year = 2011 +} + +@incollection{cgal:fghhs-bv-11b +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann and Sven Sch{\"o}nherr" +, title = "Bounding Volumes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:BoundingVolumes" +, year = 2011 +} + +@incollection{cgal:fgsw-lqps-11b +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Sven Sch{\"o}nherr and Frans Wessendorp" +, title = "Linear and Quadratic Programming Solver" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:QPSolver" +, year = 2011 +} + +@incollection{cgal:hp-ia-11b +, author = "Michael Hoffmann and Eli Packer" +, title = "Inscribed Areas" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:InscribedAreas" +, year = 2011 +} + +@incollection{cgal:fghhs-od-11b +, author = "Kaspar Fischer and Bernd G{\"a}rtner and Thomas Herrmann and Michael Hoffmann + and Sven Sch{\"o}nherr" +, title = "Optimal Distances" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:OptimalDistances" +, year = 2011 +} + +@incollection{cgal:f-i-11b +, author = "Julia Fl{\"o}totto" +, title = "{2D} and Surface Function Interpolation" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Interpolation2" +, year = 2011 +} + +@incollection{cgal:ap-pcad-11b +, author = "Pierre Alliez and Sylvain Pion and Ankit Gupta" +, title = "Principal Component Analysis" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:PrincipalComponentAnalysisD" +, year = 2011 +} + +@incollection{cgal:m-ps-11b +, author = "Abdelkrim Mebarki" +, title = "{2D} Placement of Streamlines" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:PlacementOfStreamlines2" +, year = 2011 +} + +@incollection{cgal:cp-arutsm-11b +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Approximation of Ridges and Umbilics on Triangulated Surface Meshes" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Ridges_3" +, year = 2011 +} + +@incollection{cgal:pc-eldp-11b +, author = "Marc Pouget and Fr\'ed\'eric Cazals" +, title = "Estimation of Local Differential Properties" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Jet_fitting_3" +, year = 2011 +} + +@incollection{cgal:ass-psp-11b +, author = "Pierre Alliez and Laurent Saboret and Nader Salman" +, title = "Point Set Processing" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:PointSetProcessing" +, year = 2011 +} + +@incollection{cgal:r-kds-11b +, author = "Daniel Russel" +, title = "Kinetic Data Structures" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Kds" +, year = 2011 +} + +@incollection{cgal:r-kdsf-11b +, author = "Daniel Russel" +, title = "Kinetic Framework" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:KdsFramework" +, year = 2011 +} + +@incollection{cgal:cfw-cbgl-11b +, author = "Andreas Fabri and Fernando Cacciola and Ron Wein" +, title = "{CGAL} and the {Boost} Graph Library" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:BGL" +, year = 2011 +} + +@incollection{cgal:fs-cbpm-11b +, author = "Andreas Fabri and Laurent Saboret" +, title = "{CGAL} and {Boost} Property Maps" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Property_map" +, year = 2011 +} + +@incollection{cgal:d-ss-11b +, author = "Christophe Delage" +, title = "Spatial Sorting" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:SpatialSorting" +, year = 2011 +} + +@incollection{cgal:atw-aabb-11b +, author = "Pierre Alliez and St\'ephane Tayeb and Camille Wormser" +, title = "AABB Tree" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:AABB_tree" +, year = 2011 +} + +@incollection{cgal:h-msms-11b +, author = "Michael Hoffmann" +, title = "Monotone and Sorted Matrix Search" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:MatrixSearch" +, year = 2011 +} + +@incollection{cgal:hkpw-se-11b +, author = "Michael Hoffmann and Lutz Kettner and Sylvain Pion and Ron Wein" +, title = "STL Extensions for {CGAL}" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:StlExtension" +, year = 2011 +} + +@incollection{cgal:dksy-hc-11b +, author = "Olivier Devillers and Lutz Kettner and Michael Seel and Mariette Yvinec" +, title = "Handles and Circulators" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:HandlesAndCirculators" +, year = 2011 +} + +@incollection{cgal:hhk-gog-11b +, author = "Susan Hert and Michael Hoffmann and Lutz Kettner and Sven Sch\"onherr" +, title = "Geometric Object Generators" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Generators" +, year = 2011 +} + +@incollection{cgal:kps-pthum-11b +, author = "Lutz Kettner and Sylvain Pion and Michael Seel" +, title = "Profiling Tools Timers, Hash Map, Union-find, Modifiers" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:ProfilingTools" +, year = 2011 +} + +@incollection{cgal:fgk-ios-11b +, author = "Andreas Fabri and Geert-Jan Giezeman and Lutz Kettner" +, title = "IO Streams" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:IOstreams" +, year = 2011 +} + +@incollection{cgal:fp-gv-11b +, author = "Andreas Fabri and Sylvain Pion" +, title = "Geomview" +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:Geomview" +, year = 2011 +} + +@incollection{cgal:fr-cqgvf-11b +, author = "Andreas Fabri and Laurent Rineau" +, title = "{CGAL} and the Qt Graphics View Framework " +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:GraphicsView" +, year = 2011 +} + +@incollection{cgal:lp-gi-11b +, author = "S\'ebastien Loriot and Sylvain Pion" +, title = "{CGAL} Ipelets " +, publisher = "{CGAL Editorial Board}" +, edition = "{3.9}" +, booktitle = "{CGAL} User and Reference Manual" +, url = "http://www.cgal.org/Manual/3.9/doc_html/cgal_manual/packages.html#Pkg:CGALIpelets" +, year = 2011 +} diff --git a/Manual/doc_tex/Miscellany/PkgDescription.tex b/Manual/doc_tex/Miscellany/PkgDescription.tex index 2a48d294da4..9d54b18e067 100644 --- a/Manual/doc_tex/Miscellany/PkgDescription.tex +++ b/Manual/doc_tex/Miscellany/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Profiling tools, Hash Map, Union-find, Modifiers \label{Pkg:ProfilingTools}} -\ccPkgHowToCiteCgal{cgal:kps-pthum-11} +\ccPkgHowToCiteCgal{cgal:kps-pthum-11b} \ccPkgSummary{This package provides classes for profiling time and memory consumption, a hash map, a union find data structure and a modifier.} diff --git a/Manual/doc_tex/Preliminaries/PkgDescription.tex b/Manual/doc_tex/Preliminaries/PkgDescription.tex index 4ab505cb25c..d491779b3a2 100644 --- a/Manual/doc_tex/Preliminaries/PkgDescription.tex +++ b/Manual/doc_tex/Preliminaries/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Preliminaries\label{Pkg:Preliminaries}} -\ccPkgHowToCiteCgal{cgal:eb-gi-11} +\ccPkgHowToCiteCgal{cgal:eb-gi-11b} \ccPkgSummary{ This chapter lists the licenses under which the \cgal\ datastructures and algorithms are distributed, diff --git a/Manual/doc_tex/cgal_manual.tex b/Manual/doc_tex/cgal_manual.tex index 317624e3af6..d5f6fb3c606 100644 --- a/Manual/doc_tex/cgal_manual.tex +++ b/Manual/doc_tex/cgal_manual.tex @@ -90,10 +90,11 @@ \packageleftright{Minkowski_sum_2}{Minkowski_sum_2_ref} - \entry{\part{Polyhedra\label{Part:Polyhedra}}} + \entry{\part{Cell Complexes and Polyhedra\label{Part:Polyhedra}}} \packageleftright{Polyhedron}{Polyhedron_ref} \packageleftright{HalfedgeDS}{HalfedgeDS_ref} + \packageleftright{Combinatorial_map}{Combinatorial_map_ref} \packageleftright{Nef_3}{Nef_3_ref} \packageleftright{Convex_decomposition_3}{Convex_decomposition_3_ref} \packageleftright{Minkowski_sum_3}{Minkowski_sum_3_ref} diff --git a/Matrix_search/doc_tex/Matrix_search/PkgDescription.tex b/Matrix_search/doc_tex/Matrix_search/PkgDescription.tex index 5bb79135666..8b046ce7569 100644 --- a/Matrix_search/doc_tex/Matrix_search/PkgDescription.tex +++ b/Matrix_search/doc_tex/Matrix_search/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Monotone and Sorted Matrix Search \label{Pkg:MatrixSearch}} -\ccPkgHowToCiteCgal{cgal:h-msms-11} +\ccPkgHowToCiteCgal{cgal:h-msms-11b} \ccPkgSummary{ This package provides a matrix search framework, which is the underlying technique for the computation of all furthest neighbors for the vertices of a convex polygon, diff --git a/Mesh_2/doc_tex/Mesh_2/PkgDescription.tex b/Mesh_2/doc_tex/Mesh_2/PkgDescription.tex index 9bcbb54904f..86763691112 100644 --- a/Mesh_2/doc_tex/Mesh_2/PkgDescription.tex +++ b/Mesh_2/doc_tex/Mesh_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Conforming Triangulations and Meshes\label{Pkg:Mesh2}} -\ccPkgHowToCiteCgal{cgal:r-ctm2-11} +\ccPkgHowToCiteCgal{cgal:r-ctm2-11b} \ccPkgSummary{ This package implements a Delaunay refinement algorithm to construct conforming triangulations and 2D meshes. diff --git a/Mesh_3/doc_tex/Mesh_3/PkgDescription.tex b/Mesh_3/doc_tex/Mesh_3/PkgDescription.tex index 4999bc07887..c5139604613 100644 --- a/Mesh_3/doc_tex/Mesh_3/PkgDescription.tex +++ b/Mesh_3/doc_tex/Mesh_3/PkgDescription.tex @@ -13,7 +13,7 @@ Surfaces may exhibit 1-dimensional features (e.g. crease edges) and 0-dimensional features (e.g. singular points as corners tips, cusps or darts), that have to be fairly approximated in the mesh. } -\ccPkgHowToCiteCgal{cgal:rty-m3-11} +\ccPkgHowToCiteCgal{cgal:rty-m3-11b} \ccPkgDependsOn{\ccRef[3D Triangulations]{Pkg:Triangulation3}, \ccRef[2D Meshes]{Pkg:Mesh2}, \ccRef[3D Surface Mesh Generation]{Pkg:SurfaceMesher3} diff --git a/Mesh_3/doc_tex/Mesh_3/mesh_3_user.tex b/Mesh_3/doc_tex/Mesh_3/mesh_3_user.tex index c4c49e136d2..f49366ab72f 100644 --- a/Mesh_3/doc_tex/Mesh_3/mesh_3_user.tex +++ b/Mesh_3/doc_tex/Mesh_3/mesh_3_user.tex @@ -172,7 +172,7 @@ and the $0$-dimensional exposed features are represented by mesh vertices. -\subsubsection{Delaunay refinement} +\subsubsection{Delaunay Refinement} \label{introsec:param} The mesh generation algorithm is mainly a Delaunay refinement process. diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 50c714da6e3..9363acb2a99 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -163,7 +163,7 @@ private: else if ( perturbation() != pv.perturbation() ) return *perturbation() < *pv.perturbation(); else - return true; // all characteristics are the same! + return false; // all characteristics are the same! } private: diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 9e54f5fea9d..7c5ae78bef2 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -31,7 +31,11 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "test_criteria.cpp" ) create_single_source_cgal_program( "test_domain_with_polyline_features.cpp" ) create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) + if(CGAL_ImageIO_USE_ZLIB) + create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) + else() + message(STATUS "test_meshing_3D_image requires the ZLIB library, and will not be compiled.") + endif() create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedron_with_features.cpp" ) diff --git a/Minkowski_sum_2/doc_tex/Minkowski_sum_2/PkgDescription.tex b/Minkowski_sum_2/doc_tex/Minkowski_sum_2/PkgDescription.tex index ce1cb4ba520..5ab62b53c63 100644 --- a/Minkowski_sum_2/doc_tex/Minkowski_sum_2/PkgDescription.tex +++ b/Minkowski_sum_2/doc_tex/Minkowski_sum_2/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{2D Minkowski Sums\label{Pkg:MinkowskiSum2}} -\ccPkgHowToCiteCgal{cgal:w-rms2-11} +\ccPkgHowToCiteCgal{cgal:w-rms2-11b} \ccPkgSummary{ This package consists of functions that compute the Minkowski sum of two simple straight-edge polygons in the plane. It also contains diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h index 961877cdba1..ace8107c84c 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h @@ -197,7 +197,7 @@ public: std::vector dirs2 (n2); Vertex_circulator prev2, curr2, next2; Vertex_ref bottom_left; - // bool is_convex2 = true; + bool is_convex2 = true; std::list reflex_vertices; unsigned int k2; @@ -223,7 +223,7 @@ public: if (f_orientation (*prev2, *curr2, *next2) == RIGHT_TURN) { // We found a reflex vertex. - // is_convex2 = false; + is_convex2 = false; reflex_vertices.push_back (Vertex_ref (curr2, k2)); } diff --git a/Minkowski_sum_3/doc_tex/Minkowski_sum_3/PkgDescription.tex b/Minkowski_sum_3/doc_tex/Minkowski_sum_3/PkgDescription.tex index 8eaccf72ea5..24deafceda0 100644 --- a/Minkowski_sum_3/doc_tex/Minkowski_sum_3/PkgDescription.tex +++ b/Minkowski_sum_3/doc_tex/Minkowski_sum_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{3D Minkowski Sum of Polyhedra\label{Pkg:MinkowskiSum3}} -\ccPkgHowToCiteCgal{cgal:h-msp3-11} +\ccPkgHowToCiteCgal{cgal:h-msp3-11b} \ccPkgSummary{ This package provides a function, which computes the Minkowski sum of two point sets in $\mathbb{R}^3$. These point sets may consist of diff --git a/Modular_arithmetic/doc_tex/Modular_arithmetic/PkgDescription.tex b/Modular_arithmetic/doc_tex/Modular_arithmetic/PkgDescription.tex index 0b60bb2ed43..4811b26f562 100644 --- a/Modular_arithmetic/doc_tex/Modular_arithmetic/PkgDescription.tex +++ b/Modular_arithmetic/doc_tex/Modular_arithmetic/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Modular Arithmetic \label{Pkg:ModularArithmetic}} -\ccPkgHowToCiteCgal{cgal:h-ma-11} +\ccPkgHowToCiteCgal{cgal:h-ma-11b} \ccPkgSummary{ This package provides arithmetic over finite fields. The provided tools are in particular useful for filters based on diff --git a/Nef_2/doc_tex/Nef_2/PkgDescription.tex b/Nef_2/doc_tex/Nef_2/PkgDescription.tex index 77bf16fb034..01fbf6ea602 100644 --- a/Nef_2/doc_tex/Nef_2/PkgDescription.tex +++ b/Nef_2/doc_tex/Nef_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Boolean Operations on Nef Polygons \label{Pkg:Nef2}} -\ccPkgHowToCiteCgal{cgal:s-bonp2-11} +\ccPkgHowToCiteCgal{cgal:s-bonp2-11b} \ccPkgSummary{ A Nef polygon is any set that can be obtained from a finite set of open halfspaces by set complement and set intersection diff --git a/Nef_3/doc_tex/Nef_3/PkgDescription.tex b/Nef_3/doc_tex/Nef_3/PkgDescription.tex index 5a2f5aaa2d9..2a20a17fd9a 100644 --- a/Nef_3/doc_tex/Nef_3/PkgDescription.tex +++ b/Nef_3/doc_tex/Nef_3/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{3D Boolean Operations on Nef Polyhedra\label{Pkg:Nef3}} -\ccPkgHowToCiteCgal{cgal:hk-bonp3-11} +\ccPkgHowToCiteCgal{cgal:hk-bonp3-11b} \ccPkgSummary{ 3D Nef polyhedra, are a boundary representation for cell-complexes bounded by halfspaces that diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index 18b17eb606c..28c5e01c4bc 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -504,8 +504,8 @@ public: std::list S; const Node* node; Traits traits; - CGAL_assertion_code( Segment_3 prev_segment); - CGAL_assertion_code( bool first_segment); + CGAL_assertion_code( Segment_3 prev_segment;) + CGAL_assertion_code( bool first_segment;) public: Iterator() : node(0) {} Iterator( const Node* root, const Segment_3& s) { diff --git a/Nef_S2/doc_tex/Nef_S2/PkgDescription.tex b/Nef_S2/doc_tex/Nef_S2/PkgDescription.tex index 1e18f9aa696..c528d6a69c4 100644 --- a/Nef_S2/doc_tex/Nef_S2/PkgDescription.tex +++ b/Nef_S2/doc_tex/Nef_S2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Boolean Operations on Nef Polygons Embedded on the Sphere \label{Pkg:NefS2}} -\ccPkgHowToCiteCgal{cgal:hk-bonpes2-11} +\ccPkgHowToCiteCgal{cgal:hk-bonpes2-11b} \ccPkgSummary{This package offers the equivalent to 2D Nef Polygons in the plane. Here halfplanes correspond to half spheres delimited by great circles. } diff --git a/Optimisation_doc/doc_tex/Bounding_volumes/PkgDescription.tex b/Optimisation_doc/doc_tex/Bounding_volumes/PkgDescription.tex index 09d9c19699d..d859820b689 100644 --- a/Optimisation_doc/doc_tex/Bounding_volumes/PkgDescription.tex +++ b/Optimisation_doc/doc_tex/Bounding_volumes/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Bounding Volumes \label{Pkg:BoundingVolumes}} - \ccPkgHowToCiteCgal{cgal:fghhs-bv-11} + \ccPkgHowToCiteCgal{cgal:fghhs-bv-11b} \ccPkgSummary{ This package provides algorithms for computing optimal bounding volumes of point sets. In d-dimensional space, the smallest enclosing sphere, diff --git a/Optimisation_doc/doc_tex/Inscribed_areas/PkgDescription.tex b/Optimisation_doc/doc_tex/Inscribed_areas/PkgDescription.tex index f87e8d56b34..71cee9eb5bb 100644 --- a/Optimisation_doc/doc_tex/Inscribed_areas/PkgDescription.tex +++ b/Optimisation_doc/doc_tex/Inscribed_areas/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Inscribed Areas \label{Pkg:InscribedAreas}} -\ccPkgHowToCiteCgal{cgal:hp-ia-11} +\ccPkgHowToCiteCgal{cgal:hp-ia-11b} \ccPkgSummary{ This package provides algorithms for computing inscribed areas. The algorithms for computing inscribed areas are: the largest inscribed diff --git a/Partition_2/doc_tex/Partition_2/PkgDescription.tex b/Partition_2/doc_tex/Partition_2/PkgDescription.tex index 3ebea971a9d..f0a74544cfc 100644 --- a/Partition_2/doc_tex/Partition_2/PkgDescription.tex +++ b/Partition_2/doc_tex/Partition_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Polygon Partitioning \label{Pkg:PolygonPartitioning2}} -\ccPkgHowToCiteCgal{cgal:h-pp2-11} +\ccPkgHowToCiteCgal{cgal:h-pp2-11b} \ccPkgSummary{This package provides functions for partitioning polygons in monotone or convex polygons. The algorithms can produce results with the minimal number of diff --git a/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/P3Triang3.tex b/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/P3Triang3.tex index 852de3c197f..eef6d306de9 100644 --- a/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/P3Triang3.tex +++ b/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/P3Triang3.tex @@ -118,7 +118,7 @@ indices \ccc{i} and \ccc{j}). See Figure~\ref{TDS3-fig-repres}. Some point sets do not admit a triangulation in $\mathbb T_c^3$. In this case we use 27 periodic copies of the point set arranged in a cube of edge length $3c$. Any point set constructed in this way has a -triangulation in $\mathbb R^3/G'$ with $G'=(3c\cdot\mathbb Z,+)$ +triangulation in $\mathbb R^3/G'$ with $G'=((3c\cdot\mathbb Z)^3,+)$ \cite{cgal:ct-c3pt-09}. So we compute the triangulation in this space, which is a \emph{27-sheeted covering space} of $\mathbb T_c^3$ (see Figure~\ref{P3Triangulation3-fig-covering}). diff --git a/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/PkgDescription.tex b/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/PkgDescription.tex index 4acbfa128ae..8d864278e8d 100644 --- a/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/PkgDescription.tex +++ b/Periodic_3_triangulation_3/doc_tex/Periodic_3_triangulation_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{3D Periodic Triangulations\label{Pkg:Periodic3Triangulation3}} -\ccPkgHowToCiteCgal{cgal:ct-pt3-11} +\ccPkgHowToCiteCgal{cgal:ct-pt3-11b} \ccPkgSummary{ This package allows to build and handle triangulations of point sets in the three dimensional flat torus. Triangulations are built diff --git a/Point_set_2/doc_tex/Point_set_2/PkgDescription.tex b/Point_set_2/doc_tex/Point_set_2/PkgDescription.tex index 3cee379f1cf..69ad4b8a127 100644 --- a/Point_set_2/doc_tex/Point_set_2/PkgDescription.tex +++ b/Point_set_2/doc_tex/Point_set_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Range and Neighbor Search\label{Pkg:PointSet2}} -\ccPkgHowToCiteCgal{cgal:b-ss2-11} +\ccPkgHowToCiteCgal{cgal:b-ss2-11b} \ccPkgSummary{ This package supports circular, triangular, and isorectangular range search queries as well as (k) nearest neighbor search queries on 2D point sets. diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex index 575f94df87c..a2d7c0d58cc 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Point Set Processing\label{Pkg:PointSetProcessing}} -\ccPkgHowToCiteCgal{cgal:ass-psp-11} +\ccPkgHowToCiteCgal{cgal:ass-psp-11b} \ccPkgSummary{This \cgal\ component implements methods to analyze and process unorganized point sets. The input is an unorganized point set, possibly with normal attributes (unoriented or oriented). The point set can be analyzed to measure its average spacing, and processed through functions devoted diff --git a/Point_set_processing_3/doc_tex/Property_map/PkgDescription.tex b/Point_set_processing_3/doc_tex/Property_map/PkgDescription.tex index bc4aef88b72..bda4ed47191 100644 --- a/Point_set_processing_3/doc_tex/Property_map/PkgDescription.tex +++ b/Point_set_processing_3/doc_tex/Property_map/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{CGAL and Boost Property Maps\label{Pkg:Property_map}} -\ccPkgHowToCiteCgal{cgal:fs-cbpm-11} +\ccPkgHowToCiteCgal{cgal:fs-cbpm-11b} \ccPkgSummary{This package provides a framework for interfacing \cgal\ data structures with algorithms expecting Boost Property Maps.} diff --git a/Point_set_processing_3/include/CGAL/Search_traits_vertex_handle_3.h b/Point_set_processing_3/include/CGAL/Search_traits_vertex_handle_3.h index 55ecdd8ee31..5adf629f267 100644 --- a/Point_set_processing_3/include/CGAL/Search_traits_vertex_handle_3.h +++ b/Point_set_processing_3/include/CGAL/Search_traits_vertex_handle_3.h @@ -96,7 +96,7 @@ template struct Construct_cartesian_const_iterator_vertex_handle_3 { typedef CGAL::Point_vertex_handle_3 Point_vertex_handle_3; - + typedef const double* result_type; const double* operator()(const Point_vertex_handle_3& p) const { return static_cast(p.m_coord); } diff --git a/Polynomial/doc_tex/Polynomial/PkgDescription.tex b/Polynomial/doc_tex/Polynomial/PkgDescription.tex index 0cd91ade744..2425d4ca321 100644 --- a/Polynomial/doc_tex/Polynomial/PkgDescription.tex +++ b/Polynomial/doc_tex/Polynomial/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Polynomial \label{Pkg:Polynomial}} -\ccPkgHowToCiteCgal{cgal:h-p-11} +\ccPkgHowToCiteCgal{cgal:h-p-11b} \ccPkgSummary{ This package introduces a concept for univariate and multivariate polynomials in $d$ variables. Though the concept is written for an arbitrary diff --git a/Polytope_distance_d/doc_tex/Polytope_distance_d/PkgDescription.tex b/Polytope_distance_d/doc_tex/Polytope_distance_d/PkgDescription.tex index dafedad32e4..fca4689eb87 100644 --- a/Polytope_distance_d/doc_tex/Polytope_distance_d/PkgDescription.tex +++ b/Polytope_distance_d/doc_tex/Polytope_distance_d/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Optimal Distances \label{Pkg:OptimalDistances}} -\ccPkgHowToCiteCgal{cgal:fghhs-od-11} +\ccPkgHowToCiteCgal{cgal:fghhs-od-11b} \ccPkgSummary{ This package provides algorithms for computing the distance between the convex hulls of two point sets in d-dimensional space, without diff --git a/Principal_component_analysis/doc_tex/Principal_component_analysis/PkgDescription.tex b/Principal_component_analysis/doc_tex/Principal_component_analysis/PkgDescription.tex index 4685a9141c1..8e5901e03d7 100644 --- a/Principal_component_analysis/doc_tex/Principal_component_analysis/PkgDescription.tex +++ b/Principal_component_analysis/doc_tex/Principal_component_analysis/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Principal Component Analysis\label{Pkg:PrincipalComponentAnalysisD}} -\ccPkgHowToCiteCgal{cgal:ap-pcad-11} +\ccPkgHowToCiteCgal{cgal:ap-pcad-11b} \ccPkgSummary{This package provides functions to compute global information about the shape of a set of 2D or 3D objects. It provides the computation of axis-aligned bounding boxes for point sets, and barycenters of weighted point sets. In addition, it provides computation of centroids (center of mass) and linear least squares fitting for point sets as well as for sets of other bounded objects. More specifically, it is possible to fit 2D lines to 2D segments, circles, disks, iso rectangles and triangles, as well as to fit 3D lines or 3D planes to 3D segments, triangles, iso cuboids, tetrahedra, spheres and balls. The common interface to these functions takes an iterator range of objects.} %\ccPkgDependsOn{} diff --git a/QP_solver/doc_tex/QP_solver/PkgDescription.tex b/QP_solver/doc_tex/QP_solver/PkgDescription.tex index 4aa6f618dff..782e98e64e8 100644 --- a/QP_solver/doc_tex/QP_solver/PkgDescription.tex +++ b/QP_solver/doc_tex/QP_solver/PkgDescription.tex @@ -1,7 +1,7 @@ \begin{ccPkgDescription}{Linear and Quadratic Programming Solver \label{Pkg:QPSolver}} -\ccPkgHowToCiteCgal{cgal:fgsw-lqps-11} +\ccPkgHowToCiteCgal{cgal:fgsw-lqps-11b} \ccPkgSummary{This package contains algorithms for minimizing linear and convex quadratic functions over polyhedral domains, described by linear equations and inequalities. The algorithms are exact, i.e. the solution diff --git a/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex b/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex index d1ad35a97a0..fb4e4b577c8 100644 --- a/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex +++ b/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Approximation of Ridges and Umbilics on Triangulated Surface Meshes \label{Pkg:Ridges_3}} - \ccPkgHowToCiteCgal{cgal:cp-arutsm-11} + \ccPkgHowToCiteCgal{cgal:cp-arutsm-11b} \ccPkgSummary{Global features related to curvature extrema encode important informations used in segmentation, registration, diff --git a/SearchStructures/doc_tex/SearchStructures/PkgDescription.tex b/SearchStructures/doc_tex/SearchStructures/PkgDescription.tex index 7bdbd07e60d..c60960fd050 100644 --- a/SearchStructures/doc_tex/SearchStructures/PkgDescription.tex +++ b/SearchStructures/doc_tex/SearchStructures/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{dD Range and Segment Trees \label{Pkg:RangeSegmentTreesD}} -\ccPkgHowToCiteCgal{cgal:n-rstd-11} +\ccPkgHowToCiteCgal{cgal:n-rstd-11b} \ccPkgSummary{Range and segment trees allow to perform window queries on point sets, and to enumerate all ranges enclosing a query point. The provided data structures are static and they are optimized for fast queries.} diff --git a/Snap_rounding_2/doc_tex/Snap_rounding_2/PkgDescription.tex b/Snap_rounding_2/doc_tex/Snap_rounding_2/PkgDescription.tex index 4b6b4f19de3..839a299f93d 100644 --- a/Snap_rounding_2/doc_tex/Snap_rounding_2/PkgDescription.tex +++ b/Snap_rounding_2/doc_tex/Snap_rounding_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Snap Rounding \label{Pkg:SnapRounding2}} -\ccPkgHowToCiteCgal{cgal:p-sr2-11} +\ccPkgHowToCiteCgal{cgal:p-sr2-11b} \ccPkgSummary{ Snap Rounding is a well known method for converting arbitrary-precision arrangements of segments into a fixed-precision diff --git a/Spatial_searching/TODO.txt b/Spatial_searching/TODO.txt new file mode 100644 index 00000000000..e14b5e2cc52 --- /dev/null +++ b/Spatial_searching/TODO.txt @@ -0,0 +1 @@ +*in SearchTraits, FT should be comparable. Check that RT is only needed diff --git a/Spatial_searching/doc_tex/Spatial_searching/PkgDescription.tex b/Spatial_searching/doc_tex/Spatial_searching/PkgDescription.tex index 9406c1d383d..422acb79ca1 100644 --- a/Spatial_searching/doc_tex/Spatial_searching/PkgDescription.tex +++ b/Spatial_searching/doc_tex/Spatial_searching/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{dD Spatial Searching\label{Pkg:SpatialSearchingD}} -\ccPkgHowToCiteCgal{cgal:tf-ssd-11} +\ccPkgHowToCiteCgal{cgal:tf-ssd-11b} \ccPkgSummary{ This package implements exact and approximate distance browsing by diff --git a/Spatial_searching/doc_tex/Spatial_searching/intro.tex b/Spatial_searching/doc_tex/Spatial_searching/intro.tex index 19c921cd506..2dae53507ab 100644 --- a/Spatial_searching/doc_tex/Spatial_searching/intro.tex +++ b/Spatial_searching/doc_tex/Spatial_searching/intro.tex @@ -315,6 +315,32 @@ wrapper for all these types. The searching itself works exactly as for \cgal\ k \ccIncludeExampleCode{Spatial_searching/user_defined_point_and_distance.cpp} +\newpage +\subsection{Examples for Using an Arbitrary Point Type with Point Property Maps} +The following three example programs illustrate how to use the classes \ccc{Search_traits_adapter} and +\ccc{Distance_for_point_adapter} to store in the kd-tree objects of an arbitrary key type. Points are +accessed through a point \ccAnchor{http://www.boost.org/doc/libs/release/libs/property_map/index.html}{property map}. +This is really convenient to associate information to a point or to reduce the size of the search structure. + +\subsubsection{Using a Point and an Integer as Key Type} +In this example program, the search tree stores tuples of point and integer. +The value type of the iterator of the neighbor searching algorithm is this tuple type. + +\ccIncludeExampleCode{Spatial_searching/searching_with_point_with_info.cpp} + +\subsubsection{Using an Integer as Key Type} +In this example program, the search tree stores only integers that refer to points stored within a user vector. +The point type of the search traits is \ccc{std::size_t}. + +\ccIncludeExampleCode{Spatial_searching/searching_with_point_with_info_inplace.cpp} + +\subsubsection{Using a Model of L-value Property Map Concept} +This example programs uses a \boost\ \ccAnchor{http://www.boost.org/doc/libs/release/libs/property_map/doc/LvaluePropertyMap.html}{LvaluePropertyMap}. +Points are read from a \ccc{std::map}. The search tree stores integers of type \ccc{std::size_t}. The value type of the iterator of the neighbor searching algorithm is \ccc{std::size_t}. + +\ccIncludeExampleCode{Spatial_searching/searching_with_point_with_info_pmap.cpp} + + \newpage \subsection{Example for Selecting a Splitting Rule and Setting the Bucket Size} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Distance_adapter.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Distance_adapter.tex new file mode 100644 index 00000000000..dedc81e8f35 --- /dev/null +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Distance_adapter.tex @@ -0,0 +1,57 @@ +\begin{ccRefClass}{Distance_for_point_adapter} + +\ccDefinition + +A class that uses a point property map to adapt a distance class to work on a +key as point type. +When using \ccc{Search_traits_adapter} +in a nearest neighbor search algorithm, this class must be used as distance. + + +\ccInclude{CGAL/Search_traits_adapter.h} + +\ccParameters +\ccc{Key} is a type that is associated to a point of type \ccc{Base_distance::Point_d}.\\ +\ccc{PointPropertyMap} is a model of \ccAnchor{http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html}{boost::ReadablePropertyMap} +with \ccc{Key} as \ccc{key_type} and \ccc{Base_distance::Point_d} as \ccc{value_type}.\\ +\ccc{Base_distance} is a model of either \ccc{GeneralDistance} or \ccc{OrthogonalDistance}. + +\ccInheritsFrom +\ccc{Base_distance} + +\ccIsModel + +\ccc{GeneralDistance} if \ccc{Base_distance} is a model of \ccc{GeneralDistance}.\\ +\ccc{OrthogonalDistance} if \ccc{Base_distance} is a model of \ccc{OrthogonalDistance}. + +\ccTypes +\ccTypedef{Base_distance::FT FT;}{} +\ccTypedef{Key Point_d;}{} +\ccTypedef{Base_distance::Query_item Query_item;}{} + +\ccCreation +\ccCreationVariable{d} %% choose variable name + + +\ccConstructor{Distance_for_point_adapter(const PointPropertyMap& ppmap=PointPropertyMap(),const Base_distance& base=Base_distance());} +{Constructor initializing the class to \ccc{base} and setting the point property map of the class to \ccc{ppmap}.} + +\ccOperations + +\ccMethod{const PointPropertyMap& point_property_map() const;}{Returns the point property map.} + + + +\ccSeeAlso + +\ccc{Search_traits_adapter} + + +\end{ccRefClass} + + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance.tex index f75bd79541e..e57b73e9bef 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance.tex @@ -45,7 +45,7 @@ Expects for the first template argument a model of the concept \ccCreation \ccCreationVariable{ed} %% choose variable name -\ccConstructor{Euclidean_distance();}{Default constructor.} +\ccConstructor{Euclidean_distance(Traits t=Traits());}{Default constructor.} \ccOperations diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance_sphere_point.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance_sphere_point.tex index 6e7cb33e643..d922ee25822 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance_sphere_point.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Euclidean_distance_sphere_point.tex @@ -47,18 +47,18 @@ for example \ccc{CGAL::Cartesian_d}. \ccCreationVariable{ed} %% choose variable name -\ccConstructor{Euclidean_distance_sphere_point();} +\ccConstructor{Euclidean_distance_sphere_point(Traits t=Traits());} {Default constructor.} \ccOperations \ccMethod{NT transformed_distance(Query_item s, Point_d p);}{Returns the distance between \ccc{s} and \ccc{p}.} -\ccMethod{NT min_distance_to_rectangle(Query_item s, Kd_tree_rectangle r);} +\ccMethod{NT min_distance_to_rectangle(Query_item s, Kd_tree_rectangle r);} {Returns the minimal distance between a point from the sphere \ccc{s} and a point from \ccc{r}.} -\ccMethod{NT max_distance_to_rectangle(Query_item s, Kd_tree_rectangle r);} +\ccMethod{NT max_distance_to_rectangle(Query_item s, Kd_tree_rectangle r);} {Returns the maximal distance between the sphere \ccc{s} and a point from \ccc{r} furthest to \ccc{s}. } diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/FuzzyQueryItem.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/FuzzyQueryItem.tex index e81693f4651..384e4f8f96a 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/FuzzyQueryItem.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/FuzzyQueryItem.tex @@ -38,11 +38,11 @@ The concept \ccRefName\ describes the requirements for fuzzy $d$-dimensional spa \ccMethod{bool contains(Point_d p); const}{test whether $q$ contains $p$.} -\ccMethod{bool inner_range_intersects(const Kd_tree_rectangle& rectangle); const} +\ccMethod{bool inner_range_intersects(const Kd_tree_rectangle& rectangle); const} {test whether the inner approximation of the spatial object intersects a rectangle associated with a node of a tree. } -\ccMethod{bool outer_range_contains(const Kd_tree_rectangle& rectangle); const} +\ccMethod{bool outer_range_contains(const Kd_tree_rectangle& rectangle); const} {test whether the outer approximation of the spatial object encloses the rectangle associated with a node of a tree.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_iso_box_d.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_iso_box_d.tex index d6f6138430a..05c87259bcb 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_iso_box_d.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_iso_box_d.tex @@ -44,7 +44,7 @@ Expects for the template argument a model of the concept \ccCreation \ccCreationVariable{b} %% choose variable name -\ccConstructor{Fuzzy_iso_box(Point_d p, Point_d q, FT epsilon=FT(0));}{Constructs a fuzzy iso box +\ccConstructor{Fuzzy_iso_box(Point_d p, Point_d q, FT epsilon=FT(0),Traits t=Traits());}{Constructs a fuzzy iso box specified by the minimal iso box containing \ccc{p} and \ccc{q} and fuzziness value \ccc{epsilon}. \ccPrecond{ \ccc{p} must be lexicographically smaller than \ccc{q}.}} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_sphere_d.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_sphere_d.tex index c5fb81982ee..19d106696b8 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_sphere_d.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Fuzzy_sphere_d.tex @@ -44,7 +44,7 @@ Expects for the template argument a model of the concept -\ccConstructor{Fuzzy_sphere(Point_d center, FT radius, FT epsilon=FT(0));}{Constructs a fuzzy sphere +\ccConstructor{Fuzzy_sphere(Point_d center, FT radius, FT epsilon=FT(0),Traits t=Traits());}{Constructs a fuzzy sphere centered at \ccc{center} with radius \ccc{radius} and fuzziness value \ccc{epsilon}.} \ccOperations diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/GeneralDistance.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/GeneralDistance.tex index 69f11069586..55ec26251f6 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/GeneralDistance.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/GeneralDistance.tex @@ -26,8 +26,8 @@ Euclidean distance. \ccHasModels -\ccc{CGAL::Manhattan_distance_rectangle_point}\\ -\ccc{CGAL::Euclidean_distance_sphere_point}. +\ccc{CGAL::Manhattan_distance_iso_box_point}\\ +\ccc{CGAL::Euclidean_distance_sphere_point}. \ccTypes diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Incremental_neighbor_search.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Incremental_neighbor_search.tex index e0ee98409f7..93e84b1b02b 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Incremental_neighbor_search.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Incremental_neighbor_search.tex @@ -29,8 +29,10 @@ Expects for the first template argument a model of the concept \ccc{SearchTraits for example \ccc{CGAL::Search_traits_2 >}. Expects for the second template argument a model of the -concept \ccc{GeneralDistance}. The default type is -\ccc{CGAL::Euclidean_distance}. +concept \ccc{GeneralDistance}. If \ccc{Traits} is +\ccc{CGAL::Search_traits_adapter} +the default type is \ccc{CGAL::Distance_for_point_adapter >}, +and \ccc{CGAL::Euclidean_distance} otherwise. Expects for third template argument a model of the concept \ccc{Splitter}. The default type is \ccc{CGAL::Sliding_midpoint}. @@ -43,6 +45,7 @@ template argument \ccc{CGAL::Tag_false} makes that the tree is built with unexte \ccTypedef{Traits::Point_d Point_d;}{Point type.} \ccTypedef{Traits::NT NT;}{Number type.} +\ccTypedef{GeneralDistance Distance;}{Distance type.} \ccTypedef{std::pair Point_with_transformed_distance;}{Pair of point and transformed distance. } \ccNestedType{iterator}{Input iterator with value type \ccc{Point_with_transformed_distance} for enumerating approximate neighbors.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/IsoBox_d.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/IsoBox_d.tex deleted file mode 100644 index 685e1843722..00000000000 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/IsoBox_d.tex +++ /dev/null @@ -1,56 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: IsoBox_d.tex -% +------------------------------------------------------------------------+ -% | 1.07.2001 Johan W.H. Tangelder -% | Package: ASPAS -% | -\RCSdef{\RCSIsoBoxdRev}{$Id$} -\RCSdefDate{\RCSIsoBoxdDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefConcept}{IsoBox} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[concept]{} %% add further index entries - -\ccDefinition - -The concept \ccRefName\ describes the requirements for iso-boxes. - - -\ccTypes - -\ccNestedType{Point_d}{Point type.} - -\ccCreation -\ccCreationVariable{b} %% choose variable name - -\ccConstructor{IsoBox_d(Point_d p, Point_d q);}{introduces an iso-oriented box with diagonal opposite points -\ccc{p} and \ccc{q}.} - -\ccOperations - -\ccMethod{Point_d min();} -{Returns the lexicographically smallest vertex of the iso-oriented box.} - - -\ccMethod{Point_d max();} -{Returns the lexicographically largest vertex of the iso-oriented box.} - - -\ccHasModels - -\ccc{Kernel::Iso_rectangle_2},\\ -\ccc{Kernel::Iso_cuboid_3},\\ -\ccc{Kernel_d::Iso_box_d}. - -\end{ccRefConcept} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/K_neighbor_search.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/K_neighbor_search.tex index b2700069917..84b253ed17e 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/K_neighbor_search.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/K_neighbor_search.tex @@ -30,8 +30,10 @@ Expects for the first template argument an implementation of the concept \ccc{Se for example \ccc{CGAL::Cartesian_d}. Expects for the second template argument a model of the -concept \ccc{GeneralDistance}. The default type is -\ccc{CGAL::Euclidean_distance}. +concept \ccc{GeneralDistance}. If \ccc{Traits} is +\ccc{CGAL::Search_traits_adapter} +the default type is \ccc{CGAL::Distance_for_point_adapter >}, +and \ccc{CGAL::Euclidean_distance} otherwise. Expects for fourth template argument an implementation of the concept \ccc{SpatialTree}. @@ -42,6 +44,7 @@ template argument \ccc{CGAL::Tag_false} makes that the tree is built with unexte \ccTypedef{Traits::Point_d Point_d;}{Point type.} \ccTypedef{Traits::FT FT;}{Number type.} +\ccTypedef{GeneralDistance Distance;}{Distance type.} \ccTypedef{std::pair Point_with_transformed_distance;}{Pair of point and transformed distance.} \ccNestedType{iterator}{Bidirectional iterator with value type \ccc{Point_with_distance} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree.tex index ae39e361e06..aaec0d7c30b 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree.tex @@ -50,10 +50,10 @@ with value type \ccc{Point_d*}.} \ccCreation \ccCreationVariable{tree} -\ccConstructor{Kd_tree(Splitter s=Splitter());}{Constructs an empty $k$-$d$ tree.} +\ccConstructor{Kd_tree(Splitter s=Splitter(),Traits t=Traits());}{Constructs an empty $k$-$d$ tree.} \ccConstructor -{template Kd_tree(InputIterator first, InputIterator beyond, Splitter s=Splitter());} +{template Kd_tree(InputIterator first, InputIterator beyond, Splitter s=Splitter(),Traits t=Traits());} { Constructs a $k$-$d$ tree on the elements from the sequence \ccc{[first, beyond)} using the splitting rule implemented by \ccc{s}. @@ -74,7 +74,9 @@ The value type of the \ccc{InputIterator} must be \ccc{Point_d}.} template OutputIterator search(OutputIterator it, FuzzyQueryItem q);} {Reports the points that are approximately contained by~\ccc{q}. -The types \ccc{FuzzyQueryItem::Point_d} and \ccc{Point_d} must be equivalent.} +The types \ccc{FuzzyQueryItem::Point_d} and \ccc{Point_d} must be equivalent. +To use this function \ccc{Traits} must be a model of the concept \ccc{RangeSearchTraits}. +} \ccMethod{iterator begin();}{Returns an iterator to the first point in the tree.} \ccMethod{iterator end();}{Returns the corresponding past-the-end iterator.} @@ -85,12 +87,14 @@ The types \ccc{FuzzyQueryItem::Point_d} and \ccc{Point_d} must be equivalent.} \ccMethod{unsigned int size();} {Returns the number of points that are stored in the tree.} +\ccMethod{Traits traits() const;}{return the instance of the traits used to construct the tree.} + \begin{ccAdvanced} \ccMethod{Node_handle root();} {Returns a handle to the root node of the tree.} -\ccMethod{const Kd_tree_rectangle& bounding_box();}{returns a const reference +\ccMethod{const Kd_tree_rectangle& bounding_box();}{returns a const reference to the bounding box of the root node of the tree.} \ccMethod{std::ostream& statistics(std::ostream& s);} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_rectangle.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_rectangle.tex index 3bb888c5065..2871d3afda7 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_rectangle.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_rectangle.tex @@ -11,7 +11,7 @@ % +------------------------------------------------------------------------+ -\begin{ccRefClass}{Kd_tree_rectangle} %% add template arg's if necessary +\begin{ccRefClass}{Kd_tree_rectangle} %% add template arg's if necessary \begin{ccAdvanced} @@ -29,7 +29,7 @@ e.g., methods to compute bounding boxes of point sets. \ccTypes -\ccTypedef{Traits::FT FT;}{Number type.} +\ccTypedef{FT FT;}{Number type.} \ccCreation \ccCreationVariable{r} %% choose variable name @@ -39,10 +39,11 @@ e.g., methods to compute bounding boxes of point sets. in each dimension.} \ccConstructor{ -template -Kd_tree_rectangle(int d, PointIter begin, PointIter end);} +template +Kd_tree_rectangle(int d, PointIter begin, PointIter end,const Construct_cartesian_const_iterator_d& construct_it);} {Constructs the bounding box of the points in the range [\ccc{begin,end}), where the value -type of \ccc{PointIter} must be \ccc{Traits::Point_d}.} +type of \ccc{PointIter} can be used by operators of functors \ccc{Construct_cartesian_const_iterator_d} +to define iterators with value type \ccc{FT}.} \ccOperations @@ -70,14 +71,14 @@ type of \ccc{PointIter} must be \ccc{Traits::Point_d}.} \ccMethod{int dimension();} {Returns the dimension of the rectangle.} -\ccMethod{void split(Kd_tree_rectangle& r, int d, FT value);} +\ccMethod{void split(Kd_tree_rectangle& r, int d, FT value);} {Splits rectangle in dimension \ccc{d} at coordinate-value \ccc{value} by modifying itself to lower half and by modifying \ccc{r} to upper half.} \ccHeading{Output Routines} \ccFunction{ template -std::ostream& operator<<(std::ostream& s, Kd_tree_rectangle& r);} +std::ostream& operator<<(std::ostream& s, Kd_tree_rectangle& r);} {Inserts rectangle \ccc{r} in the output stream \ccc{s} and returns~\ccc{s}.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Manhattan_distance_iso_box_point.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Manhattan_distance_iso_box_point.tex index 64b2dbdf86a..5c5100c29b6 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Manhattan_distance_iso_box_point.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Manhattan_distance_iso_box_point.tex @@ -45,7 +45,7 @@ Expects for the template argument a model for the concept \ccCreation \ccCreationVariable{md} %% choose variable name -\ccConstructor{Manhattan_distance_iso_box_point();}{Default constructor.} +\ccConstructor{Manhattan_distance_iso_box_point(Traits t=Traits());}{Default constructor.} \ccOperations @@ -57,11 +57,11 @@ distance between \ccc{b} and \ccc{p}.} \ccMethod{FT inverse_of_transformed_distance(FT d);} {Returns the value of the inverse of the transform function applied to $d$.} -\ccMethod{FT min_distance_to_rectangle(Query_item b, Kd_tree_rectangle r);} +\ccMethod{FT min_distance_to_rectangle(Query_item b, Kd_tree_rectangle r);} {Returns the minimal distance between a point from \ccc{b} and a point from \ccc{r}.} -\ccMethod{FT max_distance_to_rectangle(Query_item b, Kd_tree_rectangle r);} +\ccMethod{FT max_distance_to_rectangle(Query_item b, Kd_tree_rectangle r);} {Returns the maximal distance between the iso-box \ccc{b} and a point from \ccc{r} furthest to \ccc{b}.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/OrthogonalDistance.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/OrthogonalDistance.tex index 6a02ea08025..b558ec4ee10 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/OrthogonalDistance.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/OrthogonalDistance.tex @@ -46,11 +46,11 @@ E.g., for an Euclidean distance the transformed distance is the squared Euclidea \ccMethod{FT transformed_distance(Query_item q, Point_d r);}{Returns the transformed distance between \ccc{q} and~\ccc{r}.} -\ccMethod{FT min_distance_to_rectangle(Query_item q, Kd_tree_rectangle r);} +\ccMethod{FT min_distance_to_rectangle(Query_item q, Kd_tree_rectangle r);} {Returns the transformed distance between \ccc{q} and the point on the boundary of \ccc{r} closest to \ccc{q}.} -\ccMethod{FT max_distance_to_rectangle(Query_item q, Kd_tree_rectangle r);} +\ccMethod{FT max_distance_to_rectangle(Query_item q, Kd_tree_rectangle r);} {Returns the transformed distance between \ccc{q} and the point on the boundary of \ccc{r} farthest to \ccc{q}.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_incremental_neighbor_search.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_incremental_neighbor_search.tex index 869c3d9f3d7..aecc856fcf1 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_incremental_neighbor_search.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_incremental_neighbor_search.tex @@ -28,8 +28,10 @@ Expects for the first template argument a model of the concept \ccc{SearchTraits for example \ccc{CGAL::Search_traits_2 >}. Expects for the second template argument a model of the -concept \ccc{GeneralDistance}. The default type is -\ccc{CGAL::Euclidean_distance}. +concept \ccc{GeneralDistance}. If \ccc{Traits} is +\ccc{CGAL::Search_traits_adapter} +the default type is \ccc{CGAL::Distance_for_point_adapter >}, +and \ccc{CGAL::Euclidean_distance} otherwise. Expects for third template argument a model of the concept \ccc{Splitter}. The default type is \ccc{CGAL::Sliding_midpoint}. @@ -43,6 +45,7 @@ kd tree nodes. \ccTypedef{Traits::Point_d Point_d;}{Point type.} \ccTypedef{Traits::FT FT;}{Number type.} +\ccTypedef{OrthogonalDistance Distance;}{Distance type.} \ccTypedef{OrthogonalDistance::Query_item Query_item;}{Query item.} \ccTypedef{std::pair Point_with_transformed_distance;}{Pair of point and transformed distance.} \ccNestedType{iterator}{Input iterator with value type \ccc{Point_with_transformed_distance} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_k_neighbor_search.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_k_neighbor_search.tex index 89a84f8b72d..1dff39d9086 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_k_neighbor_search.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Orthogonal_k_neighbor_search.tex @@ -30,7 +30,13 @@ Expects for the first template argument an implementation of the concept \ccc{Se for example \ccc{CGAL::Search_traits_2 >}. Expects for the second template argument a model of the -concept \ccc{GeneralDistance}. The default type is +concept \ccc{GeneralDistance}. If \ccc{Traits} is +\ccc{CGAL::Search_traits_adapter} +the default type is \ccc{CGAL::Distance_adapter >}, +and \ccc{CGAL::Euclidean_distance} otherwise. + + +The default type is \ccc{CGAL::Euclidean_distance}. Expects for third template argument a model of the concept \ccc{Splitter}. @@ -45,6 +51,7 @@ kd tree nodes. \ccTypedef{Traits::Point_d Point_d;}{Point type.} \ccTypedef{Traits::FT FT;}{Number type.} +\ccTypedef{OrthogonalDistance Distance;}{Distance type.} \ccTypedef{GeneralDistance::Query_item Query_item;}{Query item.} \ccTypedef{std::pair Point_with_transformed_distance;}{Pair of point and transformed distance.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Plane_separator.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Plane_separator.tex index 24c41a73276..cf76459a86b 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Plane_separator.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Plane_separator.tex @@ -56,9 +56,9 @@ void set_cutting_value(FT v);} \ccMethod{FT cutting_value();}{Returns the cutting value.} -\ccMethod{template -bool has_on_negative_side(SpatialPoint p);} -{Returns true if and only if the coordinate of \ccc{p} in the cutting dimension is smaller than the cutting value.} +% \ccMethod{template +% bool has_on_negative_side(SpatialPoint p);} +% {Returns true if and only if the coordinate of \ccc{p} in the cutting dimension is smaller than the cutting value.} \ccMethod{ Plane_separator operator=(Plane_separator s2);} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/PointContainer.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/PointContainer.tex deleted file mode 100644 index 649df5a5c74..00000000000 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/PointContainer.tex +++ /dev/null @@ -1,71 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: PointContainer.tex -% +------------------------------------------------------------------------+ -% | 1.07.2001 Johan W.H. Tangelder -% | Package: ASPAS -% | -\RCSdef{\RCSPointContainerRev}{$Id$} -\RCSdefDate{\RCSPointContainerDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefConcept}{PointContainer} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[concept]{} %% add further index entries - -\begin{ccAdvanced} - -\ccDefinition - -The concept \ccRefName\ defines the requirements for -a point container. - - -\ccTypes - -\ccNestedType{Point_d} { A $d$-dimensional point.} -\ccCreation -\ccCreationVariable{c} %% choose variable name - -\ccConstructor{PointContainer(int d);} -{ -Construct an empty container for storing \ccc{d}-dimensional points. -} - -\ccConstructor{ -template -PointContainer(int d, InputIterator begin, InputIterator end);} -{ -Construct the container of $d$-dimensional points of type \ccc{Point_d} -given by the iterator sequence \ccc{[begin,end)}. -} - -\ccOperations - -\ccMethod{template -void split(PointContainer& c2, SpatialSeparator sep, bool sliding=false);} -{Given an empty container \ccc{c2} with the same dimension as \ccc{c}, splits \ccVar\ into -\ccVar\ and \ccc{c2} using the separator \ccc{sep}. If sliding is \ccc{true}, after splitting -each container contains at least one point. Container \ccVar\ should contain at least two points.} - -\ccHasModels - -\ccc{CGAL::Point_container}. - -\ccSeeAlso - -\ccc{SearchTraits}\\ -\ccc{SpatialSeparator}\\ -\ccc{CGAL::Point_container} - -\end{ccAdvanced} -\end{ccRefConcept} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Point_container.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Point_container.tex deleted file mode 100644 index 92343e2410e..00000000000 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Point_container.tex +++ /dev/null @@ -1,211 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Point_container.tex -% +------------------------------------------------------------------------+ -% | 1.07.2001 Johan W.H. Tangelder -% | Package: ASPAS -% | -\RCSdef{\RCSPointcontainerRev}{$Id$} -\RCSdefDate{\RCSPointcontainerDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefClass}{Point_container} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[class]{} %% add further index entries - - -\begin{ccAdvanced} - - -\ccDefinition -A custom container for points used to build a tree. Each point container -holds the points from a rectangle associated with a node of the tree. -In the remainder of this reference page this rectangle is called the -associated rectangle. -Provides a method to split a container and a number of methods -to support the implementation of splitting rules. - -\ccInclude{CGAL/Point_container.h} - -\ccParameters - -Expects for the template argument an implementation for -$d$-dimensional points of the concept \ccc{SearchTraits}, for example -\ccc{CGAL::Cartesian_d}. - -\ccTypes - -\ccTypedef{Traits::FT FT;}{Number type.} -\ccTypedef{Traits::Point_d Point_d;}{Point type.} -\ccNestedType{iterator}{An iterator with value type \ccc{Point_d*}.} - -%---------------------------------------- -\ccCreation -\ccCreationVariable{c} - -\ccConstructor{Point_container(int d);} -{ -Construct an empty container for storing \ccc{d}-dimensional points. -} - -\ccConstructor{ -template -Point_container(int d, InputIterator begin, InputIterator end);} -{ -Construct the container of $d$-dimensional points of type \ccc{Point_d} -given by the iterator sequence \ccc{[begin, end)}.} - - - -\ccOperations - -\ccMethod{template -void split(Point_container &c2, SpatialSeparator sep, bool sliding=false);} -{Given an empty container \ccc{c2} with the same dimension as \ccVar, splits \ccVar\ into -\ccVar and \ccc{c2} using the separator \ccc{sep}. If sliding is \ccc{true} after splitting -each container contains at least one point. Container \ccVar\ should contain at least two points.} - - -\ccMethod{void swap(Point_container &c2);} -{Swap the contents of \ccVar\ and \ccc{c2}} - - -\ccMethod{void recompute_tight_bounding_box();} -{Recompute the bounding box of the points in the container.} - - -\ccMethod{iterator begin();} -{ -Return an iterator pointing to the pointer to the first point. -} - -\ccMethod{iterator end();} -{ -Return the iterator to the corresponding past-the-end iterator. -} - -\ccMethod{int dimension() const;} -{ -Return the dimension. -} - -\ccMethod{int built_coordinate();} -{ -Return coordinate for which the pointer list is built. -} - -\ccMethod{int max_span_coord();} -{ -Return coordinate where the associated rectangle has maximal span. -} - -\ccMethod{int max_tight_span_coord();} -{ -Return coordinate where the point coordinates have maximal span. -} - -\ccMethod{FT max_span_lower();} -{ -Return lower value of the interval corresponding to -\ccc{max_span_coord()}. -} - - -\ccMethod{FT max_tight_span_lower();} -{ -Return lower value of the interval corresponding to -\ccc{max_tight_span_coord()}. That is, the smallest -\ccc{max_tight_span_coord()}-th coordinate of the points in -\ccVar. -} - - -\ccMethod{FT max_span_upper();} -{ -Return upper value of the interval corresponding to -\ccc{max_span_coord()}. -} - -\ccMethod{FT max_span_upper_without_dim(int d);} -{ -Return upper value of the interval over all dimensions -without taking dimension \ccc{d} into account. -} - -\ccMethod{FT max_tight_span_upper();} -{ -Return upper value of the interval corresponding to -\ccc{max_tight_span_coord()}. -} - -\ccMethod{FT max_spread();} -{ -Return the size of the interval corresponding to \ccc{max_span_coord()}. -} - -\ccMethod{FT max_tight_spread();} -{ -Return the size of the interval corresponding to \ccc{max_tight_span_coord()}. -} - -\ccMethod{FT median(int split_coord);} -{ -Return the median value of the points stored in the container for -dimension \ccc{split_coord}. -} - -\ccMethod{const Kd_tree_rectangle & bounding_box();} -{Return the associated rectangle.} - -\ccMethod{const Kd_tree_rectangle & tight_bounding_box();} -{Return the bounding box of the items in associated rectangle.} - -\ccMethod{int max_tight_span_coord_balanced(FT aspect_ratio);} -{Return the dimension with the maximal point spread, for which after fair splitting -the ratio of the length of the longest side and the smallest side of the bounding box of -the items in associated rectangle, -does not exceed \ccc{aspect_ratio}.} - -\ccMethod{FT balanced_fair(int d, FT aspect_ratio);} -{Return the splitting value for fair splitting.} - -\ccMethod{FT balanced_sliding_fair(int d, FT aspect_ratio);} -{Return the splitting value for sliding fair splitting.} - -\ccMethod{int size();} -{ -Return the number of points stored. -} - -\ccMethod{bool empty();} -{ -Return true if no points are present, false otherwise. -} - - - - -\ccHeading{Output Routines} - -\ccFunction{ template -std::ostream& operator<<(std::ostream& s, Point_container c);} -{Prints the point container \ccVar\ to the output stream \ccc{s} and returns \ccc{s}.} - - -\ccSeeAlso - -\ccc{SearchTraits},\\ -\ccc{SpatialSeparator},\\ -\ccc{PointContainer}. - -\end{ccAdvanced} -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/RangeSearchTraits.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/RangeSearchTraits.tex new file mode 100644 index 00000000000..d9cbef8dd0b --- /dev/null +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/RangeSearchTraits.tex @@ -0,0 +1,67 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: RangeSearchTraits.tex +% +------------------------------------------------------------------------+ +% | 22.12.2010 Sebastien Loriot +% | Package: ASPAS +% | +% \RCSdef{\RCSSpatialPointRev}{$Id: RangeSearchTraits.tex -1 $} +% \RCSdefDate{\RCSSpatialPointDate}{$Date: $} +% | +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefConcept}{RangeSearchTraits} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[concept]{} %% add further index entries + +\ccDefinition + +The concept \ccClassTemplateName\ defines the requirements for the template +parameter of the search classes. This concept also defines requirements to +range search queries in a model of \ccc{SpatialTree}. + +\ccRefines + +\ccc{SearchTraits} + +\ccTypes + +\ccNestedType{Iso_box_d}{Iso box type. It is only needed for range search queries.} +\ccNestedType{Sphere_d}{Sphere type. It is only needed for range search queries.} + + +\ccNestedType{Construct_iso_box_d}{Functor with operator to construct the iso box from two points.} + +\ccNestedType {Construct_center_d}{Functor with operator to construct +the center of an object of type \ccc{Sphere_d}.} + +\ccNestedType {Construct_squared_radius_d}{Functor with operator to compute +the squared radius of a an object of type \ccc{Sphere_d}.} + +\ccNestedType {Construct_min_vertex_d}{Functor with operator to construct +the vertex with lexicographically smallest coordinates of an object of type \ccc{Iso_box_d}.} + +\ccNestedType {Construct_max_vertex_d}{Functor with operator to construct +the vertex with lexicographically largest coordinates of an object of type \ccc{Iso_box_d}.} + + +\ccHasModels +\ccc{CGAL::Cartesian_d}\\ +\ccc{CGAL::Homogeneous_d}\\ +\ccc{CGAL::Search_traits_2}\\ +\ccc{CGAL::Search_traits_3} + + +\ccSeeAlso +\ccc{SearchTraits} +\ccc{CGAL::Search_traits_adapter} + +\end{ccRefConcept} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/SpatialPoint.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/SearchTraits.tex similarity index 61% rename from Spatial_searching/doc_tex/Spatial_searching_ref/SpatialPoint.tex rename to Spatial_searching/doc_tex/Spatial_searching_ref/SearchTraits.tex index 5715eae5552..6d1c5c60283 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/SpatialPoint.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/SearchTraits.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: SpatialPoint.tex +% | Reference manual page: SearchTraits.tex % +------------------------------------------------------------------------+ % | 1.07.2001 Johan W.H. Tangelder % | Package: ASPAS @@ -26,35 +26,22 @@ parameter of the search classes. \ccNestedType{Point_d}{Point type. \ccc{CGAL::Kernel_traits} has to be specialized for this type.} - -\ccNestedType{Iso_box_d}{Iso box type. It is only needed for range search queries.} -\ccNestedType{Sphere_d}{Sphere type. It is only needed for range search queries.} - \ccNestedType{FT}{The number type of the \ccHtmlNoLinksFrom{Cartesian} coordinates of types \ccc{Point_d}} - -\ccNestedType{Cartesian_const_iterator_d}{An random access iterator type to enumerate the +\ccNestedType{Cartesian_const_iterator_d}{A random access iterator type to enumerate the \ccHtmlNoLinksFrom{Cartesian} coordinates of a point.} \ccNestedType{Construct_cartesian_const_iterator_d}{Functor with operators to construct iterators on the -first and the past-the-end iterator for the \ccHtmlNoLinksFrom{Cartesian} coordinates of a point.} - -%\ccNestedType{Construct_iso_box_d}{Functor with operator to construct the iso box from two points.} -% -\ccNestedType {Construct_center_d}{Functor with operator to construct -the center of an object of type \ccc{Sphere_d}.} - -\ccNestedType {Construct_squared_radius_d}{Functor with operator to compute -the squared radius of a an object of type \ccc{Sphere_d}.} - -\ccNestedType {Construct_min_vertex_d}{Functor with operator to construct -the vertex with lexicographically smallest coordinates of an object of type \ccc{Iso_box_d}.} - -\ccNestedType {Construct_max_vertex_d}{Functor with operator to construct -the vertex with lexicographically largest coordinates of an object of type \ccc{Iso_box_d}.} +first and the past-the-end iterator for the \ccHtmlNoLinksFrom{Cartesian} coordinates of a point. This functor must +provides the type \ccc{result_type} that must be the same a \ccc{Cartesian_const_iterator_d}.} +\ccCreation +\ccCreationVariable{t} %% choose variable name +\ccOperations +\ccMethod{Construct_cartesian_const_iterator_d construct_construct_cartesian_const_iterator_d_object(const Point_d& p);} +{function used to construct an object of type \ccc{Construct_cartesian_const_iterator_d}.} \ccHasModels \ccc{CGAL::Cartesian_d}\\ @@ -63,6 +50,9 @@ the vertex with lexicographically largest coordinates of an object of type \ccc{ \ccc{CGAL::Search_traits_3}, \\ \ccc{CGAL::Search_traits}. +\ccSeeAlso +\ccc{RangeSearchTraits} +\ccc{CGAL::Search_traits_adapter} \end{ccRefConcept} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits.tex similarity index 97% rename from Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point.tex rename to Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits.tex index d7fb5ad8bf4..4e6aa8eee92 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: Kd_tree_traits_point.tex +% | Reference manual page: Search_traits.tex % +------------------------------------------------------------------------+ % | 1.07.2001 Johan W.H. Tangelder % | Package: ASPAS diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point_2.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_2.tex similarity index 96% rename from Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point_2.tex rename to Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_2.tex index a64a7fb612c..e26f3b70942 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point_2.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_2.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: Kd_tree_traits_point.tex +% | Reference manual page: Search_traits_2.tex % +------------------------------------------------------------------------+ % | 1.07.2001 Johan W.H. Tangelder % | Package: ASPAS @@ -26,11 +26,11 @@ and the search classes. \ccParameters Expects for the template argument a model of the concept \ccc{Kernel}, -for example \ccc{CGAL::Cartesian} or \ccc{CGAL::Simple_cartesian}. +for example \ccc{CGAL::Cartesian} or \ccc{CGAL::Simple_cartesian}. \ccIsModel -\ccc{SearchTraits}. +\ccc{SearchTraits} and \ccc{RangeSearchTraits}. \ccTypes diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point_3.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_3.tex similarity index 96% rename from Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point_3.tex rename to Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_3.tex index e8243493886..f240c0e5f7f 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Kd_tree_traits_point_3.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_3.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: Kd_tree_traits_point.tex +% | Reference manual page: Search_traits_3.tex % +------------------------------------------------------------------------+ % | 1.07.2001 Johan W.H. Tangelder % | Package: ASPAS @@ -26,11 +26,11 @@ and the search classes. \ccc{Kernel} must be a \cgal\ kernel. \ccParameters Expects for the template argument a model of the concept \ccc{Kernel}, -for example \ccc{CGAL::Cartesian} or \ccc{CGAL::Simple_cartesian}. +for example \ccc{CGAL::Cartesian} or \ccc{CGAL::Simple_cartesian}. \ccIsModel -\ccc{SearchTraits}. +\ccc{SearchTraits} and \ccc{RangeSearchTraits}. \ccTypes diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_adapter.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_adapter.tex new file mode 100644 index 00000000000..2c586aecc54 --- /dev/null +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Search_traits_adapter.tex @@ -0,0 +1,62 @@ +\begin{ccRefClass}{Search_traits_adapter} + +\ccDefinition + +The class \ccRefName\ can be used as a template parameter of the kd tree +and the search classes. When using this traits class in a nearest neighbor search algorithm, the class +\ccc{Distance_for_point_adapter} +must be used as distance. + + +\ccInclude{CGAL/Search_traits_adapter.h} + +\ccParameters +\ccc{Key} is a type that is associated to a point of type \ccc{Base_distance::Point_d}.\\ +\ccc{PointPropertyMap} is a model of \ccAnchor{http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html}{boost::ReadablePropertyMap} +with \ccc{Key} as \ccc{key_type} and \ccc{Base_distance::Point_d} as \ccc{value_type}.\\ +In practice, the current implementation requires a class providing \ccc{Base_traits::Point_d operator[] (const Key& point) const}.\\ +\ccc{Base_traits} is a model of either \ccc{SearchTraits} or \ccc{RangeSearchTraits}. + +\ccInheritsFrom +\ccc{Base_traits} + +\ccIsModel + +\ccc{SearchTraits} if \ccc{Base_traits} is a model of \ccc{SearchTraits}.\\ +\ccc{RangeSearchTraits} if \ccc{Base_traits} is a model of \ccc{RangeSearchTraits}. + +\ccTypes +\ccTypedef{Key Point_d;}{} +\ccTypedef{Base_traits::FT FT;}{} +\ccTypedef{Base_traits::Cartesian_const_iterator_d Cartesian_const_iterator_d;}{} + + +\ccCreation +\ccCreationVariable{t} %% choose variable name + + +\ccConstructor{Search_traits_adapter(const PointPropertyMap& ppmap=PointPropertyMap(),const Base_traits& base=Base_traits());} +{Constructor initializing the class to \ccc{base} and setting the point property map of the class to \ccc{ppmap}.} + +\ccOperations + +\ccMethod{const PointPropertyMap& point_property_map() const;}{Returns the point property map.} + + + +\ccSeeAlso + +\ccc{Distance_for_point_adapter}\\ +\ccc{Search_traits_2}\\ +\ccc{Search_traits_3}\\ +\ccc{Search_traits_d}\\ +\ccc{Search_traits} or \ccc{CGAL::Homogeneous_d}. +for example \ccc{CGAL::Cartesian_d} or \ccc{CGAL::Homogeneous_d}. \ccIsModel -\ccc{SearchTraits}. +\ccc{SearchTraits} and \ccc{RangeSearchTraits}. \ccTypes diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/SpatialTree.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/SpatialTree.tex index d34a236d822..48f51a45089 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/SpatialTree.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/SpatialTree.tex @@ -60,7 +60,7 @@ of \ccc{OutputIterator} must be \ccc{Point_d}.} Returns a handle to the root node of the tree. } -\ccMethod{const Kd_tree_rectangle& bounding_box();}{returns a const +\ccMethod{const Kd_tree_rectangle& bounding_box();}{returns a const reference to the bounding box of the root node of the tree.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Sphere.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Sphere.tex deleted file mode 100644 index 6220a2f37f4..00000000000 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Sphere.tex +++ /dev/null @@ -1,60 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Sphere.tex -% +------------------------------------------------------------------------+ -% | 1.07.2001 Johan W.H. Tangelder -% | Package: ASPAS -% | -\RCSdef{\RCSBalldRev}{$Id$} -\RCSdefDate{\RCSBalldDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefConcept}{Sphere} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[concept]{} %% add further index entries - -\ccDefinition - -The concept \ccRefName\ defines the requirements for arbitrary dimensional spheres. - -{\bf Refines} - -\ccc{QueryItem} - - -\ccTypes - -\ccTypedef{Kernel_traits::Kernel::FT FT;}{Number type.} - - -\ccCreationVariable{s} %% choose variable name - - - -\ccOperations - -\ccMethod{SpatialPoint center();} -{Returns the center of the sphere \ccVar.} - - -\ccMethod{FT squared_radius();} -{Returns the squared radius of the sphere \ccVar.} - - -\ccHasModels - -\ccc{CGAL::Iso_circle_2}, \ccc{CGAL::Iso_sphere_3}, -\ccc{CGAL::Iso_sphere_d}. - - - -\end{ccRefConcept} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Splitter_base.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Splitter_base.tex deleted file mode 100644 index cbf5609492e..00000000000 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Splitter_base.tex +++ /dev/null @@ -1,70 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Splitter.tex -% +------------------------------------------------------------------------+ -% | 1.07.2001 Johan W.H. Tangelder -% | Package: ASPAS -% | -\RCSdef{\RCSSplitterRev}{$Id$} -\RCSdefDate{\RCSSplitterDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefClass}{Splitter_base} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[concept]{} %% add further index entries - -\begin{ccAdvanced} - -\ccDefinition - -The class \ccRefName\ serves as a base class for implementing splitting rules. - -\ccTypes - -\ccNestedType{FT}{Number type.} -\ccNestedType{Container}{Point container.} -\ccNestedType{Separator}{Separator.} - -\ccCreationVariable{s} %% choose variable name - -The parameters \ccc{aspect_ratio} and \ccc{bucket_size} -define the way in which $k$-$d$ tree is constructed. - -\ccOperations - -\ccMethod{ -void operator()(Separator& s, Container& c0, Container& c1);} -{Modifies the separator $s$, -and splits \ccc{c0} into \ccc{c0} and \ccc{c1}, -using the splitting dimension and the splitting value of the modified separator. -} - -\ccMethod{FT aspect_ratio();}{Returns the maximal ratio between the largest and smallest side -of a cell allowed for fair splitting.} - -\ccMethod{int bucket_size();} {Returns the bucket size of the leaf nodes.} - - - - -\ccSeeAlso -\ccc{CGAL::Fair}, \\ -\ccc{CGAL::Median_of_rectangle}, \\ -\ccc{CGAL::Median_of_max_spread}, \\ -\ccc{CGAL::Midpoint_of_rectangle}, \\ -\ccc{CGAL::Midpoint_of_max_spread}, \\ -\ccc{CGAL::Sliding_fair}, \\ -\ccc{CGAL::Sliding_midpoint.} - -\end{ccAdvanced} - -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/TreeTraits.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/TreeTraits.tex deleted file mode 100644 index 1c6bbeb307c..00000000000 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/TreeTraits.tex +++ /dev/null @@ -1,57 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: TreeTraits.tex -% +------------------------------------------------------------------------+ -% | 1.07.2001 Johan W.H. Tangelder -% | Package: ASPAS -% | -\RCSdef{\RCSTreeTraitsRev}{$Id$} -\RCSdefDate{\RCSTreeTraitsDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefConcept}{TreeTraits} - -\ccDefinition - -The concept \ccRefName\ defines the requirements for a tree traits class, which is used as -a template class for the construction of a tree. -It is assumed that the tree consists of internal nodes -and leaf nodes. There are two types of external nodes. Extended internal nodes support orthogonal range searching. -Unextended internal nodes do not support orthogonal range searching. -Leaf nodes have a bucket size denoting the maximal number of points that can be -stored at a leaf node. - -\ccTypes - -\ccNestedType{Point}{$d$-dimensional point.} -\ccNestedType{Point_iterator}{Point iterator.} -\ccNestedType{Container}{Point container.} -\ccNestedType{Separator}{Separator.} -\ccNestedType{NT}{Number type.} - -\ccCreation -\ccCreationVariable{tr} %% choose variable name - - -\ccHasModels - -\ccc{CGAL::Kd_tree_traits_point} - -\ccSeeAlso - -\ccc{CGAL::Kd_tree_traits_point_2} -\ccc{CGAL::Kd_tree_traits_point_3} -\ccc{CGAL::Kd_tree_traits_point_d} -\ccc{CGAL::Kd_tree_traits_point}, -\ccc{CGAL::Kd_tree}. - -\end{ccRefConcept} - - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/Weighted_Minkowski_distance.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/Weighted_Minkowski_distance.tex index 35860da1ce2..238098ba3e1 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/Weighted_Minkowski_distance.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/Weighted_Minkowski_distance.tex @@ -46,10 +46,10 @@ Expects for the template argument a model of the concept \ccCreation \ccCreationVariable{wd} %% choose variable name -\ccConstructor{Weighted_Minkowski_distance(int d);}{Constructor implementing $l_2$ metric for $d$-dimensional points.} +\ccConstructor{Weighted_Minkowski_distance(int d,Traits t=Traits());}{Constructor implementing $l_2$ metric for $d$-dimensional points.} \ccConstructor{template - Weighted_Minkowski_distance(FT power, int dim, InputIterator wb, InputIterator we);} + Weighted_Minkowski_distance(FT power, int dim, InputIterator wb, InputIterator we,Traits t=Traits());} {Constructor implementing the $l_{power}(weights)$ metric. $power \leq 0$ denotes the $l_{\infty}(weights)$ metric. The values in the iterator range \ccc{[wb,we)} are the weight. } @@ -59,11 +59,11 @@ The values in the iterator range \ccc{[wb,we)} are the weight. } \ccMethod{FT transformed_distance(Point_d q, Point_d r);}{Returns $d^{power}$, where $d$ denotes the distance between \ccc{q} and~\ccc{r}.} -\ccMethod{FT min_distance_to_rectangle(Point_d q, Kd_tree_rectangle r;);} +\ccMethod{FT min_distance_to_rectangle(Point_d q, Kd_tree_rectangle r;);} {Returns $d^{power}$, where $d$ denotes the distance between the query item \ccc{q} and the point on the boundary of \ccc{r} closest to \ccc{q}.} -\ccMethod{FT max_distance_to_rectangle(Point_d q, Kd_tree_rectangle r;);} +\ccMethod{FT max_distance_to_rectangle(Point_d q, Kd_tree_rectangle r;);} {Returns $d^{power}$, where $d$ denotes the distance between the query item \ccc{q} and the point on the boundary of \ccc{r} farthest to \ccc{q}.} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/intro.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/intro.tex index 58ca9f6d346..82b3a4b28dc 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/intro.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/intro.tex @@ -55,14 +55,17 @@ classes that are described in the reference pages. \ccRefIdfierPage{CGAL::Search_traits_2}\\ \ccRefIdfierPage{CGAL::Search_traits_3}\\ \ccRefIdfierPage{CGAL::Search_traits_d}\\ -\ccRefIdfierPage{CGAL::Search_traits} +\ccRefIdfierPage{CGAL::Search_traits}\\ +\ccRefIdfierPage{CGAL::Search_traits_adapter} \ccHeading{Distance Classes} \ccRefIdfierPage{CGAL::Euclidean_distance} \\ \ccRefIdfierPage{CGAL::Euclidean_distance_sphere_point} \\ \ccRefIdfierPage{CGAL::Manhattan_distance_iso_box_point} \\ -\ccRefIdfierPage{CGAL::Weighted_Minkowski_distance} +\ccRefIdfierPage{CGAL::Weighted_Minkowski_distance} \\ +\ccRefIdfierPage{CGAL::Distance_for_point_adapter} + \ccHeading{Splitter Classes} @@ -79,7 +82,7 @@ classes that are described in the reference pages. \ccHeading{Advanced Classes} \ccRefIdfierPage{CGAL::Kd_tree_node} \\ -\ccRefIdfierPage{CGAL::Kd_tree_rectangle} \\ +\ccRefIdfierPage{CGAL::Kd_tree_rectangle} \\ \ccRefIdfierPage{CGAL::Plane_separator} \ccHeading{Concepts} @@ -88,6 +91,7 @@ classes that are described in the reference pages. \ccRefConceptPage{GeneralDistance} \\ \ccRefConceptPage{OrthogonalDistance} \\ \ccRefConceptPage{SearchTraits} \\ +\ccRefConceptPage{RangeSearchTraits} \\ \ccRefConceptPage{SpatialSeparator} \\ \ccRefConceptPage{SpatialTree} diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/introduction.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/introduction.tex deleted file mode 100644 index e30f0dabfc4..00000000000 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/introduction.tex +++ /dev/null @@ -1,87 +0,0 @@ -\ccRefChapter{Spatial Searching} - -The spatial searching package implements -exact and approximate distance browsing -by providing implementations of algorithms supporting - -\begin{itemize} - -\item -both nearest and furthest neighbor searching - -\item -both exact and approximate searching - -\item -(approximate) range searching - -\item -(approximate) $k$-nearest and $k$-furthest neighbor searching - -\item -(approximate) incremental nearest and incremental furthest neighbor searching - -\item -query items representing points and spatial objects. - -\end{itemize} - -In these searching problems a set $P$ of data points in $d$-dimensional -space is given. - -The spatial searching package -consists of the following concepts and classes -that are described in the reference pages. - -\ccHeading{Concepts} - - -\ccRefConceptPage{FuzzyQueryItem} \\ -\ccRefConceptPage{GeneralDistance} \\ -\ccRefConceptPage{IsoBox_d} \\ -\ccRefConceptPage{OrthogonalDistance} \\ -\ccRefConceptPage{PointContainer} \\ -\ccRefConceptPage{PointTraits} \\ -\ccRefConceptPage{QueryItem} \\ -\ccRefConceptPage{SpatialSeparator} \\ -\ccRefConceptPage{SpatialTree} \\ -\ccRefConceptPage{Splitter} \\ -\ccRefConceptPage{TreeTraits} \\ - -\ccHeading{Classes} - -\ccRefIdfierPage{CGAL::Euclidean_distance} \\ -\ccRefIdfierPage{CGAL::Euclidean_distance_sphere_point} \\ -\ccRefIdfierPage{CGAL::Fair} \\ -\ccRefIdfierPage{CGAL::Fuzzy_iso_box} \\ -\ccRefIdfierPage{CGAL::Fuzzy_sphere} \\ -\ccRefIdfierPage{CGAL::General_priority_search} \\ -\ccRefIdfierPage{CGAL::General_standard_search} \\ -\ccRefIdfierPage{CGAL::Kd_tree} \\ -\ccRefIdfierPage{CGAL::Kd_tree_node} \\ -\ccRefIdfierPage{CGAL::Kd_tree_rectangle} \\ -\ccRefIdfierPage{CGAL::Kd_tree_traits_point_2} \\ -\ccRefIdfierPage{CGAL::Kd_tree_traits_point_3} \\ -\ccRefIdfierPage{CGAL::Kd_tree_traits_point_d} \\ -\ccRefIdfierPage{CGAL::Manhattan_distance_rectangle_point} \\ -\ccRefIdfierPage{CGAL::Median_of_max_spread} \\ -\ccRefIdfierPage{CGAL::Median_of_rectangle} \\ -\ccRefIdfierPage{CGAL::Midpoint_of_max_spread} \\ -\ccRefIdfierPage{CGAL::Midpoint_of_rectangle} \\ -\ccRefIdfierPage{CGAL::Orthogonal_priority_search} \\ -\ccRefIdfierPage{CGAL::Orthogonal_standard_search} \\ -\ccRefIdfierPage{CGAL::Plane_separator} \\ -\ccRefIdfierPage{CGAL::Point_container} \\ -\ccRefIdfierPage{CGAL::Sliding_fair} \\ -\ccRefIdfierPage{CGAL::Sliding_midpoint} \\ -\ccRefIdfierPage{CGAL::Weighted_Minkowski_distance} \\ - -\lcHtml{\ccHeading{Alphabetical Listing of Reference Pages}} - - - - - - - - diff --git a/Spatial_searching/doc_tex/Spatial_searching_ref/main.tex b/Spatial_searching/doc_tex/Spatial_searching_ref/main.tex index 36815bb9643..aef7c3eee70 100644 --- a/Spatial_searching/doc_tex/Spatial_searching_ref/main.tex +++ b/Spatial_searching/doc_tex/Spatial_searching_ref/main.tex @@ -29,11 +29,14 @@ \input{Spatial_searching_ref/Orthogonal_k_neighbor_search.tex} \input{Spatial_searching_ref/Plane_separator.tex} -\input{Spatial_searching_ref/SpatialPoint.tex} -\input{Spatial_searching_ref/Kd_tree_traits_point_2.tex} -\input{Spatial_searching_ref/Kd_tree_traits_point_3.tex} -\input{Spatial_searching_ref/Kd_tree_traits_point_d.tex} -\input{Spatial_searching_ref/Kd_tree_traits_point.tex} +\input{Spatial_searching_ref/SearchTraits.tex} +\input{Spatial_searching_ref/RangeSearchTraits.tex} +\input{Spatial_searching_ref/Search_traits_2.tex} +\input{Spatial_searching_ref/Search_traits_3.tex} +\input{Spatial_searching_ref/Search_traits_d.tex} +\input{Spatial_searching_ref/Search_traits.tex} +\input{Spatial_searching_ref/Search_traits_adapter.tex} +\input{Spatial_searching_ref/Distance_adapter.tex} \input{Spatial_searching_ref/Sliding_fair.tex} \input{Spatial_searching_ref/Sliding_midpoint.tex} \input{Spatial_searching_ref/SpatialSeparator.tex} diff --git a/Spatial_searching/examples/Spatial_searching/Distance.h b/Spatial_searching/examples/Spatial_searching/Distance.h index c9b62cdab2b..4fb3bc13054 100644 --- a/Spatial_searching/examples/Spatial_searching/Distance.h +++ b/Spatial_searching/examples/Spatial_searching/Distance.h @@ -1,5 +1,6 @@ struct Distance { typedef Point Query_item; + typedef double FT; double transformed_distance(const Point& p1, const Point& p2) const { double distx= p1.x()-p2.x(); diff --git a/Spatial_searching/examples/Spatial_searching/Point.h b/Spatial_searching/examples/Spatial_searching/Point.h index 5f531272f00..1e87c6fea37 100644 --- a/Spatial_searching/examples/Spatial_searching/Point.h +++ b/Spatial_searching/examples/Spatial_searching/Point.h @@ -35,6 +35,7 @@ namespace CGAL { struct Construct_coord_iterator { + typedef const double* result_type; const double* operator()(const Point& p) const { return static_cast(p.vec); } diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp new file mode 100644 index 00000000000..0438c70c459 --- /dev/null +++ b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp @@ -0,0 +1,75 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; +typedef boost::tuple Point_and_int; + +//definition of the property map +struct My_point_property_map{ + typedef Point_3 value_type; + typedef const value_type& reference; + typedef const Point_and_int& key_type; + typedef boost::readable_property_map_tag category; +}; + +//get function for the property map +My_point_property_map::reference +get(My_point_property_map,My_point_property_map::key_type p) +{return boost::get<0>(p);} + + +typedef CGAL::Random_points_in_cube_3 Random_points_iterator; +typedef CGAL::Search_traits_3 Traits_base; +typedef CGAL::Search_traits_adapter Traits; + + +typedef CGAL::Orthogonal_k_neighbor_search K_neighbor_search; +typedef K_neighbor_search::Tree Tree; +typedef K_neighbor_search::Distance Distance; + +int main() { + const unsigned int K = 5; + // generator for random data points in the cube ( (-1,-1,-1), (1,1,1) ) + Random_points_iterator rpit( 1.0); + std::vector points; + std::vector indices; + + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + + indices.push_back(0); + indices.push_back(1); + indices.push_back(2); + indices.push_back(3); + indices.push_back(4); + indices.push_back(5); + indices.push_back(6); + + // Insert number_of_data_points in the tree + Tree tree( + boost::make_zip_iterator(boost::make_tuple( points.begin(),indices.begin() )), + boost::make_zip_iterator(boost::make_tuple( points.end(),indices.end() ) ) + ); + Point_3 query(0.0, 0.0, 0.0); + Distance tr_dist; + + // search K nearest neighbours + K_neighbor_search search(tree, query, K); + for(K_neighbor_search::iterator it = search.begin(); it != search.end(); it++){ + std::cout << " d(q, nearest neighbor)= " + << tr_dist.inverse_of_transformed_distance(it->second) << " " << boost::get<0>(it->first)<< " " << boost::get<1>(it->first) << std::endl; + } + return 0; +} diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp new file mode 100644 index 00000000000..07ba0a23e9c --- /dev/null +++ b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp @@ -0,0 +1,76 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +typedef std::size_t Point; + +//definition of the property map and get +//function as friend function to have access to +//private member +class My_point_property_map{ + const std::vector& points; +public: + typedef Point_3 value_type; + typedef const value_type& reference; + typedef Point key_type; + typedef boost::readable_property_map_tag category; + + My_point_property_map(const std::vector& pts):points(pts){} + + friend reference get(const My_point_property_map& ppmap,key_type i) + {return ppmap.points[i];} +}; + + +typedef CGAL::Random_points_in_cube_3 Random_points_iterator; +typedef CGAL::Search_traits_3 Traits_base; +typedef CGAL::Search_traits_adapter Traits; + + +typedef CGAL::Orthogonal_k_neighbor_search K_neighbor_search; +typedef K_neighbor_search::Tree Tree; +typedef Tree::Splitter Splitter; +typedef K_neighbor_search::Distance Distance; + +int main() { + const unsigned int K = 5; + // generator for random data points in the cube ( (-1,-1,-1), (1,1,1) ) + Random_points_iterator rpit( 1.0); + std::vector points; + + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + points.push_back(Point_3(*rpit++)); + + My_point_property_map ppmap(points); + + // Insert number_of_data_points in the tree + Tree tree( + boost::counting_iterator(0), + boost::counting_iterator(points.size()), + Splitter(), + Traits(ppmap) + ); + Point_3 query(0.0, 0.0, 0.0); + Distance tr_dist(ppmap); + + // search K nearest neighbours + K_neighbor_search search(tree, query, K,0,true,tr_dist); + for(K_neighbor_search::iterator it = search.begin(); it != search.end(); it++){ + std::cout << " d(q, nearest neighbor)= " + << tr_dist.inverse_of_transformed_distance(it->second) << " " << points[it->first] << " " << it->first << std::endl; + } + return 0; +} diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp new file mode 100644 index 00000000000..b5dd393f71b --- /dev/null +++ b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp @@ -0,0 +1,60 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +typedef std::size_t Point; + +typedef boost::const_associative_property_map > My_point_property_map; + +typedef CGAL::Random_points_in_cube_3 Random_points_iterator; +typedef CGAL::Search_traits_3 Traits_base; +typedef CGAL::Search_traits_adapter Traits; + + +typedef CGAL::Orthogonal_k_neighbor_search K_neighbor_search; +typedef K_neighbor_search::Tree Tree; +typedef Tree::Splitter Splitter; +typedef K_neighbor_search::Distance Distance; + +int main() { + const unsigned int K = 5; + // generator for random data points in the cube ( (-1,-1,-1), (1,1,1) ) + Random_points_iterator rpit( 1.0); + std::map points; + + points[0]=Point_3(*rpit++); + points[1]=Point_3(*rpit++); + points[2]=Point_3(*rpit++); + points[3]=Point_3(*rpit++); + points[4]=Point_3(*rpit++); + points[5]=Point_3(*rpit++); + points[6]=Point_3(*rpit++); + + My_point_property_map ppmap(points); + + // Insert number_of_data_points in the tree + Tree tree( + boost::counting_iterator(0), + boost::counting_iterator(points.size()), + Splitter(), + Traits(ppmap) + ); + Point_3 query(0.0, 0.0, 0.0); + Distance tr_dist(ppmap); + + // search K nearest neighbours + K_neighbor_search search(tree, query, K,0,true,tr_dist); + for(K_neighbor_search::iterator it = search.begin(); it != search.end(); it++){ + std::cout << " d(q, nearest neighbor)= " + << tr_dist.inverse_of_transformed_distance(it->second) << " " << points[it->first] << " " << it->first << std::endl; + } + return 0; +} diff --git a/Spatial_searching/include/CGAL/Euclidean_distance.h b/Spatial_searching/include/CGAL/Euclidean_distance.h index 29dbc1f9307..907de9d5c28 100644 --- a/Spatial_searching/include/CGAL/Euclidean_distance.h +++ b/Spatial_searching/include/CGAL/Euclidean_distance.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -24,26 +24,34 @@ namespace CGAL { - + template + class Euclidean_distance; + + namespace internal{ + template + struct Spatial_searching_default_distance{ + typedef ::CGAL::Euclidean_distance type; + }; + } //namespace internal template class Euclidean_distance { - + + SearchTraits traits; + public: typedef typename SearchTraits::FT FT; typedef typename SearchTraits::Point_d Point_d; typedef Point_d Query_item; - - public: // default constructor - Euclidean_distance() {} + Euclidean_distance(const SearchTraits& traits_=SearchTraits()):traits(traits_) {} inline FT transformed_distance(const Query_item& q, const Point_d& p) const { FT distance = FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d qit = construct_it(q), qe = construct_it(q,1), pit = construct_it(p); for(; qit != qe; qit++, pit++){ @@ -54,9 +62,9 @@ namespace CGAL { inline FT min_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) const { + const Kd_tree_rectangle& r) const { FT distance = FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d qit = construct_it(q), qe = construct_it(q,1); for(unsigned int i = 0;qit != qe; i++, qit++){ @@ -72,9 +80,9 @@ namespace CGAL { } inline FT max_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) const { + const Kd_tree_rectangle& r) const { FT distance=FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d qit = construct_it(q), qe = construct_it(q,1); for(unsigned int i = 0;qit != qe; i++, qit++){ diff --git a/Spatial_searching/include/CGAL/Euclidean_distance_sphere_point.h b/Spatial_searching/include/CGAL/Euclidean_distance_sphere_point.h index 46d3494ea01..6936d11c6df 100644 --- a/Spatial_searching/include/CGAL/Euclidean_distance_sphere_point.h +++ b/Spatial_searching/include/CGAL/Euclidean_distance_sphere_point.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -26,7 +26,8 @@ namespace CGAL { template class Euclidean_distance_sphere_point { - + SearchTraits traits; + public: typedef typename SearchTraits::Point_d Point_d; @@ -40,13 +41,13 @@ namespace CGAL { public: // default constructor - Euclidean_distance_sphere_point() {} + Euclidean_distance_sphere_point(const SearchTraits& traits_=SearchTraits()):traits(traits_) {} inline FT transformed_distance(const Sphere_d& q, const Point_d& p) const { Point_d c= Construct_center_d()(q); FT distance = FT(0); - Construct_cartesian_const_iterator_d construct_it; + Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); Cartesian_const_iterator_d cit = construct_it(c), ce = construct_it(c,1), pit = construct_it(p); for(; cit != ce; cit++, pit++){ @@ -59,10 +60,10 @@ namespace CGAL { inline FT min_distance_to_rectangle(const Sphere_d& q, - const Kd_tree_rectangle& r) const { + const Kd_tree_rectangle& r) const { Point_d c= Construct_center_d()(q); FT distance = FT(0); - Construct_cartesian_const_iterator_d construct_it; + Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); Cartesian_const_iterator_d cit = construct_it(c), ce = construct_it(c,1); for (unsigned int i = 0; cit != ce; ++i, ++cit) { @@ -80,11 +81,11 @@ namespace CGAL { } inline FT max_distance_to_rectangle(const Sphere_d& q, - const Kd_tree_rectangle& r) const { + const Kd_tree_rectangle& r) const { Construct_center_d construct_center_d; Point_d c = construct_center_d(q); FT distance=FT(0); - Construct_cartesian_const_iterator_d construct_it; + Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); Cartesian_const_iterator_d cit = construct_it(c), ce = construct_it(c,1); for (unsigned int i = 0; cit != ce; ++i, ++cit) { diff --git a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h index 78db33579f7..f1bd95dc054 100644 --- a/Spatial_searching/include/CGAL/Fuzzy_iso_box.h +++ b/Spatial_searching/include/CGAL/Fuzzy_iso_box.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -26,7 +26,8 @@ namespace CGAL { template class Fuzzy_iso_box{ - + SearchTraits traits; + public: typedef typename SearchTraits::Point_d Point_d; @@ -39,7 +40,7 @@ namespace CGAL { private: - Point_d min, max; + typename Construct_min_vertex_d::result_type min, max; Cartesian_const_iterator_d min_begin, max_begin; FT eps; unsigned int dim; @@ -47,13 +48,13 @@ namespace CGAL { public: // default constructor - Fuzzy_iso_box() {} + Fuzzy_iso_box(const SearchTraits& traits_=SearchTraits()):traits(traits_) {} // constructor - Fuzzy_iso_box(const Point_d& p, const Point_d& q, FT epsilon=FT(0)) - : eps(epsilon) + Fuzzy_iso_box(const Point_d& p, const Point_d& q, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) + : traits(traits_), eps(epsilon) { - Construct_cartesian_const_iterator_d construct_it; + Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); Cartesian_const_iterator_d begin = construct_it(p), end = construct_it(p,1); dim = static_cast(end - begin); @@ -69,7 +70,7 @@ namespace CGAL { bool contains(const Point_d& p) const { - Construct_cartesian_const_iterator_d construct_it; + Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); Cartesian_const_iterator_d pit = construct_it(p); Cartesian_const_iterator_d minit= min_begin, maxit = max_begin; for (unsigned int i = 0; i < dim; ++i, ++pit, ++minit, ++maxit) { @@ -78,7 +79,7 @@ namespace CGAL { return true; } - bool inner_range_intersects(const Kd_tree_rectangle& rectangle) const { + bool inner_range_intersects(const Kd_tree_rectangle& rectangle) const { Cartesian_const_iterator_d minit= min_begin, maxit = max_begin; for (unsigned int i = 0; i < dim; ++i, ++minit, ++maxit) { if ( ((*maxit)-eps < rectangle.min_coord(i)) @@ -88,7 +89,7 @@ namespace CGAL { } - bool outer_range_contains(const Kd_tree_rectangle& rectangle) const { + bool outer_range_contains(const Kd_tree_rectangle& rectangle) const { Cartesian_const_iterator_d minit= min_begin, maxit = max_begin; for (unsigned int i = 0; i < dim; ++i, ++minit, ++maxit) { if ( ((*maxit)+eps < rectangle.max_coord(i) ) diff --git a/Spatial_searching/include/CGAL/Fuzzy_sphere.h b/Spatial_searching/include/CGAL/Fuzzy_sphere.h index ae79d006239..6770c2e33a9 100644 --- a/Spatial_searching/include/CGAL/Fuzzy_sphere.h +++ b/Spatial_searching/include/CGAL/Fuzzy_sphere.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -26,7 +26,7 @@ namespace CGAL { template class Fuzzy_sphere{ - + SearchTraits traits; public: typedef typename SearchTraits::FT FT; @@ -41,15 +41,15 @@ namespace CGAL { // default constructor - Fuzzy_sphere() {} + Fuzzy_sphere(const SearchTraits& traits_=SearchTraits()):traits(traits_) {} // constructor - Fuzzy_sphere(const Point_d& center, FT radius, FT epsilon=FT(0)) : - c(center), r(radius), eps(epsilon) + Fuzzy_sphere(const Point_d& center, FT radius, FT epsilon=FT(0),const SearchTraits& traits_=SearchTraits()) : + traits(traits_),c(center), r(radius), eps(epsilon) { // avoid problems if eps > r if (eps>r) eps=r; - } + } bool contains(const Point_d& p) const { // test whether the squared distance @@ -57,7 +57,8 @@ namespace CGAL { // is at most the squared_radius FT squared_radius = r*r; FT distance=FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c), pit = construct_it(p), end = construct_it(c, 0); @@ -71,13 +72,14 @@ namespace CGAL { } - bool inner_range_intersects(const Kd_tree_rectangle& rectangle) const { + bool inner_range_intersects(const Kd_tree_rectangle& rectangle) const { // test whether the interior of a sphere // with radius (r-eps) intersects r, i.e. // if the minimal distance of r to c is less than r-eps FT distance = FT(0); FT squared_radius = (r-eps)*(r-eps); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c), end = construct_it(c, 0); for (int i = 0; cit != end && (distance < squared_radius); ++cit, ++i) { @@ -93,14 +95,15 @@ namespace CGAL { } - bool outer_range_contains(const Kd_tree_rectangle& rectangle) const { + bool outer_range_contains(const Kd_tree_rectangle& rectangle) const { // test whether the interior of a sphere // with radius (r+eps) is contained by r, i.e. // if the minimal distance of the boundary of r // to c is less than r+eps FT distance=FT(0); FT squared_radius = (r+eps)*(r+eps); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d cit = construct_it(c), end = construct_it(c, 0); for (int i = 0; cit != end && (distance < squared_radius) ; ++cit,++i) { diff --git a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h index f2587314b45..2ca4c2843bb 100644 --- a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -31,7 +31,7 @@ namespace CGAL { template , + class Distance_=typename internal::Spatial_searching_default_distance::type, class Splitter_ = Sliding_midpoint, class Tree_=Kd_tree > class Incremental_neighbor_search { @@ -45,7 +45,7 @@ namespace CGAL { typedef typename Tree::Point_d_iterator Point_d_iterator; typedef typename Tree::Node_handle Node_handle; typedef typename Tree::Splitter Splitter; - typedef Kd_tree_rectangle Node_box; + typedef Kd_tree_rectangle Node_box; typedef typename Distance::Query_item Query_item; class Cell { diff --git a/Spatial_searching/include/CGAL/K_neighbor_search.h b/Spatial_searching/include/CGAL/K_neighbor_search.h index 8c9fd0dce56..1796b0aae21 100644 --- a/Spatial_searching/include/CGAL/K_neighbor_search.h +++ b/Spatial_searching/include/CGAL/K_neighbor_search.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -25,7 +25,7 @@ namespace CGAL { template , + class Distance= typename internal::Spatial_searching_default_distance::type, class Splitter= Sliding_midpoint , class Tree= Kd_tree > class K_neighbor_search: public internal::K_neighbor_search { @@ -48,17 +48,17 @@ private: using Base::branch; void - compute_neighbors_general(typename Base::Node_handle N, const Kd_tree_rectangle& r) + compute_neighbors_general(typename Base::Node_handle N, const Kd_tree_rectangle& r) { if (!(N->is_leaf())) { this->number_of_internal_nodes_visited++; int new_cut_dim=N->cutting_dimension(); FT new_cut_val=N->cutting_value(); - Kd_tree_rectangle r_lower(r); + Kd_tree_rectangle r_lower(r); // modifies also r_lower to lower half - Kd_tree_rectangle r_upper(r_lower); + Kd_tree_rectangle r_upper(r_lower); r_lower.split(r_upper, new_cut_dim, new_cut_val); FT distance_to_lower_half; diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 60691523681..9672cda3641 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -51,13 +51,13 @@ public: typedef typename std::vector::const_iterator iterator; private: - + SearchTraits traits_; mutable Splitter split; mutable Compact_container nodes; mutable Node_handle tree_root; - mutable Kd_tree_rectangle* bbox; + mutable Kd_tree_rectangle* bbox; mutable std::vector pts; // Instead of storing the points in arrays in the Kd_tree_node @@ -65,14 +65,13 @@ private: // and we only store an iterator range in the Kd_tree_node. // mutable std::vector data; - SearchTraits tr; mutable bool built_; // protected copy constructor Kd_tree(const Tree& tree) - : built_(tree.built_) + : traits_(tree.traits_),built_(tree.built_) {}; @@ -116,7 +115,7 @@ private: { Node_handle nh = nodes.emplace(Node::EXTENDED_INTERNAL); - Point_container c_low(c.dimension()); + Point_container c_low(c.dimension(),traits_); split(nh->separator(), c, c_low); int cd = nh->separator().cutting_dimension(); @@ -149,7 +148,7 @@ private: { Node_handle nh = nodes.emplace(Node::INTERNAL); - Point_container c_low(c.dimension()); + Point_container c_low(c.dimension(),traits_); split(nh->separator(), c, c_low); if (c_low.size() > split.bucket_size()){ @@ -169,14 +168,14 @@ private: public: - Kd_tree(Splitter s = Splitter()) - : split(s), built_(false) + Kd_tree(Splitter s = Splitter(),const SearchTraits traits=SearchTraits()) + : traits_(traits),split(s), built_(false) {} template Kd_tree(InputIterator first, InputIterator beyond, - Splitter s = Splitter()) - : split(s), built_(false) + Splitter s = Splitter(),const SearchTraits traits=SearchTraits()) + : traits_(traits),split(s), built_(false) { pts.insert(pts.end(), first, beyond); } @@ -189,15 +188,15 @@ public: build() const { const Point_d& p = *pts.begin(); - typename SearchTraits::Construct_cartesian_const_iterator_d ccci; + typename SearchTraits::Construct_cartesian_const_iterator_d ccci=traits_.construct_cartesian_const_iterator_d_object(); int dim = static_cast(std::distance(ccci(p), ccci(p,0))); data.reserve(pts.size()); for(unsigned int i = 0; i < pts.size(); i++){ data.push_back(&pts[i]); } - Point_container c(dim, data.begin(), data.end()); - bbox = new Kd_tree_rectangle(c.bounding_box()); + Point_container c(dim, data.begin(), data.end(),traits_); + bbox = new Kd_tree_rectangle(c.bounding_box()); if (c.size() <= split.bucket_size()){ tree_root = create_leaf_node(c); }else { @@ -252,7 +251,7 @@ public: if(! is_built()){ build(); } - Kd_tree_rectangle b(*bbox); + Kd_tree_rectangle b(*bbox); tree_root->search(it,q,b); } return it; @@ -268,7 +267,7 @@ public: SearchTraits traits() const { - return tr; + return traits_; } Node_handle @@ -289,7 +288,7 @@ public: root()->print(); } - const Kd_tree_rectangle& + const Kd_tree_rectangle& bounding_box() const { if(! is_built()){ diff --git a/Spatial_searching/include/CGAL/Kd_tree_node.h b/Spatial_searching/include/CGAL/Kd_tree_node.h index d6520a5f424..9295436421d 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_node.h +++ b/Spatial_searching/include/CGAL/Kd_tree_node.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -248,7 +248,7 @@ namespace CGAL { template OutputIterator search(OutputIterator it, const FuzzyQueryItem& q, - Kd_tree_rectangle& b) + Kd_tree_rectangle& b) { if (is_leaf()) { if (n>0) @@ -258,7 +258,7 @@ namespace CGAL { } else { // after splitting b denotes the lower part of b - Kd_tree_rectangle b_upper(b); + Kd_tree_rectangle b_upper(b); b.split(b_upper, sep.cutting_dimension(), sep.cutting_value()); diff --git a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h index e2a9ce90e31..4188677b8cd 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_rectangle.h +++ b/Spatial_searching/include/CGAL/Kd_tree_rectangle.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -27,22 +27,22 @@ namespace CGAL { - template + template struct set_bounds_from_pointer : public std::unary_function { int dim; T *lower; T *upper; + Construct_cartesian_const_iterator_d construct_it; - set_bounds_from_pointer(int d, T *l, T *u) - : dim(d), lower(l), upper(u) + set_bounds_from_pointer(int d, T *l, T *u,Construct_cartesian_const_iterator_d construct_it_) + : dim(d), lower(l), upper(u), construct_it(construct_it_) {} void operator()(P p) { T h; - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; - typename SearchTraits::Cartesian_const_iterator_d pit = construct_it(*p); + typename Construct_cartesian_const_iterator_d::result_type pit = construct_it(*p); for (int i = 0; i < dim; ++i, ++pit) { h=(*pit); if (h < lower[i]) lower[i] = h; @@ -52,10 +52,10 @@ namespace CGAL { }; - template + template class Kd_tree_rectangle { public: - typedef typename SearchTraits::FT FT; + typedef FT_ FT; typedef FT T; private: @@ -112,56 +112,41 @@ namespace CGAL { explicit - Kd_tree_rectangle(const Kd_tree_rectangle& r) + Kd_tree_rectangle(const Kd_tree_rectangle& r) : dim(r.dim), lower_(new FT[dim]), upper_(new FT[dim]), max_span_coord_(r.max_span_coord_) { std::copy(r.lower_, r.lower_+dim, lower_); std::copy(r.upper_, r.upper_+dim, upper_); } - - template // was PointIter - Kd_tree_rectangle(int d, PointPointerIter begin, PointPointerIter end) - : dim(d), lower_(new FT[d]), upper_(new FT[d]) + + template + void update_from_point_pointers(PointPointerIter begin, + PointPointerIter end, + const Construct_cartesian_const_iterator_d& construct_it + ) { + if (begin ==end) + return; // initialize with values of first point - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; - typename SearchTraits::Cartesian_const_iterator_d bit = construct_it(**begin); + typename Construct_cartesian_const_iterator_d::result_type bit = construct_it(**begin); - for (int i=0; i < dim; ++bit, ++i){ - lower_[i]=(*bit); upper_[i]=lower_[i]; + for (int i=0; i < dim; ++i, ++bit) { + lower_[i]= *bit; upper_[i]=lower_[i]; } begin++; typedef typename std::iterator_traits::value_type P; - - std::for_each(begin, end, set_bounds_from_pointer(dim, lower_, upper_)); - set_max_span(); - } - - template - void update_from_point_pointers(PointPointerIter begin, - PointPointerIter end) - { - if (begin ==end) { // no points - for (int i=0; i < dim; ++i) { - lower_[i]= FT(1); upper_[i]= FT(-1); - } - } else { - // initialize with values of first point - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; - typename SearchTraits::Cartesian_const_iterator_d bit = construct_it(**begin); - - for (int i=0; i < dim; ++i, ++bit) { - lower_[i]= *bit; upper_[i]=lower_[i]; - } - begin++; - typedef typename std::iterator_traits::value_type P; - std::for_each(begin, end, - set_bounds_from_pointer(dim, lower_, upper_)); - } + std::for_each(begin, end,set_bounds_from_pointer(dim, lower_, upper_,construct_it)); set_max_span(); } + template // was PointIter + Kd_tree_rectangle(int d, PointPointerIter begin, PointPointerIter end,const Construct_cartesian_const_iterator_d& construct_it) + : dim(d), lower_(new FT[d]), upper_(new FT[d]) + { + update_from_point_pointers(begin,end,construct_it); + } + inline int max_span_coord() const { @@ -236,9 +221,11 @@ namespace CGAL { return dim; } + const T* lower() const {return lower_;} + const T* upper() const {return upper_;} - Kd_tree_rectangle& - operator=(const Kd_tree_rectangle& r) + Kd_tree_rectangle& + operator=(const Kd_tree_rectangle& r) { CGAL_assertion(dimension() == r.dimension()); if (this != &r) { @@ -253,9 +240,9 @@ namespace CGAL { }; // of class Kd_tree_rectangle - template + template std::ostream& - operator<<(std::ostream& s, const Kd_tree_rectangle& r) + operator<<(std::ostream& s, const Kd_tree_rectangle& r) { return r.print(s); } diff --git a/Spatial_searching/include/CGAL/Manhattan_distance_iso_box_point.h b/Spatial_searching/include/CGAL/Manhattan_distance_iso_box_point.h index 8a97ca65dce..7f791dd6f9b 100644 --- a/Spatial_searching/include/CGAL/Manhattan_distance_iso_box_point.h +++ b/Spatial_searching/include/CGAL/Manhattan_distance_iso_box_point.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -27,8 +27,8 @@ namespace CGAL { template class Manhattan_distance_iso_box_point { - - public: + SearchTraits traits; + public: typedef typename SearchTraits::Point_d Point_d; typedef typename SearchTraits::Iso_box_d Iso_box_d; @@ -36,19 +36,15 @@ namespace CGAL { typedef Iso_box_d Query_item; - Manhattan_distance_iso_box_point() {} + Manhattan_distance_iso_box_point(const SearchTraits& traits_=SearchTraits()):traits(traits_) {} // obsolete as we no longer store dimension Manhattan_distance_iso_box_point(const int d) : the_dimension(d) {} - //copy constructor - Manhattan_distance_iso_box_point(const Manhattan_distance_iso_box_point& ) {} - - ~Manhattan_distance_iso_box_point() {} - - inline FT transformed_distance(const Query_item& q, const Point_d& p) { + inline FT transformed_distance(const Query_item& q, const Point_d& p) const { FT distance = FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Construct_min_vertex_d construct_min_vertex; typename SearchTraits::Construct_max_vertex_d construct_max_vertex; typename SearchTraits::Cartesian_const_iterator_d qmaxit = construct_it(construct_max_vertex(q)), @@ -65,9 +61,10 @@ namespace CGAL { inline FT min_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) { + const Kd_tree_rectangle& r) const { FT distance = FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Construct_min_vertex_d construct_min_vertex; typename SearchTraits::Construct_max_vertex_d construct_max_vertex; typename SearchTraits::Cartesian_const_iterator_d qmaxit = construct_it(construct_max_vertex(q)), @@ -84,9 +81,10 @@ namespace CGAL { inline FT max_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) { + const Kd_tree_rectangle& r) const { FT distance=FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Construct_min_vertex_d construct_min_vertex; typename SearchTraits::Construct_max_vertex_d construct_max_vertex; typename SearchTraits::Cartesian_const_iterator_d qmaxit = construct_it(construct_max_vertex(q)), @@ -102,14 +100,14 @@ namespace CGAL { inline FT - transformed_distance(FT d) + transformed_distance(FT d) const { return d; } inline FT - inverse_of_transformed_distance(FT d) + inverse_of_transformed_distance(FT d) const { return d; } diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index fa005a749a9..0c50506cf1e 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -30,7 +30,7 @@ namespace CGAL { template , + class Distance_= typename internal::Spatial_searching_default_distance::type, class Splitter_ = Sliding_midpoint, class Tree_= Kd_tree > class Orthogonal_incremental_neighbor_search { @@ -60,7 +60,7 @@ namespace CGAL { }; class Iterator_implementation { - + SearchTraits traits; public: int number_of_neighbours_computed; @@ -134,7 +134,7 @@ namespace CGAL { // constructor Iterator_implementation(Tree& tree,const Query_item& q, const Distance& tr, FT Eps=FT(0.0), bool search_nearest=true) - : number_of_neighbours_computed(0), number_of_internal_nodes_visited(0), + : traits(tree.traits()),number_of_neighbours_computed(0), number_of_internal_nodes_visited(0), number_of_leaf_nodes_visited(0), number_of_items_visited(0), Orthogonal_distance_instance(tr), multiplication_factor(Orthogonal_distance_instance.transformed_distance(FT(1.0)+Eps)), query_point(q), search_nearest_neighbour(search_nearest), @@ -242,7 +242,7 @@ namespace CGAL { next_neighbour_found= (rd < multiplication_factor*Item_PriorityQueue.top()->second); } - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point); // otherwise browse the tree further while ((!next_neighbour_found) && (!PriorityQueue.empty())) { diff --git a/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h index 9bdb9d716d8..626043aaa22 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -25,7 +25,7 @@ namespace CGAL { template , + class Distance= typename internal::Spatial_searching_default_distance::type, class Splitter= Sliding_midpoint , class Tree= Kd_tree > class Orthogonal_k_neighbor_search: public internal::K_neighbor_search { @@ -49,7 +49,7 @@ public: distance_to_root = this->distance_instance.max_distance_to_rectangle(q, tree.bounding_box()); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=tree.traits().construct_cartesian_const_iterator_d_object(); query_object_it = construct_it(this->query_object); compute_neighbors_orthogonally(tree.root(), distance_to_root); diff --git a/Spatial_searching/include/CGAL/Plane_separator.h b/Spatial_searching/include/CGAL/Plane_separator.h index 28373864af3..2d1f64bde73 100644 --- a/Spatial_searching/include/CGAL/Plane_separator.h +++ b/Spatial_searching/include/CGAL/Plane_separator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -37,26 +37,15 @@ template < class FT> class Plane_separator { void set_cutting_value(FT val) { cutting_val=val; } - - template - inline bool has_on_negative_side(const Point& i) { - return i[cutting_dimension()] < cutting_value(); - } +//commented this is not used +// template +// inline bool has_on_negative_side(const Point& i) { +// return i[cutting_dimension()] < cutting_value(); +// } Plane_separator(const int d, const FT& v) : cutting_dim(d), cutting_val(v) {} - Plane_separator(const Plane_separator& s) : - cutting_dim(s.cutting_dimension()), - cutting_val(s.cutting_value()) {} explicit Plane_separator() : cutting_dim(0), cutting_val(0) {} - Plane_separator& operator= (const Plane_separator& s) { - cutting_dim = s.cutting_dimension(); - cutting_val = s.cutting_value(); - return *this; - } - - ~Plane_separator() {} - }; template < class FT> diff --git a/Spatial_searching/include/CGAL/Point_container.h b/Spatial_searching/include/CGAL/Point_container.h index 68088140259..d9f119c76d0 100644 --- a/Spatial_searching/include/CGAL/Point_container.h +++ b/Spatial_searching/include/CGAL/Point_container.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -45,26 +45,26 @@ public: typedef typename Point_vector::iterator iterator; private: - + Traits traits; // the iterator range of the Point_container boost::optional m_b ; boost::optional m_e ; int built_coord; // a coordinate for which the pointer list is built - Kd_tree_rectangle bbox; // bounding box, i.e. rectangle of node - Kd_tree_rectangle tbox; // tight bounding box, + Kd_tree_rectangle bbox; // bounding box, i.e. rectangle of node + Kd_tree_rectangle tbox; // tight bounding box, // i.e. minimal enclosing bounding // box of points public: - inline const Kd_tree_rectangle& + inline const Kd_tree_rectangle& bounding_box() const { return bbox; } - inline const Kd_tree_rectangle& + inline const Kd_tree_rectangle& tight_bounding_box() const { return tbox; @@ -221,8 +221,8 @@ public: } // building the container from a sequence of Point_d* - Point_container(const int d, iterator begin, iterator end) : - m_b(begin), m_e(end), bbox(d, begin, end), tbox(bbox) + Point_container(const int d, iterator begin, iterator end,const Traits& traits_) : + traits(traits_),m_b(begin), m_e(end), bbox(d, begin, end,traits.construct_cartesian_const_iterator_d_object()), tbox(bbox) { built_coord = max_span_coord(); } @@ -236,8 +236,8 @@ public: // building an empty container - Point_container(const int d) : - bbox(d), tbox(d) + Point_container(const int d,const Traits& traits_) : + traits(traits_),bbox(d), tbox(d) {} template @@ -248,10 +248,10 @@ public: int split_coord; FT value; - typename Traits2::Construct_cartesian_const_iterator_d construct_it; + const typename Traits2::Construct_cartesian_const_iterator_d& construct_it; - Cmp(int s, FT c) - : split_coord(s), value(c) + Cmp(int s, FT c,const typename Traits2::Construct_cartesian_const_iterator_d& cst_it) + : split_coord(s), value(c), construct_it(cst_it) {} bool @@ -272,10 +272,10 @@ public: int split_coord; FT low, high; - typename Traits2::Construct_cartesian_const_iterator_d construct_it; + const typename Traits2::Construct_cartesian_const_iterator_d& construct_it; - Between(int s, FT l, FT h) - : split_coord(s), low(l), high(h) + Between(int s, FT l, FT h,const typename Traits2::Construct_cartesian_const_iterator_d& cst_it) + : split_coord(s), low(l), high(h), construct_it(cst_it) {} bool @@ -298,7 +298,7 @@ public: void recompute_tight_bounding_box() { - tbox.update_from_point_pointers(begin(), end()); + tbox.template update_from_point_pointers(begin(), end(),traits.construct_cartesian_const_iterator_d_object()); } @@ -311,7 +311,8 @@ public: CGAL_assertion( b = (b && (bbox.min_coord(i) <= tbox.min_coord(i)))); CGAL_assertion( b = (b && (bbox.max_coord(i) >= tbox.max_coord(i)))); - Between between(i,tbox.min_coord(i), tbox.max_coord(i)); + typename Traits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); + Between between(i,tbox.min_coord(i), tbox.max_coord(i), construct_it); for(iterator it = begin(); it != end(); it++){ b = (b && between(*it)); } @@ -336,15 +337,15 @@ public: c.built_coord=split_coord; - typename Traits::Construct_cartesian_const_iterator_d construct_it; + typename Traits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); - Cmp cmp(split_coord, cutting_value); + Cmp cmp(split_coord, cutting_value,construct_it); iterator it = std::partition(begin(), end(), cmp); // now [begin,it) are lower and [it,end) are upper if (sliding) { // avoid empty lists if (it == begin()) { - iterator minelt = std::min_element(begin(),end(),comp_coord_val(split_coord)); + iterator minelt = std::min_element(begin(),end(),comp_coord_val(split_coord,construct_it)); if(minelt != it){ std::iter_swap(minelt,it); } @@ -353,7 +354,7 @@ public: it++; } if (it == end()) { - iterator maxelt = std::max_element(begin(),end(),comp_coord_val(split_coord)); + iterator maxelt = std::max_element(begin(),end(),comp_coord_val(split_coord,construct_it)); it--; if(maxelt != it){ std::iter_swap(maxelt,it); @@ -367,11 +368,9 @@ public: set_range(it, end()); // adjusting boxes bbox.set_lower_bound(split_coord, cutting_value); - tbox.update_from_point_pointers(begin(), - end()); + tbox. template update_from_point_pointers(begin(),end(),construct_it); c.bbox.set_upper_bound(split_coord, cutting_value); - c.tbox.update_from_point_pointers(c.begin(), - c.end()); + c.tbox. template update_from_point_pointers(c.begin(),c.end(),construct_it); CGAL_assertion(is_valid()); CGAL_assertion(c.is_valid()); } @@ -383,17 +382,17 @@ public: private: Value coord; + const typename Traits2::Construct_cartesian_const_iterator_d& construct_it; typedef typename Traits2::Point_d Point_d; public: - comp_coord_val (const Value& coordinate) - : coord(coordinate) + comp_coord_val (const Value& coordinate,const typename Traits2::Construct_cartesian_const_iterator_d& cst_it) + : coord(coordinate), construct_it(cst_it) {} bool operator()(const Point_d *a, const Point_d *b) const { - typename Traits2::Construct_cartesian_const_iterator_d construct_it; typename Traits2::Cartesian_const_iterator_d ait = construct_it(*a), bit = construct_it(*b); return *(ait+coord) < *(bit+coord); @@ -404,10 +403,10 @@ public: FT median(const int split_coord) { + typename Traits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename Point_vector::iterator mid = begin() + (end() - begin())/2; - std::nth_element(begin(), mid, end(),comp_coord_val(split_coord)); - - typename Traits::Construct_cartesian_const_iterator_d construct_it; + std::nth_element(begin(), mid, end(),comp_coord_val(split_coord,construct_it)); + typename Traits::Cartesian_const_iterator_d mpit = construct_it((*(*mid))); FT val1 = *(mpit+split_coord); mid++; diff --git a/Spatial_searching/include/CGAL/Search_traits.h b/Spatial_searching/include/CGAL/Search_traits.h index 5aaf81c4a8c..2af38435f96 100644 --- a/Spatial_searching/include/CGAL/Search_traits.h +++ b/Spatial_searching/include/CGAL/Search_traits.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -23,7 +23,6 @@ namespace CGAL { - template class Search_traits { @@ -33,6 +32,10 @@ namespace CGAL { typedef Point Point_d; typedef FT_ FT; + Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object() const { + return Construct_cartesian_const_iterator_d(); + } + }; diff --git a/Spatial_searching/include/CGAL/Search_traits_2.h b/Spatial_searching/include/CGAL/Search_traits_2.h index 51607cf35dd..5443ad3ffee 100644 --- a/Spatial_searching/include/CGAL/Search_traits_2.h +++ b/Spatial_searching/include/CGAL/Search_traits_2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -42,6 +42,10 @@ namespace CGAL { typedef typename K::Construct_iso_rectangle_2 Construct_iso_box_d; typedef typename K::FT FT; + + Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object() const { + return Construct_cartesian_const_iterator_d(); + } }; diff --git a/Spatial_searching/include/CGAL/Search_traits_3.h b/Spatial_searching/include/CGAL/Search_traits_3.h index 8e8920cc1f6..6881d43600c 100644 --- a/Spatial_searching/include/CGAL/Search_traits_3.h +++ b/Spatial_searching/include/CGAL/Search_traits_3.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -42,7 +42,11 @@ namespace CGAL { typedef typename K::Construct_center_3 Construct_center_d; typedef typename K::Compute_squared_radius_3 Compute_squared_radius_d; typedef typename K::FT FT; - + + Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object() const { + return Construct_cartesian_const_iterator_d(); + } + }; diff --git a/Spatial_searching/include/CGAL/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h new file mode 100644 index 00000000000..aeccedacf31 --- /dev/null +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -0,0 +1,161 @@ +// Copyright (c) 2011 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Sebastien Loriot + +#ifndef CGAL_SEARCH_TRAITS_WITH_INFO +#define CGAL_SEARCH_TRAITS_WITH_INFO + +#include +#include +#include //for default distance specialization + +#include +#if BOOST_VERSION >= 104000 + #include +#else + #include +#endif + +namespace CGAL{ + +using ::get; + +template +class Search_traits_adapter; + +template +class Distance_adapter; + +namespace internal{ + +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_typedef_Iso_box_d,Iso_box_d,false) + +template ::value > +struct Get_iso_box_d; + +template +struct Get_iso_box_d +{ + typedef void type; +}; + +template +struct Get_iso_box_d +{ + typedef typename T::Iso_box_d type; +}; + + template + struct Spatial_searching_default_distance< ::CGAL::Search_traits_adapter >{ + typedef ::CGAL::Distance_adapter::type> type; + }; + +} //namespace internal + + +template +class Search_traits_adapter : public Base_traits{ + PointPropertyMap ppmap; +public: + typedef Base_traits Base; + typedef typename internal::Get_iso_box_d::type Iso_box_d; + + Search_traits_adapter(const PointPropertyMap& ppmap_=PointPropertyMap(), + const Base_traits& base=Base_traits() + ):Base_traits(base),ppmap(ppmap_){} + + typedef typename Base_traits::Cartesian_const_iterator_d Cartesian_const_iterator_d; + typedef Point_with_info Point_d; + typedef typename Base_traits::FT FT; + + struct Construct_cartesian_const_iterator_d: public Base_traits::Construct_cartesian_const_iterator_d{ + PointPropertyMap ppmap; + using Base_traits::Construct_cartesian_const_iterator_d::operator(); + + Construct_cartesian_const_iterator_d(const typename Base_traits::Construct_cartesian_const_iterator_d& base, const PointPropertyMap& ppmap_) + :Base_traits::Construct_cartesian_const_iterator_d(base), ppmap(ppmap_){} + + typename Base_traits::Cartesian_const_iterator_d operator()(const Point_with_info& p) const + { return this->operator() (get(ppmap,p)); } + + typename Base_traits::Cartesian_const_iterator_d operator()(const Point_with_info& p, int) const + { return this->operator() (get(ppmap,p),0); } + }; + + struct Construct_iso_box_d: public Base::Construct_iso_box_d{ + PointPropertyMap ppmap; + typedef typename Base_traits::FT FT; // needed for VC++, because otherwise it is taken from the private typedef of the base class + + Iso_box_d operator() () const { + return static_cast(this)->operator() (); + } + Iso_box_d operator() (const Point_with_info& p, const Point_with_info& q) const + { + return static_cast(this)->operator() (get(ppmap,p),get(ppmap,q)); + } + }; + + const PointPropertyMap& point_property_map() const {return ppmap;} + + Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object() const { + return Construct_cartesian_const_iterator_d( + static_cast(this)->construct_cartesian_const_iterator_d_object(), + ppmap); + } +}; + +template +class Distance_adapter : public Base_distance { + PointPropertyMap ppmap; + typedef typename Base_distance::FT FT; +public: + + Distance_adapter( const PointPropertyMap& ppmap_=PointPropertyMap(), + const Base_distance& distance=Base_distance() + ):Base_distance(distance),ppmap(ppmap_){} + + using Base_distance::transformed_distance; + + typedef Point_with_info Point_d; + typedef typename Base_distance::Query_item Query_item; + + const PointPropertyMap& point_property_map() const {return ppmap;} + + FT transformed_distance(const Query_item& p1, const Point_with_info& p2) const + { + return this->transformed_distance(p1,get(ppmap,p2)); + } + + template + FT min_distance_to_rectangle(const Query_item& p, const CGAL::Kd_tree_rectangle& b) const + { + return static_cast(this)->min_distance_to_rectangle(p,b); + } + + template + FT max_distance_to_rectangle(const Query_item& p,const CGAL::Kd_tree_rectangle& b) const + { + return static_cast(this)->max_distance_to_rectangle(p,b); + } +}; + +}//namespace CGAL + +#endif //CGAL_SEARCH_TRAITS_WITH_INFO diff --git a/Spatial_searching/include/CGAL/Search_traits_d.h b/Spatial_searching/include/CGAL/Search_traits_d.h index 9d89dc61a7b..e90affa48a1 100644 --- a/Spatial_searching/include/CGAL/Search_traits_d.h +++ b/Spatial_searching/include/CGAL/Search_traits_d.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -36,6 +36,9 @@ namespace CGAL { typedef typename K::Iso_box_d Iso_box_d; typedef typename K::FT FT; + Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object() const { + return Construct_cartesian_const_iterator_d(); + } }; diff --git a/Spatial_searching/include/CGAL/Weighted_Minkowski_distance.h b/Spatial_searching/include/CGAL/Weighted_Minkowski_distance.h index a28180211fd..ea7f0b75f7d 100644 --- a/Spatial_searching/include/CGAL/Weighted_Minkowski_distance.h +++ b/Spatial_searching/include/CGAL/Weighted_Minkowski_distance.h @@ -1,4 +1,4 @@ -// Copyright (c) 2002 Utrecht University (The Netherlands). +// Copyright (c) 2002,2011 Utrecht University (The Netherlands). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -30,7 +30,7 @@ namespace CGAL { template class Weighted_Minkowski_distance { - + SearchTraits traits; public: typedef typename SearchTraits::Point_d Point_d; @@ -49,12 +49,12 @@ namespace CGAL { // default constructor - Weighted_Minkowski_distance() - : power(2) + Weighted_Minkowski_distance(const SearchTraits& traits_=SearchTraits()) + : traits(traits_),power(2) {} - Weighted_Minkowski_distance(const int d) - : power(2), the_weights(d) + Weighted_Minkowski_distance(const int d,const SearchTraits& traits_=SearchTraits()) + : traits(traits_),power(2), the_weights(d) { for (unsigned int i = 0; i < d; ++i) the_weights[i]=FT(1); } @@ -63,8 +63,9 @@ namespace CGAL { Weighted_Minkowski_distance (FT pow, int dim, - const Weight_vector& weights) - : power(pow) + const Weight_vector& weights, + const SearchTraits& traits_=SearchTraits()) + : traits(traits_),power(pow) { CGAL_assertion(power >= FT(0)); CGAL_assertion(dim==weights.size()); @@ -76,8 +77,9 @@ namespace CGAL { template Weighted_Minkowski_distance (FT pow, int dim, - InputIterator begin, InputIterator end) - : power(pow) + InputIterator begin, InputIterator end, + const SearchTraits& traits_=SearchTraits()) + : traits(traits_),power(pow) { CGAL_assertion(power >= FT(0)); the_weights.resize(dim); @@ -96,7 +98,8 @@ namespace CGAL { transformed_distance(const Query_item& q, const Point_d& p) { FT distance = FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), qe = construct_it(q,1), pit = construct_it(p); @@ -116,10 +119,11 @@ namespace CGAL { inline FT min_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) const + const Kd_tree_rectangle& r) const { FT distance = FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), qe = construct_it(q,1); if (power == FT(0)) { @@ -151,9 +155,10 @@ namespace CGAL { inline FT max_distance_to_rectangle(const Query_item& q, - const Kd_tree_rectangle& r) const { + const Kd_tree_rectangle& r) const { FT distance=FT(0); - typename SearchTraits::Construct_cartesian_const_iterator_d construct_it; + typename SearchTraits::Construct_cartesian_const_iterator_d construct_it= + traits.construct_cartesian_const_iterator_d_object(); Coord_iterator qit = construct_it(q), qe = construct_it(q,1); if (power == FT(0)) { diff --git a/Spatial_searching/include/CGAL/internal/K_neighbor_search.h b/Spatial_searching/include/CGAL/internal/K_neighbor_search.h index 8aa109f4a42..d762a199f2b 100644 --- a/Spatial_searching/include/CGAL/internal/K_neighbor_search.h +++ b/Spatial_searching/include/CGAL/internal/K_neighbor_search.h @@ -33,10 +33,7 @@ namespace CGAL { namespace internal{ -template , - class Splitter_= Sliding_midpoint , - class Tree_= Kd_tree > +template class K_neighbor_search { public: diff --git a/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_ddim_points.cpp b/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_ddim_points.cpp index 514e7eb1440..48f3ee6a1eb 100644 --- a/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_ddim_points.cpp +++ b/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_ddim_points.cpp @@ -9,52 +9,61 @@ #include #include #include +#include +#include "Point_with_info.h" #include #include #include //typedef CGAL::Cartesian_d K; -typedef CGAL::Homogeneous_d K; -typedef CGAL::Point_d Point; +typedef CGAL::Homogeneous_d Kernel; +typedef CGAL::Point_d Point; typedef CGAL::Random_points_in_cube_d Point_generator; -typedef K SearchTraits; -typedef CGAL::Orthogonal_k_neighbor_search Orthogonal_k_neighbor_search; -typedef CGAL::K_neighbor_search K_neighbor_search; +typedef Kernel SearchTraits; +typedef CGAL::Orthogonal_k_neighbor_search Orthogonal_k_neighbor_search; +typedef CGAL::K_neighbor_search K_neighbor_search; +typedef Orthogonal_k_neighbor_search::Distance Distance; +//typdefs for Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +typedef CGAL::Distance_adapter Distance_adapter; +typedef CGAL::Orthogonal_k_neighbor_search Orthogonal_k_neighbor_search_with_info; +typedef CGAL::K_neighbor_search K_neighbor_search_with_info; -int main() { - - const unsigned int N = 1000; - const unsigned int K = 20; - - std::vector points; - - Point_generator g(3); - CGAL::copy_n( g, N, std::back_inserter(points)); - g++; - Point query = *g; - - Orthogonal_k_neighbor_search::Tree o_tree(points.begin(), points.end()); +const unsigned int N = 1000; +const unsigned int K = 20; + +template +void run(const std::vector& points,const Point& query) +{ + typename OK_search::Tree o_tree( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); o_tree.statistics(std::cout); - K_neighbor_search::Tree tree(points.begin(), points.end()); + typename K_search::Tree tree( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); tree.statistics(std::cout); // do checking double dist = 0; std::vector result; - Orthogonal_k_neighbor_search o_search(o_tree, query,K); - for(Orthogonal_k_neighbor_search::iterator it = o_search.begin(); + OK_search o_search(o_tree, query,K); + for(typename OK_search::iterator it = o_search.begin(); it != o_search.end(); it++){ - result.push_back(it->first); + result.push_back(get_point(it->first)); if(CGAL::to_double(it->second) > dist) dist = CGAL::to_double(it->second); } assert(result.size() == K); - for(std::vector::iterator it = points.begin(); + for(std::vector::const_iterator it = points.begin(); it != points.end(); it++){ if( std::find(result.begin(), result.end(), *it) == result.end()){ @@ -63,23 +72,38 @@ int main() { } result.clear(); - K_neighbor_search search(tree, query,K); - for(K_neighbor_search::iterator it = search.begin(); + K_search search(tree, query,K); + for(typename K_search::iterator it = search.begin(); it != search.end(); it++){ - result.push_back(it->first); + result.push_back(get_point(it->first)); if(CGAL::to_double(it->second) > dist) dist = CGAL::to_double(it->second); } assert(result.size() == K); - for(std::vector::iterator it = points.begin(); + for(std::vector::const_iterator it = points.begin(); it != points.end(); it++){ if( std::find(result.begin(), result.end(), *it) == result.end()){ assert(CGAL::squared_distance(query, *it) >= dist); } } - std::cout << "done" << std::endl; + std::cout << "done" << std::endl; +} + +int main() { + + + std::vector points; + + Point_generator g(3); + CGAL::copy_n( g, N, std::back_inserter(points)); + g++; + Point query = *g; + + run(points,query); + run(points,query); + return 0; } diff --git a/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp b/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp index ebd3f27465c..3e3a756162a 100644 --- a/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp +++ b/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp @@ -2,54 +2,71 @@ #include #include +#include #include #include #include #include "Point.h" #include "Distance.h" +#include "Point_with_info.h" -typedef CGAL::Random_points_in_cube_3 Random_points_iterator; -typedef CGAL::Counting_iterator N_Random_points_iterator; -typedef CGAL::Search_traits Traits; -typedef CGAL::Orthogonal_k_neighbor_search K_neighbor_search; -typedef K_neighbor_search::Tree Tree; +typedef CGAL::Random_points_in_cube_3 Random_points_iterator; +typedef CGAL::Counting_iterator N_Random_points_iterator; +typedef CGAL::Search_traits Traits; +typedef CGAL::Orthogonal_k_neighbor_search K_neighbor_search; +//typdefs for Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +typedef CGAL::Distance_adapter Distance_adapter; +typedef CGAL::Orthogonal_k_neighbor_search K_neighbor_search_with_info; -int main() { - const unsigned int N = 1000; - const unsigned int K = 5; - // generator for random data points in the cube ( (-1,-1,-1), (1,1,1) ) - Random_points_iterator rpit( 1.0); - - std::vector points(N_Random_points_iterator(rpit,0), - N_Random_points_iterator(N)); +const unsigned int N = 1000; +const unsigned int K = 5; + +template +void run(const std::vector& points) +{ // Insert number_of_data_points in the tree - Tree tree(points.begin(), points.end()); + typename K_search::Tree tree( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); Point query(0.0, 0.0, 0.0); // search K nearest neighbours - K_neighbor_search search(tree, query, K); + K_search search(tree, query, K); // do checking double dist = 0; std::vector result; - for(K_neighbor_search::iterator it = search.begin(); + for(typename K_search::iterator it = search.begin(); it != search.end(); it++){ - result.push_back(it->first); + result.push_back(get_point(it->first)); if(CGAL::to_double(it->second) > dist) dist = CGAL::to_double(it->second); } assert(result.size() == K); - for(std::vector::iterator it = points.begin(); + for(std::vector::const_iterator it = points.begin(); it != points.end(); it++){ if( std::find(result.begin(), result.end(), *it) == result.end()){ - Distance d; - assert(d.transformed_distance(query, *it) >= dist); + assert(Distance().transformed_distance(query, *it) >= dist); } } - std::cout << "done" << std::endl; + std::cout << "done" << std::endl; +} + +int main() { + // generator for random data points in the cube ( (-1,-1,-1), (1,1,1) ) + Random_points_iterator rpit( 1.0); + + std::vector points(N_Random_points_iterator(rpit,0), + N_Random_points_iterator(N)); + + run(points); + run(points); return 0; } diff --git a/Spatial_searching/test/Spatial_searching/Circular_query.cpp b/Spatial_searching/test/Spatial_searching/Circular_query.cpp index 9d51f1ad6e6..aebe35e1c2c 100644 --- a/Spatial_searching/test/Spatial_searching/Circular_query.cpp +++ b/Spatial_searching/test/Spatial_searching/Circular_query.cpp @@ -9,18 +9,76 @@ #include #include #include +#include #include #include #include +#include "Point_with_info.h" typedef CGAL::Cartesian K; typedef K::Point_2 Point; typedef CGAL::Random_points_in_square_2 Random_points_iterator; typedef CGAL::Counting_iterator N_Random_points_iterator; -typedef CGAL::Search_traits_2 Traits; -typedef CGAL::Fuzzy_sphere Fuzzy_circle; -typedef CGAL::Kd_tree Tree; +typedef CGAL::Search_traits_2 Traits; +//for Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; + + +template +void run(std::list all_points){ + typedef CGAL::Fuzzy_sphere Fuzzy_circle; + typedef CGAL::Kd_tree Tree; + // Insert also the N points in the tree + Tree tree( + boost::make_transform_iterator(all_points.begin(),Create_point_with_info()), + boost::make_transform_iterator(all_points.end(),Create_point_with_info()) + ); + + // define exact circular range query (fuzziness=0) + Point center(0.2, 0.2); + Fuzzy_circle exact_range(typename Traits::Point_d(center), 0.2); + + std::list result; + tree.search(std::back_inserter( result ), exact_range); + + // test the results of the exact query + std::list copy_all_points(all_points); + for (typename std::list::iterator pt=result.begin(); (pt != result.end()); ++pt) { + assert(CGAL::squared_distance(center,get_point(*pt))<=0.04); + copy_all_points.remove(get_point(*pt)); + } + + for (std::list::iterator pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) { + if(CGAL::squared_distance(center,*pt)<=0.04){ + std::cout << "we missed " << *pt << " with distance = " << CGAL::squared_distance(center,*pt) << std::endl; + } + assert(CGAL::squared_distance(center,*pt)>0.04); + } + + + result.clear(); + // approximate range searching using value 0.1 for fuzziness parameter + Fuzzy_circle approximate_range(typename Traits::Point_d(center), 0.2, 0.1); + + tree.search(std::back_inserter( result ), approximate_range); + // test the results of the approximate query + for (typename std::list::iterator pt=result.begin(); (pt != result.end()); ++pt) { + // a point we found may be slighlty outside the circle + assert(CGAL::squared_distance(center,get_point(*pt))<=0.09); + all_points.remove(get_point(*pt)); + } + + for (std::list::iterator pt=all_points.begin(); (pt != all_points.end()); ++pt) { + if(CGAL::squared_distance(center,*pt)<=0.01){ + std::cout << "we missed " << *pt << " with distance = " << CGAL::squared_distance(center,*pt) << std::endl; + } + assert(CGAL::squared_distance(center,*pt)> 0.01); + } + std::cout << "done" << std::endl; +} + int main() { const int N=1000; @@ -32,51 +90,9 @@ int main() { std::list all_points(N_Random_points_iterator(rpit,0), N_Random_points_iterator(N)); - // Insert also the N points in the tree - Tree tree(all_points.begin(),all_points.end()); + run(all_points); + run(all_points); - // define exact circular range query (fuzziness=0) - Point center(0.2, 0.2); - Fuzzy_circle exact_range(center, 0.2); - - std::list result; - tree.search(std::back_inserter( result ), exact_range); - - // test the results of the exact query - std::list copy_all_points(all_points); - std::list::iterator pt; - for (pt=result.begin(); (pt != result.end()); ++pt) { - assert(CGAL::squared_distance(center,*pt)<=0.04); - copy_all_points.remove(*pt); - } - - for (pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) { - if(CGAL::squared_distance(center,*pt)<=0.04){ - std::cout << "we missed " << *pt << " with distance = " << CGAL::squared_distance(center,*pt) << std::endl; - } - assert(CGAL::squared_distance(center,*pt)>0.04); - } - - - result.clear(); - // approximate range searching using value 0.1 for fuzziness parameter - Fuzzy_circle approximate_range(center, 0.2, 0.1); - - tree.search(std::back_inserter( result ), approximate_range); - // test the results of the approximate query - for (pt=result.begin(); (pt != result.end()); ++pt) { - // a point we found may be slighlty outside the circle - assert(CGAL::squared_distance(center,*pt)<=0.09); - all_points.remove(*pt); - } - - for (pt=all_points.begin(); (pt != all_points.end()); ++pt) { - if(CGAL::squared_distance(center,*pt)<=0.01){ - std::cout << "we missed " << *pt << " with distance = " << CGAL::squared_distance(center,*pt) << std::endl; - } - assert(CGAL::squared_distance(center,*pt)> 0.01); - } - std::cout << "done" << std::endl; return 0; } diff --git a/Spatial_searching/test/Spatial_searching/Compare_methods.cpp b/Spatial_searching/test/Spatial_searching/Compare_methods.cpp index fd86ee6d8fa..5715804d2e0 100644 --- a/Spatial_searching/test/Spatial_searching/Compare_methods.cpp +++ b/Spatial_searching/test/Spatial_searching/Compare_methods.cpp @@ -69,7 +69,7 @@ void one_run(int NB_INPUT_POINTS,int VALUE_OF_K,int NB_NEIGH){ OK_search::Tree ok_tree(points.begin(),points.end()); OK_search ok_search(ok_tree, query,VALUE_OF_K); OK_search::iterator ok_it=ok_search.begin(), ok_end=ok_search.end(); - for (int j=0; (j < NB_NEIGH-1)&&(ok_it!=ok_end); ++j,++ok_it); + for (int j=0; (j < NB_NEIGH-1)&&(ok_it!=ok_end); ++j,++ok_it) {} time.stop(); ok_time=time.time(); std::cout << ok_time << " "; time.reset(); if (NB_INPUT_POINTS!=0){ CGAL_assertion(ok_it!=ok_end); @@ -89,8 +89,7 @@ void one_run(int NB_INPUT_POINTS,int VALUE_OF_K,int NB_NEIGH){ K_search::Tree k_tree(points.begin(),points.end()); K_search k_search(k_tree, query,VALUE_OF_K); K_search::iterator k_it=k_search.begin(), k_end=k_search.end(); - for (int j=0; (j < NB_NEIGH-1)&&(k_it!=k_end); ++j,++k_it); - //~ //std::cout << (*k_it).first << " at squared distance = " << (*k_it).second << std::endl; + for (int j=0; (j < NB_NEIGH-1)&&(k_it!=k_end); ++j,++k_it) {} time.stop(); k_time=time.time(); std::cout << k_time << " "; time.reset(); if (NB_INPUT_POINTS!=0){ CGAL_assertion(k_it!=k_end); @@ -108,8 +107,7 @@ void one_run(int NB_INPUT_POINTS,int VALUE_OF_K,int NB_NEIGH){ OI_search::Tree oi_tree(points.begin(),points.end()); OI_search oi_search(oi_tree, query); OI_search::iterator oi_it=oi_search.begin(), oi_end=oi_search.end(); - for (int j=0; (j < NB_NEIGH-1)&&(oi_it!=oi_end); ++j,++oi_it); - //~ std::cout << (*oi_it).first << " at squared distance = " << (*oi_it).second << std::endl; + for (int j=0; (j < NB_NEIGH-1)&&(oi_it!=oi_end); ++j,++oi_it) {} time.stop(); oi_time=time.time(); std::cout << oi_time << " "; time.reset(); if (NB_INPUT_POINTS!=0){ CGAL_assertion(oi_it!=oi_end); @@ -127,8 +125,7 @@ void one_run(int NB_INPUT_POINTS,int VALUE_OF_K,int NB_NEIGH){ I_search::Tree i_tree(points.begin(),points.end()); I_search i_search(i_tree, query); I_search::iterator i_it=i_search.begin(), i_end=i_search.end(); - for (int j=0; (j < NB_NEIGH-1)&&(i_it!=i_end); ++j,++i_it); - //~ std::cout << (*i_it).first << " at squared distance = " << (*i_it).second << std::endl; + for (int j=0; (j < NB_NEIGH-1)&&(i_it!=i_end); ++j,++i_it) {} time.stop(); i_time=time.time(); std::cout << i_time << " "; time.reset(); if (NB_INPUT_POINTS!=0){ CGAL_assertion(i_it!=i_end); diff --git a/Spatial_searching/test/Spatial_searching/Distance.h b/Spatial_searching/test/Spatial_searching/Distance.h index f07aadc81a0..04f270f06a3 100644 --- a/Spatial_searching/test/Spatial_searching/Distance.h +++ b/Spatial_searching/test/Spatial_searching/Distance.h @@ -1,5 +1,6 @@ struct Distance { typedef Point Query_item; + typedef double FT; double transformed_distance(const Point& p1, const Point& p2) const { double distx= p1.x()-p2.x(); diff --git a/Spatial_searching/test/Spatial_searching/Iso_rectangle_2_query.cpp b/Spatial_searching/test/Spatial_searching/Iso_rectangle_2_query.cpp index 8bbd4fc87b4..7c01f519786 100644 --- a/Spatial_searching/test/Spatial_searching/Iso_rectangle_2_query.cpp +++ b/Spatial_searching/test/Spatial_searching/Iso_rectangle_2_query.cpp @@ -4,8 +4,10 @@ #include #include #include +#include #include #include +#include "Point_with_info.h" #include #include @@ -17,9 +19,65 @@ typedef K::Iso_rectangle_2 Iso_rectangle; typedef CGAL::Random_points_in_square_2 Random_points_iterator; typedef CGAL::Counting_iterator N_Random_points_iterator; typedef CGAL::Search_traits_2 Traits; -typedef CGAL::Fuzzy_iso_box Fuzzy_box; -typedef CGAL::Kd_tree Tree; +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +template +void run(std::list all_points) +{ + typedef CGAL::Fuzzy_iso_box Fuzzy_box; + + // Insert also the N points in the tree + CGAL::Kd_tree tree( + boost::make_transform_iterator(all_points.begin(),Create_point_with_info()), + boost::make_transform_iterator(all_points.end(),Create_point_with_info()) + ); + + Point p(0.1, 0.2); + Point q(0.3, 0.5); + typename SearchTraits::Point_d pp(p); + typename SearchTraits::Point_d qq(q); + + + Iso_rectangle exact_ic(p,q); + + Fuzzy_box exact_range(pp,qq); + + std::list result; + // Searching the box r exactly + tree.search( std::back_inserter( result ), exact_range); + + // test the results of the exact query + std::list copy_all_points(all_points); + for (typename std::list::iterator pt=result.begin(); (pt != result.end()); ++pt) { + assert(! exact_ic.has_on_unbounded_side(get_point(*pt)) || exact_ic.has_on_boundary(get_point(*pt))); + copy_all_points.remove(get_point(*pt)); + } + + for (std::list::iterator pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) { + assert(exact_ic.has_on_unbounded_side(*pt) || exact_ic.has_on_boundary(*pt)); + } + + + result.clear(); + // approximate range searching using value 0.1 for fuzziness parameter + Fuzzy_box approximate_range(pp,qq,0.05); + Iso_rectangle inner_ic(p+ 0.05*Vector(1,1),q-0.05*Vector(1,1)); + Iso_rectangle outer_ic(p- 0.05*Vector(1,1),q+0.05*Vector(1,1)); + + tree.search(std::back_inserter( result ), approximate_range); + // test the results of the approximate query + for (typename std::list::iterator pt=result.begin(); (pt != result.end()); ++pt) { + // a point we found may be slighlty outside the isorectangle + assert(! outer_ic.has_on_unbounded_side(get_point(*pt)) || outer_ic.has_on_boundary(get_point(*pt))); + all_points.remove(get_point(*pt)); + } + + for (std::list::iterator pt=all_points.begin(); (pt != all_points.end()); ++pt) { + assert(inner_ic.has_on_unbounded_side(*pt) || inner_ic.has_on_boundary(*pt)); + } + std::cout << "done" << std::endl; +} int main() { @@ -32,52 +90,9 @@ int main() { std::list all_points(N_Random_points_iterator(rpit,0), N_Random_points_iterator(N)); - // Insert also the N points in the tree - Tree tree(all_points.begin(),all_points.end()); + run(all_points); + run(all_points); - Point p(0.1, 0.2); - Point q(0.3, 0.5); - - Iso_rectangle exact_ic(p,q); - - Fuzzy_box exact_range(p,q); - - std::list result; - // Searching the box r exactly - tree.search( std::back_inserter( result ), exact_range); - - // test the results of the exact query - std::list copy_all_points(all_points); - std::list::iterator pt; - for (pt=result.begin(); (pt != result.end()); ++pt) { - assert(! exact_ic.has_on_unbounded_side(*pt) || exact_ic.has_on_boundary(*pt)); - copy_all_points.remove(*pt); - } - - for (pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) { - assert(exact_ic.has_on_unbounded_side(*pt) || exact_ic.has_on_boundary(*pt)); - } - - - result.clear(); - // approximate range searching using value 0.1 for fuzziness parameter - Fuzzy_box approximate_range(p,q,0.05); - Iso_rectangle inner_ic(p+ 0.05*Vector(1,1),q-0.05*Vector(1,1)); - Iso_rectangle outer_ic(p- 0.05*Vector(1,1),q+0.05*Vector(1,1)); - - tree.search(std::back_inserter( result ), approximate_range); - // test the results of the approximate query - for (pt=result.begin(); (pt != result.end()); ++pt) { - // a point we found may be slighlty outside the isorectangle - assert(! outer_ic.has_on_unbounded_side(*pt) || outer_ic.has_on_boundary(*pt)); - all_points.remove(*pt); - } - - for (pt=all_points.begin(); (pt != all_points.end()); ++pt) { - assert(inner_ic.has_on_unbounded_side(*pt) || inner_ic.has_on_boundary(*pt)); - } - std::cout << "done" << std::endl; - return 0; } diff --git a/Spatial_searching/test/Spatial_searching/K_neighbor_search_manhattan_distance_isobox_point.cpp b/Spatial_searching/test/Spatial_searching/K_neighbor_search_manhattan_distance_isobox_point.cpp index bcb77f5c53b..425be051905 100644 --- a/Spatial_searching/test/Spatial_searching/K_neighbor_search_manhattan_distance_isobox_point.cpp +++ b/Spatial_searching/test/Spatial_searching/K_neighbor_search_manhattan_distance_isobox_point.cpp @@ -5,17 +5,48 @@ #include #include #include +#include +#include "Point_with_info.h" -typedef CGAL::Cartesian K; -typedef K::Point_2 Point_d; -typedef K::Iso_rectangle_2 Iso_box_d; -typedef CGAL::Search_traits_2 TreeTraits; +typedef CGAL::Cartesian Kernel; +typedef Kernel::Point_2 Point_d; +typedef Kernel::Iso_rectangle_2 Iso_box_d; +typedef CGAL::Search_traits_2 TreeTraits; typedef CGAL::Manhattan_distance_iso_box_point Distance; typedef CGAL::K_neighbor_search Neighbor_search; -typedef Neighbor_search::Tree Tree; +//typdefs for Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +typedef CGAL::Distance_adapter Distance_adapter; +typedef CGAL::K_neighbor_search Neighbor_search_with_info; + +const unsigned int K = 8; + + +template +void run(std::list points) +{ + typename K_search::Tree tree( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); + + Point_d pp(2,3); + Point_d qq(4,5); + Iso_box_d query(pp,qq); + + Distance tr_dist; + K_search N1(tree, query, K); // eps=10.0, nearest=false + + for (typename K_search::iterator it = N1.begin();it != N1.end();it++) { + assert( get_point(it->first) == points.front()); + points.pop_front(); + } + std::cout << "done" << std::endl; +} int main() { - const unsigned int K = 8; + std::list points; points.push_back(Point_d(3,4)); @@ -30,20 +61,8 @@ int main() { points.push_back(Point_d(10,1)); points.push_back(Point_d(10,9)); + run(points); + run(points); - Tree tree(points.begin(), points.end()); - - Point_d pp(2,3); - Point_d qq(4,5); - Iso_box_d query(pp,qq); - - Distance tr_dist; - Neighbor_search N1(tree, query, K); // eps=10.0, nearest=false - - for (Neighbor_search::iterator it = N1.begin();it != N1.end();it++) { - assert( it->first == points.front()); - points.pop_front(); - } - std::cout << "done" << std::endl; return 0; } diff --git a/Spatial_searching/test/Spatial_searching/K_neighbor_search_with_circle.cpp b/Spatial_searching/test/Spatial_searching/K_neighbor_search_with_circle.cpp index c0cd19cd74d..1498d333bf6 100644 --- a/Spatial_searching/test/Spatial_searching/K_neighbor_search_with_circle.cpp +++ b/Spatial_searching/test/Spatial_searching/K_neighbor_search_with_circle.cpp @@ -6,31 +6,36 @@ #include #include #include +#include +#include "Point_with_info.h" #include #include -typedef CGAL::Cartesian K; -typedef K::Point_2 Point; -typedef K::Circle_2 Circle; -typedef K::FT NT; -typedef CGAL::Search_traits_2 TreeTraits; +typedef CGAL::Cartesian Kernel; +typedef Kernel::Point_2 Point; +typedef Kernel::Circle_2 Circle; +typedef Kernel::FT NT; +typedef CGAL::Search_traits_2 TreeTraits; typedef CGAL::Euclidean_distance_sphere_point Distance; typedef CGAL::K_neighbor_search Neighbor_search; -typedef Neighbor_search::Tree Tree; typedef CGAL::Random_points_in_square_2 Random_points_iterator; - -int main() { +//typdefs for Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +typedef CGAL::Distance_adapter Distance_adapter; +typedef CGAL::K_neighbor_search Neighbor_search_with_info; - const unsigned int N = 1000; - const unsigned int K = 50; - Random_points_iterator g(1.0); - std::vector points; - for(unsigned int i=0; i < N; i++){ - points.push_back(*g++); - } - - - Tree tree(points.begin(), points.end()); + +const unsigned int N = 1000; +const unsigned int K = 50; + +template +void run(std::vector points) +{ + typename K_search::Tree tree( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); double squared_radius = 0.04; @@ -39,15 +44,15 @@ int main() { Distance dist; - Neighbor_search search(tree, query, K); + K_search search(tree, query, K); std::vector result; double max_dist = -1; - for (Neighbor_search::iterator it = search.begin(); + for (typename K_search::iterator it = search.begin(); it != search.end(); it++){ - result.push_back(it->first); - if(CGAL::squared_distance(center, it->first) > max_dist){ + result.push_back(get_point(it->first)); + if(CGAL::squared_distance(center, get_point(it->first)) > max_dist){ max_dist = it->second; } } @@ -68,6 +73,22 @@ int main() { } std::cout << "done" << std::endl; +} + + +int main() { + + + Random_points_iterator g(1.0); + std::vector points; + for(unsigned int i=0; i < N; i++){ + points.push_back(*g++); + } + + run(points); + run(points); + + return 0; } diff --git a/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp b/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp index 0eb0c330cf5..10a1250f5fb 100644 --- a/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp +++ b/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp @@ -11,7 +11,8 @@ #include #include #include - +#include +#include "Point_with_info.h" #ifdef TWO @@ -32,29 +33,20 @@ typedef CGAL::Search_traits_3 TreeTraits; typedef std::vector Vector; //typedef CGAL::Orthogonal_incremental_neighbor_search Orthogonal_incremental_neighbor_search; -typedef CGAL::Incremental_neighbor_search Orthogonal_incremental_neighbor_search; -typedef Orthogonal_incremental_neighbor_search::iterator NN_iterator; -typedef Orthogonal_incremental_neighbor_search::Tree Tree; +typedef CGAL::Incremental_neighbor_search Orthogonal_incremental_neighbor_search; +typedef Orthogonal_incremental_neighbor_search::Distance Distance; +typedef Orthogonal_incremental_neighbor_search::iterator NN_iterator; typedef Orthogonal_incremental_neighbor_search::Point_with_transformed_distance Point_with_transformed_distance; - -struct less_second { - bool operator()(const Orthogonal_incremental_neighbor_search::Point_with_transformed_distance& p1, - const Orthogonal_incremental_neighbor_search::Point_with_transformed_distance& p2) const - { - return p1.second < p2.second; - } -}; +//typdefs for Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +typedef CGAL::Distance_adapter Distance_adapter; +typedef CGAL::Incremental_neighbor_search Orthogonal_incremental_neighbor_search_with_info; -std::ostream& operator<<(std::ostream& os, const Orthogonal_incremental_neighbor_search::Point_with_transformed_distance& pair) +template +void run() { - os << pair.first << " | " << pair.second; - return os; -} - -int -main() { - const int N = 1000; Vector points; Vector points2; Random_points g( 150.0); @@ -65,32 +57,33 @@ main() { CGAL::copy_n( g, 1000, std::back_inserter(points)); - Tree t(points.begin(), points.end()); + typename K_search::Tree t( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); g++; Point query = *g; - std::vector result(N); + K_search oins(t, query, 0.0, true); - Orthogonal_incremental_neighbor_search oins(t, query, 0.0, true); - - Orthogonal_incremental_neighbor_search::iterator it = oins.begin(); - Point_with_transformed_distance pd = *it; - points2.push_back(pd.first); - if(CGAL::squared_distance(query,pd.first) != pd.second){ - std::cout << "different distances: " << CGAL::squared_distance(query,pd.first) << " != " << pd.second << std::endl; + typename K_search::iterator it = oins.begin(); + typename K_search::Point_with_transformed_distance pd = *it; + points2.push_back(get_point(pd.first)); + if(CGAL::squared_distance(query,get_point(pd.first)) != pd.second){ + std::cout << "different distances: " << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL::squared_distance(query,pd.first) == pd.second); + assert(CGAL::squared_distance(query,get_point(pd.first)) == pd.second); it++; for(; it != oins.end();it++){ - Point_with_transformed_distance qd = *it; + typename K_search::Point_with_transformed_distance qd = *it; assert(pd.second <= qd.second); pd = qd; - points2.push_back(pd.first); - if(CGAL::squared_distance(query,pd.first) != pd.second){ - std::cout << "different distances: " << CGAL::squared_distance(query,pd.first) << " != " << pd.second << std::endl; + points2.push_back(get_point(pd.first)); + if(CGAL::squared_distance(query,get_point(pd.first)) != pd.second){ + std::cout << "different distances: " << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL::squared_distance(query,pd.first) == pd.second); + assert(CGAL::squared_distance(query,get_point(pd.first)) == pd.second); } @@ -107,6 +100,12 @@ main() { std::cout << "done" << std::endl; +} + +int +main() { + run(); + run(); return 0; } diff --git a/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp b/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp index b3b1186f4ef..31ddd170746 100644 --- a/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp +++ b/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp @@ -3,20 +3,25 @@ #include #include #include +#include #include +#include "Point_with_info.h" #include typedef CGAL::Cartesian K; typedef K::Point_2 Point; -typedef CGAL::Random_points_in_square_2 Random_points_iterator; -typedef CGAL::Counting_iterator N_Random_points_iterator; -typedef CGAL::Search_traits_2 TreeTraits; -typedef CGAL::Orthogonal_k_neighbor_search Neighbor_search; -typedef Neighbor_search::Tree Tree; +typedef CGAL::Random_points_in_square_2 Random_points_iterator; +typedef CGAL::Counting_iterator N_Random_points_iterator; +typedef CGAL::Search_traits_2 TreeTraits; +typedef CGAL::Orthogonal_k_neighbor_search Neighbor_search; +//typdefs fo Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +typedef CGAL::Distance_adapter Distance_adapter; +typedef CGAL::Orthogonal_k_neighbor_search Neighbor_search_with_info; - -void -search(bool nearest) +template +void search(bool nearest) { const unsigned int N = 1000; const double cube_side_length = 1.0; @@ -27,19 +32,22 @@ search(bool nearest) N_Random_points_iterator(N)); - Tree tree(points.begin(), points.end()); + typename K_search::Tree tree( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); Point query(0,0); - Neighbor_search search(tree, query, N/2 , 0.0, nearest); + K_search search(tree, query, N/2 , 0.0, nearest); std::vector result, diff; - // report the N/2 furthest neighbors and their distance + // report the N/2 furthest neighbors and their distance //std::copy(search.begin(), search.end(), std::back_inserter(result)); - for(Neighbor_search::iterator nit = search.begin(); + for(typename K_search::iterator nit = search.begin(); nit != search.end(); nit++){ - result.push_back(nit->first); + result.push_back(get_point(nit->first)); } std::sort(points.begin(), points.end()); @@ -83,8 +91,10 @@ search(bool nearest) int main() { - search(true); - search(false); + search(true); + search(false); + search(true); + search(false); std::cout << "done" << std::endl; return 0; } diff --git a/Spatial_searching/test/Spatial_searching/Point.h b/Spatial_searching/test/Spatial_searching/Point.h index ea770bfac51..0017492d6b7 100644 --- a/Spatial_searching/test/Spatial_searching/Point.h +++ b/Spatial_searching/test/Spatial_searching/Point.h @@ -35,6 +35,7 @@ namespace CGAL { struct Construct_coord_iterator { + typedef const double* result_type; const double* operator()(const Point& p) const { return static_cast(p.vec); } diff --git a/Spatial_searching/test/Spatial_searching/Point_with_info.h b/Spatial_searching/test/Spatial_searching/Point_with_info.h new file mode 100644 index 00000000000..f8446c31870 --- /dev/null +++ b/Spatial_searching/test/Spatial_searching/Point_with_info.h @@ -0,0 +1,39 @@ +#include + +template +struct My_point_with_info +{ + typedef Pt Point; + Pt p; + explicit My_point_with_info(const Pt& pt):p(pt){} + const Pt& point() const {return p;} + int dimension() const { return p.dimension();} +}; + + +template +struct Point_with_info_helper{ + typedef My_point_with_info type; +}; + + +struct Point_property_map{ + template + friend const Point& get(Point_property_map,const My_point_with_info& p) {return p.point();} +}; + +template +const Point& get_point(const Point& p) {return p;} + +template +const Point& get_point(const My_point_with_info& p) {return get(Point_property_map(),p);} + +template +struct Create_point_with_info : public std::unary_function{ + const Point& operator() (const Point& p) const { return p; } +}; + +template +struct Create_point_with_info > : public std::unary_function >{ + My_point_with_info operator() (const Point& p) const { return My_point_with_info(p); } +}; diff --git a/Spatial_searching/test/Spatial_searching/Range_searching.cpp b/Spatial_searching/test/Spatial_searching/Range_searching.cpp index 0ce30442267..14b4d861cd3 100644 --- a/Spatial_searching/test/Spatial_searching/Range_searching.cpp +++ b/Spatial_searching/test/Spatial_searching/Range_searching.cpp @@ -2,8 +2,10 @@ #include #include #include +#include #include #include +#include "Point_with_info.h" #include #include @@ -14,15 +16,72 @@ typedef K::Vector_3 Vector; typedef K::Iso_cuboid_3 Iso_cuboid; typedef CGAL::Random_points_in_sphere_3 Random_points_iterator; typedef CGAL::Counting_iterator N_Random_points_iterator; -typedef CGAL::Search_traits_3 Traits; -typedef CGAL::Fuzzy_iso_box Fuzzy_box; -typedef CGAL::Kd_tree Tree; +typedef CGAL::Search_traits_3 Traits; +//for Point_with_info +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +const int N=10000; + +template +void run(std::list all_points) +{ + typedef CGAL::Fuzzy_iso_box Fuzzy_box; + + // Insert also the N points in the tree + CGAL::Kd_tree tree( + boost::make_transform_iterator(all_points.begin(),Create_point_with_info()), + boost::make_transform_iterator(all_points.end(),Create_point_with_info()) + ); + + Point p(0.1, 0.2, 0.3); + Point q(0.3, 0.5, 0.4); + + typename SearchTraits::Point_d pp(p); + typename SearchTraits::Point_d qq(q); + + Iso_cuboid exact_ic(p,q); + + Fuzzy_box exact_range(pp,qq); + + std::list result; + // Searching the box r exactly + tree.search( std::back_inserter( result ), exact_range); + + // test the results of the exact query + std::list copy_all_points(all_points); + + for (typename std::list::iterator pt=result.begin(); (pt != result.end()); ++pt) { + assert(! exact_ic.has_on_unbounded_side(get_point(*pt))); + copy_all_points.remove(get_point(*pt)); + } + + for (std::list::iterator pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) { + assert(exact_ic.has_on_unbounded_side(*pt)); + } + + + result.clear(); + // approximate range searching using value 0.1 for fuzziness parameter + Fuzzy_box approximate_range(pp,qq,0.05); + Iso_cuboid inner_ic(p+ 0.05*Vector(1,1,1),q-0.05*Vector(1,1,1)); + Iso_cuboid outer_ic(p- 0.05*Vector(1,1,1),q+0.05*Vector(1,1,1)); + + tree.search(std::back_inserter( result ), approximate_range); + // test the results of the approximate query + for (typename std::list::iterator pt=result.begin(); (pt != result.end()); ++pt) { + // a point we found may be slighlty outside the isocuboid + assert(! outer_ic.has_on_unbounded_side(get_point(*pt))); + all_points.remove(get_point(*pt)); + } + + for (std::list::iterator pt=all_points.begin(); (pt != all_points.end()); ++pt) { + assert(inner_ic.has_on_unbounded_side(*pt)); + } + std::cout << "done" << std::endl; +} int main() { - - const int N=10000; - // generator for random data points in the square ( (-1,-1), (1,1) ) Random_points_iterator rpit( 1.0); @@ -30,52 +89,9 @@ int main() { std::list all_points(N_Random_points_iterator(rpit,0), N_Random_points_iterator(N)); - // Insert also the N points in the tree - Tree tree(all_points.begin(),all_points.end()); + run(all_points); + run(all_points); - Point p(0.1, 0.2, 0.3); - Point q(0.3, 0.5, 0.4); - - Iso_cuboid exact_ic(p,q); - - Fuzzy_box exact_range(p,q); - - std::list result; - // Searching the box r exactly - tree.search( std::back_inserter( result ), exact_range); - - // test the results of the exact query - std::list copy_all_points(all_points); - std::list::iterator pt; - for (pt=result.begin(); (pt != result.end()); ++pt) { - assert(! exact_ic.has_on_unbounded_side(*pt)); - copy_all_points.remove(*pt); - } - - for (pt=copy_all_points.begin(); (pt != copy_all_points.end()); ++pt) { - assert(exact_ic.has_on_unbounded_side(*pt)); - } - - - result.clear(); - // approximate range searching using value 0.1 for fuzziness parameter - Fuzzy_box approximate_range(p,q,0.05); - Iso_cuboid inner_ic(p+ 0.05*Vector(1,1,1),q-0.05*Vector(1,1,1)); - Iso_cuboid outer_ic(p- 0.05*Vector(1,1,1),q+0.05*Vector(1,1,1)); - - tree.search(std::back_inserter( result ), approximate_range); - // test the results of the approximate query - for (pt=result.begin(); (pt != result.end()); ++pt) { - // a point we found may be slighlty outside the isocuboid - assert(! outer_ic.has_on_unbounded_side(*pt)); - all_points.remove(*pt); - } - - for (pt=all_points.begin(); (pt != all_points.end()); ++pt) { - assert(inner_ic.has_on_unbounded_side(*pt)); - } - std::cout << "done" << std::endl; - return 0; } diff --git a/Spatial_searching/test/Spatial_searching/Splitters.cpp b/Spatial_searching/test/Spatial_searching/Splitters.cpp index 142b47bb247..a27e35ebeea 100644 --- a/Spatial_searching/test/Spatial_searching/Splitters.cpp +++ b/Spatial_searching/test/Spatial_searching/Splitters.cpp @@ -6,8 +6,10 @@ #include #include #include +#include #include #include +#include "Point_with_info.h" @@ -26,63 +28,51 @@ typedef CGAL::Random_points_in_sphere_3 Random_points; typedef CGAL::Search_traits_3 TreeTraits; typedef CGAL::Euclidean_distance Distance; #endif +typedef Point_with_info_helper::type Point_with_info; +typedef CGAL::Search_traits_adapter Traits_with_info; +typedef CGAL::Distance_adapter Distance_adapter; typedef std::vector Vector; -template +template struct Splitter_test { - typedef CGAL::Orthogonal_incremental_neighbor_search Orthogonal_incremental_neighbor_search; + typedef CGAL::Orthogonal_incremental_neighbor_search Orthogonal_incremental_neighbor_search; typedef typename Orthogonal_incremental_neighbor_search::iterator NN_iterator; typedef typename Orthogonal_incremental_neighbor_search::Tree Tree; typedef typename Orthogonal_incremental_neighbor_search::Point_with_transformed_distance Point_with_transformed_distance; - struct less_second { - bool operator()(const typename Orthogonal_incremental_neighbor_search::Point_with_transformed_distance& p1, - const typename Orthogonal_incremental_neighbor_search::Point_with_transformed_distance& p2) const - { - return p1.second < p2.second; - } - }; - - /* - std::ostream& operator<<(std::ostream& os, const Orthogonal_incremental_neighbor_search::Point_with_transformed_distance& pair) - { - os << pair.first << " | " << pair.second; - return os; - } - */ - bool operator()(Vector points, Point query) { Vector points2; - Tree t(points.begin(), points.end()); - - std::vector result; + Tree t( + boost::make_transform_iterator(points.begin(),Create_point_with_info()), + boost::make_transform_iterator(points.end(),Create_point_with_info()) + ); Orthogonal_incremental_neighbor_search oins(t, query, 0.0, true); typename Orthogonal_incremental_neighbor_search::iterator it = oins.begin(); Point_with_transformed_distance pd = *it; - points2.push_back(pd.first); - if(CGAL::squared_distance(query,pd.first) != pd.second){ - std::cout << CGAL::squared_distance(query,pd.first) << " != " << pd.second << std::endl; + points2.push_back(get_point(pd.first)); + if(CGAL::squared_distance(query,get_point(pd.first)) != pd.second){ + std::cout << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL::squared_distance(query,pd.first) == pd.second); + assert(CGAL::squared_distance(query,get_point(pd.first)) == pd.second); it++; for(; it != oins.end();it++){ Point_with_transformed_distance qd = *it; assert(pd.second <= qd.second); pd = qd; - points2.push_back(pd.first); - if(CGAL::squared_distance(query,pd.first) != pd.second){ - std::cout << CGAL::squared_distance(query,pd.first) << " != " << pd.second << std::endl; + points2.push_back(get_point(pd.first)); + if(CGAL::squared_distance(query,get_point(pd.first)) != pd.second){ + std::cout << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL::squared_distance(query,pd.first) == pd.second); + assert(CGAL::squared_distance(query,get_point(pd.first)) == pd.second); } std::sort(points.begin(),points.end()); std::sort(points2.begin(),points2.end()); @@ -107,43 +97,57 @@ main() { Point query = *g; { std::cout << "Testing Sliding_midpoint" << std::endl; - Splitter_test > st; + Splitter_test,Distance > st; st(points,query); + Splitter_test,Distance_adapter > sti; + sti(points,query); } { std::cout << "Testing Sliding_fair" << std::endl; - Splitter_test > st; + Splitter_test,Distance > st; st(points,query); + Splitter_test,Distance_adapter > sti; + sti(points,query); } { std::cout << "Testing Fair" << std::endl; - Splitter_test > st; + Splitter_test,Distance > st; st(points,query); + Splitter_test,Distance_adapter > sti; + sti(points,query); } { std::cout << "Testing Median_of_rectangle" << std::endl; - Splitter_test > st; + Splitter_test,Distance > st; st(points,query); + Splitter_test,Distance_adapter > sti; + sti(points,query); } { std::cout << "Testing Midpoint_of_rectangle" << std::endl; - Splitter_test > st; + Splitter_test,Distance > st; st(points,query); + Splitter_test,Distance_adapter > sti; + sti(points,query); } { std::cout << "Testing Midpoint_of_max_spread" << std::endl; - Splitter_test > st; + Splitter_test,Distance > st; st(points,query); + Splitter_test,Distance_adapter > sti; + sti(points,query); } { std::cout << "Testing Median_of_max_spread" << std::endl; - Splitter_test > st; + Splitter_test,Distance > st; st(points,query); + Splitter_test,Distance_adapter > sti; + sti(points,query); } std::cout << "done" << std::endl; diff --git a/Straight_skeleton_2/doc_tex/Straight_skeleton_2/PkgDescription.tex b/Straight_skeleton_2/doc_tex/Straight_skeleton_2/PkgDescription.tex index 2d466c1fd33..65d90ced946 100644 --- a/Straight_skeleton_2/doc_tex/Straight_skeleton_2/PkgDescription.tex +++ b/Straight_skeleton_2/doc_tex/Straight_skeleton_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Straight Skeleton and Polygon Offsetting \label{Pkg:StraightSkeleton2}} -\ccPkgHowToCiteCgal{cgal:c-sspo2-11} +\ccPkgHowToCiteCgal{cgal:c-sspo2-11b} \ccPkgSummary{This package implements an algorithm to construct a halfedge data structure representing the straight skeleton in the interior of 2D polygons with holes and an algorithm to construct inward offset diff --git a/Stream_lines_2/doc_tex/Stream_lines_2/PkgDescription.tex b/Stream_lines_2/doc_tex/Stream_lines_2/PkgDescription.tex index e603bcafa84..1efa8e64f24 100644 --- a/Stream_lines_2/doc_tex/Stream_lines_2/PkgDescription.tex +++ b/Stream_lines_2/doc_tex/Stream_lines_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Placement of Streamlines\label{Pkg:PlacementOfStreamlines2}} -\ccPkgHowToCiteCgal{cgal:m-ps-11} +\ccPkgHowToCiteCgal{cgal:m-ps-11b} \ccPkgSummary{ Visualizing vector fields is important for many application domains. A good way to do it is to generate streamlines that describe the flow diff --git a/Subdivision_method_3/doc_tex/Subdivision_method_3/PkgDescription.tex b/Subdivision_method_3/doc_tex/Subdivision_method_3/PkgDescription.tex index 0fd9eb51112..f4670b9c01b 100644 --- a/Subdivision_method_3/doc_tex/Subdivision_method_3/PkgDescription.tex +++ b/Subdivision_method_3/doc_tex/Subdivision_method_3/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{3D Surface Subdivision Methods\label{Pkg:SurfaceSubdivisionMethods3}} -\ccPkgHowToCiteCgal{cgal:s-ssm2-11} +\ccPkgHowToCiteCgal{cgal:s-ssm2-11b} \ccPkgSummary{ Subdivision methods recursively refine a control mesh and generate points approximating the limit surface. This package consists of four diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex index bcf5a9bc99a..c4ca0864d4e 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Planar Parameterization of Triangulated Surface Meshes\label{Pkg:SurfaceParameterization}} -\ccPkgHowToCiteCgal{cgal:sal-pptsm2-11} +\ccPkgHowToCiteCgal{cgal:sal-pptsm2-11b} \ccPkgSummary{Parameterizing a surface amounts to finding a one-to-one mapping from a suitable domain to the surface. In this package, we focus on triangulated surfaces that are homeomorphic to a disk and on piecewise diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/PkgDescription.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/PkgDescription.tex index ac866fb8f78..8d6792c1377 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/PkgDescription.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{Triangulated Surface Mesh Simplification\label{Pkg:SurfaceMeshSimplification}} -\ccPkgHowToCiteCgal{cgal:c-tsms-11} +\ccPkgHowToCiteCgal{cgal:c-tsms-11b} \ccPkgSummary{This package provides an algorithm to simplify a triangulated surface mesh by edge collapsing. It is an implementation of the Turk/Lindstrom {\em memoryless} mesh simplification algorithm.} diff --git a/Surface_mesher/doc_tex/Surface_mesher/PkgDescription.tex b/Surface_mesher/doc_tex/Surface_mesher/PkgDescription.tex index a850c8f1f15..f7aec137255 100644 --- a/Surface_mesher/doc_tex/Surface_mesher/PkgDescription.tex +++ b/Surface_mesher/doc_tex/Surface_mesher/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{3D Surface Mesh Generation\label{Pkg:SurfaceMesher3}} -\ccPkgHowToCiteCgal{cgal:ry-smg-11} +\ccPkgHowToCiteCgal{cgal:ry-smg-11b} \ccPkgSummary{ This package provides functions to generate surface meshes that interpolate diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h b/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h index c69c1bf0e89..335ea67b9b8 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h @@ -25,6 +25,7 @@ #include #include #include +#include #include diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex index eaba64cdbc1..17c8bed4983 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{Surface Reconstruction from Point Sets\label{Pkg:SurfaceReconstructionFromPointSets}} -\ccPkgHowToCiteCgal{cgal:asg-srps-11} +\ccPkgHowToCiteCgal{cgal:asg-srps-11b} \ccPkgSummary{ This \cgal\ package implements a surface reconstruction method: Poisson Surface Reconstruction. It takes as input a set of points with oriented normals and computes an implicit function. The \cgal\ surface mesh generator can then be used to extract an iso-surface from this function. } \ccPkgDependsOn{\ccThirdPartyTaucs} diff --git a/Voronoi_diagram_2/doc_tex/Voronoi_diagram_2/PkgDescription.tex b/Voronoi_diagram_2/doc_tex/Voronoi_diagram_2/PkgDescription.tex index a484a4df198..9067dace5ea 100644 --- a/Voronoi_diagram_2/doc_tex/Voronoi_diagram_2/PkgDescription.tex +++ b/Voronoi_diagram_2/doc_tex/Voronoi_diagram_2/PkgDescription.tex @@ -1,6 +1,6 @@ \begin{ccPkgDescription}{2D Voronoi Diagram Adaptor \label{Pkg:VoronoiDiagramAdaptor2}} -\ccPkgHowToCiteCgal{cgal:k-vda2-11} +\ccPkgHowToCiteCgal{cgal:k-vda2-11b} \ccPkgSummary{ The 2D Voronoi diagram adaptor package provides an adaptor that adapts a 2-dimensional triangulated Delaunay graph to the corresponding diff --git a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h index ce34dcb2412..7293b86abfe 100644 --- a/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2.h @@ -746,6 +746,7 @@ public: // insert is not really supported... inline Face_handle insert(const Site_2& t, const Tag_false&) { INSERT_IS_NOT_SUPPORTED(t); + return Face_handle(); } public: diff --git a/iostream/doc_tex/IOstream/PkgDescription.tex b/iostream/doc_tex/IOstream/PkgDescription.tex index f74aa5bbc56..0efb388aa65 100644 --- a/iostream/doc_tex/IOstream/PkgDescription.tex +++ b/iostream/doc_tex/IOstream/PkgDescription.tex @@ -1,5 +1,5 @@ \begin{ccPkgDescription}{IO Streams\label{Pkg:IOstreams}} -\ccPkgHowToCiteCgal{cgal:fgk-ios-11} +\ccPkgHowToCiteCgal{cgal:fgk-ios-11b} \ccPkgSummary{All classes in the \cgal\ kernel provide input and output operators for IO streams.