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
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
Luc Maisonobe
e24bdc331c
fixed numerous checkstyle warnings (javadoc, trailing spaces, tabs, parenthesis, declaration order ...)
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980981 13f79535-47bb-0310-9956-ffa450edef68
2010-07-30 22:03:04 +00:00
Luc Maisonobe
a48186437b
removed unused import
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980944 13f79535-47bb-0310-9956-ffa450edef68
2010-07-30 20:31:11 +00:00
Luc Maisonobe
3fac04e842
added missing SerialVersionId
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980942 13f79535-47bb-0310-9956-ffa450edef68
2010-07-30 20:28:06 +00:00
Luc Maisonobe
d9e60241d2
Added support for Gaussian curve fitting
...
JIRA: MATH-400
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980938 13f79535-47bb-0310-9956-ffa450edef68
2010-07-30 20:16:18 +00:00
Luc Maisonobe
7adf364d60
fixed javadoc error
...
JIRA: MATH-399
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980544 13f79535-47bb-0310-9956-ffa450edef68
2010-07-29 19:23:46 +00:00
Luc Maisonobe
97ab3822cc
removed reference to Java 1.6 Math.nextUp method
...
JIRA: MATH-398
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980154 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 18:47:28 +00:00
Gilles Sadowski
6d6d96df69
Removed "println" statements.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980047 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 13:21:17 +00:00
Gilles Sadowski
58c6028e21
MATH-396
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980039 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 12:48:48 +00:00
Gilles Sadowski
962315ba93
MATH-395: Another bug uncovered; all things being equal, the code now behaves
...
like the Puthon implementation.
MATH-397: Modified "BrentOptimizer" following the changes in
"AbstractUnivariateRealOptimizer".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980032 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 12:03:41 +00:00
Gilles Sadowski
7572385a7e
MATH-397. Modified "AbstractUnivariateRealOptimizer" so that its usage is
...
more similar to what is done in package "optimization.general".
Deprecated many methods as a consequence of the new layout.
New utility methods in "ConvergingAlgorithmImpl".
Temporary workaround in "BrentOptimizer" (requirement from base class) to
avoid committing two issues at the same time...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@980013 13f79535-47bb-0310-9956-ffa450edef68
2010-07-28 10:27:02 +00:00
Gilles Sadowski
c917b3b3fa
MATH-396.
...
Introducing "PowellOptimizer" which uses "BracketFinder".
"PowellOptimizerTest" uses "SumSincFunction" which uses "SincFunction".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@979460 13f79535-47bb-0310-9956-ffa450edef68
2010-07-26 21:47:32 +00:00
Gilles Sadowski
e0723d16df
Corrected typos in some Javadoc comments.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@979458 13f79535-47bb-0310-9956-ffa450edef68
2010-07-26 21:45:26 +00:00
Luc Maisonobe
1bc1ca5843
fixed an import generating a compilation error
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@979401 13f79535-47bb-0310-9956-ffa450edef68
2010-07-26 18:25:19 +00:00