Repository: mahout Updated Branches: refs/heads/spark-1.0.x 66f164057 -> ee6359f62
(NOJIRA) style, spacing Project: http://git-wip-us.apache.org/repos/asf/mahout/repo Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/e5bc885f Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/e5bc885f Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/e5bc885f Branch: refs/heads/spark-1.0.x Commit: e5bc885fdb4492a6d54232cea6c7e8e0abd4080d Parents: 66f1640 Author: Dmitriy Lyubimov <[email protected]> Authored: Mon Aug 4 16:39:29 2014 -0700 Committer: Dmitriy Lyubimov <[email protected]> Committed: Mon Aug 4 16:39:29 2014 -0700 ---------------------------------------------------------------------- .../mahout/math/scalabindings/package.scala | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mahout/blob/e5bc885f/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala ---------------------------------------------------------------------- diff --git a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala index 8e0c07f..43db95e 100644 --- a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala +++ b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/package.scala @@ -17,9 +17,7 @@ package org.apache.mahout.math -import org.apache.mahout.math._ import org.apache.mahout.math.solver.EigenDecomposition -import org.apache.mahout.math.decompositions.SSVD /** * Mahout matrices and vectors' scala syntactic sugar @@ -145,10 +143,10 @@ package object scalabindings { else throw new IllegalArgumentException( "double[][] data parameter can be the only argument for dense()") - case t:Array[Vector] => - val m = new DenseMatrix(t.size,t.head.length) - t.view.zipWithIndex.foreach{ - case(v,idx) => m(idx,::) := v + case t: Array[Vector] => + val m = new DenseMatrix(t.size, t.head.length) + t.view.zipWithIndex.foreach { + case (v, idx) => m(idx, ::) := v } return m case _ => throw new IllegalArgumentException("unsupported type in the inline Matrix initializer") @@ -160,11 +158,14 @@ package object scalabindings { /** * Default initializes are always row-wise. * create a sparse, - * e.g. + * e.g. {{{ + * * m = sparse( - * (0,5)::(9,3)::Nil, - * (2,3.5)::(7,8)::Nil + * (0,5)::(9,3)::Nil, + * (2,3.5)::(7,8)::Nil * ) + * + * }}} * * @param rows * @return
