Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math.analysis.solvers
Interface UnivariateRealSolver

All Superinterfaces:
  ConvergingAlgorithm

All Known Implementing Classes:
  BisectionSolver, BrentSolver, LaguerreSolver, MullerSolver, NewtonSolver, RiddersSolver, SecantSolver, UnivariateRealSolverImpl

    public interface UnivariateRealSolver

extends ConvergingAlgorithm

Interface for (univariate real) rootfinding algorithms.

Implementations will search for only one zero in the given interval.

Version:
  $Revision: 1070725 $ $Date: 2011-02-15 02:31:12 +0100 (mar. 15 fÃ©vr. 2011) $

Method Summary
`double` | `getFunctionValue()` Get the result of the last run of the solver.
`double` | `getFunctionValueAccuracy()` Get the actual function value accuracy.
`double` | `getResult()` Get the result of the last run of the solver.
`void` | `resetFunctionValueAccuracy()` Reset the actual function accuracy to the default.
`void` | `setFunctionValueAccuracy(double accuracy)` Set the function value accuracy.
`double` | `solve(double min, double max)` Deprecated. replaced by `solve(UnivariateRealFunction, double, double)` since 2.0
`double` | `solve(double min, double max, double startValue)` Deprecated. replaced by `solve(UnivariateRealFunction, double, double, double)` since 2.0
`double` | `solve(UnivariateRealFunction f, double min, double max)` Deprecated. in 2.2 (to be removed in 3.0).
`double` | `solve(UnivariateRealFunction f, double min, double max, double startValue)` Deprecated. in 2.2 (to be removed in 3.0).

Methods inherited from interface org.apache.commons.math.ConvergingAlgorithm
`getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, resetAbsoluteAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy`

Method Detail

### setFunctionValueAccuracy

    void setFunctionValueAccuracy(double accuracy)

  Set the function value 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.

  Parameters:
    `accuracy` - the accuracy.
  Throws:
    `IllegalArgumentException` - if the accuracy can't be achieved by the solver or is otherwise deemed unreasonable.

### getFunctionValueAccuracy

    double getFunctionValueAccuracy()

  Get the actual function value accuracy.

  Returns:
    the accuracy

### resetFunctionValueAccuracy

    void resetFunctionValueAccuracy()

  Reset the actual function accuracy to the default. The default value is provided by the solver implementation.

### solve

    @Deprecated
    double solve(double min,
                            double max)
                 throws ConvergenceException,
                        FunctionEvaluationException

  Deprecated. replaced by `solve(UnivariateRealFunction, double, double)` since 2.0

  Solve for a zero root in the given interval.

  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.

  Parameters:
    `min` - the lower bound for the interval.
    `max` - the upper bound for the interval.
  Returns:
    a value where the function is zero
  Throws:
    `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 solver

### solve

    @Deprecated
    double solve(UnivariateRealFunction f,
                            double min,
                            double max)
                 throws ConvergenceException,
                        FunctionEvaluationException

  Deprecated. in 2.2 (to be removed in 3.0).

  Solve for a zero root in the given interval.

  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.

  Parameters:
    `f` - the function to solve.
    `min` - the lower bound for the interval.
    `max` - the upper bound for the interval.
  Returns:
    a value where the function is zero
  Throws:
    `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 solver
  Since:
    2.0

### solve

    @Deprecated
    double solve(double min,
                            double max,
                            double startValue)
                 throws ConvergenceException,
                        FunctionEvaluationException,
                        IllegalArgumentException

  Deprecated. replaced by `solve(UnivariateRealFunction, double, double, double)` since 2.0

  Solve for a zero in the given interval, start at startValue.

  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.

  Parameters:
    `min` - the lower bound for the interval.
    `max` - the upper bound for the interval.
    `startValue` - the start value to use
  Returns:
    a value where the function is zero
  Throws:
    `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

### solve

    @Deprecated
    double solve(UnivariateRealFunction f,
                            double min,
                            double max,
                            double startValue)
                 throws ConvergenceException,
                        FunctionEvaluationException,
                        IllegalArgumentException

  Deprecated. in 2.2 (to be removed in 3.0).

  Solve for a zero in the given interval, start at startValue.

  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.

  Parameters:
    `f` - the function to solve.
    `min` - the lower bound for the interval.
    `max` - the upper bound for the interval.
    `startValue` - the start value to use
  Returns:
    a value where the function is zero
  Throws:
    `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
  Since:
    2.0

### getResult

    double getResult()

  Get the result of the last run of the solver.

  Returns:
    the last result.
  Throws:
    `IllegalStateException` - if there is no result available, either because no result was yet computed or the last attempt failed.

### getFunctionValue

    double getFunctionValue()

  Get the result of the last run of the solver.

  Returns:
    the value of the function at the last result.
  Throws:
    `IllegalStateException` - if there is no result available, either because no result was yet computed or the last attempt failed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.