Kaydet (Commit) c61a0a33 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Slight cleanup in polynomial curve calculation

Change-Id: Ifc1b923e633beedce9ad27847f3c5c1298ee812e
üst e6a0cc2d
...@@ -77,9 +77,7 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression( ...@@ -77,9 +77,7 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression(
aPowers[j] += pow(x, j); aPowers[j] += pow(x, j);
} }
aMatrix[ 0 * aNumberOfRows + aNumberOfPolyElements] += y; for (int j = 0; j < aNumberOfPolyElements; j++) {
for (int j = 1; j < aNumberOfPolyElements; j++) {
aMatrix[j * aNumberOfRows + aNumberOfPolyElements] += pow(x, j) * y; aMatrix[j * aNumberOfRows + aNumberOfPolyElements] += pow(x, j) * y;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment