Commit Graph

4595 Commits

Author SHA1 Message Date
Gilles Sadowski 329cf9e8e6 MATH-867
Modified "encode" and "decode" methods. Unit test "testFitAccuracyDependsOnBoundary"
now passes and is thus enabled. Unit test "testConstrainedRosen" had to be modified
in order to not fail with the new code (starting point is set closer to the solution).


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1391840 13f79535-47bb-0310-9956-ffa450edef68
2012-09-29 16:58:18 +00:00
Gilles Sadowski 678377a1e8 MATH-867
Unit test showing the problem. It is disabled (with the "@Ignore" annotation)
because it fails with the current code.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1391477 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 14:06:19 +00:00
Luc Maisonobe 6129654bc2 Fixed some issues in nth root derivatives at 0.
The current behavior is correct with respect to infinities and NaN being
appropriately generated, but in some cases counter-intuitive.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1391451 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 13:28:42 +00:00
Sebastien Brisard e1ed0b96ba User's Guide, Special Functions: changed the introduction, as special functions
should not be considered as a by-product of Commons-Math.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1391304 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 05:25:06 +00:00
Sebastien Brisard 07f51c0dea User's guide for special functions now uses the APT format, instead of the XDOC
format.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1391302 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 05:14:10 +00:00
Sebastien Brisard 9462626718 MATH-854: filled the "throws" clause of BlockRealMatrix.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1391160 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 18:42:45 +00:00
Sebastien Brisard 2a32964f25 Populated throws clause of OpenMapRealMatrix (MATH-854).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390842 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 05:04:10 +00:00
Sebastien Brisard 8708ef28f2 MATH-870: deprecated SparseFieldMatrix.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390832 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 03:54:04 +00:00
Sebastien Brisard 3a3fec3bb2 MATH-870: deprecated SparseRealMatrix and OpenMapRealMatrix.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390831 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 03:52:34 +00:00
Sebastien Brisard 9cf853b3fc MATH-870: deprecated SparseFieldVector.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390829 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 03:49:54 +00:00
Sebastien Brisard b894782174 MATH-870: javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390828 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 03:48:44 +00:00
Sebastien Brisard e2bab1ae13 MATH-870: deprecated OpenMapRealVector, SparseRealVector.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390684 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 19:17:29 +00:00
Gilles Sadowski dadeacc23e MATH-853
New exception intended to become, as of release 4.0, the base class for
all CM exceptions (except "NullArgumentException").


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390354 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 09:39:19 +00:00
Sebastien Brisard 2ff6587c4e In AbstractRealMatrix, provided empty implementations to methods
- createMatrix(int, int),
  - copy(),
  - getEntry(int, int),
  - setEntry(int, int).
This allows the use of the @Override tag in classes Array2DRowRealMatrix, BlockRealMatrix,
OpenMapRealMatrix with java 5.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1390302 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 07:24:35 +00:00
Thomas Neidhart 774257e3a7 Javadoc fixes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1389866 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 13:56:57 +00:00
Luc Maisonobe 282bb0eaa6 Typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1389858 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 13:29:16 +00:00
Phil Steitz ecd4748cdf Added tests confirming exception behavior for regress(double[]).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1389150 13f79535-47bb-0310-9956-ffa450edef68
2012-09-23 21:42:51 +00:00
Thomas Neidhart ad252a8ca3 [MATH-848] Fixed Schur transformation for certain input matrices, changed index parameter names to indicate their purpose.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1389129 13f79535-47bb-0310-9956-ffa450edef68
2012-09-23 19:34:02 +00:00
Gilles Sadowski eda482d9f9 Typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388766 13f79535-47bb-0310-9956-ffa450edef68
2012-09-22 10:02:53 +00:00
Gilles Sadowski f33f1fb501 MATH-860
Matrix "block inversion".


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388555 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 15:41:06 +00:00
Gilles Sadowski 5144e1d878 MATH-865
Update "changes" file.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388554 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 15:34:03 +00:00
Gilles Sadowski b55e020684 MATH-865
Early detection that overflow will occur in the variables normalization
procedure ("encode" method). Warning mentioned in the documentation.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388552 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 15:32:18 +00:00
Gilles Sadowski abe53a537b MATH-864
Fixed missing "repair" of a point that lies outside the boundaries. Thanks
to Frank Hessen for the report and for pinpointing the cause of the problem.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388517 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 14:17:37 +00:00
Gilles Sadowski ce118ef14a MATH-863
Patch provided by Julien Anxionnat:
 * method name change,
 * bug fix and unit test for "dotProduct" (instance method).


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388406 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 10:42:30 +00:00
Sebastien Brisard 9146a58024 In AbstractRealMatrix, removed orphan javadoc comment.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388298 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 01:56:06 +00:00
Sebastien Brisard 95bf9fb6cf In AbstractRealMatrix, removed empty abstract method copy() (specified in interface RealMatrix).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388296 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 01:53:28 +00:00
Sebastien Brisard d2258eff70 Removed some @Override tags, which have become illegal following some changes in r1388154.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388294 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 01:49:51 +00:00
Sebastien Brisard b2cea08e85 MATH-854
- filled the "throws" clause of Array2DRowRealMatrix,
  - corrected some method signatures in RealMatrix and AbstractRealMatrix accordingly,
  - in AbstractRealMatrix, removed "abstract implementations" of some methods specified in interface RealMatrix, as they serve no purpose.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388154 13f79535-47bb-0310-9956-ffa450edef68
2012-09-20 18:50:45 +00:00
Gilles Sadowski 7a74137904 MATH-863
New "Quaternion" class. Thanks to Julien Anxionnat.
After applying the original patch, the following changes were made:
* Renamed the "static" quaternion instances ("PLUS_" prefix removed).
* Removed some (syntactic sugar) methods; removed or modified corresponding
  unit tests.
* Made the redundant accessors call the "canonic" ones.
* Removed the default tolerance and added an explicit tolerance parameter
  in methods that depend on equality testing.
* When a "ZeroException" is thrown, the actual value of the norm is provided
  in the detailed message (as the implementation actually does not use a
  strict comparison with 0).
* Added "equals(Object)" and "hashCode" methods.
* Javadoc and formatting. Added license header.
* Removed "toString" documentation (as this representation should not be
  binding). Changed the representation to not use a comma.
* Renamed "scalarMultiply" to "multiply".
* More stringent tolerance used in the unit tests assertions, whenever
  possible.
* Added unit tests.



git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1388099 13f79535-47bb-0310-9956-ffa450edef68
2012-09-20 16:21:46 +00:00
Gilles Sadowski 600f00ba58 MATH-866
Method to test for equality with a given relative tolerance (due to
Yannick Tanguy and Julien Anxionnat). Original patch provided in
JIRA MATH-863 and committed with a few changes.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387941 13f79535-47bb-0310-9956-ffa450edef68
2012-09-20 10:09:37 +00:00
Thomas Neidhart b245e08d24 Removed exception from throws clause which is never thrown.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387637 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 15:21:57 +00:00
Thomas Neidhart 322fde4ec5 Javadoc formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387635 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 15:15:43 +00:00
Luc Maisonobe a20a890fa6 Typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387501 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 09:12:01 +00:00
Luc Maisonobe c390c53c22 Removed dead test code.
The code was never used and was an implementation of a now deprecated
interface.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387084 13f79535-47bb-0310-9956-ffa450edef68
2012-09-18 10:30:01 +00:00
Luc Maisonobe 5259df5f91 Fail early on wrong derivation order.
If the user asks for a derivation order that is too large for the number
of points in the finite differences algorithm, we now detect it before
the first call to the underlying function.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387064 13f79535-47bb-0310-9956-ffa450edef68
2012-09-18 09:07:54 +00:00
Sebastien Brisard 19c954cabc MATH-854: populated throws clause of AbstractRealMatrix.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387002 13f79535-47bb-0310-9956-ffa450edef68
2012-09-18 06:38:33 +00:00
Thomas Neidhart f91ffbac36 Add findbugs exception for RealVector#equals method.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1386794 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 19:54:33 +00:00
Luc Maisonobe 830cd9eeca Added a FiniteDifferencesDifferentiator class.
This class implements both UnivariateFunctionDifferentiator,
UnivariateVectorFunctionDifferentiator and
UnivariateMatrixFunctionDifferentiator. It is not limited in the
derivation order, but checks the order is consistent with the number of
points. Typically, attempting to extract 5th derivative from a 3 points
scheme will not work (a NumberIsTooLargeException will be thrown,
referencing the derivation order).

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1386745 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 17:42:47 +00:00
Luc Maisonobe 3876bd9bc4 Added a way to create DerivativeStructure from all derivatives.
In some cases, users may already have all the derivatives available at
once. It was impossible to use this knowledge and create the object, so
users had to user dirty tricks like adding together variables holding
value and zero derivative with variables holding derivatives and zero
value.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1386743 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 17:42:19 +00:00
Luc Maisonobe be26e43b98 Added differentiator interfaces for vector and matrix functions.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1386742 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 17:41:54 +00:00
Luc Maisonobe 69f087edcb Differentiable function can trigger any MathIllegalArgumentException.
One very important case corresponds to an unsupported derivation order.
The order is not enforced in the API, but is specified as the properties
of the DerivativeStructure argument, as well as the number of free
parameters. Some functions have no limitation on this order (typically
functions implemented using only the DerivativeStructure API), but some
functions may limit the derivation order to 1 or 2 as they implement the
differentiation themselves or through finite differences.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1386741 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 17:41:24 +00:00
Sebastien Brisard 06880f1138 Populated throws clause of RealMatrix (MATH-854); javadoc + formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1386486 13f79535-47bb-0310-9956-ffa450edef68
2012-09-17 06:48:04 +00:00
Phil Steitz dae4cf5da1 Added missing throws declarations and fixed javadoc to match what is actually thrown. JIRA: MATH-854.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385386 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 22:11:15 +00:00
Thomas Neidhart 0752ffec8f [MATH-666] added to changes.xml.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385318 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 16:54:20 +00:00
Thomas Neidhart 79f99111d5 [MATH-666] make FieldVector#getData() method deprecated in favor of toArray(), minor formatting, move implementation of SparseFieldVector#getData() to toArray().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385316 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 16:50:32 +00:00
Thomas Neidhart 1f914f9917 Removed trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385315 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 16:37:34 +00:00
Thomas Neidhart b694b79c60 Javadoc formatting and fixes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385314 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 16:35:49 +00:00
Thomas Neidhart be41bc2053 Removed unused imports.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385313 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 16:35:23 +00:00
Thomas Neidhart 7536672818 Javadoc cleanup of transform package, removed unnecessary paragraph tags.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385310 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 16:32:10 +00:00
Thomas Neidhart 75fe8b8b99 Javadoc cleanup of linear optimization package.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1385307 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 16:19:55 +00:00