32 #ifndef vtkAmoebaMinimizer_h
33 #define vtkAmoebaMinimizer_h
35 #include "vtkCommonMathModule.h"
54 void SetFunction(
void (*f)(
void *),
void *arg);
59 void SetFunctionArgDelete(
void (*f)(
void *));
71 void SetParameterValue(
const char *
name,
double value);
72 void SetParameterValue(
int i,
double value);
82 void SetParameterScale(
const char *
name,
double scale);
83 double GetParameterScale(
const char *
name);
84 void SetParameterScale(
int i,
double scale);
95 double GetParameterValue(
const char *
name);
120 virtual void Minimize();
126 virtual int Iterate();
132 vtkSetMacro(FunctionValue,
double);
142 vtkSetClampMacro(ContractionRatio,
double,0.5,1.0);
143 vtkGetMacro(ContractionRatio,
double);
151 vtkSetClampMacro(ExpansionRatio,
double,1.0,2.0);
152 vtkGetMacro(ExpansionRatio,
double);
159 vtkSetMacro(Tolerance,
double);
160 vtkGetMacro(Tolerance,
double);
167 vtkSetMacro(ParameterTolerance,
double);
168 vtkGetMacro(ParameterTolerance,
double);
175 vtkSetMacro(MaxIterations,
int);
176 vtkGetMacro(MaxIterations,
int);
184 vtkGetMacro(Iterations,
int);
191 vtkGetMacro(FunctionEvaluations,
int);
198 void EvaluateFunction();
204 void (*Function)(
void *);
205 void (*FunctionArgDelete)(
void *);
226 double **AmoebaVertices;
227 double *AmoebaValues;
230 double AmoebaHighValue;
231 int AmoebaNStepsNoImprovement;
233 void InitializeAmoeba();
234 void GetAmoebaParameterValues();
235 void TerminateAmoeba();
236 double TryAmoeba(
double sum[],
int high,
double fac);
238 int CheckParameterTolerance();