@@ -33,19 +33,18 @@ class BlockMatrixSuite extends FunSuite with MLlibTestSparkContext {
33
33
val colPerPart = 2
34
34
val numPartitions = 3
35
35
var gridBasedMat : BlockMatrix = _
36
- type SubMatrix = ((Int , Int ), Matrix )
37
36
38
37
override def beforeAll () {
39
38
super .beforeAll()
40
39
41
- val entries : Seq [SubMatrix ] = Seq (
42
- new SubMatrix ((0 , 0 ), new DenseMatrix (2 , 2 , Array (1.0 , 0.0 , 0.0 , 2.0 ))),
43
- new SubMatrix ((0 , 1 ), new DenseMatrix (2 , 2 , Array (0.0 , 1.0 , 0.0 , 0.0 ))),
44
- new SubMatrix ((1 , 0 ), new DenseMatrix (2 , 2 , Array (3.0 , 0.0 , 1.0 , 1.0 ))),
45
- new SubMatrix ((1 , 1 ), new DenseMatrix (2 , 2 , Array (1.0 , 2.0 , 0.0 , 1.0 ))),
46
- new SubMatrix ((2 , 1 ), new DenseMatrix (1 , 2 , Array (1.0 , 5.0 ))))
40
+ val blocks : Seq [(( Int , Int ), Matrix ) ] = Seq (
41
+ ((0 , 0 ), new DenseMatrix (2 , 2 , Array (1.0 , 0.0 , 0.0 , 2.0 ))),
42
+ ((0 , 1 ), new DenseMatrix (2 , 2 , Array (0.0 , 1.0 , 0.0 , 0.0 ))),
43
+ ((1 , 0 ), new DenseMatrix (2 , 2 , Array (3.0 , 0.0 , 1.0 , 1.0 ))),
44
+ ((1 , 1 ), new DenseMatrix (2 , 2 , Array (1.0 , 2.0 , 0.0 , 1.0 ))),
45
+ ((2 , 1 ), new DenseMatrix (1 , 2 , Array (1.0 , 5.0 ))))
47
46
48
- gridBasedMat = new BlockMatrix (sc.parallelize(entries , numPartitions), rowPerPart, colPerPart)
47
+ gridBasedMat = new BlockMatrix (sc.parallelize(blocks , numPartitions), rowPerPart, colPerPart)
49
48
}
50
49
51
50
test(" size" ) {
0 commit comments