The traits class Arr_algebraic_segment_traits_2<Coefficient> is a model of the ArrangementTraits_2 concept that handles planar algebraic curves of arbitrary degree, and xmonotone of such curves. A planar (real) algebraic curve is the vanishing set of a polynomial in two variables, that is, the curve is defined by the defining equation
f(x):=∑_{i+j ≤ n} a_{ij} x^{i} y^{j} =0, 
The traits class allows the construction of algebraic curves, by specifying their implicit equation. xmonotone and vertical segments of a curve can also be defined; unbounded curves and segments are supported. The template parameter Coefficient defines the innermost coefficient type of the polynomials. Currently, the types leda::integer and CORE::BigInt are supported as well as any instance of CGAL::Sqrt_extension that is instantiated with one of the integral types above.
#include <CGAL/Arr_algebraic_segment_traits_2.h>
 
Value to specify whether a point should be in the interior
of a segment, or its minimal point,
or its maximal point in lexicographic order.
 
 
the type for bivariate polynomials,
with innermost coefficient type Coefficient.
Constitutes a model of the concept Polynomial_d
with two variables.
(see page )
 
 
model for the concept
AlgebraicKernel_1
 
 
represents coordinates of points.
Typedef from Algebraic_kernel_1::Algebraic_real_1
 
 
Typedef from Algebraic_kernel_1::Bound

Models the ArrangementTraits_2::Curve_2 concept. Represents algebraic curves. Internally, the type stores topologicalgeometric information about the particular curve. In order to use internal caching, instances should only be created using the Construct_curve_2 functor of the traits class.

 returns the defining polynomial of the curve. 
Models the ArrangementBasicTraits_2::Point_2 concept. Represents points in ℝ^{2}. Intersection points of algebraic curves are in general nonrational, so we need a data structure that is capable of representing arbitrary points with algebraic coordinates.
The traits class represents algebraic coordinates by the type Algebraic_real_1, which is a model of the AlgebraicReal_1 concept. A point p is stored by a triple (x,cv,arcno), where x is the xcoordinate of a point, cv is an instance of Curve_2 that contains the point, (and has no vertical line at x), and arcno is an int, denoting that p is met as the arcnoth point when shooting a vertical ray at x, starting from ∞ (where counting starts with 0).
In addition to the methods listed below, the copy constructor and assignment operator for Point_2 objects are also supported.
The functor Construct_point_2 constructs Point_2 instances.

 returns the xcoordinate of p. 


returns the ycoordinates of p. Attention: As described above, points are not stored by their ycoordinate in Algebraic_real_1 representation. In fact, this representation must be computed on demand, and might become quite costly for points defined by highdegree polynomials. Therefore, it is recommended to avoid to call this function as much as possible. 

 returns a Curve_2 instance that pis part of. 

 returns the arc number of p. 

 returns doubleapproximations of the x and ycoordinates. 
Models the ArrangementBasicTraits_2::X_monotone_curve_2 concept. Represents terminal segments of an algebraic curves, that means vertical segments or xmonotone segments with no critical xcoordinate in the interior of their xrange. Terminal segments might either be bounded or unbounded. By definition, each interior point of a nonvertical segment has the same arc number (see the documentation of type Point_2 above, which is called the arc number of the segment (note the arc number at the endpoints might differ). Such segments are represented internally by a 4tuple (p,q,cv,arcno), where p and q are the endpoints, cv is the supporting curve that the segment belongs to, and arcno is the arc number of the segment.
Arbitrary (weakly) xmonotone segments are presented by a range of X_monotone_curve_2 instances, whose union equals the segment. The functor Construct_x_monotone_segment_2 allows their construction. To construct all (maximal) terminal segments of a curve, use the Make_x_monotone_2 functor supplied by the traits class.

 returns the supporting algebraic curve of s.  

 returns whether s is a vertical segment.  

 
returns whether s has a finite endpoint on the left (if ce==CGAL::ARR_MIN_END) or on the right (if ce==CGAL::ARR_MAX_END).  

 
returns the left or right endpoint of sfor ce==CGAL::ARR_MIN_END
and ce==CGAL::ARR_MAX_END.
 


returns the arc number of the segment.
 


returns the xcoordinate of a vertical segment.

Curves, points, and xmonotone segments are created by special functors. The functors are not default constructible; the only possibility to obtain them is by the corresponding accessing functions.

 Returns a Curve_2 object that represents the curve defined by the polynomial p 

 Returns a Curve_2 object specified by s. The passed string represents the defining polynomial of the curve and must be given in a MAPLEreadable format using "x" as first and "y" as second variable, e.g., "(xˆ3*y2*x)*(6*xyˆ3*xˆ6)" for integer coefficients, and "3/2*x*yˆ45/7*xˆ2+3/1" for rational coefficients. 

 
Returns a Point_2 object that represents the arcnoth
point in the fiber of cv at xcoordinate x,
counted from the bottom, starting with zero.
 

 
Returns a Point_2 object that represents the
point on xcv at xcoordinate x
 

 
Returns a Point_2 object that represents (x,y)  

 
Returns a Point_2 object that represents (x,y)  

 Returns a Point_2 object that represents (x,y)  

 Returns a Point_2 object that represents (x,y) 
 

 
Writes a sequence of X_monotone_curve_2 objects (terminal
segments) into out. These terminal segments compose an
xmonotone (or vertical) segment of the curve cv that
starts in end_min, and ends in end_max.
 
 

 
Writes a sequence of X_monotone_curve_2 objects into out.
These segments form an xmonotone (or vertical)
segment of the curve cv.
If site_of_p==POINT_IN_INTERIOR, the maximal segment is returned that contains p in its interior. If site_of_p==MIN_ENDPOINT, the maximal segment is returned that contains p as its left endpoint. If site_of_p==MAX_ENDPOINT, the maximal segment is returned that contains p as its left endpoint.
 
 

 
Writes a sequence of X_monotone_curve_2 objects into out.
These segments form a straightline segment connecting
the points p and q. If p and q share the
same xcoordinate, the constructed vertical segment consists of
only one X_monotone_curve_2 object and can be computed
efficiently. In the nonvertical case,
the construction is only possible if p and q
have both rational x and ycoordinates.
