From baa6317f32778477ccce194ff894b96bd4c7a776 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 22 Dec 2024 14:38:57 +0100 Subject: [PATCH] Remove more redundant methods The generic code is actually faster than those --- src/flint/fmpz_mod_mpoly.jl | 4 ---- src/flint/fmpz_mpoly.jl | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/flint/fmpz_mod_mpoly.jl b/src/flint/fmpz_mod_mpoly.jl index 2254152c3d..e7d44cd2e7 100644 --- a/src/flint/fmpz_mod_mpoly.jl +++ b/src/flint/fmpz_mod_mpoly.jl @@ -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 diff --git a/src/flint/fmpz_mpoly.jl b/src/flint/fmpz_mpoly.jl index f83fb2be72..73bb15c4d1 100644 --- a/src/flint/fmpz_mpoly.jl +++ b/src/flint/fmpz_mpoly.jl @@ -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)