This class implements the Hermite polynomial interpolation method, which
can match function derivatives in addition to function value at sampling
points. The implementation is done for vector-valued functions.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1351257 13f79535-47bb-0310-9956-ffa450edef68
- modified OpenMapRealVector.ebeMultiply() and ebeDivide() to handle
special cases 0d * NaN, 0d * Infinity, 0d / 0d and 0d / NaN.
- added implementation of isNaN() and isInfinite() to
SparseRealVectorTest.SparseRealVectorTestImpl in order to allow for testing
of OpenMapRealVector.ebeMultiply() and ebeDivide() with mixed types.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1348721 13f79535-47bb-0310-9956-ffa450edef68
Parameterized "CurveFitter" with the type of the fitting function. Updated subclasses
"PolynomialFitter", "HarmonicFitter", "GaussianFitter" accordingly.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1348613 13f79535-47bb-0310-9956-ffa450edef68
- In RealVectorTest.TestVectorImpl, removed add(RealVector) and
subtract(RealVector), as they prevented testing of default implementations
(provided in the RealVector abstract class).
- In RealVectorAbstractTest, extracted unit tests for
+ RealVector.add(RealVector),
+ RealVector.subtract(RealVector),
+ RealVector.ebeMultiply(RealVector),
+ RealVector.ebeDivide(RealVector).
These tests fail with OpenMapRealVector. This is identified as a bug (see
MATH-803).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1348485 13f79535-47bb-0310-9956-ffa450edef68
- testSubVectorInvalidIndex1(),
- testSubVectorInvalidIndex2(),
- testSubVectorInvalidIndex3(),
- testSubVectorInvalidIndex4()
from RealVectorAbstractTest.testDataInOut(). This test revealed that
positivity of the number of elements was not checked for in
RealVector.getSubVector(int, int).
This is corrected, and a NotPositiveException is now thrown (corresponding
error message has been added to LocalizedFormats).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1347883 13f79535-47bb-0310-9956-ffa450edef68
RealVectorTest.testAddToEntryInvalidIndex2() revealed a bug in
ArrayRealVector.addToEntry(int, double) (method used to throw wrong type of
exception).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1347717 13f79535-47bb-0310-9956-ffa450edef68
- defined class variables data1 and data2 for the creation of test vectors.
Attention has been paid to "special" values, which are interspersed with
"normal" values (see e.g. sparse vectors).
- created testGetDimension().
- created testGetEntry().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1346741 13f79535-47bb-0310-9956-ffa450edef68
- some methods are not implemented by RealVector, so they should not be
tested: added @Ignore annotations in RealVectorTest.
- in RealVectorAbstractTest, extracted
+ testAppendVector()
+ testAppendScalar()
from testDataInOut().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1346740 13f79535-47bb-0310-9956-ffa450edef68
In very rare cases, due to numerical inaccuracies the computed quaternion
was not normalized (some examples went as high as 1.0e8) and even after
normalization, the quaternion was plain wrong.
JIRA: MATH-801
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1346513 13f79535-47bb-0310-9956-ffa450edef68
- Factored out testSerial().
- In RealVectorTest, the vector returned by create(double[]) should really be
of type RealVectorTest.TestVectorImpl, as the minimal implementation is to be
tested. This causes some tests not to pass, they are skipped for the time
being (overriden from RealVectorAbstractTest, without @Test annotation). When
the tests in RealVectorAbstractTest are split, only the smaller tests which do
not make sense in the present context will be skipped.
- In RealVectorTest, the constructor of RealVectorTest.TestVectorImpl now
makes a defensive copy of the specified double[] array (see Javadoc of
+ RealVectorAbstractTest.create(double[]),
+ RealVectorAbstractTest.createAlien(double[]).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1346243 13f79535-47bb-0310-9956-ffa450edef68
Test case provided by the reporter, adapted to become a unit test, shows
that the same convergence criterion generates a very similar solution by
both "LevenbergMarquardtOptimizer" and "GaussNewtonOptimizer".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1345538 13f79535-47bb-0310-9956-ffa450edef68