4126 Commits

Author SHA1 Message Date
Gilles Sadowski
3a87c22aee MATH-829
Removed unnecessary "throws Exception" clause from method signature.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1364030 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 01:10:04 +00:00
Gilles Sadowski
aa5e60b456 MATH-829
Removed unnecessary (and uninformative) "throws Exception" clauses in
method signature.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1364028 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 00:42:49 +00:00
Gilles Sadowski
1fb8df0850 MATH-797
Performance: synchronization should ensure that the computation of each
rule will be performed once, even if the factory is accessed from multiple
threads.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1364024 13f79535-47bb-0310-9956-ffa450edef68
2012-07-21 00:08:18 +00:00
Gilles Sadowski
6f92d77bb1 Added license header.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363955 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 21:27:21 +00:00
Gilles Sadowski
6aab535162 MATH-797
Performance improvement: Caching the converted rules that were already
retrieved, so that the conversion from "Number" occurs only once per rule.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363875 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 17:12:30 +00:00
Gilles Sadowski
d6f70780c9 MATH-764
MATH-823
Recovered backward-compatible functionality (removed in r1363604) for
deprecated field.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363612 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 01:12:08 +00:00
Gilles Sadowski
9a0794de0f MATH-764
MATH-823
Allow explicit setting of RNG (parameter of the constructor).
Removed dependency on "RandomDataImpl" for the "sample" method.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363604 13f79535-47bb-0310-9956-ffa450edef68
2012-07-20 00:43:45 +00:00
Gilles Sadowski
7771f5aabe Typo in svn tag.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363588 13f79535-47bb-0310-9956-ffa450edef68
2012-07-19 23:49:15 +00:00
Gilles Sadowski
178ab444fe MATH-829
Removed "throws" clause from method signature.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363575 13f79535-47bb-0310-9956-ffa450edef68
2012-07-19 23:02:47 +00:00
Thomas Neidhart
c56b813444 Fixed checkstyle warning.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363565 13f79535-47bb-0310-9956-ffa450edef68
2012-07-19 22:02:16 +00:00
Gilles Sadowski
4ca1aec24c Fixed typo in class name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363309 13f79535-47bb-0310-9956-ffa450edef68
2012-07-19 12:01:05 +00:00
Thomas Neidhart
cb719d1fa8 Add math-235 to changes.xml.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363118 13f79535-47bb-0310-9956-ffa450edef68
2012-07-18 21:08:51 +00:00
Thomas Neidhart
1213c8a2dd [MATH-235] Added random data test for eigen decomposition, improved error handling.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1363105 13f79535-47bb-0310-9956-ffa450edef68
2012-07-18 20:49:43 +00:00
Thomas Neidhart
7dd77c4bdf Relax epsilon criteria for eigen decomposition.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1362665 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 21:30:23 +00:00
Thomas Neidhart
35c5d7143b Added more random tests for SchurTransformer.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1362647 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 21:10:34 +00:00
Thomas Neidhart
d8273182a6 Added more random data tests for HessenbergTransformer.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1362645 13f79535-47bb-0310-9956-ffa450edef68
2012-07-17 21:07:08 +00:00
Gilles Sadowski
abd69cafa6 Code cleanup.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1362032 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 13:38:12 +00:00
Gilles Sadowski
a05022cbab MATH-825
Deprecated method that should not be part of the public API.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1361956 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 09:57:06 +00:00
Gilles Sadowski
a201eaf582 Fixed CheckStyle warnings.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1361839 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 23:42:38 +00:00
Gilles Sadowski
bf2ac35d56 Moved variable declarations closer to their point of use.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1361797 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 21:06:33 +00:00
Gilles Sadowski
3ba28fe49d MATH-768
Provided access to methods for finding complex roots of a polynomial in
"LaguerreSolver" class.
Added utility for converting an array of doubles to an array of "Complex"
objects.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1361793 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 20:50:13 +00:00
Thomas Neidhart
8b71139a74 [MATH-822] Added new constructors in EigenDecomposition. Thanks to Jared Becksfort for the report.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1361587 13f79535-47bb-0310-9956-ffa450edef68
2012-07-14 21:19:36 +00:00
Sebastien Brisard
aad388f4b4 Added @Ignore tags with explanatory messages for unit tests ignored until MATH-821 is solved.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1361170 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 11:37:40 +00:00
Gilles Sadowski
d607d9323c Two failing tests temporarily disabled until MATH-821 is fixed.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1361164 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 11:20:42 +00:00
Gilles Sadowski
b8d454adb4 MATH-797
Initial version for Gauss-Legendre quadrature rules: the integration is
performed on the whole interval using a single rule. [Whereas the approach
used in class "analysis.integration.LegendreGaussIntegrator" is to divide
iteratively into sub-intervals (over which the integration rule is used)
until some covergence criterion is met.]
Adapted from an original code donated by Sébastien Brisard.
In the current implementation, the Gauss-Legendre rules are computed in
double precision in "LegendreRuleFactory" and high precision (using
"java.math.BigDecimal") in "LegendreHighPrecisionRuleFactory". However,
the "GaussIntegrator" class performs the integration using "double"s
whatever the precision of the rule.
The framework of "BaseRuleFactory" enables the addition of other quadrature
schemes (by overriding the "computeRule" method). [Sébastien's code already
provides Gauss-Chebyshev and Gauss-Hermite schemes (in double precision).]


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1360706 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 14:43:18 +00:00
Sebastien Brisard
607c9ec626 MATH-812: fixed a bug in RealVector.outerProduct(RealVector). Now loops through *all* entries of the vectors.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1360668 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 13:31:45 +00:00
Sebastien Brisard
6eb4655543 MATH-812: fixed a bug in RealVector.dotProduct(RealVector). Now loops through *all* entries of the vectors.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1360662 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 13:17:08 +00:00
Gilles Sadowski
5cdd5e950c Typo in userguide.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358535 13f79535-47bb-0310-9956-ffa450edef68
2012-07-07 10:26:33 +00:00
Sebastien Brisard
42596833d5 MATH-795: made some error messages more explicit.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358502 13f79535-47bb-0310-9956-ffa450edef68
2012-07-07 05:17:44 +00:00
Sebastien Brisard
e36f4a730d MATH-795: final clean-up of ArrayRealVectorTest.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358366 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 19:31:00 +00:00
Sebastien Brisard
c846a2953f In RealVectorAbstractTest.RealVectorTestImpl, removed
- RealVector mapToSelf(UnivariateFunction),
  - double[] toArray(),
which override default implementations.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358359 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 19:12:52 +00:00
Sebastien Brisard
f838857569 MATH-795: in RealVectorAbstractTest, removed unused class variables.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358355 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 19:07:07 +00:00
Sebastien Brisard
3621d9d559 MATH-795: in RealVectorAbstractTest, removed unused method assertClose.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358353 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 19:05:58 +00:00
Sebastien Brisard
8c10a80525 MATH-795: in RealVectorTest, removed unecessary re-implementation of testAddToEntry.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358349 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 19:02:16 +00:00
Sebastien Brisard
58c9ef25ef MATH-795: in RealVectorTest, removed
- testCombineToSelfPrecondition()
  - testCombineToSelf()
which are redundant with other tests already implemented in RealVectorAbstractTest.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358346 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 18:59:12 +00:00
Sebastien Brisard
2094b5cb5f In RealVectorTest, removed testClone(), which does not test anything.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358344 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 18:55:49 +00:00
Sebastien Brisard
e24e3100ed MATH-795: in RealVectorTest, cleaned-up testSparseIterator().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358343 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 18:54:29 +00:00
Sebastien Brisard
1ebfcaaffa MATH-795: default implementation of RealVector RealVectorAbstractTest.createAlien(double[]).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358339 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 18:32:03 +00:00
Sebastien Brisard
cae661e3ce MATH-795: SparseRealVectorTest now uses RealVectorAbstractTest.RealVectorTestImpl instead of SparseRealVectorTest.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358338 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 18:29:11 +00:00
Sebastien Brisard
53fb7e8704 MATH-795: moved minimal implementation of RealVector, ArrayRealVectorTest.RealVectorTestImpl to RealVectorAbstractTest.RealVectorTestImpl.
This minimal implementation is now used by RealVectorTest and ArrayRealVectorTest.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358334 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 18:24:50 +00:00
Sebastien Brisard
092c0972ba MATH-795: in ArrayRealVectorTest, cleaned up the minimal implementation of RealVector, RealVectorTestImpl. This minimal implementation used to be cluttered with unnecessary method implementations, which should have been removed when the interface RealVector was changed into an abstract class.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358319 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 17:59:42 +00:00
Sebastien Brisard
12dfb2e92d MATH-795: cleanup of RealVectorAbstractTest.
Removed unused class variables and imports.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358049 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 06:23:03 +00:00
Sebastien Brisard
e89009749f MATH-795:
- Corrected some build failures caused by changes in r1358046.
  - Moved javadoc of boolean ArrayRealVector.equals(Object) to RealVector.
  - In RealVector, default implementations of equals(Object) and hashCode() throw UnsupportedOperationException, in order to force implementation in subclasses.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358048 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 05:47:02 +00:00
Sebastien Brisard
8762808a04 MATH-795: removed redundant unit tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358046 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 05:26:35 +00:00
Sebastien Brisard
ea6d2beeaf MATH-795:
- Added default implementation to RealVector RealVector.projection(RealVector)
  - Removed implementation in concrete classes (to avoid code duplication).
  - Created unit tests accordingly.
 


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358044 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 05:18:39 +00:00
Sebastien Brisard
c7196c8f20 MATH-795: refactored unit tests for double RealVector.cosine(RealVector).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1358033 13f79535-47bb-0310-9956-ffa450edef68
2012-07-06 03:48:04 +00:00
Gilles Sadowski
d182f07d6a MATH-798
Added overridden "fit" method where one can specify the maximum number of
function evaluations.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1357353 13f79535-47bb-0310-9956-ffa450edef68
2012-07-04 18:00:02 +00:00
Gilles Sadowski
f2187efaf0 MATH-810
Added new accessors.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1357004 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 23:03:55 +00:00
Sebastien Brisard
075a88a074 MATH-795: in RealVectorAbstractTest, factored out unit tests for
double dotProduct(RealVector)

As first reported by Bill Barker, these tests fail with the current default implementation (in RealVector) as well as the sparse implementation (in OpenMapRealVector).


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1356576 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 05:51:57 +00:00
Sebastien Brisard
8071ded100 MATH-795: in RealVectorAbstractTest, refactored unit tests of
- RealVector RealVector.combine(double, double, RealVector),
  - RealVector RealVector.combineToSelf(double, double, RealVector).


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1356070 13f79535-47bb-0310-9956-ffa450edef68
2012-07-02 05:46:10 +00:00