phpisciuneri commented on a change in pull request #25818: 
[SPARK-29121][ML][MLLIB] Support for dot product operation on Vector(s)
URL: https://github.com/apache/spark/pull/25818#discussion_r325728399
 
 

 ##########
 File path: mllib-local/src/main/scala/org/apache/spark/ml/linalg/Vectors.scala
 ##########
 @@ -178,6 +178,13 @@ sealed trait Vector extends Serializable {
    */
   @Since("2.0.0")
   def argmax: Int
+
+  /**
+   * Calculate the dot product of this vector with another.
+   *
+   * If `size` does not match an [IllegalArgumentException] is thrown.
+   */
+  def dot(v: Vector): Double = BLAS.dot(this, v)
 
 Review comment:
   @srowen thanks.  I added the annotation to each of dot functions in ml and 
mllib.
   
   I actually am not very familiar (scala coder) with the Pyspark and SparkR 
portions of the code base... Let me have a look.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to