Package org.hipparchus.analysis.solvers
Class AbstractPolynomialSolver
- java.lang.Object
-
- org.hipparchus.analysis.solvers.BaseAbstractUnivariateSolver<PolynomialFunction>
-
- org.hipparchus.analysis.solvers.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 Summary
Constructors Modifier Constructor Description protected
AbstractPolynomialSolver(double absoluteAccuracy)
Construct a solver with given absolute accuracy.protected
AbstractPolynomialSolver(double relativeAccuracy, double absoluteAccuracy)
Construct a solver with given accuracies.protected
AbstractPolynomialSolver(double relativeAccuracy, double absoluteAccuracy, double functionValueAccuracy)
Construct a solver with given accuracies.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double[]
getCoefficients()
protected void
setup(int maxEval, PolynomialFunction f, double min, double max, double startValue)
Prepare for computation.-
Methods inherited from class org.hipparchus.analysis.solvers.BaseAbstractUnivariateSolver
computeObjectiveValue, doSolve, getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMax, getMaxEvaluations, getMin, getRelativeAccuracy, getStartValue, incrementEvaluationCount, isBracketing, isSequence, solve, solve, solve, verifyBracketing, verifyInterval, verifySequence
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hipparchus.analysis.solvers.BaseUnivariateSolver
getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve, solve
-
-
-
-
Constructor Detail
-
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 Detail
-
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 thesolve
methods.- Overrides:
setup
in classBaseAbstractUnivariateSolver<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()
- Returns:
- the coefficients of the polynomial function.
-
-