@@ -391,9 +391,7 @@ mutable struct MPolyCoeffs{T <: AbstractAlgebra.NCRingElem, S <: AbstractAlgebra
391391 temp:: S # only used if inplace == true
392392
393393 function MPolyCoeffs (f:: AbstractAlgebra.NCRingElem ; inplace:: Bool = false )
394- I = new {typeof(f), elem_type(coefficient_ring_type(f))} ()
395- I. poly = f
396- I. inplace = inplace
394+ I = new {typeof(f), elem_type(coefficient_ring_type(f))} (f, inplace)
397395 if inplace
398396 I. temp = zero (coefficient_ring (parent (f)))
399397 end
@@ -413,9 +411,7 @@ mutable struct MPolyExponentVectors{T <: AbstractAlgebra.RingElem, S}
413411 end
414412
415413 function MPolyExponentVectors (:: Type{Vector{S}} , f:: AbstractAlgebra.NCRingElem ; inplace:: Bool = false ) where S
416- I = new {typeof(f), Vector{S}} ()
417- I. poly = f
418- I. inplace = inplace
414+ I = new {typeof(f), Vector{S}} (f, inplace)
419415 if inplace
420416 # Don't use `zeros`: If S === ZZRingElem, then all the entries would be identical
421417 I. temp = [zero (S) for _ in 1 : nvars (parent (f))]
@@ -430,9 +426,7 @@ mutable struct MPolyTerms{T <: AbstractAlgebra.NCRingElem}
430426 temp:: T # only used if inplace == true
431427
432428 function MPolyTerms (f:: AbstractAlgebra.NCRingElem ; inplace:: Bool = false )
433- I = new {typeof(f)} ()
434- I. poly = f
435- I. inplace = inplace
429+ I = new {typeof(f)} (f, inplace)
436430 if inplace
437431 I. temp = zero (parent (f))
438432 end
@@ -446,9 +440,7 @@ mutable struct MPolyMonomials{T <: AbstractAlgebra.NCRingElem}
446440 temp:: T # only used if inplace == true
447441
448442 function MPolyMonomials (f:: AbstractAlgebra.NCRingElem ; inplace:: Bool = false )
449- I = new {typeof(f)} ()
450- I. poly = f
451- I. inplace = inplace
443+ I = new {typeof(f)} (f, inplace)
452444 if inplace
453445 I. temp = zero (parent (f))
454446 end
0 commit comments