|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnr.minimizer.VecMinimizerImp
public abstract class VecMinimizerImp
Simple implementation of a VecMinimizer. The constructor takes a
#nr.ScalarFunction and epsilon is used to create a vector, such that
if the trial minimum is changed less than that vector in each component, the
algorithm has converged.
The concrete implementation needs to implement doMinimize.
| Field Summary | |
|---|---|
int |
MAXFUNCTIONEVAL
The maximum number of times to evaluate the function before throwing #nr.DidNotConvergeException |
| Constructor Summary | |
|---|---|
VecMinimizerImp(ScalarFunction f)
create a new instance of VecMinimizerImp. |
|
| Method Summary | |
|---|---|
double |
getEpsilon()
return the relative accuracy parameter |
double |
minimize(Vec x)
minimize. |
int |
numFuncEvals()
the number of function evaluations it took to converge to the minimum. |
void |
setEpsilon(double epsilon)
set the desired relative accuracy parameter. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int MAXFUNCTIONEVAL
#nr.DidNotConvergeException
| Constructor Detail |
|---|
public VecMinimizerImp(ScalarFunction f)
f - the ScalarFunction to minimize| Method Detail |
|---|
public double minimize(Vec x)
minimize in interface VecMinimizerx - the initial guess; epsilon*x is the convergence criterion.
x will be changed to the minimum of the initial function.
DidNotConvergeException - if the algorithm could not find the minimumpublic double getEpsilon()
VecMinimizer
getEpsilon in interface VecMinimizerpublic void setEpsilon(double epsilon)
VecMinimizer
setEpsilon in interface VecMinimizerpublic int numFuncEvals()
VecMinimizer
numFuncEvals in interface VecMinimizer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||