CGAL 5.6 - 2D Arrangements
CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2 Class Reference

#include <CGAL/Arr_rational_function_traits_2.h>

Definition

Types

typedef AlgebraicKernel_d_1::Polynomial_1 Polynomial_1
 
typedef AlgebraicKernel_d_1::Algebraic_real_1 Algebraic_real_1
 
typedef AlgebraicKernel_d_1::Bound Bound
 

Operations

Polynomial_1 numerator () const
 returns the numerator of the supporting rational function.
 
Polynomial_1 denominator () const
 returns the denominator of the supporting rational function.
 
std::pair< double, double > to_double () const
 returns double-approximations of the x- and y-coordinates.
 
Algebraic_real_1 x () const
 returns the \( x\)-coordinate of the point.
 
Algebraic_real_1 y () const
 obtains the y-coordinates of the point. More...
 
std::pair< Bound, Boundapproximate_absolute_x (int a) const
 Computes a pair \( p\) approximating the \( x\)-coordinate with respect to the given absolute precision \( a\). More...
 
std::pair< Bound, Boundapproximate_absolute_y (int a) const
 Computes a pair \( p\) approximating the \( y\)-coordinate with respect to the given absolute precision \( a\). More...
 
std::pair< Bound, Boundapproximate_relative_x (int r) const
 Computes a pair \( p\) approximating the \( x\)-coordinate with respect to the given relative precision \( r\). More...
 
std::pair< Bound, Boundapproximate_relative_y (int r) const
 Computes a pair \( p\) approximating the \( y\)-coordinate with respect to the given relative precision \( r\). More...
 

Member Function Documentation

◆ approximate_absolute_x()

template<typename AlgebraicKernel_d_1 >
std::pair<Bound,Bound> CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2::approximate_absolute_x ( int  a) const

Computes a pair \( p\) approximating the \( x\)-coordinate with respect to the given absolute precision \( a\).

Postcondition
\( p.first \leq x \leq p.second \)
\( p.second - p.first \leq2^{-a} \)

◆ approximate_absolute_y()

template<typename AlgebraicKernel_d_1 >
std::pair<Bound,Bound> CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2::approximate_absolute_y ( int  a) const

Computes a pair \( p\) approximating the \( y\)-coordinate with respect to the given absolute precision \( a\).

Postcondition
\( p.first \leq y \leq p.second \)
\( p.second - p.first \leq2^{-a} \)

◆ approximate_relative_x()

template<typename AlgebraicKernel_d_1 >
std::pair<Bound,Bound> CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2::approximate_relative_x ( int  r) const

Computes a pair \( p\) approximating the \( x\)-coordinate with respect to the given relative precision \( r\).

Postcondition
\( p.first \leq x \leq p.second \)
\( p.second - p.first \leq2^{-r}|x| \)

◆ approximate_relative_y()

template<typename AlgebraicKernel_d_1 >
std::pair<Bound,Bound> CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2::approximate_relative_y ( int  r) const

Computes a pair \( p\) approximating the \( y\)-coordinate with respect to the given relative precision \( r\).

Postcondition
\( p.first \leq y \leq p.second \)
\( p.second - p.first \leq2^{-r}|y| \)

◆ y()

template<typename AlgebraicKernel_d_1 >
Algebraic_real_1 CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2::y ( ) const

obtains the y-coordinates of the point.

Attention: As described above, points are not stored by their y-coordinate in 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.