Skip to content

Commit b5772b4

Browse files
committed
Fix binary compatibility.
1 parent 2f65186 commit b5772b4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,19 @@ sealed trait Matrix extends Serializable {
7878
}
7979

8080
/** Convenience method for `Matrix`-`DenseVector` multiplication. */
81+
def multiply(y: DenseVector): DenseVector = {
82+
val output = new DenseVector(new Array[Double](numRows))
83+
BLAS.gemv(1.0, this, y, 0.0, output)
84+
output
85+
}
86+
87+
/** Convenience method for `Matrix`-`Vector` multiplication. */
8188
def multiply(y: Vector): DenseVector = {
8289
val output = new DenseVector(new Array[Double](numRows))
8390
BLAS.gemv(1.0, this, y, 0.0, output)
8491
output
8592
}
86-
93+
8794
/** A human readable representation of the matrix */
8895
override def toString: String = toBreeze.toString()
8996

0 commit comments

Comments
 (0)