Class AbstractPolynomialSolver

All Implemented Interfaces:
BaseUnivariateSolver<PolynomialFunction>, PolynomialSolver
Direct Known Subclasses:
LaguerreSolver

public abstract class AbstractPolynomialSolver extends BaseAbstractUnivariateSolver<PolynomialFunction> implements PolynomialSolver
Base class for solvers.
  • Constructor Details

    • AbstractPolynomialSolver

      protected AbstractPolynomialSolver(double absoluteAccuracy)
      Construct a solver with given absolute accuracy.
      Parameters:
      absoluteAccuracy - Maximum absolute error.
    • AbstractPolynomialSolver

      protected AbstractPolynomialSolver(double relativeAccuracy, double absoluteAccuracy)
      Construct a solver with given accuracies.
      Parameters:
      relativeAccuracy - Maximum relative error.
      absoluteAccuracy - Maximum absolute error.
    • AbstractPolynomialSolver

      protected AbstractPolynomialSolver(double relativeAccuracy, double absoluteAccuracy, double functionValueAccuracy)
      Construct a solver with given accuracies.
      Parameters:
      relativeAccuracy - Maximum relative error.
      absoluteAccuracy - Maximum absolute error.
      functionValueAccuracy - Maximum function value error.
  • Method Details

    • setup

      protected void setup(int maxEval, PolynomialFunction f, double min, double max, double startValue)
      Prepare for computation. Subclasses must call this method if they override any of the solve methods.
      Overrides:
      setup in class BaseAbstractUnivariateSolver<PolynomialFunction>
      Parameters:
      maxEval - Maximum number of evaluations.
      f - Function to solve.
      min - Lower bound for the interval.
      max - Upper bound for the interval.
      startValue - Start value to use.
    • getCoefficients

      protected double[] getCoefficients()
      Get the coefficients of the polynomial function.
      Returns:
      the coefficients of the polynomial function