Skip to content

Commit 8bbe388

Browse files
committed
Add check
1 parent 266784e commit 8bbe388

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/check.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using LinearAlgebra
2+
using SparseArrays
23
using SparseMatrixColorings:
34
structurally_orthogonal_columns,
45
symmetrically_orthogonal_columns,
@@ -308,3 +309,12 @@ end
308309
log = (:warn, "4 colors provided for 3 rows.")
309310
@test_logs log !substitutable_bidirectional(A, B, [1, 0, 0, 1], [0, 1, 1]; verbose=true)
310311
end
312+
313+
# See https://github.com/gdalle/SparseMatrixColorings.jl/pull/300
314+
@testset "Empty matrix" begin
315+
problem = ColoringProblem(; structure = :symmetric, partition = :column)
316+
algo = GreedyColoringAlgorithm(; decompression = :substitution)
317+
S = spzeros(Int, 0, 0)
318+
result = coloring(S, problem, algo)
319+
@test isempty(result.color)
320+
end

0 commit comments

Comments
 (0)