Previous commit was missing a crucial modification (in the "repair" method),
an inconsistency which entailed the failing of some tests.
With that modification (thanks to Nikolaus Hansen), it was established that
the "encode" and "decode" steps were indeed useless. This commit thus removes
them, and all the code that was necessary only because of those two methods.
Finite and infinite can now be freely mixed.
Unit tests that depended on those limitations were also removed (thus also
the one that was added following MATH-865).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1391908 13f79535-47bb-0310-9956-ffa450edef68
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
- 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
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
- 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
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
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
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
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
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
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