Skip to content

Commit

Permalink
fixes a pivot bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelDavidMohr committed Nov 8, 2023
1 parent f583634 commit 6ac5eac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/siggb/linear_algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function echelonize!(matrix::MacaulayMatrix,
hash2col[col2hash[i]] = MonIdx(i)
end

@inbounds for i in 2:matrix.nrows
@inbounds for i in 1:matrix.nrows
row_ind = matrix.sig_order[i]

row_cols = matrix.rows[row_ind]
Expand All @@ -34,7 +34,10 @@ function echelonize!(matrix::MacaulayMatrix,
does_red = !iszero(pividx) && rev_sigorder[pividx] < i
does_red && break
end
!does_red && continue
if !does_red
pivots[l_col_idx] = row_ind
continue
end

# buffer the row
row_coeffs = matrix.coeffs[row_ind]
Expand Down
1 change: 0 additions & 1 deletion src/siggb/update.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ function update_basis!(basis::Basis,
insert_in_basis_hash_table_pivots!(row, basis_ht, symbol_ht)
lm = basis_ht.exponents[first(row)]
s = new_sig
# println("new $s, $(lm.exps)")

# add everything to basis
l = basis.basis_load + 1
Expand Down

0 comments on commit 6ac5eac

Please sign in to comment.