@@ -15,40 +15,42 @@ algo = GreedyColoringAlgorithm()
1515
1616@test startswith (string (algo), " GreedyColoringAlgorithm(" )
1717
18+ asymmetric_params = vcat (
19+ [(10 , 20 , p) for p in (0.1 : 0.1 : 0.5 )],
20+ [(20 , 10 , p) for p in (0.1 : 0.1 : 0.5 )],
21+ [(100 , 200 , p) for p in (0.01 : 0.01 : 0.05 )],
22+ [(200 , 100 , p) for p in (0.01 : 0.01 : 0.05 )],
23+ )
24+
25+ symmetric_params = vcat (
26+ [(10 , p) for p in (0.1 : 0.05 : 0.5 )], #
27+ [(100 , p) for p in (0.01 : 0.005 : 0.05 )],
28+ )
29+
1830@testset " Column coloring" begin
19- @testset " Size ($m , $n ) - sparsity $p " for (m, n, p) in [
20- (10 , 20 , 0.05 ), (20 , 10 , 0.05 ), (100 , 200 , 0.05 ), (200 , 100 , 0.05 )
21- ]
31+ @testset " Size ($m , $n ) - sparsity $p " for (m, n, p) in asymmetric_params
2232 @testset " $(typeof (A)) " for A in matrix_versions (sprand (rng, Bool, m, n, p))
2333 column_color = column_coloring (A, algo)
2434 @test check_structurally_orthogonal_columns (A, column_color)
25- @test minimum (column_color) == 1
26- @test maximum (column_color) < size (A, 2 ) ÷ 2
2735 end
2836 end
2937end ;
3038
3139@testset " Row coloring" begin
32- @testset " Size ($m , $n ) - sparsity $p " for (m, n, p) in [
33- (10 , 20 , 0.05 ), (20 , 10 , 0.05 ), (100 , 200 , 0.05 ), (200 , 100 , 0.05 )
34- ]
35- @testset " $(typeof (A)) " for A in matrix_versions (sprand (rng, Bool, m, n, 0.05 ))
40+ @testset " Size ($m , $n ) - sparsity $p " for (m, n, p) in asymmetric_params
41+ @testset " $(typeof (A)) " for A in matrix_versions (sprand (rng, Bool, m, n, p))
3642 row_color = row_coloring (A, algo)
3743 @test check_structurally_orthogonal_columns (transpose (A), row_color)
38- @test minimum (row_color) == 1
39- @test maximum (row_color) < size (A, 1 ) ÷ 2
4044 end
4145 end
4246end ;
4347
4448@testset " Symmetric coloring" begin
45- @testset " Size ($n , $n ) - sparsity $p " for (n, p) in [( 10 , 0.05 ), ( 100 , 0.05 )]
49+ @testset " Size ($n , $n ) - sparsity $p " for (n, p) in symmetric_params
4650 @testset " $(typeof (A)) " for A in
4751 matrix_versions (Symmetric (sprand (rng, Bool, n, n, p)))
4852 symmetric_color = symmetric_coloring (A, algo)
4953 @test check_symmetrically_orthogonal_columns (A, symmetric_color)
50- @test minimum (symmetric_color) == 1
51- @test maximum (symmetric_color) < size (A, 2 ) ÷ 2
5254 end
5355 end
5456end ;
0 commit comments