mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smar...@apache.org
Subject mahout git commit: MAHOUT-1756:Missing +=: and *=: operators on vectors, closes#153
Date Fri, 31 Jul 2015 19:43:58 GMT
Repository: mahout
Updated Branches:
  refs/heads/master c943c37e0 -> a5a5b5144


MAHOUT-1756:Missing +=: and *=: operators on vectors, closes#153


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

Branch: refs/heads/master
Commit: a5a5b5144fd5b68e0ec14ffedd8c0a8b3a1b044f
Parents: c943c37
Author: smarthi <smarthi@apache.org>
Authored: Fri Jul 31 15:21:20 2015 -0400
Committer: smarthi <smarthi@apache.org>
Committed: Fri Jul 31 15:41:20 2015 -0400

----------------------------------------------------------------------
 .../org/apache/mahout/math/scalabindings/RLikeVectorOps.scala    | 4 ++++
 .../scala/org/apache/mahout/math/scalabindings/VectorOps.scala   | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/a5a5b514/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/RLikeVectorOps.scala
----------------------------------------------------------------------
diff --git a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/RLikeVectorOps.scala
b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/RLikeVectorOps.scala
index bf1bb30..3a64351 100644
--- a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/RLikeVectorOps.scala
+++ b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/RLikeVectorOps.scala
@@ -31,12 +31,16 @@ class RLikeVectorOps(_v: Vector) extends VectorOps(_v) {
   /** Elementwise *= */
   def *=(that: Vector) = v.assign(that, Functions.MULT)
 
+  def *=:(that:Vector) = *=(that)
+
   /** Elementwise /= */
   def /=(that: Vector) = v.assign(that, Functions.DIV)
 
   /** Elementwise *= */
   def *=(that: Double) = v.assign(Functions.MULT, that)
 
+  def *=:(that: Double) = *=(that)
+
   /** Elementwise /= */
   def /=(that: Double) = v.assign(Functions.DIV, that)
 

http://git-wip-us.apache.org/repos/asf/mahout/blob/a5a5b514/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/VectorOps.scala
----------------------------------------------------------------------
diff --git a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/VectorOps.scala
b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/VectorOps.scala
index ef9c494..de1a954 100644
--- a/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/VectorOps.scala
+++ b/math-scala/src/main/scala/org/apache/mahout/math/scalabindings/VectorOps.scala
@@ -101,10 +101,14 @@ class VectorOps(private[scalabindings] val v: Vector) {
 
   def +=(that: Vector) = v.assign(that, Functions.PLUS)
 
+  def +=:(that: Vector) = +=(that)
+
   def -=(that: Vector) = v.assign(that, Functions.MINUS)
 
   def +=(that: Double) = v.assign(Functions.PLUS, that)
 
+  def +=:(that: Double) = +=(that)
+
   def -=(that: Double) = +=(-that)
 
   def -=:(that: Vector) = v.assign(Functions.NEGATE).assign(that, Functions.PLUS)


Mime
View raw message