@@ -3,7 +3,7 @@ using JET
33using LinearAlgebra
44using SparseArrays
55using SparseMatrixColorings
6- using SparseMatrixColorings: matrix_versions, respectful_similar
6+ using SparseMatrixColorings: matrix_versions, respectful_similar, all_orders
77using StableRNGs
88using Test
99
@@ -178,25 +178,27 @@ end;
178178 (:nonsymmetric , :bidirectional , :direct ),
179179 (:nonsymmetric , :bidirectional , :substitution ),
180180 ]
181- result = coloring (
182- A,
183- ColoringProblem (; structure, partition),
184- GreedyColoringAlgorithm (; decompression);
185- )
186- if partition in (:column , :bidirectional )
187- @test eltype (column_colors (result)) == Int32
188- @test eltype (column_groups (result)[1 ]) == Int32
189- end
190- if partition in (:row , :bidirectional )
191- @test eltype (row_colors (result)) == Int32
192- @test eltype (row_groups (result)[1 ]) == Int32
193- end
194- if partition == :bidirectional
195- Br, Bc = compress (A, result)
196- @test decompress (Br, Bc, result) isa SparseMatrixCSC{Float32,Int32}
197- else
198- B = compress (A, result)
199- @test decompress (B, result) isa SparseMatrixCSC{Float32,Int32}
181+ @testset for order in all_orders ()
182+ result = coloring (
183+ A,
184+ ColoringProblem (; structure, partition),
185+ GreedyColoringAlgorithm (order; decompression);
186+ )
187+ if partition in (:column , :bidirectional )
188+ @test eltype (column_colors (result)) == Int32
189+ @test eltype (column_groups (result)[1 ]) == Int32
190+ end
191+ if partition in (:row , :bidirectional )
192+ @test eltype (row_colors (result)) == Int32
193+ @test eltype (row_groups (result)[1 ]) == Int32
194+ end
195+ if partition == :bidirectional
196+ Br, Bc = compress (A, result)
197+ @test decompress (Br, Bc, result) isa SparseMatrixCSC{Float32,Int32}
198+ else
199+ B = compress (A, result)
200+ @test decompress (B, result) isa SparseMatrixCSC{Float32,Int32}
201+ end
200202 end
201203 end
202204end
0 commit comments