Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/graph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,23 @@ function bidirectional_pattern(S::SparsityPatternCSC{T}; symmetric_pattern::Bool
counter = 1
for col in (n + 1):p
nnz_col = colptr[col]
colptr[col] = counter
colptr[col] = nnzS + counter
counter += nnz_col
end

for j in 1:n
for index in S.colptr[j]:(S.colptr[j + 1] - 1)
i = S.rowval[index]
pos = colptr[n + i]
rowval[nnzS + pos] = j
edge_to_index[nnzS + pos] = edge_to_index[index]
rowval[pos] = j
edge_to_index[pos] = edge_to_index[index]
colptr[n + i] += 1
end
end

colptr[p + 1] = nnzS + counter
for col in p:-1:(n + 2)
colptr[col] = nnzS + colptr[col - 1]
colptr[col] = colptr[col - 1]
end
colptr[n + 1] = nnzS + 1
end
Expand Down