RootOf_2

Definition

Concept to represent algebraic numbers of degree up to 2 over a RingNumberType denoted as RT.

Creation

RootOf_2 make_root_of_2 ( RT a, RT b, RT c, bool s)
Returns the smaller (resp. larger) root of the equation aX2+bX+c=0 if s is true (resp. false).
RootOf_2 make_root_of_2 ( FT a, FT b, FT c, bool s)
Returns the smaller (resp. larger) root of the equation aX2+bX+c=0 if s is true (resp. false).

Operations

The comparison operators ==, !=, <, >, <=, >= as well as the sign and compare functions need to be provided to compare elements of types RootOf_2, RT and FT.

In addition, the following operations must be provided:

RootOf_2 RT a + RootOf_2 r
RootOf_2 FT a + RootOf_2 r
RootOf_2 RootOf_2 r + RT a
RootOf_2 RootOf_2 r + FT a

and similarly for operators -, * and /.

RootOf_2 square ( RootOf_2 r)

Has Models

double, CGAL::Root_of_2, etc

See Also

CGAL::make_root_of_2
CGAL::Root_of_2<RT>
CGAL::Root_of_traits_2<RT>
AlgebraicKernelForCircles::PolynomialForCircles_2_2
AlgebraicKernelForCircles