Removed dead test code.

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

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1387084 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2012-09-18 10:30:01 +00:00
parent 5259df5f91
commit c390c53c22
1 changed files with 2 additions and 31 deletions

View File

@ -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.function.Sinc;
*
* @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 DifferentiableMultivariateFunction {
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;
}
};
}
}