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.


Constructor Index

 o NewtonRaphson(Function)
Creates a NewtonRaphson root finder for the given function

Method Index

 o 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.
 o main(String[])
Exercise the class by trying the various functions
 o setMaxSteps(int)
Sets the maximum number of steps for the solver
 o setTolerance(double)
Sets the tolerance for the newton solver
 o setUpdateFrequency(int)
Sets the frequency of the jacobian updates

Constructors

 o NewtonRaphson
 public NewtonRaphson(Function func)
Creates a NewtonRaphson root finder for the given function

Parameters:
func - The function for which to find roots

Methods

 o 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
 o setTolerance
 public void setTolerance(double tolerance)
Sets the tolerance for the newton solver

Parameters:
tolerance - The new tolerance
 o setMaxSteps
 public void setMaxSteps(int maxSteps)
Sets the maximum number of steps for the solver

Parameters:
maxSteps - The maximum number of steps to perform
 o setUpdateFrequency
 public void setUpdateFrequency(int frequency)
Sets the frequency of the jacobian updates

Parameters:
maxSteps - The maximum number of steps to perform
 o 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