| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.numerics.Root
public class Root
Class Root defines various root finding algorithms. This class cannot be subclassed or instantiated because all methods are static.
| Method Summary | |
|---|---|
| static double | bisection(Function f,
          double x1,
          double x2,
          double tol)Implements the bisection method for finding the root of a function. | 
| static double | newton(Function f,
       double x,
       double tol)Implements Newton's method for finding the root of a function. | 
| static double | newton(Function f,
       Function df,
       double x,
       double tol)Implements Newton's method for finding the root of a function. | 
| static double[] | solveQuadratic(double a,
               double b,
               double c)Solves for the roots of the quadratic equation ax2+bx+c=0. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static double[] solveQuadratic(double a,
                                      double b,
                                      double c)
a - double quadratic term coefficientb - double linear term coefficientc - double constant term
public static double newton(Function f,
                            double x,
                            double tol)
f - Function the functionx - double guess the roottol - double computation tolerance
public static double newton(Function f,
                            Function df,
                            double x,
                            double tol)
f - Function the functiondf - Function the derivative of the functionx - double guess the roottol - double computation tolerance
public static double bisection(Function f,
                               double x1,
                               double x2,
                               double tol)
f - Function the functionx1 - double guess roottol - double computation tolerance
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||