org.apache.commons.math.analysis.solvers

Class BisectionSolver

• Method Detail

• solve

@Deprecated
public double solve(double min,
double max,
double initial)
throws MaxIterationsExceededException,
FunctionEvaluationException
Deprecated.
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.
initial - the start value to use
Returns:
a value where the function is zero
Throws:
FunctionEvaluationException - if an error occurs evaluating the function
MaxIterationsExceededException
• solve

@Deprecated
public double solve(double min,
double max)
throws MaxIterationsExceededException,
FunctionEvaluationException
Deprecated.
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:
FunctionEvaluationException - if an error occurs evaluating the function
MaxIterationsExceededException
• solve

@Deprecated
public double solve(UnivariateRealFunction f,
double min,
double max,
double initial)
throws MaxIterationsExceededException,
FunctionEvaluationException
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.
initial - the start value to use
Returns:
a value where the function is zero
Throws:
FunctionEvaluationException - if an error occurs evaluating the function
MaxIterationsExceededException
• solve

public double solve(int maxEval,
UnivariateRealFunction f,
double min,
double max,
double initial)
throws MaxIterationsExceededException,
FunctionEvaluationException
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.

Overrides:
solve in class UnivariateRealSolverImpl
Parameters:
maxEval - Maximum number of evaluations.
f - the function to solve.
min - the lower bound for the interval.
max - the upper bound for the interval.
initial - the start value to use
Returns:
a value where the function is zero
Throws:
FunctionEvaluationException - if an error occurs evaluating the function
MaxIterationsExceededException
• solve

@Deprecated
public double solve(UnivariateRealFunction f,
double min,
double max)
throws MaxIterationsExceededException,
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:
FunctionEvaluationException - if an error occurs evaluating the function
MaxIterationsExceededException