CGAL 4.6.2 - Number Types
|
Classes | |
class | CGAL::Root_of_traits< RT > |
For a RealEmbeddable IntegralDomain RT , the class template Root_of_traits<RT> associates a type Root_of_2 , which represents algebraic numbers of degree 2 over RT . More... | |
class | CGAL::Sqrt_extension< NT, ROOT, DifferentExtensionComparable, FilterPredicates > |
An instance of this class represents an extension of the type NT by one square root of the type ROOT . More... | |
Functions | |
template<typename RT , typename OutputIterator > | |
OutputIterator | CGAL::compute_roots_of_2 (const RT &a, const RT &b, const RT &c, OutputIterator oit) |
The function compute_roots_of_2() solves a univariate polynomial as it is defined by the coefficients given to the function. More... | |
template<typename RT > | |
Root_of_traits< RT >::Root_of_2 | CGAL::make_root_of_2 (const RT &a, const RT &b, const RT &c, bool s) |
The function make_root_of_2() constructs an algebraic number of degree 2 over a ring number type. More... | |
template<typename RT > | |
Root_of_traits< RT >::Root_of_2 | CGAL::make_root_of_2 (RT alpha, RT beta, RT gamma) |
The function make_root_of_2() constructs an algebraic number of degree 2 over a ring number type. More... | |
template<typename RT > | |
Root_of_traits< RT >::Root_of_2 | CGAL::make_sqrt (const RT &x) |
The function make_sqrt() constructs a square root of a given value of type \( RT\). More... | |
OutputIterator CGAL::compute_roots_of_2 | ( | const RT & | a, |
const RT & | b, | ||
const RT & | c, | ||
OutputIterator | oit | ||
) |
The function compute_roots_of_2()
solves a univariate polynomial as it is defined by the coefficients given to the function.
The solutions are written into the given OutputIterator
. Writes the real roots of the polynomial \( aX^2+bX+c\) into \( oit\) in ascending order.
OutputIterator
is required to accept Root_of_traits<RT>::Root_of_2
.
Multiplicities are not reported.
RT
is an IntegralDomainWithoutDivision
. RootOf_2
CGAL::Root_of_traits<RT>
CGAL::make_root_of_2()
CGAL::make_sqrt()
CGAL::Sqrt_extension<NT,ROOT>
#include <CGAL/Root_of_traits.h>
Root_of_traits<RT>::Root_of_2 CGAL::make_root_of_2 | ( | const RT & | a, |
const RT & | b, | ||
const RT & | c, | ||
bool | s | ||
) |
The function make_root_of_2()
constructs an algebraic number of degree 2 over a ring number type.
Returns the smallest real root of the polynomial \( aX^2+bX+c\) if \( s\) is true, and the largest root is \( s\) is false.
RT
is an IntegralDomainWithoutDivision
. RootOf_2
CGAL::Root_of_traits<RT>
CGAL::make_sqrt()
CGAL::compute_roots_of_2()
CGAL::Sqrt_extension<NT,ROOT>
#include <CGAL/Root_of_traits.h>
Root_of_traits<RT>::Root_of_2 CGAL::make_root_of_2 | ( | RT | alpha, |
RT | beta, | ||
RT | gamma | ||
) |
The function make_root_of_2()
constructs an algebraic number of degree 2 over a ring number type.
Constructs the number \( \alpha+ \beta\sqrt{\gamma}\).
RT
is an IntegralDomainWithoutDivision
. RootOf_2
CGAL::Root_of_traits<RT>
CGAL::make_sqrt()
CGAL::compute_roots_of_2()
CGAL::Sqrt_extension<NT,ROOT>
#include <CGAL/Root_of_traits.h>
Root_of_traits<RT>::Root_of_2 CGAL::make_sqrt | ( | const RT & | x) |
The function make_sqrt()
constructs a square root of a given value of type \( RT\).
Depending on the type \( RT\) the square root may be returned in a new type that can represent algebraic extensions of degree \( 2\).
RT
is a RealEmbeddable
IntegralDomain
. RootOf_2
CGAL::make_root_of_2()
CGAL::Root_of_traits<RT>
#include <CGAL/Root_of_traits.h>