class Solver

Solver is used to find roots.

Subclassed by feasst::SolverBisection, feasst::SolverBrentDekker, feasst::SolverNewtonRaphson

Public Functions

Solver(argtype args = argtype())


  • tolerance: solve within this tolerance.

  • lower: optional lower bound.

  • upper: optional upper bound.

  • guess: initial guess for the root.

double tolerance() const

Return the tolerance.

bool is_lower() const

Return true if lower bound is used.

double lower() const

Return lower bound.

void set_lower(const double lower)

Set lower bound.

bool is_upper() const

Return true if upper bound is used.

double upper() const

Return upper bound.

void set_upper(const double upper)

Set upper bound.

double guess() const

Return the guess.

void set_guess(const double guess)

Set the guess.

virtual double root(Formula *formula) = 0

Return a root of the Formula.