File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -455,30 +455,30 @@ function decompress_single_color!(
455455 result:: StarSetColoringResult ,
456456 uplo:: Symbol = :F ,
457457)
458- (; ag, color, group, star_set) = result
459- (; hub, spokes) = star_set
458+ (; ag, compressed_indices, group) = result
460459 (; S) = ag
461460 uplo == :F && check_same_pattern (A, S)
462461
463- # Recover the diagonal coefficients of A
464- if has_diagonal (ag)
465- for i in group[c]
466- if ! iszero (S[i, i])
467- A[i, i] = b[i]
468- end
469- end
470- end
471-
472- # Recover the off-diagonal coefficients of A
473- for s in eachindex (hub, spokes)
474- j = abs (hub[s])
475- if color[j] == c
476- for i in spokes[s]
477- if in_triangle (i, j, uplo)
478- A[i, j] = b[i]
479- end
480- if in_triangle (j, i, uplo)
481- A[j, i] = b[i]
462+ offset = (c - 1 ) * S. n
463+ lower_index = offset + 1
464+ upper_index = c * S. n
465+ rvS = rowvals (S)
466+ for j in group[c]
467+ for k in nzrange (S, j)
468+ if lower_index ≤ compressed_indices[k] ≤ upper_index
469+ l = compressed_indices[k] - offset
470+ i = rvS[k]
471+ if i == j
472+ # Recover the diagonal coefficients of A
473+ A[i, i] = b[l]
474+ else
475+ # Recover the off-diagonal coefficients of A
476+ if in_triangle (i, j, uplo)
477+ A[i, j] = b[l]
478+ end
479+ if in_triangle (j, i, uplo)
480+ A[j, i] = b[l]
481+ end
482482 end
483483 end
484484 end
You can’t perform that action at this time.
0 commit comments