removed unused variable
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1141882 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46dfce79a4
commit
5dadec877b
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue