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

CGAL 6.2 - 2D Arrangements

Loading...
Searching...
No Matches
List of all members
CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2 Class Reference

`#include <CGAL/Arr_rational_function_traits_2.h>`

## Definition

template<typename AlgebraicKernel_d_1>
class CGAL::Arr_rational_function_traits_2< AlgebraicKernel_d_1 >::Point_2

Is model of
  `ArrTraits::Point_2`

## 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.
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\).
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\).
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\).
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\).

## 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 \leq 2^{-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 \leq 2^{-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.