removed unused variables

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1084592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2011-03-23 14:11:50 +00:00
parent 97ca946c84
commit d9e74e0417
3 changed files with 2 additions and 6 deletions

View File

@ -121,8 +121,6 @@ public class Sigmoid implements DifferentiableUnivariateRealFunction {
public double[] gradient(double x, double ... param) {
validateParameters(param);
final double lo = param[0];
final double hi = param[1];
final double invExp1 = 1 / (1 + FastMath.exp(-x));
return new double[] { 1 - invExp1, invExp1 };

View File

@ -24,7 +24,6 @@ import java.util.ArrayList;
import org.apache.commons.math.analysis.DifferentiableMultivariateRealFunction;
import org.apache.commons.math.analysis.MultivariateRealFunction;
import org.apache.commons.math.analysis.MultivariateVectorialFunction;
import org.apache.commons.math.analysis.solvers.BrentSolver;
import org.apache.commons.math.optimization.general.ConjugateGradientFormula;
import org.apache.commons.math.optimization.general.NonLinearConjugateGradientOptimizer;
import org.apache.commons.math.random.GaussianRandomGenerator;
@ -54,7 +53,6 @@ public class MultiStartDifferentiableMultivariateRealOptimizerTest {
MultiStartDifferentiableMultivariateRealOptimizer optimizer =
new MultiStartDifferentiableMultivariateRealOptimizer(underlying, 10, generator);
optimizer.setConvergenceChecker(new SimpleScalarValueChecker(1.0e-10, 1.0e-10));
BrentSolver solver = new BrentSolver();
RealPointValuePair optimum =
optimizer.optimize(200, circle, GoalType.MINIMIZE, new double[] { 98.680, 47.345 });
Assert.assertEquals(200, optimizer.getMaxEvaluations());

View File

@ -34,7 +34,7 @@ public class HarmonicFitterTest {
HarmonicFitter fitter =
new HarmonicFitter(new LevenbergMarquardtOptimizer());
final double[] fitted = fitter.fit();
fitter.fit();
}
// This test fails (throwing "ConvergenceException" instead).
@ -108,7 +108,7 @@ public class HarmonicFitterTest {
fitter.addObservedPoint(1, x, 1e-7 * randomizer.nextGaussian());
}
final double[] fitted = fitter.fit();
fitter.fit();
// This test serves to cover the part of the code of "guessAOmega"
// when the algorithm using integrals fails.
}