Skip to content

Commit 2e242f4

Browse files
committed
Fix tests
1 parent 8450830 commit 2e242f4

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/matrices.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,8 @@ function compatible_pattern(A::AbstractMatrix, ag::AdjacencyGraph, uplo::Symbol)
8686
size(A) == size(ag.S)
8787
end
8888
function compatible_pattern(A::SparseMatrixCSC, ag::AdjacencyGraph, uplo::Symbol)
89-
if uplo == :L || uplo == :U
90-
return size(A) == size(ag.S) && nnz(A) == (nb_edges(ag) + ag.nb_self_loops)
91-
else
92-
return size(A) == size(ag.S) && nnz(A) == nnz(ag.S)
93-
end
89+
nnzS = (uplo == :L || uplo == :U) ? (nb_edges(ag) + ag.nb_self_loops) : nnz(ag.S)
90+
size(A) == size(ag.S) && nnz(A) == nnzS
9491
end
9592

9693
function check_compatible_pattern(A::AbstractMatrix, bg::BipartiteGraph)

0 commit comments

Comments
 (0)