Skip to content

Commit ce6de0b

Browse files
committed
Fix a minor bug in the Bareiss algorithm
1 parent a919c23 commit ce6de0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/alias_elimination.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ function bareiss!(
283283
for ei in k+1:m
284284
# elimate `v`
285285
coeff = 0
286-
vars = eadj[ei]
287-
vj = findfirst(isequal(v), vars)
286+
ivars = eadj[ei]
287+
vj = findfirst(isequal(v), ivars)
288288
if vj === nothing # `v` is not in in `e`
289289
continue
290290
else # remove `v`
@@ -303,7 +303,7 @@ function bareiss!(
303303
empty!(tmp_incidence)
304304
empty!(tmp_coeffs)
305305
empty!(vars)
306-
union!(vars, kvars, ivars)
306+
union!(vars, ivars, kvars)
307307

308308
for v in vars
309309
ck = getcoeff(kvars, kcoeffs, v)

0 commit comments

Comments
 (0)