drasys.or.nonlinear
Interface EquationSolutionI

All Known Implementing Classes:
Bisection, EquationSolution

public interface EquationSolutionI

An interface to access algorithms that solve single equations.


Method Summary
 double getAccuracy()
          Get the accuracy of the answer.
 int getMaxIterations()
          Get the maximum number of iterations.
 void setAccuracy(double accuracy)
          Set the accuracy of the answer.
 void setMaxIterations(int maxIterations)
          Set the maximum number of iterations.
 double solve(FunctionI function, double x1, double x2, double y)
          Find x between x1 and x2 where f(x) = y.
 

Method Detail

setAccuracy

public void setAccuracy(double accuracy)
Set the accuracy of the answer.

getAccuracy

public double getAccuracy()
Get the accuracy of the answer.

setMaxIterations

public void setMaxIterations(int maxIterations)
Set the maximum number of iterations.

getMaxIterations

public int getMaxIterations()
Get the maximum number of iterations.

solve

public double solve(FunctionI function,
                    double x1,
                    double x2,
                    double y)
             throws NonlinearException,
                    AccuracyException
Find x between x1 and x2 where f(x) = y.
Throws:
AccuracyException - if the answer isn't found to the specified accuracy.
NonlinearException - if f(x1) and f(x2) don't bracket the root.


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com