Skip to content

Commit

Permalink
Remove more redundant methods
Browse files Browse the repository at this point in the history
The generic code is actually faster than those
  • Loading branch information
fingolfin committed Dec 22, 2024
1 parent 08f690d commit baa6317
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/flint/fmpz_mod_mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ for (etype, rtype, ftype, ctype) in (
return length(a) == 1
end

function is_unit(a::($etype))
return length(a) == 1 && total_degree(a) == 0 && is_unit(coeff(a, 1))
end

function is_constant(a::($etype))
return Bool(@ccall libflint.fmpz_mod_mpoly_is_fmpz(a::Ref{($etype)}, parent(a)::Ref{($rtype)})::Cint)
end
Expand Down
4 changes: 0 additions & 4 deletions src/flint/fmpz_mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ function is_term(a::ZZMPolyRingElem)
return length(a) == 1
end

function is_unit(a::ZZMPolyRingElem)
return length(a) == 1 && total_degree(a) == 0 && is_unit(coeff(a, 1))
end

function is_constant(a::ZZMPolyRingElem)
b = @ccall libflint.fmpz_mpoly_is_fmpz(a::Ref{ZZMPolyRingElem}, parent(a)::Ref{ZZMPolyRing})::Cint
return Bool(b)
Expand Down

0 comments on commit baa6317

Please sign in to comment.