You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by dl...@apache.org on 2014/08/16 00:26:56 UTC

git commit: (NOJIRA) Oops. forgotten operation from another branch. Fixing build.

Repository: mahout
Updated Branches:
  refs/heads/master 25c9ed0eb -> 8d6ac39fc


(NOJIRA) Oops. forgotten operation from another branch. Fixing build.


Project: http://git-wip-us.apache.org/repos/asf/mahout/repo
Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/8d6ac39f
Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/8d6ac39f
Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/8d6ac39f

Branch: refs/heads/master
Commit: 8d6ac39fc08d11d84a0c37bf81d8af5d6d7fe234
Parents: 25c9ed0
Author: Dmitriy Lyubimov <dl...@apache.org>
Authored: Fri Aug 15 15:26:07 2014 -0700
Committer: Dmitriy Lyubimov <dl...@apache.org>
Committed: Fri Aug 15 15:26:07 2014 -0700

----------------------------------------------------------------------
 .../scala/org/apache/mahout/math/scalabindings/MatrixOps.scala     | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/8d6ac39f/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/MatrixOps.scala
----------------------------------------------------------------------
diff --git a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/MatrixOps.scala b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/MatrixOps.scala
index bb77ae1..a94d2a8 100644
--- a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/MatrixOps.scala
+++ b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/MatrixOps.scala
@@ -177,6 +177,8 @@ class MatrixOps(val m: Matrix) {
 
   def rowMeans() = if (m.ncol == 0) rowSums() else rowSums() /= m.ncol
 
+  def diagv = m.viewDiagonal()
+
   def numNonZeroElementsPerColumn() = m.aggregateColumns(vectorCountNonZeroElementsFunc)
 }