mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlyubi...@apache.org
Subject git commit: (NOJIRA) Oops. forgotten operation from another branch. Fixing build.
Date Fri, 15 Aug 2014 22:26:56 GMT
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 <dlyubimov@apache.org>
Authored: Fri Aug 15 15:26:07 2014 -0700
Committer: Dmitriy Lyubimov <dlyubimov@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)
 }
 


Mime
View raw message