29 #ifndef vtkAmoebaMinimizer_h
30 #define vtkAmoebaMinimizer_h
32 #include "vtkCommonMathModule.h"
51 void SetFunction(
void (*f)(
void *),
void *arg);
56 void SetFunctionArgDelete(
void (*f)(
void *));
68 void SetParameterValue(
const char *
name,
double value);
69 void SetParameterValue(
int i,
double value);
79 void SetParameterScale(
const char *
name,
double scale);
80 double GetParameterScale(
const char *
name);
81 void SetParameterScale(
int i,
double scale);
92 double GetParameterValue(
const char *
name);
117 virtual void Minimize();
123 virtual int Iterate();
129 vtkSetMacro(FunctionValue,
double);
139 vtkSetClampMacro(ContractionRatio,
double,0.5,1.0);
140 vtkGetMacro(ContractionRatio,
double);
148 vtkSetClampMacro(ExpansionRatio,
double,1.0,2.0);
149 vtkGetMacro(ExpansionRatio,
double);
156 vtkSetMacro(Tolerance,
double);
157 vtkGetMacro(Tolerance,
double);
164 vtkSetMacro(ParameterTolerance,
double);
165 vtkGetMacro(ParameterTolerance,
double);
172 vtkSetMacro(MaxIterations,
int);
173 vtkGetMacro(MaxIterations,
int);
181 vtkGetMacro(Iterations,
int);
188 vtkGetMacro(FunctionEvaluations,
int);
195 void EvaluateFunction();
201 void (*Function)(
void *);
202 void (*FunctionArgDelete)(
void *);
223 double **AmoebaVertices;
224 double *AmoebaValues;
227 double AmoebaHighValue;
228 int AmoebaNStepsNoImprovement;
230 void InitializeAmoeba();
231 void GetAmoebaParameterValues();
232 void TerminateAmoeba();
233 double TryAmoeba(
double sum[],
int high,
double fac);
235 int CheckParameterTolerance();