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.
This commit is contained in:
Luc Maisonobe 2015-07-06 20:39:38 +02:00
parent 70538e67fb
commit 9036edd6d6
3 changed files with 2 additions and 49 deletions

View File

@ -65,11 +65,6 @@ If the output is not quite correct, check for invisible trailing spaces!
<action dev="erans" type="add" issue="MATH-1244"> <action dev="erans" type="add" issue="MATH-1244">
Method "cosAngle" in "o.a.c.m.util.MathArrays". Method "cosAngle" in "o.a.c.m.util.MathArrays".
</action> </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 --> <action dev="tn" type="fix" issue="MATH-1240"> <!-- backported to 3.6 -->
"KolmogorovSmirnovTest#ksSum(...)" returned wrong result in case the provided "KolmogorovSmirnovTest#ksSum(...)" returned wrong result in case the provided
t-parameters was zero. This affected the calculation of "approximateP(...)" for t-parameters was zero. This affected the calculation of "approximateP(...)" for

View File

@ -184,38 +184,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 c Coordinate.
* @param val Coordinate samples. * @param val Coordinate samples.

View File

@ -160,12 +160,7 @@ public final class BicubicInterpolatingFunctionTest {
try { try {
bcf.value(x, y); bcf.value(x, y);
Assert.fail("OutOfRangeException expected"); Assert.fail("OutOfRangeException expected");
} catch (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);
}
x = xMin; x = xMin;
y = yMax + small; y = yMax + small;
@ -174,12 +169,7 @@ public final class BicubicInterpolatingFunctionTest {
try { try {
bcf.value(x, y); bcf.value(x, y);
Assert.fail("OutOfRangeException expected"); Assert.fail("OutOfRangeException expected");
} catch (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);
}
} }
/** /**