Author: erans
Date: Sat Aug 6 17:06:38 2011
New Revision: 1154550
URL: http://svn.apache.org/viewvc?rev=1154550&view=rev
Log:
MATH621
Change history:
Constants in procedures replaced by static final fields.
NF eliminated (function evaluation counting is done in base class).
MAXFUN eliminated (exception is thrown by base class).
1e300 replaced by NEGATIVE_INFINITY.
1e300 replaced by POSITIVE_INFINITY.
Number of interpolation points set at construction (no automatic default to "2n+1" if set
to "1").
Replaced "checkParameters()" with "setup()" and moved validity checks from "doOptimize()"
to "setup()".
Replaced "boundaries[][]" with two "double[]" for the constraints.
Removed unit test "testBoundariesNoData" ("null" is interpreted as "no constraints").
Replaced "xl" and "xu" with "lowerBound" and "upperBound", respectively (Fortran 1based
indexing still used).
Replaced "x" with "currentBest".
Replaced "rhobeg" with "initialTrustRegionRadius". Using instance field directly instead
of passing it as function argument.
Replaced "rhoend" with "stoppingTrustRegionRadius". Using instance field directly instead
of passing it as function argument.
Removed all parameters from "bobyqa" function (using instance fields directly).
Removed (from "bobyqa" function) a test on the bound difference: It would never fail because
of the autocorrection in "setup".
Replaced "ScopedPtr" by "FortranArray" for all onedimensional data.
0based loop in "bobyqa".
Replaced "ScopedPtr" by "FortranMatrix" for all matrix data.
Looplocal counters in all functions.
Replaced kopt with "trustRegionCenterInterpolationPointIndex" instance variable.
Removed "ndim", "n" and "npt" from the arguments list of all functions.
Removed "w" from the arguments list of "update".
Removed "w" from the arguments list of "altmov" (replaced with local variables "work1" and
"work2").
In "trsbox" arguments list, replaced "ScopedPtr" ("gnew", "xbdi", "s", "hs", "hred") by "FortranArray".
Removed "ptsaux", "ptsid" from arguments list of "rescue" (replaced with local variables).
Corrected bug in "rescue" function.
Removed "w" from arguments list of "rescue".
Removed "glag" and "hcol" from arguments list of "altmov" (replaced by local variables).
Removed "w" from arguments list of "bobyqb" (replaced by local variables).
Removed global work space "w".
Removed auxiliary class "ScopedPtr".
Removed "alpha" and "cauchy" ("DoubleRef") in "altmov" arguments list: Values returned in
a "double[]" array.
Removed "dsq" and "crvmin" ("DoubleRef") in "trsbox" arguments list: Values returned in a
"double[]" array.
Removed "DoubleRef" auxiliary class.
Removed unused local variables; changed some to be "final".
This is still an intermediate version. Please do not commit any changes
without discussing it on JIRA.
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizer.java
commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/direct/BOBYQAOptimizerTest.java
