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();
142 vtkSetClampMacro(ContractionRatio,
double,0.5,1.0);
143 vtkGetMacro(ContractionRatio,
double);
151 vtkSetClampMacro(ExpansionRatio,
double,1.0,2.0);
152 vtkGetMacro(ExpansionRatio,
double);
160 vtkGetMacro(Tolerance,
double);
168 vtkGetMacro(ParameterTolerance,
double);
176 vtkGetMacro(MaxIterations,
int);
184 vtkGetMacro(Iterations,
int);
191 vtkGetMacro(FunctionEvaluations,
int);
198 void EvaluateFunction();
204 void (*Function)(
void *);
205 void (*FunctionArgDelete)(
void *);
208 int NumberOfParameters;
209 char **ParameterNames;
210 double *ParameterValues;
211 double *ParameterScales;
212 double FunctionValue;
214 double ContractionRatio;
215 double ExpansionRatio;
218 double ParameterTolerance;
221 int FunctionEvaluations;
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();
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.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...