The traits class Arr_rational_arc_traits_2<AlgKernel,NtTraits> is a model of the ArrangementTraits_2 concept. It handles bounded or unbounded segments of rational functions, referred to as rational arcs (in particaular, 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 = (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_{min}, x_{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 $$xrange, namely a ``ray'' defined on $$( , x_{max}] or on $$[x_{min}, ), 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 $$xcoordinates of all arrangement vertices (in particular, those representing instersection points) can be represneted as roots of polynomials with integer coefficients  namely, algebraic numbers. The $$ycoordinates can be obtained by simple arithmetic operations on the $$xcoordinates, hence they are also algebraic numbers.
We therefore require separate representations of the curve coefficients and the point coordiantes. The NtTraits should be instantiated with a class that defines nested Integer, Rational and 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 AlgKernel templateparameter should be a geometric kernel templated with the NtTraits::Algebraic numbertype. It is recommended to instantiate the CORE_algebraic_number_traits class as the NtTraits parameter, with Cartesian<NtTraits::Algebraic> instantiating the kernel. The number types in this case are provided by the CORE library, with its ability to exactly represent simple algebraic numbers.
The traits class defined its point type to be AlgKernel::Point_2, and defines a curve type (and an identical $$xmonotone curve type, as a rational arc is always $$xmonotone by definition) as detailed below.
#include <CGAL/Arr_rational_arc_traits_2.h>
The Curve_2 class nested within the rationalarc traits is used to represent rational arcs and support their construction from a single polynomial and an $$xdefinition range or from a pair of polynomials and an $$xdefinition range. The copy and default constructor as well as the assignment operator are provided for rational arcs. In addition, an operator<< for the arcs is defined for standard output streams.
 
default constructor.
 
 
constructs an arc that corresponds to the polynomial $$y = P(x), defined
for every real $$x. The vector p_coeffs specifies the coefficients
of $$P(x), where the polynomial degree is p_coeffs.size()  1 and
p[k] is the coefficient of $$x^{k} in $$P.
 
 
constructs an arc supported by the polynomial $$y = P(x). If
dir_right is true, the arc is defined over the interval
$$[s_{x}, ), otherwise it is defined over $$( , s_{x}].
The vector p_coeffs specifies the coefficients of $$P(x) as above.
 
 
constructs an arc supported by the polynomial $$y = P(x), defined over
the interval $$[s_{x}, t_{x}], given by the $$xcoordinates of the arc's
source and target. The vector p_coeffs specifies the coefficients
of $$P(x) as above.
 
 
constructs an arc supported by the rational function
$$y = (P(x))/(Q(x)), defined for every real $$x.
The vectors p_coeffs and q_coeffs specify the coefficients
of $$P(x) and $$Q(x), respectively (see above).
 
 
constructs an arc supported by the rational function
$$y = (P(x))/(Q(x)). If dir_right is true, the arc is
defined over the interval $$[s_{x}, ), otherwise it is defined
over $$( , s_{x}].
The vectors p_coeffs and q_coeffs specify the coefficients
of $$P(x) and $$Q(x), respectively (see above).
 
 
constructs an arc supported by the rational function
$$y = (P(x))/(Q(x)), defined over the internal $$[s_{x}, t_{x}],
given by the $$xcoordinates of the arc's source and target.
The vectors p_coeffs and q_coeffs specify the coefficients
of $$P(x) and $$Q(x), respectively (see above).


 returns whether a is continuous, namely whether it does not conatains any poles in its interior. $$xmonotone curves are always continuous.  

 returns a polynomial with integer coefficients equivalent to $$P(x).  

 returns a polynomial with integer coefficients equivalent to $$Q(x).  

 returns whether the $$xcoordinate of the source is finite or whether it is $$ ± .  

 returns whether the $$ycoordinate of the source is finite or whether it is $$ ± .  


returns the source point of the arc.
 


Get the $$xcoordinate of the source point.
 


Get the $$ycoordinate of the source point.
 

 returns whether the $$xcoordinate of the target is finite or whether it is $$ ± .  

 returns whether the $$ycoordinate of the target is finite or whether it is $$ ± .  


returns the target point of the arc.
 


Get the $$xcoordinate of the target point.
 


Get the $$ycoordinate of the target point.
 

 returns whether the $$xcoordinate of a's left end is finite or whether it is $$ ± .  

 returns whether the $$ycoordinate of a's left end is finite or whether it is $$ ± .  


returns the left (lexicographically smaller) endpoint of a.
 

 returns whether the $$xcoordinate of a's right end is finite or whether it is $$ ± .  

 returns whether the $$ycoordinate of a's right end is finite or whether it is $$ ± .  


returns the right (lexicographically larger) endpoint of a.
