rvl.util
Class Solve
java.lang.Object
|
+--rvl.util.Solve
- public class Solve
- extends java.lang.Object
Routines for numerical solution of univariate equations
Constructor Summary |
Solve()
|
Method Summary |
static double |
illinois(UniFunction f,
double target,
double x1,
double x2)
Solve f.of(x) == target in the interval (x1,x2)
using the Illinois method. |
protected static double |
illinois(UniFunction f,
double target,
double x1,
double x2,
double f1,
double f2)
|
static double |
search(UniFunction f,
double target,
double start,
double incr)
Solve f.of(x) == target using starting value start. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Solve
public Solve()
illinois
public static double illinois(UniFunction f,
double target,
double x1,
double x2)
- Solve f.of(x) == target in the interval (x1,x2)
using the Illinois method.
- Returns:
- the solution
illinois
protected static double illinois(UniFunction f,
double target,
double x1,
double x2,
double f1,
double f2)
search
public static double search(UniFunction f,
double target,
double start,
double incr)
- Solve f.of(x) == target using starting value start.
Searching is initialized based on function values at start
and start + incr, both of which are assumed to lie in the
domain of f. Once an enclosing interval is found, solution
is completed using the Illinois method.
- Returns:
- the solution