2575 Commits

Author SHA1 Message Date
Luc Maisonobe
a164959d1e backported r1003567 from trunk to branch 2.X
Don't catch Exception and fail(); let JUnit handle it


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003907 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 22:23:34 +00:00
Luc Maisonobe
417848e839 backported r1003566 from trunk to branch 2.X
Narrow expected exception

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003902 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 22:13:35 +00:00
Luc Maisonobe
332d372bdc backported r1003549 from trunk to branch 2.X
Split multiple tests


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003901 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 22:11:04 +00:00
Luc Maisonobe
c87e900a1b backported r1003547 from trunk to branch 2.X
Javadoc


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003900 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 22:08:39 +00:00
Luc Maisonobe
76ab9055aa backported :r1003543,1003545,1003569,1003584 from trunk to branch 2.X
Add missing fail() calls for expected exceptions


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003899 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 22:06:55 +00:00
Luc Maisonobe
b857985c79 backported r1003533 from trunk to branch 2.X
Unnecessary cast


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003896 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 21:53:24 +00:00
Luc Maisonobe
ad59080231 backported r1003526 from trunk to branch 2.X
Java 1.5 does not support Arrays.copyOf()


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003895 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 21:50:58 +00:00
Luc Maisonobe
b4681e50ff backported part of r1003351 from trunk to branch 2.X
Add missing @Override marker


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003892 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 21:28:56 +00:00
Luc Maisonobe
c4f85a60a1 backported r1003350 from trunk to branch 2.X
Unnecessary to cast byte into byte


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003890 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 21:14:22 +00:00
Luc Maisonobe
61c404a0f0 backported r1003349 from trunk to branch 2.X
Unnecessary to cast byte into byte
Add missing @Override marker


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003889 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 21:11:55 +00:00
Luc Maisonobe
c832a0c215 backported r1003348 from trunk to branch 2.X
Unnecessary to cast byte into byte



git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003888 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 21:08:52 +00:00
Luc Maisonobe
1d3822bf9c backported part of r1003346 from trunk to branch 2.X
Make immutable private fields final


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003886 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 21:04:44 +00:00
Luc Maisonobe
87f2ace0ce backported part of r999948 from trunk to branch 2.X
moved PowellOptimizer to the optimization.direct package

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003881 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 20:52:39 +00:00
Phil Steitz
2c9bdc138e Corrected javadoc link.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1003869 13f79535-47bb-0310-9956-ffa450edef68
2010-10-02 19:14:45 +00:00
Luc Maisonobe
8ad7c0a62e Prevent ODE integration to be stuck at initial point when it is restarted after
an event has stopped the previous integration
JIRA: MATH-421

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1002827 13f79535-47bb-0310-9956-ffa450edef68
2010-09-29 19:49:34 +00:00
Gilles Sadowski
635bc4b1b3 Added deprecation markers (conflict with immutable distribution instances).
Fixed typo in Javadoc.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1002660 13f79535-47bb-0310-9956-ffa450edef68
2010-09-29 14:51:54 +00:00
Luc Maisonobe
c59919dabe fixed a missing change from Math to FastMath
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@1002040 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 07:18:31 +00:00
Luc Maisonobe
9c0ed34439 improved documentation (javadoc, code comments about optimization and userguide)
JIRA: MATH-419

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@999579 13f79535-47bb-0310-9956-ffa450edef68
2010-09-21 19:51:57 +00:00
Luc Maisonobe
c8bef749c3 improved Well pseudo random numbers generators performances by inlining transforms and using indirection arrays to avoid index computation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@999136 13f79535-47bb-0310-9956-ffa450edef68
2010-09-20 22:06:40 +00:00
Phil Steitz
aad36b356e Fixed errors in multiple regression section. JIRA: MATH-407.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@998761 13f79535-47bb-0310-9956-ffa450edef68
2010-09-20 01:57:03 +00:00
Luc Maisonobe
4a18419864 Added François Panneton and Pierre L'Ecuyer WELL random generators:
WELL512a, WELL1024a, WELL19937a, WELL19937c, WELL44497a and WELL44497b

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@998742 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 22:33:45 +00:00
Dimitri Pourbaix
8541c80563 MATH-416 fixed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@997726 13f79535-47bb-0310-9956-ffa450edef68
2010-09-16 12:39:51 +00:00
Phil Steitz
2534cc0f29 Made intercept/noIntercept configurable in multiple regression classes. JIRA: MATH-409.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@996404 13f79535-47bb-0310-9956-ffa450edef68
2010-09-13 02:01:42 +00:00
Luc Maisonobe
40e0297ae2 use the new Brent solver constructor instead of setting accuracy and max iteration afterwards
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@996194 13f79535-47bb-0310-9956-ffa450edef68
2010-09-11 19:05:52 +00:00
Luc Maisonobe
f34a7da42c Fixed lost cause in MathRuntimeException.createInternalError
JIRA: MATH-415

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@996178 13f79535-47bb-0310-9956-ffa450edef68
2010-09-11 17:19:18 +00:00
Luc Maisonobe
b5d04e247f added fast cubic root computation
JIRA: MATH-375

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@996166 13f79535-47bb-0310-9956-ffa450edef68
2010-09-11 16:40:25 +00:00
Luc Maisonobe
f5bec5767b added tests for asin and acos
JIRA: MATH-375

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@996161 13f79535-47bb-0310-9956-ffa450edef68
2010-09-11 16:23:18 +00:00
Luc Maisonobe
92351cbb8f fixed visibility of an internal constructor that should remain private
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@995987 13f79535-47bb-0310-9956-ffa450edef68
2010-09-10 21:24:15 +00:00
Luc Maisonobe
294eaf3415 Use Jonathan and Peter Borwein quartic formula to compute PI,
it is MUCH faster than the previous one especially for large
numbers of digits and allows quicker loading of the class.
It was tested to compute about 10000 decimal digits, just for the fun

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@995986 13f79535-47bb-0310-9956-ffa450edef68
2010-09-10 21:23:25 +00:00
Luc Maisonobe
8d9febb32f prevent DfpField radix digit to be smaller than 4 as it created problem when converting to double
(we need to be able to create a Dfp with value 2^52 which needs 16 decimal digits or 4 radix digits)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@995965 13f79535-47bb-0310-9956-ffa450edef68
2010-09-10 20:24:54 +00:00
Phil Steitz
995efe1ead * Modified multiple regression newSample methods to ensure that by default in all cases,
regression models are estimated with intercept terms.  Prior to the fix for this issue, 
  newXSampleData(double[][]), newSampleData(double[], double[][]) and 
  newSampleData(double[], double[][], double[][]) all required columns of "1's"
  to be inserted into the x[][] arrays to create a model with an intercept term;
  while newSampleData(double[], int, int) created a model including an intercept
  term without requiring the unitary column.  All methods have  been changed to
  eliminate the need for users to add unitary columns to specify regression models.
* Improved javadoc
* Improved tests
JIRA: MATH-411

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@993574 13f79535-47bb-0310-9956-ffa450edef68
2010-09-08 01:24:51 +00:00
Luc Maisonobe
a7cfaf46e3 fixed checkstyle warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992878 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:42:20 +00:00
Luc Maisonobe
5b1beecc97 removing unused variables
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992875 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:34:41 +00:00
Luc Maisonobe
e22b8c8a2b added tests based on dfp library (now a package in commons-math)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992872 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:28:58 +00:00
Luc Maisonobe
e945ddcd4e fixed errors with infinities
added asin/acos

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992869 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:26:35 +00:00
Luc Maisonobe
dd715b13cd fixed wrong hashcode for mantissa array
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992861 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:07:50 +00:00
Luc Maisonobe
8d37aa4016 fixed javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992860 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:06:49 +00:00
Luc Maisonobe
6f2cecc697 fixed missing annotations preventing test to run
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992735 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 08:48:26 +00:00
Luc Maisonobe
b378a18f8d added the dfp library
The Dfp class represent the high precision numbers, it implements our existing Field interface and hence each instance is associated with a DfpField that provides the constants at the required precision as well as factory methods. This allowed to remove the compile-time constraint in the library. Users can even use at the same time a field for 20 decimals digits precision and another field for 100 digits precision. Dfp instances with different precision CANNOT be mixed in the same computation (doing so creates a NaN). A few utility methods have been added, like constructors from integral types, isInfinite and isNaN methods, equal has been renames to equals and its signature changed to match the general Object method (a hashcode method has been added too).
JIRA: MATH-412

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992696 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 22:57:31 +00:00
Luc Maisonobe
48411e62fc updated a findbugs filter after a method signature change
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992598 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 13:19:01 +00:00
Luc Maisonobe
2d7ba25cb8 replacing non-working equality test with NaN by a call to Double.isNaN()
NaNs have the strange property that they can be compared to nothing, they are not event equal to themselves!

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@992595 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 13:10:25 +00:00
Gilles Sadowski
3231090f64 Deprecation warning.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@991207 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 14:27:58 +00:00
Gilles Sadowski
8f52a66d5a Fix backported from trunk.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@991166 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 12:08:57 +00:00
Luc Maisonobe
2acca0c424 added FastMath and used it everywhere in replacement of java.util.Math
the unit tests have not been added yet (waiting for dfp library addition)
JIRA: MATH-375

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@990655 13f79535-47bb-0310-9956-ffa450edef68
2010-08-29 21:49:40 +00:00
William Barker
38f987dd12 Fix test that was failing on Windows
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@988779 13f79535-47bb-0310-9956-ffa450edef68
2010-08-25 01:41:46 +00:00
Phil Steitz
89af30268f Created 2.x branch.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_X@988060 13f79535-47bb-0310-9956-ffa450edef68
2010-08-23 10:24:23 +00:00
Phil Steitz
95ebe8294c Added R-squared and adjusted R-squared statistics to
OLSMultipleLinearRegression
JIRA: MATH-386



git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@987983 13f79535-47bb-0310-9956-ffa450edef68
2010-08-23 02:55:01 +00:00
Gilles Sadowski
ad63c1629d Indentation.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@987962 13f79535-47bb-0310-9956-ffa450edef68
2010-08-22 23:45:38 +00:00
Phil Steitz
25c9e050af Eliminated unnecessary residual calculation (should have been rmoved in r987897 fixing JIRA: MATH-392).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@987901 13f79535-47bb-0310-9956-ffa450edef68
2010-08-22 13:25:52 +00:00
Phil Steitz
30c9e8c111 Corrected Y variance formula and added error variance methods to return
what were previously reported as Y variances.
JIRA: MATH-392
Reported and patched by Mark Devaney


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@987897 13f79535-47bb-0310-9956-ffa450edef68
2010-08-22 13:13:35 +00:00