Skip to content

Commit 5dcb21f

Browse files
authored
Update result.jl (#92)
1 parent e20b4dc commit 5dcb21f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/result.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ end
143143
function RowColoringResult(S::SparseMatrixCSC, color::Vector{Int})
144144
Sᵀ = sparse(transpose(S))
145145
group = group_by_color(color)
146-
C = maximum(color)
146+
C = length(group) # ncolors
147147
I, J, _ = findnz(S)
148148
compressed_indices = zeros(Int, nnz(S))
149149
for k in eachindex(I, J, compressed_indices)
@@ -359,7 +359,7 @@ function LinearSystemColoringResult(
359359
S::SparseMatrixCSC, color::Vector{Int}, decompression_eltype::Type{R}
360360
) where {R}
361361
group = group_by_color(color)
362-
C = maximum(color)
362+
C = length(group) # ncolors
363363

364364
# build T such that T * strict_upper_nonzeros(A) = B
365365
# and solve a linear least-squares problem

0 commit comments

Comments
 (0)