31 #ifndef __vtkAmoebaMinimizer_h
32 #define __vtkAmoebaMinimizer_h
49 void SetFunction(
void (*f)(
void *),
void *arg);
52 void SetFunctionArgDelete(
void (*f)(
void *));
61 void SetParameterValue(
const char *
name,
double value);
62 void SetParameterValue(
int i,
double value);
70 void SetParameterScale(
const char *
name,
double scale);
71 double GetParameterScale(
const char *
name);
72 void SetParameterScale(
int i,
double scale);
81 double GetParameterValue(
const char *
name);
98 virtual void Minimize();
102 virtual int Iterate();
106 vtkSetMacro(FunctionValue,
double);
114 vtkSetClampMacro(ContractionRatio,
double,0.5,1.0);
115 vtkGetMacro(ContractionRatio,
double);
121 vtkSetClampMacro(ExpansionRatio,
double,1.0,2.0);
122 vtkGetMacro(ExpansionRatio,
double);
127 vtkSetMacro(Tolerance,
double);
128 vtkGetMacro(Tolerance,
double);
133 vtkSetMacro(ParameterTolerance,
double);
134 vtkGetMacro(ParameterTolerance,
double);
139 vtkSetMacro(MaxIterations,
int);
140 vtkGetMacro(MaxIterations,
int);
146 vtkGetMacro(Iterations,
int);
151 vtkGetMacro(FunctionEvaluations,
int);
156 void EvaluateFunction();
163 void (*Function)(
void *);
164 void (*FunctionArgDelete)(
void *);
186 double **AmoebaVertices;
187 double *AmoebaValues;
190 double AmoebaHighValue;
191 int AmoebaNStepsNoImprovement;
193 void InitializeAmoeba();
194 void GetAmoebaParameterValues();
195 void TerminateAmoeba();
196 double TryAmoeba(
double sum[],
int high,
double fac);
198 int CheckParameterTolerance();