Commit Graph

2350 Commits

Author SHA1 Message Date
Gilles Sadowski 44f6b8b20f MATH-413 (points 1, 2 and 10)
Reverted to the original version of the convergence checker (using only the
previous and current best points).
"LevenberMarquardtOptimizer": Removed setters (control parameters must be
set at construction). Added a contructor.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992976 13f79535-47bb-0310-9956-ffa450edef68
2010-09-06 09:06:28 +00:00
Gilles Sadowski fc5606177f Fixed typo in Javadoc comment.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992897 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 21:37:50 +00:00
Luc Maisonobe 80384009b3 fixed checkstyle warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992879 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:42:48 +00:00
Luc Maisonobe d3450752e7 removing unused variables
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992876 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:35:26 +00:00
Luc Maisonobe 05aebba620 added tests based on dfp library (now a package in commons-math)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992871 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:28:12 +00:00
Luc Maisonobe c2134b3a90 fixed errors with infinities
added asin/acos

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992870 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:27:05 +00:00
Luc Maisonobe 99b17c9ce1 fixed wrong hashcode for mantissa array
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992864 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:09:44 +00:00
Luc Maisonobe 3a08d608eb fixed javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992862 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 19:08:53 +00:00
Luc Maisonobe cca4fb2733 fixed missing annotations preventing test to run
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992734 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 08:47:56 +00:00
Luc Maisonobe 85d35b0ff6 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/trunk@992697 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 22:59:21 +00:00
Luc Maisonobe 18f77ee26c updated a findbugs filter after a method signature change
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992597 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 13:18:30 +00:00
William Barker 0cb5c9ae58 tabs -> spaces. No functional change
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992191 13f79535-47bb-0310-9956-ffa450edef68
2010-09-03 03:46:53 +00:00
William Barker bfe4623c65 Change the default value for those UnivariateStatistics that have a conventional value on the empty set.
JIRA: MATH-373



git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@991812 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 04:49:11 +00:00
Gilles Sadowski 495f04bcda MATH-370
Removed deprecated methods.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@991535 13f79535-47bb-0310-9956-ffa450edef68
2010-09-01 13:45:55 +00:00
Gilles Sadowski 9f631fecc8 Added checks for "null".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@991164 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 12:05:00 +00:00
Gilles Sadowski a21faeae6e MATH-394, MATH-397, MATH-404
Overhaul of the "optimization" package.
Removed lots of duplicate code.
Removed methods referring to the concept of "iteration".
Removed interface methods to access the number of evaluations of the
gradient and Jacobian.
Removed all references to "OptimizationException" (replaced by
"ConvergenceException").
Javadoc comments updated.



git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@990792 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 13:06:22 +00:00
Gilles Sadowski 320194b3cb MATH-397
New "Incrementor" utility class to encapsulate the counter of function
evaluations.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@990743 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 09:38:39 +00:00
Gilles Sadowski 79c6cb129d MATH-361 and MATH-195 (continued).
Added new exceptions.
Corrected some typos in Javadoc.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@990678 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 00:50:49 +00:00
Luc Maisonobe 0ec92a0fc2 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/trunk@990658 13f79535-47bb-0310-9956-ffa450edef68
2010-08-29 22:04:09 +00:00
Gilles Sadowski bb38a224eb MATH-410
Wrong variable ("argument" instead of "arguments").


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@989543 13f79535-47bb-0310-9956-ffa450edef68
2010-08-26 08:59:33 +00:00
William Barker f119c3a547 Fix test that was failing on Windows
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@988777 13f79535-47bb-0310-9956-ffa450edef68
2010-08-25 01:23:20 +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
Luc Maisonobe b3777d116e simplified javadoc wording
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981416 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 08:36:08 +00:00
Luc Maisonobe 6c99076d1e Moved the localization framework used for exceptions in the exceptions package.
Its former place (in the utils package) was misleading as utils is rather for
numerical utilities, not low level library management


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981404 13f79535-47bb-0310-9956-ffa450edef68
2010-08-02 08:10:39 +00:00
Gilles Sadowski e58f83acb8 Created enum "OrderDirection" in "MathUtils" (instead of the existing
"Direction" enum enclosed in an "Order" class). Changed affected files.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981347 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 23:38:06 +00:00
Phil Steitz f215f96be0 Fixed javadoc errors.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981332 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 22:24:31 +00:00
Luc Maisonobe c64ed9d119 fixed import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981258 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 16:17:55 +00:00
Luc Maisonobe 82970077ae removed duplicate strings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981257 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 16:15:54 +00:00
Luc Maisonobe dd81f436e8 removed duplicate strings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981256 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 16:14:11 +00:00
Luc Maisonobe 9a8bd27fe5 improved error messages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981254 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 16:09:56 +00:00
Luc Maisonobe df328dbd46 removed duplicate strings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981248 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 15:36:10 +00:00
Luc Maisonobe 59a4edb84d added a getMessage(final Locale locale) to class MathIllegalArgumentException
similar to the ones from MathException and MathRuntimeException

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981247 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 15:35:33 +00:00
Luc Maisonobe 972ab8b3b2 Added a localized UnsupportedOperationException
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981244 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 15:27:20 +00:00
Luc Maisonobe 2431890261 deprecated an old style exception that was forgotten
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981243 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 15:16:54 +00:00
Luc Maisonobe accccd996a fixed another bunch of checkstyle warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@981238 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01 15:01:30 +00:00