Skip to content

Commit 6ac5eac

Browse files
fixes a pivot bug
1 parent f583634 commit 6ac5eac

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/siggb/linear_algebra.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function echelonize!(matrix::MacaulayMatrix,
1919
hash2col[col2hash[i]] = MonIdx(i)
2020
end
2121

22-
@inbounds for i in 2:matrix.nrows
22+
@inbounds for i in 1:matrix.nrows
2323
row_ind = matrix.sig_order[i]
2424

2525
row_cols = matrix.rows[row_ind]
@@ -34,7 +34,10 @@ function echelonize!(matrix::MacaulayMatrix,
3434
does_red = !iszero(pividx) && rev_sigorder[pividx] < i
3535
does_red && break
3636
end
37-
!does_red && continue
37+
if !does_red
38+
pivots[l_col_idx] = row_ind
39+
continue
40+
end
3841

3942
# buffer the row
4043
row_coeffs = matrix.coeffs[row_ind]

src/siggb/update.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ function update_basis!(basis::Basis,
7676
insert_in_basis_hash_table_pivots!(row, basis_ht, symbol_ht)
7777
lm = basis_ht.exponents[first(row)]
7878
s = new_sig
79-
# println("new $s, $(lm.exps)")
8079

8180
# add everything to basis
8281
l = basis.basis_load + 1

0 commit comments

Comments
 (0)