Skip to content

Commit

Permalink
refine some return type
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxusen committed Apr 10, 2014
1 parent b064714 commit 10cf5d3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ private class ColumnStatisticsAggregator(private val n: Int)

private val currMean: BDV[Double] = BDV.zeros[Double](n)
private val currM2n: BDV[Double] = BDV.zeros[Double](n)
private var totalCnt: Double = 0.0
private var totalCnt = 0.0
private val nnz: BDV[Double] = BDV.zeros[Double](n)
private val currMax: BDV[Double] = BDV.fill(n)(Double.MinValue)
private val currMin: BDV[Double] = BDV.fill(n)(Double.MaxValue)

override def mean = {
override def mean: Vector = {
val realMean = BDV.zeros[Double](n)
var i = 0
while (i < n) {
Expand All @@ -58,7 +58,7 @@ private class ColumnStatisticsAggregator(private val n: Int)
Vectors.fromBreeze(realMean)
}

override def variance = {
override def variance: Vector = {
val realVariance = BDV.zeros[Double](n)

val denominator = totalCnt - 1.0
Expand Down

0 comments on commit 10cf5d3

Please sign in to comment.