opale.mathtools
Class RootFinder1D

java.lang.Object
  |
  +--opale.mathtools.RootFinder1D
Direct Known Subclasses:
Bisection

public abstract class RootFinder1D
extends java.lang.Object

RootFinder1D is the superclass of solving methods for f(x) = 0 where f : R->R. By convention if the precision is not reached, then the number of iterations is MAXITERATION and the variable NITER is set to -1.

Since:
Opale-Mathtools 0.12
Author:
O.C.

Field Summary
 int MAXITERATION
          This value fixes the maximum number of iterations in the algorithm.
 int NITER
          This value indicates the number of iterations to obtain the convergence.
 double PRECISION
          This value represents the precision of the solution.
 
Constructor Summary
RootFinder1D()
           
 
Method Summary
abstract  double find(IyFx f, double x0, double x1)
          Finds the root of a numeric and scalar function f.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRECISION

public double PRECISION
This value represents the precision of the solution.

MAXITERATION

public int MAXITERATION
This value fixes the maximum number of iterations in the algorithm.

NITER

public int NITER
This value indicates the number of iterations to obtain the convergence.
Constructor Detail

RootFinder1D

public RootFinder1D()
Method Detail

find

public abstract double find(IyFx f,
                            double x0,
                            double x1)
Finds the root of a numeric and scalar function f. The root must be between x0 and x1. It is returned by this method and will be computed until his precision is PRECISION or the number of iterations is MAXITERATION.
Parameters:
IyFx - f, a function.
double - x0, x1, values that bracket the root.
Returns:
double, the root.
Throws:
RootSolverException. -