20 #ifndef vtkAmoebaMinimizer_h
21 #define vtkAmoebaMinimizer_h
23 #include "vtkCommonMathModule.h"
26 VTK_ABI_NAMESPACE_BEGIN
43 void SetFunction(
void (*f)(
void*),
void* arg);
48 void SetFunctionArgDelete(
void (*f)(
void*));
60 void SetParameterValue(
const char*
name,
double value);
61 void SetParameterValue(
int i,
double value);
71 void SetParameterScale(
const char*
name,
double scale);
72 double GetParameterScale(
const char*
name);
73 void SetParameterScale(
int i,
double scale);
84 double GetParameterValue(
const char*
name);
109 virtual void Minimize();
115 virtual int Iterate();
121 vtkSetMacro(FunctionValue,
double);
131 vtkSetClampMacro(ContractionRatio,
double, 0.5, 1.0);
132 vtkGetMacro(ContractionRatio,
double);
140 vtkSetClampMacro(ExpansionRatio,
double, 1.0, 2.0);
141 vtkGetMacro(ExpansionRatio,
double);
148 vtkSetMacro(Tolerance,
double);
149 vtkGetMacro(Tolerance,
double);
156 vtkSetMacro(ParameterTolerance,
double);
157 vtkGetMacro(ParameterTolerance,
double);
164 vtkSetMacro(MaxIterations,
int);
165 vtkGetMacro(MaxIterations,
int);
173 vtkGetMacro(Iterations,
int);
180 vtkGetMacro(FunctionEvaluations,
int);
187 void EvaluateFunction();
193 void (*Function)(
void*);
194 void (*FunctionArgDelete)(
void*);
215 double** AmoebaVertices;
216 double* AmoebaValues;
219 double AmoebaHighValue;
220 int AmoebaNStepsNoImprovement;
222 void InitializeAmoeba();
223 void GetAmoebaParameterValues();
224 void TerminateAmoeba();
225 double TryAmoeba(
double sum[],
int high,
double fac);
227 int CheckParameterTolerance();
233 VTK_ABI_NAMESPACE_END
const char * GetParameterName(int i)
For completeness, an unchecked method to get the name for particular parameter (the result will be nu...
nonlinear optimization with a simplex
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double GetParameterValue(int i)
Get the value of a parameter at the current stage of the minimization.
double GetFunctionValue()
Get the function value resulting from the minimization.
double GetParameterScale(int i)
Set the scale to use when modifying a parameter, i.e.
a simple class to control print indentation
int GetNumberOfParameters()
Get the number of parameters that have been set.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
double ParameterTolerance