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 2012/09/18 12:30:01 UTC

svn commit: r1387084 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/SumSincFunction.java

Author: luc
Date: Tue Sep 18 10:30:01 2012
New Revision: 1387084

URL: http://svn.apache.org/viewvc?rev=1387084&view=rev
Log:
Removed dead test code.

The code was never used and was an implementation of a now deprecated
interface.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/SumSincFunction.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/SumSincFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/SumSincFunction.java?rev=1387084&r1=1387083&r2=1387084&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/SumSincFunction.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/SumSincFunction.java Tue Sep 18 10:30:01 2012
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math3.analysis;
 
-import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
-import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
 import org.apache.commons.math3.analysis.function.Sinc;
 
 /**
@@ -25,8 +23,8 @@ import org.apache.commons.math3.analysis
  *
  * @version $Id$
  */
-public class SumSincFunction implements DifferentiableMultivariateFunction {
-    private static final UnivariateDifferentiableFunction sinc = new Sinc();
+public class SumSincFunction implements MultivariateFunction {
+    private static final UnivariateFunction sinc = new Sinc();
 
     /**
      * Factor that will multiply each term of the sum.
@@ -54,31 +52,4 @@ public class SumSincFunction implements 
         return factor * sum;
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public MultivariateFunction partialDerivative(final int k) {
-        return new MultivariateFunction() {
-            public double value(double[] point) {
-                return sinc.value(new DerivativeStructure(1, 1, 0, point[k])).getPartialDerivative(1);
-            }
-        };
-    }
-
-    /**                                                                            
-     * {@inheritDoc}
-     */
-    public MultivariateVectorFunction gradient() {
-        return new MultivariateVectorFunction() {
-            public double[] value(double[] point) {
-                final int n = point.length;
-                final double[] r = new double[n];
-                for (int i = 0; i < n; i++) {
-                    final double x = point[i];
-                    r[i] = factor * sinc.value(new DerivativeStructure(1, 1, 0, x)).getPartialDerivative(1);
-                }
-                return r;
-            }
-        };
-    }
 }