We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4ca52d commit dcdf578Copy full SHA for dcdf578
mllib/src/test/scala/org/apache/spark/mllib/linalg/BLASSuite.scala
@@ -392,6 +392,23 @@ class BLASSuite extends SparkFunSuite {
392
}
393
394
395
+ val y17 = new DenseVector(Array(0.0, 0.0))
396
+ val y18 = y17.copy
397
+
398
+ val sA3 = new SparseMatrix(3, 2, Array(0, 2, 4), Array(1, 2, 0, 1), Array(2.0, 1.0, 1.0, 2.0))
399
+ .transpose
400
+ val sA4 =
401
+ new SparseMatrix(2, 3, Array(0, 1, 3, 4), Array(1, 0, 1, 0), Array(1.0, 2.0, 2.0, 1.0))
402
+ val sx3 = new SparseVector(3, Array(1, 2), Array(2.0, 1.0))
403
404
+ val expected4 = new DenseVector(Array(5.0, 4.0))
405
406
+ gemv(1.0, sA3, sx3, 0.0, y17)
407
+ gemv(1.0, sA4, sx3, 0.0, y18)
408
409
+ assert(y17 ~== expected4 absTol 1e-15)
410
+ assert(y18 ~== expected4 absTol 1e-15)
411
412
val dAT =
413
new DenseMatrix(3, 4, Array(0.0, 2.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 3.0))
414
val sAT =
0 commit comments