org.jcurl.math
Class NewtonSimpleSolver

Package class diagram package NewtonSimpleSolver
java.lang.Object
  extended by org.jcurl.math.NewtonSimpleSolver

public class NewtonSimpleSolver
extends Object

Very simple implementation of Newton's root-finding algorithm.

Version:
$Id: NewtonSimpleSolver.java 1031 2009-07-23 15:06:05Z mro $
Author:
M. Rohrmoser

Field Summary
static double eps
           
static int maxsteps
           
 
Constructor Summary
NewtonSimpleSolver()
           
 
Method Summary
static double computeNewtonValue(R1RNFunction f, int dim, int c, double y, double x0, double xstop)
          Compute x where f^c(x) = y using Newton's algorithm.
static double computeNewtonZero(R1RNFunction f, int c, double x)
          Compute x where f(x) = 0 using Newton's algorithm.
static double computeNewtonZero(R1RNFunction f, int dim, int c, double x0, double xstop)
          Compute x where f(x) = 0 using Newton's algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eps

public static final double eps
See Also:
Constant Field Values

maxsteps

public static final int maxsteps
See Also:
Constant Field Values
Constructor Detail

NewtonSimpleSolver

public NewtonSimpleSolver()
Method Detail

computeNewtonValue

public static double computeNewtonValue(R1RNFunction f,
                                        int dim,
                                        int c,
                                        double y,
                                        double x0,
                                        double xstop)
Compute x where f^c(x) = y using Newton's algorithm.

Parameters:
f -
dim - dimension (0,1,2,...)
c - c'th derivative
y - value
x0 - start value
xstop - stop value, may be Double.NaN.
Returns:
x for getC(dim, c, x) = y, Double.NaN if there's no solution.

computeNewtonZero

public static double computeNewtonZero(R1RNFunction f,
                                       int c,
                                       double x)
Compute x where f(x) = 0 using Newton's algorithm.

Parameters:
f -
c - c'th derivative
x - start value
Returns:
x for getC(c, x) = 0
See Also:
computeNewtonZero(R1RNFunction, int, int, double, double)

computeNewtonZero

public static double computeNewtonZero(R1RNFunction f,
                                       int dim,
                                       int c,
                                       double x0,
                                       double xstop)
Compute x where f(x) = 0 using Newton's algorithm.

Parameters:
f -
dim - dimension (0,1,2,...)
c - c'th derivative
x0 - start value
xstop - stop value
Returns:
x for getC(dim, c, x) = 0, Double.NaN for "no solution".


Copyright © 2005-2009 jcurl.org. All Rights Reserved.