Skip to content

Commit 6a8ec50

Browse files
committed
Accept AbstractSparseMatrixCSC for decompression
1 parent 3b9fe4b commit 6a8ec50

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/SparseMatrixColorings.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ using PrecompileTools: @compile_workload
3131
using Random: Random, AbstractRNG, default_rng, randperm
3232
using SparseArrays:
3333
SparseArrays,
34+
AbstractSparseMatrixCSC,
3435
SparseMatrixCSC,
3536
dropzeros,
3637
dropzeros!,

src/decompression.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ function decompress!(
586586
end
587587

588588
function decompress!(
589-
A::SparseMatrixCSC{R},
589+
A::AbstractSparseMatrixCSC{R},
590590
B::AbstractMatrix{R},
591591
result::TreeSetColoringResult,
592592
uplo::Symbol=:F,

src/matrices.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function compatible_pattern(A::AbstractMatrix, ag::AdjacencyGraph, uplo::Symbol)
8686
return size(A) == size(ag.S)
8787
end
8888

89-
function compatible_pattern(A::SparseMatrixCSC, ag::AdjacencyGraph, uplo::Symbol)
89+
function compatible_pattern(A::AbstractSparseMatrixCSC, ag::AdjacencyGraph, uplo::Symbol)
9090
nnzS = (uplo == :L || uplo == :U) ? (nb_edges(ag) + ag.nb_self_loops) : nnz(ag.S)
9191
return size(A) == size(ag.S) && nnz(A) == nnzS
9292
end

0 commit comments

Comments
 (0)