All Packages Class Hierarchy This Package Previous Next Index
Class CH.epfl.lcvm.mccc.NewtonRaphson
java.lang.Object
|
+----CH.epfl.lcvm.mccc.NewtonRaphson
- public class NewtonRaphson
- extends Object
- implements RootFinder
A class which finds roots of an function using the Newton-Raphson Chord method.
-
NewtonRaphson(Function)
- Creates a NewtonRaphson root finder for the given function
-
findRoot(Matrix)
- Returns the root of the given equation from the given starting guess
If the given point has more then one column then only the first is used.
-
main(String[])
-
Exercise the class by trying the various functions
-
setMaxSteps(int)
- Sets the maximum number of steps for the solver
-
setTolerance(double)
- Sets the tolerance for the newton solver
-
setUpdateFrequency(int)
- Sets the frequency of the jacobian updates
NewtonRaphson
public NewtonRaphson(Function func)
- Creates a NewtonRaphson root finder for the given function
- Parameters:
- func - The function for which to find roots
findRoot
public Matrix findRoot(Matrix value) throws SolverException, NoConvergenceException
- Returns the root of the given equation from the given starting guess
If the given point has more then one column then only the first is used.
- Parameters:
- value - the point at which to start the root finding
- Returns:
- the root of the function
- Throws: SolverException
- Thrown when the matrix solver fails
- Throws: NoConvergenceException
- Thrown when maximum number of
steps reached
setTolerance
public void setTolerance(double tolerance)
- Sets the tolerance for the newton solver
- Parameters:
- tolerance - The new tolerance
setMaxSteps
public void setMaxSteps(int maxSteps)
- Sets the maximum number of steps for the solver
- Parameters:
- maxSteps - The maximum number of steps to perform
setUpdateFrequency
public void setUpdateFrequency(int frequency)
- Sets the frequency of the jacobian updates
- Parameters:
- maxSteps - The maximum number of steps to perform
main
public static void main(String argv[]) throws MCCCException
- Exercise the class by trying the various functions
- Throws: MCCCException
- Thrown when numerics fail
All Packages Class Hierarchy This Package Previous Next Index