All "for" loops are 0-based (thanks to Dietmar Wolz).
"FortranArray" replaced by "ArrayRealVector"; "FortranMatrix" replaced
by "Array2DRowRealMatrix"; auxiliary classes deleted.
"INDEX_OFFSET" removed.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158015 13f79535-47bb-0310-9956-ffa450edef68
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 1-based 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 auto-correction in "setup".
Replaced "ScopedPtr" by "FortranArray" for all one-dimensional data.
0-based loop in "bobyqa".
Replaced "ScopedPtr" by "FortranMatrix" for all matrix data.
Loop-local 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.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154550 13f79535-47bb-0310-9956-ffa450edef68
Original contribution due to Dietmar Wolz: Fortran code translated in Java.
This commit is for reference only; work is under way to adapt the code into
a more maintainable version.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154543 13f79535-47bb-0310-9956-ffa450edef68
linear combinations a1.b1 + a2.b2 + ... + an.bn taking great care to compensate
for cancellation effects. This both improves and simplify several methods in
euclidean geometry classes, including linear constructors, dot product and cross
product.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154250 13f79535-47bb-0310-9956-ffa450edef68
* Added RandomGeneratorAbstractTest collecting stock tests for RandomGenerator
implementations and running RandomDataTest test cases using RandomDataImpls
constructed from generators under test.
* Added BitsStreamGeneratorTest extending RandomGeneratorAbstractTest to test
abstract method implementations in BitStreamGenerator.
* Changed Mersenne and Well generator tests to extend RandomGeneratorAbstractTest.
* Improved test coverage (discovering MATH-640) of AbstractRandomGeneratorTest
by making this class extend RandomGeneratorAbstractTest.
All new tests use fixed seeds.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1153257 13f79535-47bb-0310-9956-ffa450edef68
Replaced "DescriptiveStatistics" by "StatisticalSummary", as suggested
by Phil.
Added some "randomness" so that the timed code has a side-effect that
cannot be optimized away by the JIT compiler.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1152584 13f79535-47bb-0310-9956-ffa450edef68