commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1034867 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
Date Sat, 13 Nov 2010 20:34:21 GMT
Author: erans
Date: Sat Nov 13 20:34:21 2010
New Revision: 1034867

URL: http://svn.apache.org/viewvc?rev=1034867&view=rev
Log:
Removed workaround that ceased to be necessary.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java?rev=1034867&r1=1034866&r2=1034867&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/BicubicSplineInterpolatingFunction.java
Sat Nov 13 20:34:21 2010
@@ -17,7 +17,6 @@
 package org.apache.commons.math.analysis.interpolation;
 
 import org.apache.commons.math.DimensionMismatchException;
-import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.analysis.BivariateRealFunction;
 import org.apache.commons.math.exception.NoDataException;
 import org.apache.commons.math.exception.OutOfRangeException;
@@ -240,15 +239,7 @@ public class BicubicSplineInterpolatingF
         final double xN = (x - xval[i]) / (xval[i + 1] - xval[i]);
         final double yN = (y - yval[j]) / (yval[j + 1] - yval[j]);
 
-        double result = Double.NaN;
-        try { // Workaround to avoid carrying around "try" blocks for an
-              // exception that will never happen
-            result = partialDerivatives[which][i][j].value(xN, yN);
-        } catch (FunctionEvaluationException e) {
-            // Will never happen
-        }
-
-        return result;
+        return partialDerivatives[which][i][j].value(xN, yN);
     }
 
     /**



Mime
View raw message