diff options
author | haoyuan <haoyuan@eecs.berkeley.edu> | 2012-02-09 13:26:23 -0800 |
---|---|---|
committer | haoyuan <haoyuan@eecs.berkeley.edu> | 2012-02-09 13:26:23 -0800 |
commit | 651932e70337c1f46f0bec84e44265e4eb1e0e66 (patch) | |
tree | 552c11276aa33ab484a263a45084d55bbc14eb7d /examples/src/main/scala | |
parent | b72d93a0dab3b71ea5c3c75eed13fc1e0cd879fc (diff) | |
download | spark-651932e70337c1f46f0bec84e44265e4eb1e0e66.tar.gz spark-651932e70337c1f46f0bec84e44265e4eb1e0e66.tar.bz2 spark-651932e70337c1f46f0bec84e44265e4eb1e0e66.zip |
Format the code as coding style agreed by Matei/TD/Haoyuan
Diffstat (limited to 'examples/src/main/scala')
-rw-r--r-- | examples/src/main/scala/spark/examples/SparkKMeans.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/scala/spark/examples/SparkKMeans.scala b/examples/src/main/scala/spark/examples/SparkKMeans.scala index 3139a0a6e2..a153679ab3 100644 --- a/examples/src/main/scala/spark/examples/SparkKMeans.scala +++ b/examples/src/main/scala/spark/examples/SparkKMeans.scala @@ -54,7 +54,7 @@ object SparkKMeans { while(tempDist > convergeDist) { var closest = data.map (p => (closestPoint(p, kPoints), (p, 1))) - var pointStats = closest.reduceByKey {case ((x1, y1), (x2, y2)) => (x1 + x2, y1+y2)} + var pointStats = closest.reduceByKey {case ((x1, y1), (x2, y2)) => (x1 + x2, y1 + y2)} var newPoints = pointStats.map {pair => (pair._1, pair._2._1 / pair._2._2)}.collect() |