Skip to content

Commit

Permalink
Merge pull request #1 from jonasspinner/patch-1
Browse files Browse the repository at this point in the history
Fix add_pivot
  • Loading branch information
StefanKarpinski authored Apr 16, 2024
2 parents 7cfb508 + 3d0fc0e commit ebf5fe4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/GraphModularDecomposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ function symgraph_factorizing_permutation(
end
Xₐ = X S
isempty(Xₐ) && continue
X = X \ Xₐ
isempty(X) && continue
P[i] = X
Xₙ = X \ Xₐ
isempty(Xₙ) && continue
P[i] = Xₙ
insert!(P, i + between, Xₐ)
add_pivot(X, Xₐ)
add_pivot(X, Xₐ, Xₙ)
i += 1
end
end

function add_pivot(X, Xₐ)
function add_pivot(X, Xₐ, Xₙ)
if X in pivots
push!(pivots, Xₐ)
else
S, L = smaller_larger(X, Xₐ)
S, L = smaller_larger(Xₐ, Xₙ)
push!(pivots, S)
i = findfirst(isequal(X), modules)
if i !== nothing
Expand Down

0 comments on commit ebf5fe4

Please sign in to comment.