Skip to content

Commit 8b3834d

Browse files
authored
Use diagonal_indices in the general decompress! for acyclic coloring
1 parent 0702578 commit 8b3834d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/decompression.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ end
534534
function decompress!(
535535
A::AbstractMatrix, B::AbstractMatrix, result::TreeSetColoringResult, uplo::Symbol=:F
536536
)
537-
(; ag, color, reverse_bfs_orders, tree_edge_indices, nt, buffer) = result
537+
(; ag, color, reverse_bfs_orders, tree_edge_indices, nt, diagonal_indices, buffer) = result
538538
(; S) = ag
539539
uplo == :F && check_same_pattern(A, S)
540540
R = eltype(A)
@@ -548,10 +548,8 @@ function decompress!(
548548

549549
# Recover the diagonal coefficients of A
550550
if !augmented_graph(ag)
551-
for i in axes(S, 1)
552-
if !iszero(S[i, i])
553-
A[i, i] = B[i, color[i]]
554-
end
551+
for i in diagonal_indices
552+
A[i, i] = B[i, color[i]]
555553
end
556554
end
557555

0 commit comments

Comments
 (0)