Skip to content

Commit

Permalink
uwu
Browse files Browse the repository at this point in the history
  • Loading branch information
sumiya11 committed Jul 27, 2024
1 parent 6654d74 commit 462b269
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/f4/f4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ function f4_add_critical_pairs_to_matrix!(
)
@invariant issorted(
pairset.pairs[1:npairs],
by=pair -> monom_totaldeg(ht.monoms[pair.lcm])
lt=(a,b) -> monom_isless(ht.monoms[a.lcm], ht.monoms[b.lcm], ht.ord)
)

matrix_reinitialize!(matrix, npairs)
Expand Down
22 changes: 1 addition & 21 deletions src/f4/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ function sort_pairset_by_lcm!(pairset::Pairset, npairs::Int, hashtable::Monomial
)
permutation = collect(1:npairs)
sort_part!(permutation, 1, npairs, lt=cmps, scratch=pairset.scratch1)
# @inbounds pairs[1:npairs] = pairs[permutation]
# @inbounds pairset.degrees[1:npairs] = pairset.degrees[permutation]
if length(pairset.scratch2) < length(permutation)
resize!(pairset.scratch2, nextpow(2, length(permutation) + 1))
end
Expand Down Expand Up @@ -174,25 +172,7 @@ function matrix_row_decreasing_cmp(a::Vector{T}, b::Vector{T}) where {T <: Colum
if va > vb
return false
end
if va < vb
return true
end

@unreachable

# If there are two rows in the upper part of the matrix with the same
# leading term, something went wrong
@invariant false
# If the same leading column => compare the density of rows
va = length(a)
vb = length(b)
if va > vb
return true
end
if va < vb
return false
end
false
va < vb
end

# Compare sparse matrix rows a and b.
Expand Down

0 comments on commit 462b269

Please sign in to comment.