realroot_doc 0.1.1
|
The class which implements the functions to isolate or approximate the real roots of a univariate polynomial are of the form
template<class R, class M> struct solver;
R | is the ring in which the computation is performed. |
M | is the method used for solving. |
Such a class provides a static solve
function:
template<class Solutions, class Polynomial> static void solver<R,M>::solve(Solutions& sol, const Polynomial& f)
where
Solutions
is the type used to store the solutions, The solutions are appended at the end of sol
using the operator<<
. Polynomial
is the type of the input polynomial.A general interface function solve
is also available:
template <class Polynomial, class mth > typename solver<typename Polynomial::Scalar,mth>::Solutions solve(Polynomial& p, const mth& f);
The function solver<typename Polynomial::Scalar,mth>::solve
is called and the result of type typename
solver<typename Polynomial::Scalar,mth>::Solutions is returned.