From 611ddc1966bfc820a7f89164fd49c0bcaa6b7b55 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Fri, 1 Jul 2011 09:13:36 +0000 Subject: [PATCH] removed unused variable git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1141884 13f79535-47bb-0310-9956-ffa450edef68 --- .../general/NonLinearConjugateGradientOptimizer.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java b/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java index c427061ea..5c86efc60 100644 --- a/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java @@ -149,15 +149,10 @@ public class NonLinearConjugateGradientOptimizer } } - double dTd = 0; - for (final double di : searchDirection) { - dTd += di * di; - } - // Find the optimal step in the search direction. final UnivariateRealFunction lsf = new LineSearchFunction(searchDirection); final double uB = findUpperBound(lsf, 0, initialStep); - // XXX Last parameters is set to a value clode to zero in order to + // XXX Last parameters is set to a value close to zero in order to // work around the divergence problem in the "testCircleFitting" // unit test (see MATH-439). final double step = solver.solve(maxEval, lsf, 0, uB, 1e-15);