|
WebCab Optimization v2.6 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.webcab.ejb.math.optimization.unidimensional.BracketingAlgorithm
|
+--com.webcab.ejb.math.optimization.unidimensional.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.
BracketingAlgorithm,
AccelBracketing,
ParabolicBracketing,
Serialized Form| Constructor Summary | |
AccelDerivBracketing()
|
|
| Method Summary | |
protected Bracket |
extend(Bracket br,
UniDimensionalFunction f,
double bparam,
int extreme_type)
Expands the bracketing interval until it surely contains at least one extremum of the given type. |
protected Bracket |
find_initial(double x,
UniDimensionalFunction f,
double mindist)
Finds an initial, reasonable large interval, which can be subsequently enlarged by extend.
|
| Methods inherited from class com.webcab.ejb.math.optimization.unidimensional.BracketingAlgorithm |
bracketBidir, bracketUnidir |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AccelDerivBracketing()
| Method Detail |
protected Bracket find_initial(double x,
UniDimensionalFunction f,
double mindist)
throws InvalidUniDimensionalFunctionException,
ClassCastException
extend.
The algorithm initially sets the `b' point of the bracket to x + mindist, then modifies this value
until the sign of the derivative or the variation of the function value is not zero.
find_initial in class BracketingAlgorithmx - the starting pointf - the function. If the function does not implement derivative an UniDimensionalException will be thrown.mindist - The first try for the `b' parameter in the bracket is x + mindist. The value for this should be
of the same order with the tolerance or less. If this is too large, it is possible to skip over one or more extrema.
If it is very small, it is possible that the algorithm makes many iterations until a reasonable modification is found
(however this is less probable than in AccelBracketing, as here we have derivative information).
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid
values like infinity or NaN.
ClassCastException
protected Bracket extend(Bracket br,
UniDimensionalFunction f,
double bparam,
int extreme_type)
throws InvalidUniDimensionalFunctionException,
UniDimensionalException
AccelBracketing
and in ParabolicBracketing equality is permitted).
If extreme_type is -1, a must be less than or equal to `b'. This is guaranteed if the bracket
is set by the corresponding find_initial method.
extend in class BracketingAlgorithmbr - the bracket with points a and b set.f - the function. If the function does not implement Derivative an UniDimensionalException will be thrown.bparam - the acceleration factor for interval expansion. See Mathematical Documentation for a
discussion on recommended acceleration factors. Good values are 1.5 for increased safety or 2 for fast results.extreme_type - Specifies the type of extremum: 1 for minimum or -1 for maximum.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid
values like infinity or NaN.
UniDimensionalException
|
WebCab Optimization v2.6 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||