Skip to content

Commit 39b3fa8

Browse files
authored
Apply suggestions from code review
1 parent d554b68 commit 39b3fa8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/coloring.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,10 @@ function TreeSet(
456456
# Maintain a record of visited trees to efficiently reset found_in_tree
457457
visited_trees = Vector{T}(undef, nt)
458458

459+
# Number of trees visited for each column of S
460+
nt_visited = 0
459461
rvS = rowvals(S)
460462
for j in axes(S, 2)
461-
# Number of visited trees that contain vertex j
462-
ntree_visited = 0
463463

464464
for pos in nzrange(S, j)
465465
i = rvS[pos]
@@ -503,6 +503,7 @@ function TreeSet(
503503
for t in 1:nt_visited
504504
found_in_tree[visited_trees[t]] = false
505505
end
506+
nt_visited = 0
506507
end
507508

508509
# Compute a shifted cumulative sum of tree_edge_indices, starting from one

0 commit comments

Comments
 (0)