Interface rootsolvers.RootSolver
All Packages Class Hierarchy This Package Previous Next Index
Interface rootsolvers.RootSolver
- public interface RootSolver
- extends Object
An interface for root-solving algorithms and the specific functions
being solved.
- Version:
- 1.0 02-12-97
- Author:
- Daren Stotler
- See Also:
- RootSolverException
-
calcfOfX(double)
- This is the function to be solved.
-
root(double, double)
- This method should contain the algorithm for finding the root
of calcfOfX within the range x1 -- x2.
root
public abstract void root(double x1,
double x2) throws RootSolverException
- This method should contain the algorithm for finding the root
of calcfOfX within the range x1 -- x2. The value for the root
is actually returned by calcfOfX. Note that it is conceivable that
algorithms could be written for which the bounds on the root are
unnecessary. Presumably, the next stage is to write an abstract
class for a particular algorithm with this method implemented
but calcfOfX still abstract.
- Parameters:
- x1 - one bound on the range of the root
- x2 - other bound
- Throws: RootSolverException
- thrown when a root isn't found
calcfOfX
public abstract double calcfOfX(double x)
- This is the function to be solved.
- Parameters:
- x - point at which function is to be evaluated; on return, this
is the root
- Returns:
- function value for use in solution algorithm
All Packages Class Hierarchy This Package Previous Next Index