WebCab Optimization for Delphi (COM) v2.6

WebCab.COM.Math.Optimization.UniDimensional Namespace

Classes

ClassDescription
AccelBracketing A simple acceleration bracketing algorithm. This is a general bracketing algorithm and can be it can be applied to any continuous function. The voldg, oldg, and g fields of the result are guaranteed to respect the following condition: voldg < oldg and oldg > g or voldg > oldg and oldg < g. This means that, if the function is continuous then certainly a local maximum (in the first case) or minimum (in the second case) is between a and c. The second point is taken as x + mindist, or the closest point x1 that makes the condition f(x) != f(x1) valid. The third point is found by taking accelerated steps until there is a sense change.
AccelDerivBracketing

A version of the acceleration algorithm which uses derivative information. This bracketing algorithm can be used only for differentiable functions. If you try using this algorithm with a function for which you don't supply a derivative, a ClassCastException will be thrown.

The first point is chosen `statically' like in the other bracketing algorithms, then it is modified until it is a `reasonable' modification (that is in accordance with the problem dimension).

In the case of differentiable functions, the derivative in the initial point gives the sense of modification, so only two points are enough to bracket an extremum. Only the last two points of the bracket, `b' and `c' will actually be calculated; `a' will always be set to the value of the starting point.

Bracket
BracketingAlgorithm

This abstract class is the base class for all classes implementing a bracketing algorithm. It gives the main functionality of a bracketing algorithm to the user (given an initial point it returns a bracket containing the extremum); at the same time for the programmer the task is divided into two main parts: finding the `dimension' of the problem by taking the second point then actually bracketing the extremum.

To implement a bracketing algorithm the programmer must override {@link #find_initial find_initial} and {@link #extend extend} methods.

BrentDerivLocate A version of Brent's algortihm that uses derivative information.
BrentLocate Brent's algorithm for general functions. This is a general iterative method that searches the extremum using an adaptive algorithm (Brent's algorithm) that uses a combination of golden section search and inverse parabolic interpolation.
CubicDerivLocate

The cubic interpolation algorithm. This `locate' algorithm can be used only for derivable functions. If you try using this algorithm with a function for which you don't supply a derivative, an UniDimensionalException will be thrown.

This is an iterative algorithm which uses cubic interpolation.

Extremum This class encapsulates the value and the type of an extremum.
InvalidUniDimensionalFunctionException This exception is thrown when the user-defined function returns Double.NaN. This restriction applies to all the algorithms except Nelder-Mead and simulated annealing. However it is advisable for you to always make sure that the function does not return invalid values.
LinearLocate The golden section search algorithm. This is a general iterative algorithm that searches the extremum using golden section search. The convergence is linear, meaning that successive significant figures are won linearly with additional function evaluations. The method does not use any kind of parabolic interpolation.
ParabolicBracketing
ParabolicIterativeLocate Iterative parabolic interpolation algorithm. Searches a given interval through parabolic interpolation until a the width is less then a given tolerance.
ParabolicLocate Non-iterative parabolic interpolation algorithm. This is a very simple and fast general non-iterative locate algorithm. Given a set of three points a, b, and c that bracket an extreme, the algorithm finds an approximation of that extreme in one step, using parabolic interpolation.
SafeFunction
TooManyUniDimensionalIterationsException This exception is thrown when an algorithm exceedes the maximum number of iterations which usually is supplied as a parameter. You have the option of using the partially determined result of the algorithm.
UniDimensionalException
UniDimensionalSolver The UniDimensional class offers methods for finding the location of the extremum (i.e. minimum or maximum) of a function of one real variable.

Interfaces

InterfaceDescription
Derivative This interface should be implemented by all user-defined functions that are unidimensional and have a derivative. Unidimensional functions are functions that have only one variable.
LocateAlgorithm
UniDimensionalFunction This interface should be implemented by all user supplied functions that are unidimensional. Unidimensional functions are functions that depend upon only one variable. If, in addition, you want to supply a derivative you should implement {@link Derivative} instead.