Commit Graph

2463 Commits

Author SHA1 Message Date
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
Phil Steitz a46c441cec Removed trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@987809 13f79535-47bb-0310-9956-ffa450edef68
2010-08-21 18:12:27 +00:00
Phil Steitz ede256b235 Removed tabs and trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@987808 13f79535-47bb-0310-9956-ffa450edef68
2010-08-21 18:11:31 +00:00
Dimitri Pourbaix 93362abb9b Code simplified in AbstractLeastSquaresOptimizer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@985828 13f79535-47bb-0310-9956-ffa450edef68
2010-08-16 08:45:10 +00:00
Dimitri Pourbaix 19f58cfa37 MATH-406 corrected
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@985589 13f79535-47bb-0310-9956-ffa450edef68
2010-08-14 21:59:07 +00:00
Dimitri Pourbaix 6b4085c327 MathUtils.safeNorm (translation of enorm.f from Minpack) added
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@984453 13f79535-47bb-0310-9956-ffa450edef68
2010-08-11 15:55:14 +00:00
Dimitri Pourbaix 784e4f69ec MATH-405 corrected
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@984404 13f79535-47bb-0310-9956-ffa450edef68
2010-08-11 13:40:39 +00:00
Gilles Sadowski 31fef8fab1 Minor clean-up (to avoid changing a method arguments in-place).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@983968 13f79535-47bb-0310-9956-ffa450edef68
2010-08-10 12:45:10 +00:00
Gilles Sadowski d2fd025403 Moved "Localizable", "DummyLocalizable" and "LocalizedFormats" from
package "exception" to package "exception.util". Modified "import"
statements in all affected files.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@983921 13f79535-47bb-0310-9956-ffa450edef68
2010-08-10 10:46:06 +00:00
Gilles Sadowski c15e80eba9 MATH-401
Created "NullArgumentException" (subclass of "MathIllegalArgumentException").
Changed all occurrences of "createIllegalArgumentException" (in "MathRuntime")
to throw the new exception whenever a "null" is not allowed. Added a few
checks for null in "BigFraction.java".
Simplified "LocalizedFormats" enum.
Changed "ZeroNotAllowedException" to "ZeroException".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@982950 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 13:29:01 +00:00
Gilles Sadowski d402f6b5e1 "PowellOptimizer": Added a constructor for setting of the absolute tolerance,
removed one redundant function evaluation.
Line search relative tolerance explicitly set in the optimizer instance
created in "PowellOptimizerTest".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@982639 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 14:26:13 +00:00
Gilles Sadowski 173735d2df Moved exception utilities to package "exception.util". Created
"MathUnsupportedOperationException". Replaced factory method
"createUnsupportedOperationException" occurences by an explicit
construction of a "MathUnsupportedOperationException".
Corrected a bug (in "AbstractRealVector") where a "dimension"
was stored in a "double". Replaced a "createIllegalArgumentException"
by a "DimensionMismatchException".
Removed checks for "null" in "BigFraction".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@982526 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 09:51:48 +00:00
Dimitri Pourbaix c640932de2 MATH-377 fixed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@982507 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 08:48:00 +00:00