Cancel revision 64607. There had been a problem with the branch.

| ------------------------------------------------------------------------
  | r64607 | efif | 2011-07-05 17:27:04 +0200 (Tue, 05 Jul 2011) | 1 line
  | 
  | Merged feature-branch Aos_2-new_functors-tau into next
  | ------------------------------------------------------------------------
This commit is contained in:
Laurent Rineau
2011-07-06 11:11:58 +00:00
parent 1ddfdc5246
commit 369498d1e5
514 changed files with 11027 additions and 25243 deletions
+23 -17
View File
@@ -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
+15
View File
@@ -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
@@ -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
@@ -11,6 +11,7 @@
//
// ============================================================================
#include <CGAL/config.h>
#include <CGAL/Algebraic_kernel_d/flags.h>
// Switches on/off tests for Sqrt-extension types
@@ -11,6 +11,7 @@
//
// ============================================================================
#include <CGAL/config.h>
#include <CGAL/Algebraic_kernel_d/flags.h>
// Switches on/off tests for Sqrt-extension types
@@ -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
@@ -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;
}
@@ -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.
@@ -87,7 +87,7 @@ on the \dcel\ data structure see~\cite[Chapter~2]{bkos-cgaa-00}.
\end{ccTexOnly}
\begin{ccHtmlOnly}
<p><center>
<img src="./fig/arr_segs.gif" border=0 alt="Arrangement of segments">
<img src="./fig/arr_segs.gif" border=0 alt="Arrangement of sgements">
</center>
\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
@@ -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<Kernel>} 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<Kernel>} 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<Kernel>} inherits
from \ccc{Arr_non_caching_segment_basic_traits_2<Kernel>} 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<SegmentTraits>} 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<Kernel>} 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<AlgebraicKernel_d_1>} 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<AlgebraicKernel_d_1>} 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<AlgKernel, NtTraits>} 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<AlgebraicKernel_d_1>}
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<Coefficient>} 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}
<p><center>
<img src="./fig/cylindrical_decomposition.gif" border=0 alt="The algebraic curves">
<img src="./fig/cylindrical_decomposition.gif" border=0 alt="The braic curves">
</center>
\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}
%~~~~~~~~~~~~~~~~~~~~~~~
@@ -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
@@ -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}
@@ -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
@@ -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}.
@@ -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}
@@ -1,19 +1,13 @@
\begin{ccRefEnum}{Arr_halfedge_direction}
\ccDefinition
The enumeration \ccRefName{} is defined by
\ccc{CGAL::Arrangement_2<Traits,Dcel>::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<Traits,Dcel>::Halfedge}
\end{ccRefEnum}
@@ -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
@@ -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}
@@ -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<Kernel>}\\
\ccc{CGAL::Arr_rational_arc_traits_2<AlgKernel,NtTraits>}\\
\ccc{CGAL::Arr_algebraic_segment_traits_2<Coefficient>}\\
\ccc{CGAL::Arr_curve_data_traits_2<Tr,XData,Mrg,CData,Cnv>}\\
\ccc{CGAL::Arr_consolidated_curve_data_traits_2<Traits,Data>}
\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
@@ -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
@@ -0,0 +1,232 @@
% +------------------------------------------------------------------------+
% | Reference manual page: Arr_rational_arc_traits.tex
% +------------------------------------------------------------------------+
% |
% | Package: Arrangement_2
% |
% +------------------------------------------------------------------------+
\ccRefPageBegin
\begin{ccRefClass}{Arr_rational_arc_traits_2<AlgKernel,NtTraits>}
\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<NtTraits::Algebraic>} 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<AlgKernel,NtTraits>::Curve_2}
%======================================================================
\ccTypes
%-------
\ccNestedType{Rat_vector}{A vector of rational numbers (equivalent to
\ccc{std::vector<typename NtTraits::Rational}).}
\ccNestedType{Polynomial}{the \ccc{NtTraits::Polynomial} type
(a polynomial with integer coefficients).}
\ccCreation
\ccCreationVariable{a}
%---------------------
\ccConstructor{Curve_2 ();}
{default constructor.}
\ccConstructor{Curve_2 (const Rat_vector& p_coeffs);}
{constructs an arc that corresponds to the polynomial $y = P(x)$, defined
for every real $x$. The vector \ccc{p_coeffs} specifies the coefficients
of $P(x)$, where the polynomial degree is \ccc{p_coeffs.size() - 1} and
\ccc{p[k]} is the coefficient of $x^k$ in $P$.}
\ccConstructor{Curve_2 (const Rat_vector& p_coeffs,
const typename NtTraits::Algebraic& s_x,
bool dir_right);}
{constructs an arc supported by the polynomial $y = P(x)$. If
\ccc{dir_right} is \ccc{true}, the arc is defined over the interval
$[s_x, \infty)$, otherwise it is defined over $(-\infty, s_x]$.
The vector \ccc{p_coeffs} specifies the coefficients of $P(x)$ as above.
\ccPrecond{\ccc{s_x != t_x}.}}
\ccConstructor{Curve_2 (const Rat_vector& p_coeffs,
const typename NtTraits::Algebraic& s_x,
const typename NtTraits::Algebraic& t_x);}
{constructs an arc supported by the polynomial $y = P(x)$, defined over
the interval $[s_x, t_x]$, given by the $x$-coordinates of the arc's
source and target. The vector \ccc{p_coeffs} specifies the coefficients
of $P(x)$ as above.
\ccPrecond{\ccc{s_x != t_x}.}}
\ccConstructor{Curve_2 (const Rat_vector& p_coeffs,
const Rat_vector& q_coeffs);}
{constructs an arc supported by the rational function
$y = \frac{P(x)}{Q(x)}$, defined for every real $x$.
The vectors \ccc{p_coeffs} and \ccc{q_coeffs} specify the coefficients
of $P(x)$ and $Q(x)$, respectively (see above).}
\ccConstructor{Curve_2 (const Rat_vector& p_coeffs,
const Rat_vector& q_coeffs,
const typename NtTraits::Algebraic& s_x,
bool dir_right);}
{constructs an arc supported by the rational function
$y = \frac{P(x)}{Q(x)}$. If \ccc{dir_right} is \ccc{true}, the arc is
defined over the interval $[s_x, \infty)$, otherwise it is defined
over $(-\infty, s_x]$.
The vectors \ccc{p_coeffs} and \ccc{q_coeffs} specify the coefficients
of $P(x)$ and $Q(x)$, respectively (see above).}
\ccConstructor{Curve_2 (const Rat_vector& p_coeffs,
const Rat_vector& q_coeffs,
const typename NtTraits::Algebraic& s_x,
const typename NtTraits::Algebraic& t_x);}
{constructs an arc supported by the rational function
$y = \frac{P(x)}{Q(x)}$, defined over the internal $[s_x, t_x]$,
given by the $x$-coordinates of the arc's source and target.
The vectors \ccc{p_coeffs} and \ccc{q_coeffs} specify the coefficients
of $P(x)$ and $Q(x)$, respectively (see above).
\ccPrecond{\ccc{s_x != t_x}.}}
\ccAccessFunctions
%-----------------
\ccMethod{bool is_continuous() const;}
{returns whether \ccVar\ is continuous, namely whether it does not
contain any poles in its interior. $x$-monotone curves are always
continuous.}
\ccMethod{const Polynomial& numerator () const;}
{returns a polynomial with integer coefficients equivalent to $P(x)$.}
\ccMethod{const Polynomial& denominator () const;}
{returns a polynomial with integer coefficients equivalent to $Q(x)$.}
\ccMethod{Arr_parameter_space source_boundary_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_boundary_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{The source is finite in both $x$ and $y$.}}
\ccGlue
\ccMethod{typename NtTraits::Algebraic source_x() const;}
{Get the $x$-coordinate of the source point.
\ccPrecond{The source point is finite in $x$.}}
\ccGlue
\ccMethod{typename NtTraits::Algebraic source_y() const;}
{Get the $y$-coordinate of the source point.
\ccPrecond{The source point is finite in $y$.}}
\ccMethod{Arr_parameter_space target_boundary_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_boundary_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{The target is finite in both $x$ and $y$.}}
\ccGlue
\ccMethod{typename NtTraits::Algebraic target_x() const;}
{Get the $x$-coordinate of the target point.
\ccPrecond{The target point is finite in $x$.}}
\ccGlue
\ccMethod{typename NtTraits::Algebraic target_y() const;}
{Get the $y$-coordinate of the target point.
\ccPrecond{The target point is finite in $y$.}}
\ccMethod{Arr_parameter_space left_boundary_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 left_boundary_in_y () const;}
{returns whether the $y$-coordinate of \ccVar's left end is finite or
whether it is $\pm\infty$.}
\ccGlue
\ccMethod{const Point_2& left() const;}
{returns the left (lexicographically smaller) endpoint of \ccVar{}.
\ccPrecond{The left end is finite in both $x$ and $y$.}}
\ccMethod{Arr_parameter_space right_boundary_in_x () const;}
{returns whether the $x$-coordinate of \ccVar's right end is finite or
whether it is $\pm\infty$.}
\ccGlue
\ccMethod{Arr_parameter_space right_boundary_in_y () const;}
{returns whether the $y$-coordinate of \ccVar's right end is finite or
whether it is $\pm\infty$.}
\ccGlue
\ccMethod{const Point_2& right() const;}
{returns the right (lexicographically larger) endpoint of \ccVar{}.
\ccPrecond{The right end is finite in both $x$ and $y$.}}
\end{ccClass}
\end{ccRefClass}
\ccRefPageEnd
@@ -1,631 +0,0 @@
% +------------------------------------------------------------------------+
% | Reference manual page: Arr_rational_function_traits.tex
% +------------------------------------------------------------------------+
% |
% | Package: Arrangement_2
% |
% +------------------------------------------------------------------------+
\ccRefPageBegin
\begin{ccRefClass}{Arr_rational_function_traits_2<AlgebraicKernel_d_1>}
\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<AlgebraicKernel_d_1>(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<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::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<double,double> 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<Bound,Bound> 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<Bound,Bound> 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<Bound,Bound> 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<Bound,Bound> 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<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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 <typename InputIterator>
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<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::Curve_2 Curve_2;}{}\ccGlue
%\ccTypedef{typedef Arr_rational_function_traits_2<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::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<AlgebraicKernel_d_1>::Curve_2 Curve_2;}{}\ccGlue
%\ccTypedef{typedef Arr_rational_function_traits_2<AlgebraicKernel_d_1>::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
@@ -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<CircularKernel>}\\
\ccRefIdfierPage{CGAL::Arr_circular_line_arc_traits_2<CircularKernel>}\\
\ccRefIdfierPage{CGAL::Arr_conic_traits_2<RatKernel,AlgKernel,NtTraits>}\\
\ccRefIdfierPage{CGAL::Arr_rational_function_traits_2<AlgebraicKernel_d_1>}\\
\ccRefIdfierPage{CGAL::Arr_rational_arc_traits_2<AlgKernel,NtTraits>}\\
\ccRefIdfierPage{CGAL::Arr_Bezier_curve_traits_2<RatKernel,AlgKernel,NtTraits>}\\
\ccRefIdfierPage{CGAL::Arr_algebraic_segment_traits_2<Coefficient>}\\
\ccRefIdfierPage{CGAL::Arr_curve_data_traits_2<Tr,XData,Mrg,CData,Cnv>}\\
@@ -132,14 +131,6 @@ implemented as peripheral classes or as free (global) functions.
\ccRefIdfierPage{CGAL::Arr_trapezoid_ric_point_location<Arrangement>}\\
\ccRefIdfierPage{CGAL::Arr_landmarks_point_location<Arrangement,Generator>}
\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}\\
@@ -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}
@@ -9,7 +9,11 @@
#include <list>
#include <fstream>
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<Kernel> Traits_2;
typedef Traits_2::Point_2 Point_2;
@@ -1,80 +1,75 @@
//! \file examples/Arrangement_2/ex_rational_functions.cpp
// Constructing an arrangement of arcs of rational functions.
#include <CGAL/basic.h>
#ifndef CGAL_USE_CORE
#include <iostream>
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 <CGAL/CORE_BigInt.h> // NT
#include <CGAL/Algebraic_kernel_d_1.h> // Algebraic Kernel
#include <CGAL/Arr_rational_function_traits_2.h> // Traits
#include <CGAL/Arrangement_2.h> // Arrangement
#include <CGAL/Cartesian.h>
#include <CGAL/CORE_algebraic_number_traits.h>
#include <CGAL/Arr_rational_arc_traits_2.h>
#include <CGAL/Arrangement_2.h>
typedef CORE::BigInt Number_type;
typedef CGAL::Algebraic_kernel_d_1<Number_type> AK1;
typedef CGAL::Arr_rational_function_traits_2<AK1> Traits_2;
typedef Traits_2::Polynomial_1 Polynomial_1;
typedef Traits_2::Algebraic_real_1 Alg_real_1;
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
typedef CGAL::CORE_algebraic_number_traits Nt_traits;
typedef Nt_traits::Rational Rational;
typedef Nt_traits::Algebraic Algebraic;
typedef CGAL::Cartesian<Algebraic> Alg_kernel;
typedef CGAL::Arr_rational_arc_traits_2<Alg_kernel,
Nt_traits> 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<Rational_arc_2> Rat_arcs_list;
typedef CGAL::Arrangement_2<Traits_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<Traits_2::X_monotone_curve_2> 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<Rational_arc_2> arcs;
// Print the arcs.
for (unsigned int i(0); i < arcs.size(); ++i)
std::cout << arcs[i]<<std::endl;
Arrangement_2 arr(&traits);
insert(arr, arcs.begin(), arcs.end());
arcs.push_back (a1);
arcs.push_back (a2);
arcs.push_back (a3);
arcs.push_back (a4);
insert (arr, arcs.begin(), arcs.end());
// Print the arrangement size.
std::cout << "The arrangement size:" << std::endl
@@ -1,110 +0,0 @@
//! \file examples/Arrangement_2/ex_rational_functions.cpp
// Constructing an arrangement of arcs of rational functions.
#include <CGAL/basic.h>
#ifndef CGAL_USE_CORE
#include <iostream>
int main ()
{
std::cout << "Sorry, this example needs CORE ..." << std::endl;
return 0;
}
#else
#include <CGAL/CORE_BigInt.h> // Integer
#include <CGAL/CORE_BigRat.h> // Rational
#include <CGAL/Algebraic_kernel_d_1.h> // Algebraic Kernel
#include <CGAL/Arr_rational_function_traits_2.h> // Traits
#include <CGAL/Arrangement_2.h> // Arrangement
typedef CORE::BigInt Integer;
typedef CORE::BigRat Rational;
typedef CGAL::Algebraic_kernel_d_1<Integer> AK1;
typedef CGAL::Arr_rational_function_traits_2<AK1> Traits_2;
typedef std::vector<Rational> Rat_vec;
typedef Traits_2::Algebraic_real_1 Alg_real_1;
typedef CGAL::Arrangement_2<Traits_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<Traits_2::X_monotone_curve_2> 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]<<std::endl;
// Construct the arrangement of the four arcs.
Arrangement_2 arr(&traits);
insert(arr, arcs.begin(), arcs.end());
// Print the arrangement size.
std::cout << "The arrangement size:" << std::endl
<< " V = " << arr.number_of_vertices()
<< ", E = " << arr.number_of_edges()
<< ", F = " << arr.number_of_faces() << std::endl;
return 0;
}
#endif
@@ -10,7 +10,8 @@
typedef CGAL::Gmpq Number_type;
typedef CGAL::Cartesian<Number_type> Kernel;
typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel> Geom_traits_2;
typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>
Geom_traits_2;
typedef Geom_traits_2::Point_2 Point_2;
typedef Geom_traits_2::X_monotone_curve_2 X_monotone_curve_2;
typedef CGAL::Arr_spherical_topology_traits_2<Geom_traits_2> Topol_traits_2;
@@ -1,6 +1,5 @@
//! \file examples/Arrangement_2/unbounded_rational_functions.cpp
// Constructing an arrangement of unbounded portions of rational functions.
#include <CGAL/basic.h>
#ifndef CGAL_USE_CORE
@@ -8,83 +7,81 @@
int main ()
{
std::cout << "Sorry, this example needs CORE ..." << std::endl;
return 0;
return (0);
}
#else
#include <CGAL/CORE_BigInt.h> // NT
#include <CGAL/Algebraic_kernel_d_1.h> // Algebraic Kernel
#include <CGAL/Arr_rational_function_traits_2.h> // Traits
#include <CGAL/Arrangement_2.h> // Arrangement
#include <CGAL/Cartesian.h>
#include <CGAL/CORE_algebraic_number_traits.h>
#include <CGAL/Arr_rational_arc_traits_2.h>
#include <CGAL/Arrangement_2.h>
typedef CORE::BigInt Number_type;
typedef CGAL::Algebraic_kernel_d_1<Number_type> AK1;
typedef CGAL::Arr_rational_function_traits_2<AK1> Traits_2;
typedef Traits_2::Polynomial_1 Polynomial_1;
typedef Traits_2::Algebraic_real_1 Alg_real_1;
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
typedef CGAL::CORE_algebraic_number_traits Nt_traits;
typedef Nt_traits::Rational Rational;
typedef Nt_traits::Algebraic Algebraic;
typedef CGAL::Cartesian<Algebraic> Alg_kernel;
typedef CGAL::Arr_rational_arc_traits_2<Alg_kernel,
Nt_traits> 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<Rational_arc_2> Rat_arcs_list;
typedef CGAL::Arrangement_2<Traits_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<Traits_2::Curve_2> arcs;
std::list<Rational_arc_2> 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<std::pair<Alg_real_1,int> > 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;
}
@@ -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<Rat_kernel,
@@ -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
@@ -1,4 +1,4 @@
// Copyright (c) 2006,2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany).
// Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
@@ -92,10 +92,10 @@ public:
typedef typename CKvA_2::Has_do_intersect_category
Has_do_intersect_category;
typedef typename CKvA_2::Left_side_category Left_side_category;
typedef typename CKvA_2::Bottom_side_category Bottom_side_category;
typedef typename CKvA_2::Top_side_category Top_side_category;
typedef typename CKvA_2::Right_side_category Right_side_category;
typedef typename CKvA_2::Arr_left_side_category Arr_left_side_category;
typedef typename CKvA_2::Arr_bottom_side_category Arr_bottom_side_category;
typedef typename CKvA_2::Arr_top_side_category Arr_top_side_category;
typedef typename CKvA_2::Arr_right_side_category Arr_right_side_category;
typedef typename CKvA_2::Multiplicity Multiplicity;
@@ -119,31 +119,31 @@ public:
return CKvA_2::instance().equal_2_object();
}
typedef typename CKvA_2::Parameter_space_in_x_2 Parameter_space_in_x_2;
Parameter_space_in_x_2 parameter_space_in_x_2_object() const {
return CKvA_2::instance().parameter_space_in_x_2_object();
}
typedef typename CKvA_2::Parameter_space_in_y_2 Parameter_space_in_y_2;
Parameter_space_in_y_2 parameter_space_in_y_2_object() const {
return CKvA_2::instance().parameter_space_in_y_2_object();
}
typedef typename CKvA_2::Compare_x_near_boundary_2
Compare_x_near_boundary_2;
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const {
return CKvA_2::instance().compare_x_near_boundary_2_object();
}
typedef typename CKvA_2::Compare_y_near_boundary_2
Compare_y_near_boundary_2;
Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const {
return CKvA_2::instance().compare_y_near_boundary_2_object();
}
typedef typename CKvA_2::Parameter_space_in_x_2 Parameter_space_in_x_2;
Parameter_space_in_x_2 parameter_space_in_x_2_object() const {
return CKvA_2::instance().parameter_space_in_x_2_object();
}
typedef typename CKvA_2::Compare_x_at_limit_2 Compare_x_at_limit_2;
Compare_x_at_limit_2 compare_x_at_limit_2_object() const {
return CKvA_2::instance().compare_x_at_limit_2_object();
}
typedef typename CKvA_2::Compare_x_near_limit_2 Compare_x_near_limit_2;
Compare_x_near_limit_2 compare_x_near_limit_2_object() const {
return CKvA_2::instance().compare_x_near_limit_2_object();
}
typedef typename CKvA_2::Construct_min_vertex_2 Construct_min_vertex_2;
Construct_min_vertex_2 construct_min_vertex_2_object() const {
@@ -200,7 +200,13 @@ public:
return CKvA_2::instance().merge_2_object();
}
typedef typename CKvA_2::Make_x_monotone_2 Make_x_monotone_2;
// TODO typedef ArrangementDirectionalXMonotoneTraits_2 functors +
/// check Intersect_2 & Split return order
typedef typename CKvA_2::Make_x_monotone_2 Make_x_monotone_2;
Make_x_monotone_2 make_x_monotone_2_object() const {
return Make_x_monotone_2(&CKvA_2::instance());
}
@@ -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
@@ -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
@@ -75,27 +75,32 @@ public:
typedef typename Base::Isolated_vertex Isolated_vertex;
//@}
//! \name Arrangement types
//!@{
typedef Arr_bounded_planar_topology_traits_2<Geometry_traits_2, Dcel> Self;
// TODO remove adaptor as top-traits might be instantiated by Aos_2 itself
typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2;
//!@}
typedef Arr_bounded_planar_topology_traits_2<Geometry_traits_2, Dcel>
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<Geometry_traits_2, Self> Arr;
typedef Arrangement_on_surface_2<Geometry_traits_2, Self> Arr;
// Type definition for the constuction sweep-line visitor.
typedef Arr_construction_subcurve<Geometry_traits_2> CSubcurve;
@@ -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:
@@ -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) {}
@@ -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;
@@ -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<Rat_kernel, Alg_kernel, Nt_traits> Curve_2;
@@ -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
@@ -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 <CGAL/basic.h>
#include <CGAL/Arr_enums.h>
#include <CGAL/Arr_tags.h>
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)
@@ -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<Base_curve_2, Curve_data> Curve_2;
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
File diff suppressed because it is too large Load Diff
@@ -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
@@ -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
@@ -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
File diff suppressed because it is too large Load Diff
@@ -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
@@ -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
@@ -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
@@ -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;
@@ -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
@@ -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<RatKer, AlgKer, NtTrt, BndTrt>::equals
// Split the subcurve into two at a given split point.
//
template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
void _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::
split(const Point_2& p, Self& c1, Self& c2) const
void _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::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<Algebraic> sols;
// typename std::list<Algebraic>::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<Algebraic>::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;
}
// ---------------------------------------------------------------------------
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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<Kernel> 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<Kernel>;
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<Kernel> 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<Kernel>;
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<Kernel> 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<Kernel>;
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.
@@ -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:
@@ -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
@@ -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) {}
@@ -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<Kernel> 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<Kernel> 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<Kernel>;
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<Kernel> 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<Kernel>;
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(); }
//@}
@@ -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
@@ -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()));
@@ -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();
@@ -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
@@ -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
@@ -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
@@ -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<Arrangement_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<Arrangement_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<Arrangement_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<Arrangement_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<Arrangement_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<Arrangement_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<Arrangement_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
};
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
{
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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<Arrangement>::_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<Arrangement>::_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();
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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

Some files were not shown because too many files have changed in this diff Show More