Skip to content

Commit

Permalink
fix scala style error
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxusen committed Apr 10, 2014
1 parent 1fba230 commit e624f93
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ private class VectorRDDStatisticsAggregator(
val deltaMean = currMean
var i = 0
while (i < currM2n.size) {
realVariance(i) = currM2n(i) + deltaMean(i) * deltaMean(i) * nnz(i) * (totalCnt - nnz(i)) / totalCnt
realVariance(i) =
currM2n(i) + deltaMean(i) * deltaMean(i) * nnz(i) * (totalCnt - nnz(i)) / totalCnt
realVariance(i) /= totalCnt
i += 1
}
Expand Down Expand Up @@ -140,7 +141,7 @@ private class VectorRDDStatisticsAggregator(
// merge m2n together
if (nnz(i) + other.nnz(i) != 0.0) {
currM2n(i) += other.currM2n(i) + deltaMean(i) * deltaMean(i) * nnz(i) * other.nnz(i) /
(nnz(i)+other.nnz(i))
(nnz(i) + other.nnz(i))
}

if (currMax(i) < other.currMax(i)) currMax(i) = other.currMax(i)
Expand Down

0 comments on commit e624f93

Please sign in to comment.