@@ -33,19 +33,18 @@ class BlockMatrixSuite extends FunSuite with MLlibTestSparkContext {
3333 val colPerPart = 2
3434 val numPartitions = 3
3535 var gridBasedMat : BlockMatrix = _
36- type SubMatrix = ((Int , Int ), Matrix )
3736
3837 override def beforeAll () {
3938 super .beforeAll()
4039
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 ))))
4746
48- gridBasedMat = new BlockMatrix (sc.parallelize(entries , numPartitions), rowPerPart, colPerPart)
47+ gridBasedMat = new BlockMatrix (sc.parallelize(blocks , numPartitions), rowPerPart, colPerPart)
4948 }
5049
5150 test(" size" ) {
0 commit comments