Skip to content

Commit 4204602

Browse files
committed
Fix ambiguity.
1 parent c39f636 commit 4204602

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

src/ambiguities.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ permutation(weights::AbstractVector, alg::BT) = error()
3030
permutation(weights::AbstractVector, alg::SAT) = error()
3131
permutation(weights::AbstractVector, alg::MinimalChordal) = error()
3232
permutation(weights::AbstractVector, alg::CompositeRotations) = error()
33+
permutation(weights::AbstractVector, alg::GraphCompression) = error()
3334
permutation(weights::AbstractVector, alg::SafeRules) = error()
3435
permutation(weights::AbstractVector, alg::SafeSeparators) = error()
3536
permutation(weights::AbstractVector, alg::ConnectedComponents) = error()

src/elimination_algorithms.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2982,11 +2982,13 @@ function twins_impl!(
29822982
@inbounds h = @view head[i]
29832983
return DoublyLinkedList(h, prev, next)
29842984
end
2985-
2986-
s = popfirst!(free); m += one(V)
2987-
@inbounds prepend!(set(s), oneto(n)); size[s] = n
2988-
fill!(svar, s)
2989-
2985+
2986+
if ispositive(n)
2987+
s = popfirst!(free); m += one(V)
2988+
@inbounds prepend!(set(s), oneto(n)); size[s] = n
2989+
fill!(svar, s)
2990+
end
2991+
29902992
@inbounds for j in oneto(n)
29912993
for i in neighbors(graph, j)
29922994
if i != j

test/core.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ end
477477
SAT{CryptoMiniSat_jll}(),
478478
MinimalChordal(),
479479
CompositeRotations([1, 2, 3]),
480+
GraphCompression(),
480481
SafeRules(),
481482
SafeSeparators(),
482483
ConnectedComponents(),
@@ -558,6 +559,7 @@ end
558559
BT(),
559560
MinimalChordal(),
560561
CompositeRotations([]),
562+
GraphCompression(),
561563
SafeRules(),
562564
SafeSeparators(),
563565
ConnectedComponents(),
@@ -620,6 +622,7 @@ end
620622
SafeFlowCutter(; time = 1),
621623
BT(),
622624
CompositeRotations([1]),
625+
GraphCompression(),
623626
SafeRules(),
624627
SafeSeparators(),
625628
ConnectedComponents(),
@@ -907,6 +910,7 @@ end
907910
BT(),
908911
MinimalChordal(),
909912
CompositeRotations([1, 3]),
913+
GraphCompression(),
910914
SafeRules(),
911915
SafeSeparators(),
912916
ConnectedComponents(),

0 commit comments

Comments
 (0)