Commit Graph

1692 Commits

Author SHA1 Message Date
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
Luc Maisonobe dc4f70a777 added methods to operate directly on double arrays
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701883 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 20:37:15 +00:00
Luc Maisonobe ca2d12971f removed unneeded multiplications by zero by separating
the first iteration from the following ones in a loop
(once again ...)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701857 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 19:16:18 +00:00
Luc Maisonobe 3a751b5acf removed unneeded multiplications by zero by separating
the first iteration from the following ones in a loop

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701852 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 19:12:05 +00:00
Luc Maisonobe f0aeb29d16 replaced an intermediate variable by its opposite for easier to read expression
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701846 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 18:53:18 +00:00
Luc Maisonobe fcb63bbdac added a test ensuring the part of the symmetric matrix below the diagonal is never used
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701810 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 15:37:02 +00:00
Luc Maisonobe 50f694b7a0 improved javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701809 13f79535-47bb-0310-9956-ffa450edef68
2008-10-05 15:36:20 +00:00
Luc Maisonobe 4f7ede1974 fixed typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@701642 13f79535-47bb-0310-9956-ffa450edef68
2008-10-04 13:43:57 +00:00
Luc Maisonobe 7d5ea6a074 added interfaces for eigen decomposition and for singular value decomposition
the implementation for this interfaces is not ready yet, but it seems
important to show what the interface will look like.
JIRA: MATH-220

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@700492 13f79535-47bb-0310-9956-ffa450edef68
2008-09-30 15:09:17 +00:00
Luc Maisonobe 94f1e9e013 improved javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@700491 13f79535-47bb-0310-9956-ffa450edef68
2008-09-30 15:05:10 +00:00
Luc Maisonobe e95b705442 updated userguide after deprecation of internal LU decomposition in linear algebra
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@700367 13f79535-47bb-0310-9956-ffa450edef68
2008-09-30 07:15:05 +00:00
Luc Maisonobe bfea325efd added a transformer from symmetric matrix to tri-diagonal matrix
(this is only for internal purposes only yet, it will be used later)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@700272 13f79535-47bb-0310-9956-ffa450edef68
2008-09-29 21:47:41 +00:00
Luc Maisonobe 58e8113ee0 fixed indentation (sorry)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699857 13f79535-47bb-0310-9956-ffa450edef68
2008-09-28 16:31:33 +00:00
Luc Maisonobe a83b792eb0 fixed an matrix mismatch error
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699855 13f79535-47bb-0310-9956-ffa450edef68
2008-09-28 16:28:50 +00:00
Luc Maisonobe 8260edaaf6 added a getQT() method to QRDecomposition interface
compute Q by transposing QT rather than the other way round for efficiency
JIRA: MATH-223

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699850 13f79535-47bb-0310-9956-ffa450edef68
2008-09-28 16:17:41 +00:00
Luc Maisonobe 19a6674a57 slight optimization:
cached pointers to row vectors from double arrays
wherever the same row was used in a loop, to avoid
double index computation/range check

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699846 13f79535-47bb-0310-9956-ffa450edef68
2008-09-28 15:59:14 +00:00
Luc Maisonobe 670ebf6f93 Replaced internal LU-decomposition by the external class.
Deprecated the direct call to these methods as users should
really be able to choose the type of solver they want.
LU-decomposition is only one possibility among others like
QR-decomposition.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699845 13f79535-47bb-0310-9956-ffa450edef68
2008-09-28 15:55:15 +00:00
Luc Maisonobe d3f7151590 pulled some solve-related methods higher in the classes hierarchy
(isNonSinglular(), getInverse())

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699844 13f79535-47bb-0310-9956-ffa450edef68
2008-09-28 15:51:47 +00:00
Phil Steitz 44e04f2a0a Fixed error in javadoc added in r699704
JIRA: MATH-207




git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699762 13f79535-47bb-0310-9956-ffa450edef68
2008-09-28 02:07:19 +00:00
Phil Steitz 6460cd272a Eliminated the "mutation requirement" in nextGeneration method.
Added algorithm description in javadoc.
JIRA: MATH-207
Reported and patched by David Stefka




git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699704 13f79535-47bb-0310-9956-ffa450edef68
2008-09-27 18:05:19 +00:00
Luc Maisonobe dbd8ffb54f propagated trunk changes from r699157 into branch 2.0
MATH-227.  fixed F distribution inverse CDF computation for small denominator degrees of freedom.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@699468 13f79535-47bb-0310-9956-ffa450edef68
2008-09-26 19:51:13 +00:00