| Class | Description |
|---|---|
| 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 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 |
| 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 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 UniDimensionalSolver class offers methods for finding the location of the extremum (i.e. minimum or maximum) of a function of one real variable. |
| Interface | Description |
|---|---|
| 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.
Source Code ExamplesWith this section we provide source code examples which illustrate explicitly how a uni-dimensional function is implemented. In particular, we provide the source code for the implementation of a polynomial. Here we provide the definition of the object function:f(x) = 3x^2 + 4x + 3which is a linear function. In order to provide an implementation for this interface you are required to provide an implementation for the following methods:
Source Code Implemention of the Function on the .NET PlatformSource Code Implemention of the Function on the VB PlatformSource Code Implemention of the Function on the Delphi Platform |
| LocateAlgorithm | |
| UniDimensionalFunction |