Luc Maisonobe
6f74aee73d
fixed a forgotten replacement of divide method
...
JIRA: MATH-307
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@894109 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 21:06:21 +00:00
Luc Maisonobe
97a9dcf29e
adding rounding mode and scale as per 1.2
...
JIRA: MATH-307
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@894107 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 20:03:08 +00:00
Luc Maisonobe
d3b9c7f965
removed support for non-zero default values in OpenMapRealVector
...
JIRA: MATH-312
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@894093 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 18:48:16 +00:00
Luc Maisonobe
a5e03a2389
added tests showing that issues MATH-303 and MATH-304 are both invalid.
...
Jira: MATH-303, MATH-304
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@894083 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 17:33:37 +00:00
Luc Maisonobe
95f2dd6f5f
Fixed a convergence discrepancy with respect to theory in Gragg-Bulirsch-Stoer integrator.
...
JIRA: MATH-324
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@893281 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 19:30:10 +00:00
Luc Maisonobe
204990415d
Fixed a wrong dimension check in SVD solver
...
thanks to Dimitri for identifying and solving this
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@891436 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 21:44:13 +00:00
William Barker
01e5f22cc5
Add an optimized dotProduct to OpenMapRealVector.
...
Slightly modified from contribution by Jake Mannix.
JIRA: MATH-317
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@890159 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 02:53:40 +00:00
William Barker
b26de3b0aa
Removing the mapTo* metheds from OpenMapRealVector, and use the base class methods instead
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@890023 13f79535-47bb-0310-9956-ffa450edef68
2009-12-13 04:27:34 +00:00
Luc Maisonobe
6a5848130f
added composition features for real functions
...
JIRA: MATH-313
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@890002 13f79535-47bb-0310-9956-ffa450edef68
2009-12-12 23:15:32 +00:00
Luc Maisonobe
06c388acc9
fixed checkstyle errors
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@889999 13f79535-47bb-0310-9956-ffa450edef68
2009-12-12 23:11:01 +00:00
William Barker
1778991834
Initial fixes to the iterators.
...
This fixes the default sparseIterator problem where a RealVector only contains zero elements, and add a sparseIterator to the OpenMapRealVector.
Still TODO:
1) add unit tests
2) remove *mapTo and *mapToSelf from OpenMapRealVector
3) fix javadocs
4) remove support for non-zero default values in OpenMapRealVector
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@889516 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 06:38:20 +00:00
Luc Maisonobe
9e9048ccb5
Added mapping and iteration methods to vectors.
...
Provided a default implementation for the numerous simple methods in the RealVectorInterface.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@889008 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 22:56:11 +00:00
Luc Maisonobe
7fb69bcf38
added UnivariateRealFunction type implementations of the java.lang.Math methods
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@889007 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 22:49:24 +00:00
Luc Maisonobe
c0f87c7000
removed trailing whitespace
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@889006 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 22:46:36 +00:00
Sebastian Bazley
a97a14915d
Unnecessary casts
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@888685 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 02:37:00 +00:00
Sebastian Bazley
b910285857
Unnecessary ;
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@888684 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 02:36:28 +00:00
Sebastian Bazley
0f98e5c13d
Tab police
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@888683 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 02:34:11 +00:00
Sebastian Bazley
e91eaa0c98
Unnecessary casts; tab police
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@888680 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 02:30:02 +00:00
Luc Maisonobe
f7c0b403d2
Fixed an error in handling of very close events during ODE integration
...
JIRA: MATH-322
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@887794 13f79535-47bb-0310-9956-ffa450edef68
2009-12-06 23:04:55 +00:00
Luc Maisonobe
335572b99e
Prevent NaN to occur for singular matrices
...
Numerical inaccuracies in the underlying eigendecomposition could induce
very small negative eigenvalues, so the square root produced NaNs. The
eigenvalues really cannot be negative, so it is safe to replace the negative
ones by 0.
There are remaining problems with singular matrices:
- the singular vectors also contain NaNs
- the solver does not really work in least square sense and
complain about singular matrices
JIRA: MATH-320
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885279 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:53:36 +00:00
Luc Maisonobe
93dbc5a0c3
replaced duplicated strings by a single static string in many classes
...
this will later allow enabling the MultipleStringLiterals rule in checkstyle
(there are many other duplicated strings, so this cannot be enabled yet, I'll
do another pass on it later on)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885278 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:47:51 +00:00
Luc Maisonobe
9a324dc546
fixed some NaN appearing in eigenvectors when null pivots occurred in dstqds or dqds algorithms
...
this is a partial fix for MATH-297 but not a complete one as for example computing the
eigendecomposition if identity leads to three times the same vector ...
JIRA: MATH-297
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885268 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:21:50 +00:00
Luc Maisonobe
abb1b3fdd6
removed an unneeded constant
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885049 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 23:27:16 +00:00
Luc Maisonobe
79383e3ad3
added a test with a singular matrix
...
updated class to Junit4
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885048 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 23:24:12 +00:00
Phil Steitz
ef9b639afc
Fixed an overflow error in MathUtils.distance that was causing KMeansPlusPlusClusterer to fail with a NullPointerException when
...
component distances between points exceeded Integer.MAXVALUE.
JIRA: MATH-305
Reported by Erik van Ingen
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885027 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 21:45:38 +00:00
Phil Steitz
9e6576e7cd
Added toString.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885013 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 21:05:04 +00:00
Phil Steitz
cab28ac044
Fixed test case for number of generations evolved.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@885009 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 21:03:34 +00:00
Phil Steitz
80f4084139
Added generationsEvolved property to GeneticAlgorithm to track the number
...
of generations evolved by the evolve() method before reaching the StoppingCondition.
JIRA: MATH-315
Reported and patched by Mikkel Meyer Andersen
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@883132 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 19:50:54 +00:00
Phil Steitz
bf451895d5
Added test includes to cover tests with nonstandard names in genetics package.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@883127 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 19:27:10 +00:00
Luc Maisonobe
713a4fdd73
fixed yet another eigen decomposition bug identified, debugged and fixed by Dimitri!
...
Many thanks to him.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@833740 13f79535-47bb-0310-9956-ffa450edef68
2009-11-07 19:57:02 +00:00
Luc Maisonobe
83f18d5299
Fixed an index computation error in eigen decomposition.
...
Once again, kudos to Dimitri for debugging this.
JIRA: MATH-318
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@833433 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 15:11:57 +00:00
Luc Maisonobe
c78a0e3b00
fixed an ArrayIndexOutOfBoundsException
...
Kudos to Dimitri who debugged this mess of fortran/java array indices translation
JIRA: MATH-308
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@832577 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 22:04:08 +00:00
Phil Steitz
0596e3145c
Fixed parameter test in RandomDataImpl#nextExponential. JIRA: MATH-309.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@831510 13f79535-47bb-0310-9956-ffa450edef68
2009-10-31 02:30:18 +00:00
Luc Maisonobe
90f6eba156
fixed findbugs false positive
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@830772 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 21:54:13 +00:00
Luc Maisonobe
2741a781e9
fixed checkstyle errors
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@830771 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 21:53:35 +00:00
Luc Maisonobe
bf9f4cf20e
changed TWO_PI visibility to public
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@830770 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 21:52:39 +00:00
Brent Worden
19f633c6ae
MATH-311. Changed probability calculations for Binomial, Poisson, and Hypergeometric distributions to use Catherine Loader's saddle point approximations
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@830745 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28 19:59:21 +00:00
Phil Steitz
c09247c09b
Removed dead code, improved test coverage. Dead code pointed out in JIRA: MATH-306. Thanks to Joerg Huber.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@830044 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 01:32:19 +00:00
Niall Pemberton
cdfddcc20a
Update to commons-parent-12
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@827830 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20 23:00:29 +00:00
Phil Steitz
c30aac9ad6
Javadoc only. Dropped 'now defunct' from JAMA attribution.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@826627 13f79535-47bb-0310-9956-ffa450edef68
2009-10-19 10:27:47 +00:00
William Barker
adbe097b2b
documenting change
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@826560 13f79535-47bb-0310-9956-ffa450edef68
2009-10-19 00:03:46 +00:00
William Barker
becc8d9704
Fix for possible zero divide on an indefinite matrix
...
Fix for: MATH-297
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@826550 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 23:29:37 +00:00
Luc Maisonobe
ddc5554353
fixed typo
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@826232 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 11:25:14 +00:00
Luc Maisonobe
a667bf2834
replaced custom linear solve computation by use of the linear package features
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@825925 13f79535-47bb-0310-9956-ffa450edef68
2009-10-16 15:11:47 +00:00
Luc Maisonobe
0cb01403a1
tighten checkstyle rules: declaring multiple variables in one statement is now forbidden
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@825919 13f79535-47bb-0310-9956-ffa450edef68
2009-10-16 14:51:55 +00:00
Luc Maisonobe
88885e7a1c
fixed a checkstyle warning
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@825917 13f79535-47bb-0310-9956-ffa450edef68
2009-10-16 14:47:27 +00:00
Luc Maisonobe
925305f0fa
removed a Math.min computation that could be avoided
...
improved javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@825784 13f79535-47bb-0310-9956-ffa450edef68
2009-10-16 07:12:56 +00:00
Luc Maisonobe
dd9b7b477a
improved array structure in Romberg integrator
...
since the integrator uses only two rows at a time, we allocate only two arrays and reuse them
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@824822 13f79535-47bb-0310-9956-ffa450edef68
2009-10-13 15:56:51 +00:00
Luc Maisonobe
e975825996
tightened checkstyle rules
...
catching top level exceptions (Exception, Throwable and RuntimeException) is now forbidden
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@824783 13f79535-47bb-0310-9956-ffa450edef68
2009-10-13 14:30:27 +00:00
Luc Maisonobe
50e9a948aa
fixed checkstyle warnings
...
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@824760 13f79535-47bb-0310-9956-ffa450edef68
2009-10-13 13:48:52 +00:00