From 5dadec877b957c63f3d55b60f1baec4ebbf82710 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Fri, 1 Jul 2011 09:08:38 +0000 Subject: [PATCH] removed unused variable git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1141882 13f79535-47bb-0310-9956-ffa450edef68 --- .../optimization/general/AbstractLeastSquaresOptimizer.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java index b4f5e0700..e9ab30209 100644 --- a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java @@ -134,12 +134,10 @@ public abstract class AbstractLeastSquaresOptimizer final double[] residualsWeights = getWeightRef(); cost = 0; - int index = 0; for (int i = 0; i < rows; i++) { final double residual = targetValues[i] - objective[i]; weightedResiduals[i]= residual*FastMath.sqrt(residualsWeights[i]); cost += residualsWeights[i] * residual * residual; - index += cols; } cost = FastMath.sqrt(cost); }