You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2015/07/06 22:20:35 UTC
[2/2] [math] Reverted change about getters in bicubic interpolation.
Reverted change about getters in bicubic interpolation.
As discussed on the mailing list, the caller already knows the arrays as
it is the caller who provided them initially.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/9036edd6
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/9036edd6
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/9036edd6
Branch: refs/heads/master
Commit: 9036edd6d6256a45d2fb7efb2fbbdc7fb844b019
Parents: 70538e6
Author: Luc Maisonobe <lu...@apache.org>
Authored: Mon Jul 6 20:39:38 2015 +0200
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Mon Jul 6 20:39:38 2015 +0200
----------------------------------------------------------------------
src/changes/changes.xml | 5 ---
.../BicubicInterpolatingFunction.java | 32 --------------------
.../BicubicInterpolatingFunctionTest.java | 14 ++-------
3 files changed, 2 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/9036edd6/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 9347ca5..9e983cf 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -65,11 +65,6 @@ If the output is not quite correct, check for invisible trailing spaces!
<action dev="erans" type="add" issue="MATH-1244">
Method "cosAngle" in "o.a.c.m.util.MathArrays".
</action>
- <action dev="luc" type="add" due-to="Lorenzoexe">
- Add getXmax(), getXmin(), getYmax(), getYmin() to bicubic interpolating function.
- These can be useful to manage an OutOfRangeException without the need to access
- the original x and y arrays.
- </action>
<action dev="tn" type="fix" issue="MATH-1240"> <!-- backported to 3.6 -->
"KolmogorovSmirnovTest#ksSum(...)" returned wrong result in case the provided
t-parameters was zero. This affected the calculation of "approximateP(...)" for
http://git-wip-us.apache.org/repos/asf/commons-math/blob/9036edd6/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunction.java b/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunction.java
index f1c10f8..b89a517 100644
--- a/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunction.java
+++ b/src/main/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunction.java
@@ -185,38 +185,6 @@ public class BicubicInterpolatingFunction
}
/**
- * Returns the minimum value of the first coordinate
- * @return xval[0].
- */
- public double getXmin() {
- return xval[0];
- }
-
- /**
- * Returns the maximum value of the second coordinate
- * @return xval[xval.length - 1].
- */
- public double getXmax() {
- return xval[xval.length - 1];
- }
-
- /**
- * Returns the minimum value of the second coordinate
- * @return yval[0].
- */
- public double getYmin() {
- return yval[0];
- }
-
- /**
- * Returns the maximum value of the second coordinate
- * @return yval[yval.length - 1].
- */
- public double getYmax() {
- return yval[yval.length - 1];
- }
-
- /**
* @param c Coordinate.
* @param val Coordinate samples.
* @return the index in {@code val} corresponding to the interval
http://git-wip-us.apache.org/repos/asf/commons-math/blob/9036edd6/src/test/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunctionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunctionTest.java b/src/test/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunctionTest.java
index b54c750..0ec77aa 100644
--- a/src/test/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunctionTest.java
+++ b/src/test/java/org/apache/commons/math4/analysis/interpolation/BicubicInterpolatingFunctionTest.java
@@ -160,12 +160,7 @@ public final class BicubicInterpolatingFunctionTest {
try {
bcf.value(x, y);
Assert.fail("OutOfRangeException expected");
- } catch (OutOfRangeException expected) {
- Assert.assertEquals(xMin, bcf.getXmin(), 1.0e-15);
- Assert.assertEquals(xMax, bcf.getXmax(), 1.0e-15);
- Assert.assertEquals(yMin, bcf.getYmin(), 1.0e-15);
- Assert.assertEquals(yMax, bcf.getYmax(), 1.0e-15);
- }
+ } catch (OutOfRangeException expected) {}
x = xMin;
y = yMax + small;
@@ -174,12 +169,7 @@ public final class BicubicInterpolatingFunctionTest {
try {
bcf.value(x, y);
Assert.fail("OutOfRangeException expected");
- } catch (OutOfRangeException expected) {
- Assert.assertEquals(xMin, bcf.getXmin(), 1.0e-15);
- Assert.assertEquals(xMax, bcf.getXmax(), 1.0e-15);
- Assert.assertEquals(yMin, bcf.getYmin(), 1.0e-15);
- Assert.assertEquals(yMax, bcf.getYmax(), 1.0e-15);
- }
+ } catch (OutOfRangeException expected) {}
}
/**