Commit Graph

3269 Commits

Author SHA1 Message Date
Luc Maisonobe d7121b1c0b Added a 3D SubLine class.
JIRA: MATH-593

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1159353 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 18:50:08 +00:00
Gilles Sadowski 290621a860 MATH-413
Passing convergence checker in constructor.
Added default constructor.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1159233 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 14:10:28 +00:00
Gilles Sadowski 6c9487d625 Removed "try" blocks.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1159214 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 13:38:29 +00:00
Gilles Sadowski 1a7b144bff MATH-621
Removed unused variables and unused imports (due to Dietmar Wolz).


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1159203 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 13:03:42 +00:00
Gilles Sadowski ac30127f03 MATH-621
Matrix/vector operators.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158937 13f79535-47bb-0310-9956-ffa450edef68
2011-08-17 22:11:43 +00:00
Gilles Sadowski f18228dc45 MATH-645
MATH-602


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158913 13f79535-47bb-0310-9956-ffa450edef68
2011-08-17 21:00:04 +00:00
Gilles Sadowski ed44e8213f MATH-621
Layout.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158755 13f79535-47bb-0310-9956-ffa450edef68
2011-08-17 14:54:39 +00:00
Gilles Sadowski 2b4bc7c5a9 MATH-621
Function "altmov": All local variables defined at initialization.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158716 13f79535-47bb-0310-9956-ffa450edef68
2011-08-17 14:00:56 +00:00
Gilles Sadowski 9c4571dd50 MATH-621
Function "update": All local variables defined at initialization.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158457 13f79535-47bb-0310-9956-ffa450edef68
2011-08-16 21:55:49 +00:00
Gilles Sadowski 4b1377907d MATH-621
Removed function "rescue" and "case 190" in function "bobyqb".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158448 13f79535-47bb-0310-9956-ffa450edef68
2011-08-16 21:15:56 +00:00
Gilles Sadowski fca3f676ec MATH-621
Removed unnecessary test.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1158017 13f79535-47bb-0310-9956-ffa450edef68
2011-08-15 21:21:06 +00:00
Gilles Sadowski 3872917eff MATH-621
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
2011-08-15 21:16:57 +00:00
Luc Maisonobe 7bf24af9d2 Fixed handling of Infinite and NaN coefficients in linearCombination
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157994 13f79535-47bb-0310-9956-ffa450edef68
2011-08-15 20:31:49 +00:00
Luc Maisonobe d18208440c new tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157933 13f79535-47bb-0310-9956-ffa450edef68
2011-08-15 18:20:47 +00:00
Luc Maisonobe bbb97a74b0 clean up code, mainly replacing static dotProduct methods calls by non-static ones
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157932 13f79535-47bb-0310-9956-ffa450edef68
2011-08-15 18:20:08 +00:00
Luc Maisonobe 3e6c847030 simplified signature of intersection method
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157748 13f79535-47bb-0310-9956-ffa450edef68
2011-08-15 09:32:32 +00:00
Luc Maisonobe e7df350a55 fixed charact with wrong encoding
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157739 13f79535-47bb-0310-9956-ffa450edef68
2011-08-15 08:49:39 +00:00
Sebastian Bazley 71df2effec Fix up mangled char in comment
Looks to have been a UTF-8 char originally?

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157540 13f79535-47bb-0310-9956-ffa450edef68
2011-08-14 15:03:33 +00:00
Sebastian Bazley b19a671a94 Fix up mangled char in comment.
Looks to have been a UTF-8 char originally?

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157539 13f79535-47bb-0310-9956-ffa450edef68
2011-08-14 14:57:05 +00:00
Gilles Sadowski 6983d81680 MATH-645
Iterate on the original vector, not on the copy that is modified.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157403 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 18:10:13 +00:00
Gilles Sadowski 7c6dd40b33 MATH-621
Added temporary constant "INDEX_OFFSET" to keep track of where changes are
needed for converting from 1-based to 0-based indexing. 


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157355 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 09:08:39 +00:00
Gilles Sadowski 14fc4ba076 Changed loop condition to avoid additional test.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157352 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 08:57:44 +00:00
Gilles Sadowski cec75d74f8 MATH-602
Inverse condition number.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157345 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 07:45:42 +00:00
Gilles Sadowski 9edd2f24d7 MATH-601
Replaced call to "max" with the already known result "m".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157342 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 07:23:38 +00:00
Phil Steitz 190b6716ee Fixed javadoc typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157339 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 06:28:22 +00:00
Phil Steitz 2dc556649e Made pseudo-inverse consistent with rank computation in
SingularValueDecompositionImpl.
JIRA: MATH-601
Reported by Chris Nix
Patched by Chris Nix and Greg Sterijevxki

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157336 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 06:20:12 +00:00
Gilles Sadowski 58faa3eeb7 Code cleanup: "0.0" -> "0", "1.0" -> "1".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157288 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 23:11:46 +00:00
Gilles Sadowski 64787dc2ec Code cleanup: Removed calls to "min" function when result was already known.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157285 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 23:01:17 +00:00
Gilles Sadowski fcc13b5e98 Code cleanup: Removed "wantu" and "wantv" that were unconditionally
set to "true".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157281 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 22:42:13 +00:00
Gilles Sadowski 173736fdbb Code cleanup: Removed unnecessary parentheses, empty lines.
Bitwise operator replaced by logical one.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157280 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 22:37:29 +00:00
Gilles Sadowski ebc61de97f MATH-631
Reverted to original behaviour.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157185 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 16:48:26 +00:00
Gilles Sadowski 565b6b527f Added "final".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157088 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 13:11:30 +00:00
Gilles Sadowski 327bc1a6d3 Replaced 2 calls to "max(m,n)" by the already known value ("m"), as requested
by Greg Sterijevski on the "dev" ML.
Added "final" keyword.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1157083 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 13:00:58 +00:00
Phil Steitz 4a65b71c2a Added methods to solve upper and lower triangular systems. JIRA: MATH-624. Contributed by Greg Sterijevski.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1156968 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 05:39:55 +00:00
Phil Steitz 2f2bb7783c Removed trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154843 13f79535-47bb-0310-9956-ffa450edef68
2011-08-08 05:21:34 +00:00
Phil Steitz 5a2d63e2c3 Improved performance of nextInt(int) in BitsStreamGenerator. JIRA: MATH-642
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154815 13f79535-47bb-0310-9956-ffa450edef68
2011-08-08 04:22:04 +00:00
Gilles Sadowski d33f6b968c Removed "@Override"
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154670 13f79535-47bb-0310-9956-ffa450edef68
2011-08-07 08:18:02 +00:00
Gilles Sadowski 334c01e6eb MATH-631
Work around infinite loop.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154614 13f79535-47bb-0310-9956-ffa450edef68
2011-08-06 22:26:55 +00:00
Gilles Sadowski d451a1fb92 MATH-621
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
2011-08-06 17:06:38 +00:00
Gilles Sadowski a821e798c3 MATH-621
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
2011-08-06 16:54:39 +00:00
Gilles Sadowski a9c5cda5bd More efficient implementation: Removed unnecessary arrays.
Added another test.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154485 13f79535-47bb-0310-9956-ffa450edef68
2011-08-06 11:02:01 +00:00
Gilles Sadowski 367fe7662e Array version of "linearCombination".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154416 13f79535-47bb-0310-9956-ffa450edef68
2011-08-06 00:13:49 +00:00
Gilles Sadowski cae2a845fa MATH-632
Added explicit note on the different behaviors for NaN values between
Java and IEEE-754.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154392 13f79535-47bb-0310-9956-ffa450edef68
2011-08-05 22:07:31 +00:00
Gilles Sadowski 33c0778d90 MATH-581
New exception. Simplified others.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154361 13f79535-47bb-0310-9956-ffa450edef68
2011-08-05 19:43:04 +00:00
Luc Maisonobe 9c6557732b fixed typos, it's IEEE754, not IEEE753 ...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154356 13f79535-47bb-0310-9956-ffa450edef68
2011-08-05 19:12:37 +00:00
Luc Maisonobe 8b41800046 Fixed a wrong detection of rotation axis versus vectors plane in Rotation constructor using two vectors pairs.
JIRA: MATH-639

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154257 13f79535-47bb-0310-9956-ffa450edef68
2011-08-05 15:05:33 +00:00
Luc Maisonobe 3defe7345d Use the new highly accurate linearCombination utility methods in 3D Euclidean geometry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1154253 13f79535-47bb-0310-9956-ffa450edef68
2011-08-05 15:02:56 +00:00
Luc Maisonobe 079e67738b Added a few linearCombination utility methods in MathUtils to compute accurately
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
2011-08-05 15:01:49 +00:00
Gilles Sadowski cb067c2503 MATH-581
Method rename (previous one was misleading).


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1153821 13f79535-47bb-0310-9956-ffa450edef68
2011-08-04 10:03:51 +00:00
Phil Steitz 98556fedcc Fixed bugs in AbstractRandomGenerator nextInt() and nextLong() default
implementations.  Prior to the fix for this issue, these methods
generated only positive values.

JIRA: MATH-640

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1153338 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 04:16:23 +00:00