|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpl.mipl.util.Amoeba
public class Amoeba
Amoeba algorithm for finding a minimum of the given multidimensional function. Implements the "downhill simplex method" of Nelder and Mead.
ObjectiveFunction| Constructor Summary | |
|---|---|
Amoeba(int numDim,
double funTol,
int maxIterations)
Constructs a new Amoeba. |
|
| Method Summary | |
|---|---|
int |
compute(double[][] Parg,
double[] Y,
ObjectiveFunction objFunc)
This is the actual Amoeba algorithm implementation. |
double |
compute(double[] pZero,
double[] lambda,
ObjectiveFunction objFunc)
This is a wrapper around the amoeba algorithm which does the initialization for you. |
double |
compute(double[] pZero,
double lambda,
ObjectiveFunction objFunc)
This is a wrapper around the amoeba algorithm which does the initialization for you. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Amoeba(int numDim,
double funTol,
int maxIterations)
numDim - the number of dimensions( independent variables )funTol - the fractional convergence tolerance to be achieved
in the function. 0.00000001 (1e-8) is a good value.maxIterations - the maximum number of iterations allowed.
(suggestion: 5000)| Method Detail |
|---|
public int compute(double[][] Parg,
double[] Y,
ObjectiveFunction objFunc)
Parg - must be initialized as follows: the first row is
an initial guess at the solution. Each successive row is equal
to that first row, with one of the variables perturbed by an amount
"which is your guess of the problem's characteristic length scale",
so each variable is perturbed in one and only one row.
Upon completion, any row will hold a valid solution, although Parg[0]
is normally used. See alternative compute methods for wrapper
functions which do this initialization for you.Y - an array of numDim+1 values, which hold the results of
the function evaluation for each trial in Parg. It must be
preinitialized based on the initial Parg.objFunc - the actual function to be minimized.
public final double compute(double[] pZero,
double lambda,
ObjectiveFunction objFunc)
pZero - The initial solution.lambda - The "length scale" constant.objFunc - the actual function to be minimized.
public final double compute(double[] pZero,
double[] lambda,
ObjectiveFunction objFunc)
pZero[] - The initial solution.lambda[] - The "length scale" constant array.objFunc - the actual function to be minimized.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||