|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.ConvergingAlgorithmImpl
org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl
@Deprecated public abstract class UnivariateRealSolverImpl
Provide a default implementation for several functions useful to generic solvers.
Method Summary | |
---|---|
double |
getFunctionValue()
Deprecated. Get the result of the last run of the solver. |
double |
getFunctionValueAccuracy()
Deprecated. Get the actual function value accuracy. |
double |
getResult()
Deprecated. Get the result of the last run of the solver. |
void |
resetFunctionValueAccuracy()
Deprecated. Reset the actual function accuracy to the default. |
void |
setFunctionValueAccuracy(double accuracy)
Deprecated. Set the function value accuracy. |
double |
solve(int maxEval,
UnivariateRealFunction function,
double min,
double max)
Deprecated. Solve for a zero root in the given interval. |
double |
solve(int maxEval,
UnivariateRealFunction function,
double min,
double max,
double startValue)
Deprecated. Solve for a zero in the given interval, start at startValue. |
Methods inherited from class org.apache.commons.math.ConvergingAlgorithmImpl |
---|
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, resetAbsoluteAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.math.analysis.solvers.UnivariateRealSolver |
---|
solve, solve, solve, solve |
Methods inherited from interface org.apache.commons.math.ConvergingAlgorithm |
---|
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, resetAbsoluteAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy |
Method Detail |
---|
public double getResult()
getResult
in interface UnivariateRealSolver
public double getFunctionValue()
getFunctionValue
in interface UnivariateRealSolver
public void setFunctionValueAccuracy(double accuracy)
This is used to determine when an evaluated function value or some other value which is used as divisor is zero.
This is a safety guard and it shouldn't be necessary to change this in general.
setFunctionValueAccuracy
in interface UnivariateRealSolver
accuracy
- the accuracy.public double getFunctionValueAccuracy()
getFunctionValueAccuracy
in interface UnivariateRealSolver
public void resetFunctionValueAccuracy()
resetFunctionValueAccuracy
in interface UnivariateRealSolver
public double solve(int maxEval, UnivariateRealFunction function, double min, double max) throws ConvergenceException, FunctionEvaluationException
A solver may require that the interval brackets a single zero root. Solvers that do require bracketing should be able to handle the case where one of the endpoints is itself a root.
function
- the function to solve.min
- the lower bound for the interval.max
- the upper bound for the interval.maxEval
- Maximum number of evaluations.
ConvergenceException
- if the maximum iteration count is exceeded
or the solver detects convergence problems otherwise.
FunctionEvaluationException
- if an error occurs evaluating the function
IllegalArgumentException
- if min > max or the endpoints do not
satisfy the requirements specified by the solverpublic double solve(int maxEval, UnivariateRealFunction function, double min, double max, double startValue) throws ConvergenceException, FunctionEvaluationException, IllegalArgumentException
A solver may require that the interval brackets a single zero root. Solvers that do require bracketing should be able to handle the case where one of the endpoints is itself a root.
function
- the function to solve.min
- the lower bound for the interval.max
- the upper bound for the interval.startValue
- the start value to usemaxEval
- Maximum number of evaluations.
ConvergenceException
- if the maximum iteration count is exceeded
or the solver detects convergence problems otherwise.
FunctionEvaluationException
- if an error occurs evaluating the function
IllegalArgumentException
- if min > max or the arguments do not
satisfy the requirements specified by the solver
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |