spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [46/50] git commit: make example 0-indexed
Date Wed, 22 Jan 2014 22:02:29 GMT
make example 0-indexed


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/4e967577
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/4e967577
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/4e967577

Branch: refs/heads/master
Commit: 4e96757793e7aee165381f80a60b3f46f60c9ebc
Parents: 5c639d7
Author: Reza Zadeh <rizlar@gmail.com>
Authored: Fri Jan 17 14:33:03 2014 -0800
Committer: Reza Zadeh <rizlar@gmail.com>
Committed: Fri Jan 17 14:33:03 2014 -0800

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/examples/mllib/SparkSVD.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/4e967577/examples/src/main/scala/org/apache/spark/examples/mllib/SparkSVD.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/spark/examples/mllib/SparkSVD.scala b/examples/src/main/scala/org/apache/spark/examples/mllib/SparkSVD.scala
index 50e5f5b..19676fc 100644
--- a/examples/src/main/scala/org/apache/spark/examples/mllib/SparkSVD.scala
+++ b/examples/src/main/scala/org/apache/spark/examples/mllib/SparkSVD.scala
@@ -43,7 +43,7 @@ object SparkSVD {
     // Load and parse the data file
     val data = sc.textFile(args(1)).map { line =>
       val parts = line.split(',')
-      MatrixEntry(parts(0).toInt, parts(1).toInt, parts(2).toDouble)
+      MatrixEntry(parts(0).toInt - 1, parts(1).toInt - 1, parts(2).toDouble)
     }
     val m = args(2).toInt
     val n = args(3).toInt


Mime
View raw message