All Packages Class Hierarchy This Package Previous Next Index
Class com.micronova.math.CurveSolver
java.lang.Object
|
+----com.micronova.math.CurveSolver
- public class CurveSolver
- extends Object
Numerical Equation Solvers (Bisection/Newton-Raphson/Linear).
- Version:
- 1.01
- Author:
- Makoto Nagata, MicroNova
-
CurveSolver()
-
-
useBisection(Curve, double, double, double, double, double, double, int)
-
Solves an equation using Bisection method.
-
useBisection(Curve, double, double, double, double, int)
-
Solves an equation using Bisection method.
-
useLinear(LinearSegmentedCurve, double, double, double)
-
Specialized Solver for LinearSegmentedCurve.
-
useNewtonRaphson(DeltaCurve, double, double, double, int)
-
Solves an equation using Newton-Raphson method.
CurveSolver
public CurveSolver()
useBisection
public static final double useBisection(Curve f,
double xLow,
double xHigh,
double target,
double accuracy,
int maxLoop) throws NoSolution
- Solves an equation using Bisection method.
For a Curve f, this tries to find a value x such that |f(x) - target| <= accuracy in a range of x values [xLow, xHigh].
'NoSolution' exception is thrown if no solution is found after maxLoop tries.
- Throws: NoSolution
- No Solution Found
useBisection
public static final double useBisection(Curve f,
double xLow,
double yLow,
double xHigh,
double yHigh,
double target,
double accuracy,
int maxLoop) throws NoSolution
- Solves an equation using Bisection method. yLow must be f(xLow), and yHigh must be f(xHigh). Use this version if f(xLow) and f(xHigh) are already computed.
- Throws: NoSolution
- No Solution Found
useNewtonRaphson
public static final double useNewtonRaphson(DeltaCurve f,
double xInit,
double target,
double accuracy,
int maxLoop) throws NoSolution
- Solves an equation using Newton-Raphson method.
Given a DeltaCurve f, this tries to find a value x such that |f(x) - target| <= accuracy, starting from an initial point xInit.
The differential should not be zero.
'NoSolution' exception is thrown if no solution is found after maxLoop tries.
- Throws: NoSolution
- No Solution Found
useLinear
public static final double useLinear(LinearSegmentedCurve f,
double target,
double xLow,
double xHigh) throws NoSolution
- Specialized Solver for LinearSegmentedCurve. Returns the smallest x in the given range [xLow, xHigh] such that f(x) = target (there may be rounding errors).
All Packages Class Hierarchy This Package Previous Next Index