Commit Graph

1260 Commits

Author SHA1 Message Date
Luc Maisonobe 6a965532e6 fixed an error introduced by a recent change in PolynomialsFunction
(the coefficients array is automatically reduced if high degree coefficients are null)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@739836 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 21:06:55 +00:00
Luc Maisonobe adc64fb8cf Added add, subtract, negate, multiply and toString methods to PolynomialFunction
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@739834 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 20:56:12 +00:00
William Barker e8bb7ce937 Adding constructors that allow specifing epsilon.
Remove the isZero(int) method, since it is inconsistant with the isZero(double) method, and this class is tightly bound to it's backing store.
Some javadoc fixes.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@739667 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 00:28:07 +00:00
Sebastian Bazley d957f434e4 Javadoc typos
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@739571 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 15:53:42 +00:00
William Barker a3b466009f Initial checkin for the SparseRealVectorClass.
I know that it doesn't work 100% with the map*** methods that shouldn't be used with a sparse vector.  I'll clean those up shortly (including uncommenting unit tests).  Just want to get more eyes on this for the methods that matter.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@739504 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 04:51:17 +00:00
William Barker 5a589042b9 Correct bug that prevents replacing an element while using an iterator
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@738370 13f79535-47bb-0310-9956-ffa450edef68
2009-01-28 05:20:31 +00:00
Phil Steitz bf9c5b292e Changed FractionFormat to extend NumberFormat. JIRA: MATH-189
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737572 13f79535-47bb-0310-9956-ffa450edef68
2009-01-25 19:28:21 +00:00
Phil Steitz 3ffa187429 Eliminated advertised exceptions that are no longer thrown.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737415 13f79535-47bb-0310-9956-ffa450edef68
2009-01-24 18:38:33 +00:00
Luc Maisonobe a11930a607 various javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737161 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 19:34:32 +00:00
Luc Maisonobe ead1ffe007 fixed missing word
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737152 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 19:08:11 +00:00
Luc Maisonobe 90e47e8a4a fixed missing javadoc parameter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737151 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 19:05:56 +00:00
Luc Maisonobe 9fea76e338 fixed special xml characters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737148 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 19:03:41 +00:00
Phil Steitz 7d54daea2a Changed NaN comparison tests to use TestUtils.assertSame.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@737011 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 11:30:27 +00:00
Phil Steitz c5d148896f Forced symmetry in binomialCoefficientLog and added test cases for MathUtils.
JIRA: MATH-242
Reported and patched by Christian Semrau

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@736288 13f79535-47bb-0310-9956-ffa450edef68
2009-01-21 11:30:36 +00:00
Phil Steitz 944446a1a8 Fixed error in binomial coefficient computation
JIRA: MATH-241
Reported and patched by Christian Semrau

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735879 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19 23:52:02 +00:00
Luc Maisonobe e8cfb4889e added a Legendre-Gauss integrator
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735876 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19 23:40:14 +00:00
Phil Steitz 260b3a1410 No code change. Fixed spelling errors in comments.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735830 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19 21:25:45 +00:00
Phil Steitz e4886c0a39 Fixed error in factorial accuracy. JIRA: MATH-240.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735781 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19 19:43:01 +00:00
Luc Maisonobe 89db6968bc removed commented out code
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735546 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 21:09:42 +00:00
Luc Maisonobe 56e7606e9a improved consistency between solvers/integrators
by providing the integrand function as a parameter to integrate
rather that at construction, thus allowing reuse of a configured integrator
Jira: MATH-218

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735545 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 21:06:15 +00:00
Luc Maisonobe 217fe6de71 added absolute accuracy handling for integrators
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735536 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 20:45:16 +00:00
Luc Maisonobe e2048a1dd3 trying to recover history for solvers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735530 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 19:48:52 +00:00
Luc Maisonobe 2e405f1724 fixed various minor bugs identified by checkstyle and findbugs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735501 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 16:57:29 +00:00
Luc Maisonobe e6e70980dd added missing header
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735488 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 16:13:12 +00:00
Luc Maisonobe e60e3de474 Added a new minimization package with an implementation of the Brent algorithm
contributed by Gilles Sadowski.
The implementation needs some testing as it seems to never use the parabola fitting
and only relying on golden section. This may be due to the refactoring I did on
the original patch.
Jira: MATH-177

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735475 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 15:39:35 +00:00
Luc Maisonobe e7c3207b05 extracted a superinterface ConvergingAlgorithm from UnivariateRealSolver
for later reuse by upcoming minimization algorithms

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735468 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 14:47:51 +00:00
Luc Maisonobe eab127dce3 split the analysis package into several sub-packages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735452 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 13:17:58 +00:00
Luc Maisonobe 1e3c634cb9 split the analysis package into several sub-packages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735449 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 13:07:22 +00:00
Phil Steitz d326b9e467 javadoc formatting only.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735312 13f79535-47bb-0310-9956-ffa450edef68
2009-01-17 17:08:10 +00:00
Luc Maisonobe dabf3a5beb fixed overflow error in gdc computation
JIRA: MATH-238

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@735178 13f79535-47bb-0310-9956-ffa450edef68
2009-01-16 23:06:32 +00:00
Phil Steitz 4564adbf19 Changed return type of nthRoot to List
Renamed getPhi to getArgument
Changed and documented behavior of nthRoot wrt NaN, infinite components
Improved nth root computation
Added some test cases

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731822 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 03:46:29 +00:00
Phil Steitz e7ffb6ebc9 Changed covariance matrix computation to use QR decomp.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731398 13f79535-47bb-0310-9956-ffa450edef68
2009-01-05 01:01:16 +00:00
Phil Steitz e7911e6efa Added standard errors.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731356 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 20:39:45 +00:00
Luc Maisonobe f2b72fc248 added missing (inherited) javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731340 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 19:13:22 +00:00
Luc Maisonobe 453ba37f7a removed unused exception clause
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731339 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 19:12:52 +00:00
Luc Maisonobe 27561f331c added missing header
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731338 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 19:10:49 +00:00
Luc Maisonobe 6aa3cd95c3 removed all external decomposition solvers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731335 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 19:02:14 +00:00
Phil Steitz 5e6d73f239 Javadoc only. Cleanup formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731320 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 18:38:29 +00:00
Luc Maisonobe 2cd4edae04 simplified tests
added new tests

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731308 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 18:08:50 +00:00
Luc Maisonobe d27f56a6d4 fixed a dimension error with under-determined problems
removed IllegalStateException
create a DenseRealMatrix when solving A.X = B

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731307 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 18:08:18 +00:00
Luc Maisonobe 728e7b227d fixed a block width computation error
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731285 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 16:14:34 +00:00
Luc Maisonobe effa1be80d fixed wrong matrix type in test ...
sorry

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731245 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 12:40:04 +00:00
Luc Maisonobe 38d8f7434f new tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731243 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 12:36:37 +00:00
Luc Maisonobe 0a57f0e60d added a missing error message
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731233 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 12:10:20 +00:00
Luc Maisonobe 937d4feabc avoid ugly call to getDataRef that relies on vector internal implementation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731232 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 12:09:53 +00:00
Luc Maisonobe 1336db1d5c added copySubmatrix methods
use matrix visitors to implement some existing methods more efficiently

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731231 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 12:07:43 +00:00
Luc Maisonobe 49cea9feed added default implementations of the matrix visitors interfaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731230 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 12:06:44 +00:00
Phil Steitz 4572684320 Added hat matrix computation.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731166 13f79535-47bb-0310-9956-ffa450edef68
2009-01-04 04:11:25 +00:00
Phil Steitz bede64cd3f Changed to use updated decomp API.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@731087 13f79535-47bb-0310-9956-ffa450edef68
2009-01-03 20:50:35 +00:00
Luc Maisonobe dc68d63d33 added a static method createBlocksLayout to prepare array before constructing the matrix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@730838 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 20:21:09 +00:00
Luc Maisonobe da54a21c78 added a way to build dense matrices from data already in block layout
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@730837 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 20:13:10 +00:00
Luc Maisonobe d4e1481478 added a configurable value for missing entries in OpenIntToDoubleHashMap
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@730801 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 17:53:44 +00:00
Luc Maisonobe 89c80e938e added column walking order
renamed walkInInternalOrder into walkInOptimizedOrder

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@730787 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 17:07:42 +00:00
Luc Maisonobe 75f8b0afb1 fixed typos
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729853 13f79535-47bb-0310-9956-ffa450edef68
2008-12-29 10:07:49 +00:00
Luc Maisonobe 7e2fad01b3 fixed a forgotten scaling factor in inverse Hadamard transform
added integer Hadamard transform
note that the integer transform inverse is not always an integer transform

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729849 13f79535-47bb-0310-9956-ffa450edef68
2008-12-29 09:56:18 +00:00
Luc Maisonobe ed35ae3dee replaced TeX formulas by HTML formulas
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729770 13f79535-47bb-0310-9956-ffa450edef68
2008-12-28 20:21:27 +00:00
Luc Maisonobe dff725b2e8 Added a RealTransformer interface on top of cosine, sine and Hadamard transforms.
The Fourier transform cannot implement this interface since it produces complex results.
Improved error messages.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729758 13f79535-47bb-0310-9956-ffa450edef68
2008-12-28 18:09:28 +00:00
Luc Maisonobe f8cc8e9d37 Added method to walk matrix entries with or without changing them in the
visitor design pattern sense. Two different orders can be used, row by row
of following internal storage. Internal order should be preferred when no
specific order is needed, because it will be more cache efficient.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729673 13f79535-47bb-0310-9956-ffa450edef68
2008-12-27 20:55:12 +00:00
Luc Maisonobe 6e5a114c7a added Fast Hadamard Transform
JIRA: MATH-215

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729670 13f79535-47bb-0310-9956-ffa450edef68
2008-12-27 20:24:05 +00:00
Luc Maisonobe c4126f3174 added nth root computation for complex numbers
JIRA: MATH-236

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729639 13f79535-47bb-0310-9956-ffa450edef68
2008-12-27 16:23:43 +00:00
Luc Maisonobe 9eccfc3c46 fixed javadoc comment
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729431 13f79535-47bb-0310-9956-ffa450edef68
2008-12-25 18:06:19 +00:00
Luc Maisonobe a1a7822552 removed unused method
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729302 13f79535-47bb-0310-9956-ffa450edef68
2008-12-24 11:56:22 +00:00
Luc Maisonobe 1c90b51196 replaced use of deprecated method
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729301 13f79535-47bb-0310-9956-ffa450edef68
2008-12-24 11:55:42 +00:00
Luc Maisonobe 17a35b2e8c fixed various errors and warnings detected by checkstyle and findbugs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729291 13f79535-47bb-0310-9956-ffa450edef68
2008-12-24 10:47:53 +00:00
Luc Maisonobe 0e1654b627 added new cache-friendly specializations of get/set/operate/premultiply methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729174 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 23:30:33 +00:00
Luc Maisonobe ef8ee92f48 added a specialized implementation of premultiply
removed unneeded signatures with RelVectorImpl already handled efficiently by base class

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729173 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 23:27:52 +00:00
Luc Maisonobe 13583c53fa use direct array access where possible
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729172 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 23:25:31 +00:00
Luc Maisonobe a20be3af18 fixed javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@729171 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 23:23:31 +00:00
Luc Maisonobe febffccc41 added message for asymmetric matrices
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728918 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 10:17:53 +00:00
Luc Maisonobe 6c48638cc5 removed evenPermutation and isSingular for consistency with other decomposition solvers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728917 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 10:17:11 +00:00
Luc Maisonobe 2cb4fc8a84 javadoc improvements
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728916 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 10:14:49 +00:00
Luc Maisonobe 25a6b32fe1 prepared interface for general eigendecomposition
we currently support only symmetric matrices and real eigenvalues
Jira issue MATH-235 asks for asymmetric matrices support, which needs
an API adaptation.
Preparing the interface yet avoids introducing incompatibility later.
The current status is explained in javadoc and matrix symmetry is checked
at runtime with an InvalidMatrixException triggered if asymmetry is detected.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728915 13f79535-47bb-0310-9956-ffa450edef68
2008-12-23 10:13:58 +00:00
Luc Maisonobe 6916b0314d comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728717 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 15:51:45 +00:00
Luc Maisonobe 0815079329 implemented solver as an internal class for efficiency
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728716 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 15:50:57 +00:00
Luc Maisonobe bdf20e5cf9 implemented solver as an internal class to avoid building decomposed matrices
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728686 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 13:30:10 +00:00
Luc Maisonobe b717e8d1c0 replaced references to RealMatrixImpl
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728685 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 13:28:29 +00:00
Luc Maisonobe 46664c3e99 removed a leftover print statement
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728643 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 10:57:34 +00:00
Luc Maisonobe 4bd8d8bc13 fixed loop unrolling error
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728639 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 10:34:12 +00:00
Luc Maisonobe 008807938f added getSolver() into LUDecomposition
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728528 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 22:05:06 +00:00
Luc Maisonobe 1f3d5634d5 removed spurious exception clause
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728526 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 21:54:26 +00:00
Luc Maisonobe d1fc13cef3 fixed some javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728523 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 21:53:33 +00:00
Luc Maisonobe 6387a1f0a3 reverted some changes introduced yesterday, as they lead to unexpected test failures
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728507 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 21:23:18 +00:00
Luc Maisonobe c060390793 reverted some changes introduced yesterday, as they lead to unexpected test failures
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728500 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 21:04:47 +00:00
Luc Maisonobe 7716a7ac0d decomposed fields can be set to final (this may help optimizer)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728483 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 19:48:17 +00:00
Luc Maisonobe bf70bae29b recover performances lost with changes for r723496
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728481 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 19:35:59 +00:00
Luc Maisonobe ed721c48a3 partially unrolled some computation loops to increase performance
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728478 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 19:02:44 +00:00
Luc Maisonobe 136ffc1054 removed direct references to RealMatrixImpl and use factory
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728186 13f79535-47bb-0310-9956-ffa450edef68
2008-12-20 00:03:13 +00:00
Luc Maisonobe 735e84a26a added a new DenseRealMatrix class intended to replace RealMatrixImpl
this class is more cache-friendly as it stores data from squares blocks
in flattened arrays. This allows algorithms that need cross-direction
navigation like multiplication or transpose) to be more efficient on
modern processors.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728185 13f79535-47bb-0310-9956-ffa450edef68
2008-12-19 23:59:38 +00:00
Luc Maisonobe 4826123478 added the addToentry and multiplyEntry methods
to allow in-place operation for matrices

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@728184 13f79535-47bb-0310-9956-ffa450edef68
2008-12-19 23:53:11 +00:00
Luc Maisonobe da40b8373a removed overhead of Entry object allocation during OpenIntToDoubleHashMap iteration
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@726490 13f79535-47bb-0310-9956-ffa450edef68
2008-12-14 16:31:58 +00:00
Luc Maisonobe 11d8f0ec5f Added support for sparse real matrices
JIRA: MATH-230

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@726460 13f79535-47bb-0310-9956-ffa450edef68
2008-12-14 15:04:22 +00:00
Luc Maisonobe 578a219a0f Added an int/double hash map (OpenIntToDoubleHashMap) with much smaller
memory overhead than standard java.util.Map (open addressing and no boxing)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@726459 13f79535-47bb-0310-9956-ffa450edef68
2008-12-14 14:56:50 +00:00
Luc Maisonobe 139a0e2c53 removed obsolete comment
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724343 13f79535-47bb-0310-9956-ffa450edef68
2008-12-08 13:40:42 +00:00
Luc Maisonobe 3ac5b7b902 removed characters needing a specific encoding
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724205 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 21:16:38 +00:00
Luc Maisonobe 1021f180e5 Added support for multi-dimensional Fourier transform.
JIRA: MATH-152

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724198 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 20:48:00 +00:00
Luc Maisonobe 71a29150bb The root solvers now take the function to solve as a parameter to
the solve methods, thus allowing to reuse the same solver for different
functions.

JIRA:MATH-218

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724191 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 20:24:10 +00:00
Luc Maisonobe 50fea38398 updated error generation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724189 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 20:19:01 +00:00
Luc Maisonobe 2476371408 fixed missing error checks
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724187 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 20:17:45 +00:00
Luc Maisonobe b5f540eda2 added setter methods for rows and columns in matrices
JIRA: MATH-234

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724158 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 16:53:05 +00:00
Luc Maisonobe 227b7b2a00 added Frobenius matrix norm
JIRA: MATH-232

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724144 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 15:36:32 +00:00
Luc Maisonobe 2dc7b2d460 added an abstract implementation of RealMatrix and used it for RealMatrixImpl
JIRA: MATH-231

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724141 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 15:21:03 +00:00
Luc Maisonobe eec0bdccd6 renamed getValues() into getInternalValues() in ResizeableDoubleArray
(the old name is still there, but deprecated)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724136 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 14:39:30 +00:00
Luc Maisonobe 43b958fd8f removed unneeded call to super()
removed spurious data copy (a copy was already done in the ResizableDoubleArray)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724020 13f79535-47bb-0310-9956-ffa450edef68
2008-12-06 18:01:43 +00:00
Luc Maisonobe 9fc12bd85c added support for Zipf distribution
JIRA: MATH-178

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@724014 13f79535-47bb-0310-9956-ffa450edef68
2008-12-06 17:11:07 +00:00
Luc Maisonobe 607005c43d removed reference to non-existent version 1.3 in changes report
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723737 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 14:27:36 +00:00
Luc Maisonobe 483f55064e improved matrix decomposition API.
solving a linear system AX = B is now done by a call like:
  RealVector x = new XyzSolver(new XyzDecomposition(a)).solve(b);

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723736 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 14:05:50 +00:00
Luc Maisonobe cc080433e4 make sure the abstract copy() method signature used is the restricted one
inherited from the StorelessUnivariateStatistic interface and not the
general one inherited from AbstractUnivariateStatistic.
The eclipse compiler generates an error without this.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723694 13f79535-47bb-0310-9956-ffa450edef68
2008-12-05 09:49:25 +00:00
Luc Maisonobe 7ce0b0ed8a moved the various solve function out of decomposition algorithms
and into a dedicated DecompositionSolver class

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723500 13f79535-47bb-0310-9956-ffa450edef68
2008-12-04 23:56:17 +00:00
Luc Maisonobe 2c36a666c7 moved the various solve function out of decomposition algorithms
and into a dedicated DecompositionSolver class

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723496 13f79535-47bb-0310-9956-ffa450edef68
2008-12-04 23:48:18 +00:00
Luc Maisonobe fc3b778033 removed unused Gershgorin circles class
Gershgorin circles are now handles (simply) inside the EigenDecomposition class

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723363 13f79535-47bb-0310-9956-ffa450edef68
2008-12-04 15:53:51 +00:00
Luc Maisonobe 2655bad9b9 added (at least!) a first implementation of singular value decomposition.
JIRA: MATH-157, MATH-220, MATH-233

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723361 13f79535-47bb-0310-9956-ffa450edef68
2008-12-04 15:46:44 +00:00
Luc Maisonobe f1fa39e47a improved error messages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@723359 13f79535-47bb-0310-9956-ffa450edef68
2008-12-04 15:41:57 +00:00
Luc Maisonobe 6d37e391c7 renamed AbstractMultipleLinearRegressionTest into MultipleLinearRegressionAbstractTest
to match the pom.xml exclude rules and prevent an error in automatic builds

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@722612 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 20:32:52 +00:00
Luc Maisonobe 863fee8737 added a missing deprecated annotation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@722605 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 20:22:06 +00:00
Luc Maisonobe bcebd1a54f don't compute the expensive Q matrix until really needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@722476 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 14:41:47 +00:00
Luc Maisonobe 25756255de allow eigen decomposition of a matrix already in symmetric tridiagonal form
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@722473 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 14:39:00 +00:00
Luc Maisonobe 4cc732e81f improved test coverage
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@722471 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 14:35:00 +00:00
Luc Maisonobe 26772782b5 removed commented out code
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@722469 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 14:32:59 +00:00
Phil Steitz d9df34360f Moved math 2.0 branch to trunk.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@722335 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 02:21:22 +00:00
Phil Steitz 543a3ca57e Added rigging for checking eigenvalues and eigenvectors and some easy test cases.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@721943 13f79535-47bb-0310-9956-ffa450edef68
2008-12-01 01:34:56 +00:00
Luc Maisonobe 2924cfdf77 fixed wrong loop bounds
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@721399 13f79535-47bb-0310-9956-ffa450edef68
2008-11-28 09:25:38 +00:00
Luc Maisonobe 9d442ceec8 completed implementation of EigenDecompositionImpl.
The implementation is now based on the very fast and accurate dqd/dqds algorithm.
It is faster than Jama for all dimensions and speed gain increases with dimensions.
The gain is about 30% below dimension 100, about 50% around dimension 250 and about
65% for dimensions around 700.
It is also possible to compute only eigenvalues (and hence saving computation of
eigenvectors, thus even increasing the speed gain).
JIRA: MATH-220

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@721203 13f79535-47bb-0310-9956-ffa450edef68
2008-11-27 15:50:42 +00:00
Phil Steitz 97a3fa7255 Added support for copying statistics
Changes to stats classes:
- copy constructor
- static copy(-,-)
- instance copy()
Added copy() to UnivariateStatistic and StorelessUnivariateStatistic
interfaces.

JIRA: MATH-212
Reported and patched by Jason C. HandUber 

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@720030 13f79535-47bb-0310-9956-ffa450edef68
2008-11-23 18:47:50 +00:00
Phil Steitz 54a42c0024 Added test case to ensure permuting arrays changes hash.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@719995 13f79535-47bb-0310-9956-ffa450edef68
2008-11-23 15:35:11 +00:00
Phil Steitz 9b8d0da71a Added test case to ensure nextPermutation fails for negative arguments.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@719993 13f79535-47bb-0310-9956-ffa450edef68
2008-11-23 14:57:44 +00:00
Phil Steitz 0a19478d2d Clarified javadoc for nextPermutation (to match interface).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@719991 13f79535-47bb-0310-9956-ffa450edef68
2008-11-23 14:27:09 +00:00
Phil Steitz 05c6b8ad5a Replace hashcode functions with JDK 1.5+ provided impls. Deprecate?
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@719909 13f79535-47bb-0310-9956-ffa450edef68
2008-11-22 20:25:27 +00:00
Phil Steitz 444d2311ea Javadoc only.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@719907 13f79535-47bb-0310-9956-ffa450edef68
2008-11-22 20:16:26 +00:00
Phil Steitz dd1a6bf954 Added the following methods to ResizableDoubleArray to support MATH-212
changes to stats classes:
copy constructor
static copy(-,-)
instance copy()
equals and hashcode

JIRA: MATH-212


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@719894 13f79535-47bb-0310-9956-ffa450edef68
2008-11-22 18:41:40 +00:00
Luc Maisonobe 2ef1c3b7d0 applied Cyril Briquet's patch adding an observations removal feature to descriptive statistics
JIRA: MATH-229

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@713093 13f79535-47bb-0310-9956-ffa450edef68
2008-11-11 17:50:05 +00:00
Luc Maisonobe 4ae0245ff6 fixed typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@713088 13f79535-47bb-0310-9956-ffa450edef68
2008-11-11 17:24:21 +00:00
Luc Maisonobe 6b07dd2122 improved error messages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@712430 13f79535-47bb-0310-9956-ffa450edef68
2008-11-08 20:42:55 +00:00
Luc Maisonobe d00137cca7 allow chained IOExceptions even before Java 6
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@712187 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 16:31:58 +00:00
Luc Maisonobe 448759e46e fixed a forgotten possible NPE
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@712178 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 16:05:50 +00:00
Luc Maisonobe 0c7099ab35 improved error messages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@712144 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 14:55:23 +00:00
Luc Maisonobe b1592908df leverage null pointer handling,
exception classes can be built using null arguments arrays which
are automatically converted to zero-sized arrays to prevent null pointer exceptions

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@712142 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 14:48:13 +00:00
Luc Maisonobe 234e529e70 added factory methods to simplify creation of runtime exceptions with helpful messages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@712140 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 14:42:26 +00:00
Luc Maisonobe 4a2d68685b removed forgotten pre-JDK 1.4 stuff
added protection against null pointer exceptions

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@712136 13f79535-47bb-0310-9956-ffa450edef68
2008-11-07 14:35:16 +00:00
Luc Maisonobe 91ec7946e9 added IEEE-754 related useful constants
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@710172 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 21:37:51 +00:00
Luc Maisonobe ea15217793 replaced RuntimeException by MathRuntimeException
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@710171 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 21:36:31 +00:00
Luc Maisonobe 9e8e88d916 improved error handling in linear package with finer grained exceptions
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@710168 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 21:32:26 +00:00
Luc Maisonobe 13ea282ab8 simplified a javadoc sentence
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@710167 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 21:30:07 +00:00
Luc Maisonobe 89b21145fb remove pre Java 1.4 emulation stuff as we now need at least Java 5
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@710166 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 21:28:35 +00:00
Luc Maisonobe e143e9097d Added a scalb method in MathUtils.
This method is similar to the method with same name added in java.lang.Math as of Java 6.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@708001 13f79535-47bb-0310-9956-ffa450edef68
2008-10-26 14:55:45 +00:00
Luc Maisonobe 223168ee50 fixed checkstyle warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@705239 13f79535-47bb-0310-9956-ffa450edef68
2008-10-16 13:32:32 +00:00
Luc Maisonobe 0e77ce68b3 added missing serialVersionUID
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@705231 13f79535-47bb-0310-9956-ffa450edef68
2008-10-16 12:49:13 +00:00
Luc Maisonobe 098eaa3a78 replaced calls to deprecated methods from linear algebra package
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@705211 13f79535-47bb-0310-9956-ffa450edef68
2008-10-16 11:34:38 +00:00
Luc Maisonobe c376e656d7 removed unneeded import statements
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@705210 13f79535-47bb-0310-9956-ffa450edef68
2008-10-16 11:33:21 +00:00
Phil Steitz ab5b3d3944 Fixed error in javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@703818 13f79535-47bb-0310-9956-ffa450edef68
2008-10-12 13:50:35 +00:00
Luc Maisonobe 924041770d added a first version of eigen decomposition implementation
this version is not finished yet, but it does work when
eigenvalues are well separated and is faster than JAMA for
dimensions above 100.
It still needs work as the MRRR algorithm is not implemented
yet (only the basic parts with twisted factorization is there).
I continue working on this, but wanted to have a first version
committed to let people play with it and as a basis for comparison.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701897 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 22:38:13 +00:00