FreeMat: vtkAmoebaMinimizer

FreeMat

- Main Page
- Related Pages

vtkAmoebaMinimizer

Section: Visualization Toolkit Common Classes

# Usage

vtkAmoebaMinimizer will modify a set of parameters in order to find the minimum of a specified function. The method used is commonly known as the amoeba method, it constructs an n-dimensional simplex in parameter space (i.e. a tetrahedron if the number or parameters is 3) and moves the vertices around parameter space until a local minimum is found. The amoeba method is robust, reasonably efficient, but is not guaranteed to find the global minimum if several local minima exist.

To create an instance of class vtkAmoebaMinimizer, simply invoke its constructor as follows

      obj = vtkAmoebaMinimizer

# Methods

The class vtkAmoebaMinimizer has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkAmoebaMinimizer class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkAmoebaMinimizer = obj.NewInstance ()`
- `vtkAmoebaMinimizer = obj.SafeDownCast (vtkObject o)`
- `obj.SetParameterValue (string name, double value)` - Set the initial value for the specified parameter. Calling this function for any parameter will reset the Iterations and the FunctionEvaluations counts to zero. You must also use SetParameterScale() to specify the step size by which the parameter will be modified during the minimization. It is preferable to specify parameters by name, rather than by number.
- `obj.SetParameterValue (int i, double value)` - Set the initial value for the specified parameter. Calling this function for any parameter will reset the Iterations and the FunctionEvaluations counts to zero. You must also use SetParameterScale() to specify the step size by which the parameter will be modified during the minimization. It is preferable to specify parameters by name, rather than by number.
- `obj.SetParameterScale (string name, double scale)` - Set the scale to use when modifying a parameter, i.e. the initial amount by which the parameter will be modified during the search for the minimum. It is preferable to identify scalars by name rather than by number.
- `double = obj.GetParameterScale (string name)` - Set the scale to use when modifying a parameter, i.e. the initial amount by which the parameter will be modified during the search for the minimum. It is preferable to identify scalars by name rather than by number.
- `obj.SetParameterScale (int i, double scale)` - Set the scale to use when modifying a parameter, i.e. the initial amount by which the parameter will be modified during the search for the minimum. It is preferable to identify scalars by name rather than by number.
- `double = obj.GetParameterScale (int i)` - Set the scale to use when modifying a parameter, i.e. the initial amount by which the parameter will be modified during the search for the minimum. It is preferable to identify scalars by name rather than by number.
- `double = obj.GetParameterValue (string name)` - Get the value of a parameter at the current stage of the minimization. Call this method within the function that you are minimizing in order to get the current parameter values. It is preferable to specify parameters by name rather than by index.
- `double = obj.GetParameterValue (int i)` - Get the value of a parameter at the current stage of the minimization. Call this method within the function that you are minimizing in order to get the current parameter values. It is preferable to specify parameters by name rather than by index.
- `string = obj.GetParameterName (int i)` - For completeness, an unchecked method to get the name for particular parameter (the result will be NULL if no name was set).
- `int = obj.GetNumberOfParameters ()` - Get the number of parameters that have been set.
- `obj.Initialize ()` - Initialize the minimizer. This will reset the number of parameters to zero so that the minimizer can be reused.
- `obj.Minimize ()` - Iterate until the minimum is found to within the specified tolerance, or until the MaxIterations has been reached.
- `int = obj.Iterate ()` - Perform one iteration of minimization. Returns zero if the tolerance stopping criterion has been met.
- `obj.SetFunctionValue (double )` - Get the function value resulting from the minimization.
- `double = obj.GetFunctionValue ()` - Get the function value resulting from the minimization.
- `obj.SetTolerance (double )` - Specify the fractional tolerance to aim for during the minimization.
- `double = obj.GetTolerance ()` - Specify the fractional tolerance to aim for during the minimization.
- `obj.SetMaxIterations (int )` - Specify the maximum number of iterations to try before giving up.
- `int = obj.GetMaxIterations ()` - Specify the maximum number of iterations to try before giving up.
- `int = obj.GetIterations ()` - Return the number of interations that have been performed. This is not necessarily the same as the number of function evaluations.
- `int = obj.GetFunctionEvaluations ()` - Return the number of times that the function has been evaluated.
- `obj.EvaluateFunction ()` - Evaluate the function. This is usually called internally by the minimization code, but it is provided here as a public method.