Skip to content

Commit 582ebd2

Browse files
refactor: sort SCCs in find_var_sccs
1 parent 9dbf140 commit 582ebd2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/structural_transformation/utils.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ function find_var_sccs(g::BipartiteGraph, assign = nothing)
153153
cmog = DiCMOBiGraph{true}(g,
154154
Matching(assign === nothing ? Base.OneTo(nsrcs(g)) : assign))
155155
sccs = Graphs.strongly_connected_components(cmog)
156+
cgraph = MatchedCondensationGraph(cmog, sccs)
157+
toporder = topological_sort(cgraph)
158+
permute!(sccs, toporder)
156159
foreach(sort!, sccs)
157160
return sccs
158161
end

0 commit comments

Comments
 (0)