Skip to content

Commit 7e8faf4

Browse files
authored
Update small.jl (#183)
close #169
1 parent 6832e7f commit 7e8faf4

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

test/small.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,30 @@ end;
9191
problem = ColoringProblem(; structure=:nonsymmetric, partition=:bidirectional)
9292
order = RandomOrder(StableRNG(0), 0)
9393

94+
@testset "Anti-diagonal" begin
95+
A = sparse([0 0 0 1; 0 0 1 0; 0 1 0 0; 1 0 0 0])
96+
97+
result = coloring(
98+
A, problem, GreedyColoringAlgorithm{:direct}(; postprocessing=false)
99+
)
100+
@test ncolors(result) == 2
101+
102+
result = coloring(
103+
A, problem, GreedyColoringAlgorithm{:direct}(; postprocessing=true)
104+
)
105+
@test ncolors(result) == 1
106+
107+
result = coloring(
108+
A, problem, GreedyColoringAlgorithm{:substitution}(; postprocessing=false)
109+
)
110+
@test ncolors(result) == 2
111+
112+
result = coloring(
113+
A, problem, GreedyColoringAlgorithm{:substitution}(; postprocessing=true)
114+
)
115+
@test ncolors(result) == 1
116+
end
117+
94118
@testset "Triangle" begin
95119
A = sparse([1 1 0; 0 1 1; 1 0 1])
96120

0 commit comments

Comments
 (0)