Top Description Fields Constructors Methods
org.apache.commons.math3.analysis.solvers

public abstract Class AbstractUnivariateDifferentiableSolver

extends BaseAbstractUnivariateSolver<UnivariateDifferentiableFunction>
implements UnivariateDifferentiableSolver
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.analysis.solvers.UnivariateDifferentiableSolver, org.apache.commons.math3.analysis.solvers.BaseUnivariateSolver
Known Direct Subclasses
org.apache.commons.math3.analysis.solvers.NewtonRaphsonSolver
Imports
org.apache.commons.math3.analysis.differentiation.DerivativeStructure, .UnivariateDifferentiableFunction, org.apache.commons.math3.exception.TooManyEvaluationsException

Provide a default implementation for several functions useful to generic solvers.
Since
3.1

Field Summary

Modifier and TypeField and Description
private UnivariateDifferentiableFunction

Constructor Summary

AccessConstructor and Description
protected
AbstractUnivariateDifferentiableSolver(final double
Maximum absolute error.
absoluteAccuracy
)

Construct a solver with given absolute accuracy.

protected
AbstractUnivariateDifferentiableSolver(final double
Maximum relative error.
relativeAccuracy
,
final double
Maximum absolute error.
absoluteAccuracy
,
final double
Maximum function value error.
functionValueAccuracy
)

Construct a solver with given accuracies.

Method Summary

Modifier and TypeMethod and Description
protected DerivativeStructure

Returns:

the objective function value and derivative at specified point.
computeObjectiveValueAndDerivative
(double
Point at which the objective function must be evaluated.
point
)

Compute the objective function value.

protected void
setup(int
Maximum number of evaluations.
maxEval
,
UnivariateDifferentiableFunction
Function to solve.
f
,
double
Lower bound for the interval.
min
,
double
Upper bound for the interval.
max
,
double
Start value to use.
startValue
)

Overrides org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver.setup.

Prepare for computation.

Inherited from org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver:
computeObjectiveValuedoSolvegetAbsoluteAccuracygetEvaluationsgetFunctionValueAccuracygetMaxgetMaxEvaluationsgetMingetRelativeAccuracygetStartValueincrementEvaluationCountisBracketingisSequencesolvesolvesolveverifyBracketingverifyIntervalverifySequence

Field Detail

functionback to summary
private UnivariateDifferentiableFunction function

Hides org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver.function.

Function to solve.

Constructor Detail

AbstractUnivariateDifferentiableSolverback to summary
protected AbstractUnivariateDifferentiableSolver(final double absoluteAccuracy)

Construct a solver with given absolute accuracy.

Parameters
absoluteAccuracy:double

Maximum absolute error.

AbstractUnivariateDifferentiableSolverback to summary
protected AbstractUnivariateDifferentiableSolver(final double relativeAccuracy, final double absoluteAccuracy, final double functionValueAccuracy)

Construct a solver with given accuracies.

Parameters
relativeAccuracy:double

Maximum relative error.

absoluteAccuracy:double

Maximum absolute error.

functionValueAccuracy:double

Maximum function value error.

Method Detail

computeObjectiveValueAndDerivativeback to summary
protected DerivativeStructure computeObjectiveValueAndDerivative(double point) throws TooManyEvaluationsException

Compute the objective function value.

Parameters
point:double

Point at which the objective function must be evaluated.

Returns:DerivativeStructure

the objective function value and derivative at specified point.

Exceptions
TooManyEvaluationsException:
if the maximal number of evaluations is exceeded.
setupback to summary
protected void setup(int maxEval, UnivariateDifferentiableFunction f, double min, double max, double startValue)

Overrides org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver.setup.

Doc from org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver.setup.

Prepare for computation. Subclasses must call this method if they override any of the solve methods.

Parameters
maxEval:int

Maximum number of evaluations.

f:UnivariateDifferentiableFunction

Function to solve.

min:double

Lower bound for the interval.

max:double

Upper bound for the interval.

startValue:double

Start value to use.

Annotations
@Override