@@ -511,21 +511,29 @@ end
511511# ##############################################################################
512512
513513@doc raw """
514- coefficients(a::MPolyRingElem{T}) where T <: RingElement
514+ coefficients(a::MPolyRingElem{T}; inplace::Bool = false ) where T <: RingElement
515515
516516Return an iterator for the coefficients of the given polynomial. To retrieve
517517an array of the coefficients, use `collect(coefficients(a))`.
518+
519+ If `inplace` is `true`, the elements of the iterator may share their memory. This
520+ means that an element returned by the iterator may be overwritten 'in place' in
521+ the next iteration step. This may result in significantly fewer memory allocations.
518522"""
519523function coefficients (a:: MPolyRingElem{T} ; inplace:: Bool = false ) where T <: RingElement
520524 return Generic. MPolyCoeffs (a, inplace= inplace)
521525end
522526
523527@doc raw """
524- exponent_vectors(a::MPolyRingElem{T}) where T <: RingElement
528+ exponent_vectors(a::MPolyRingElem{T}; inplace::Bool = false ) where T <: RingElement
525529
526530Return an iterator for the exponent vectors of the given polynomial. To
527531retrieve an array of the exponent vectors, use
528532`collect(exponent_vectors(a))`.
533+
534+ If `inplace` is `true`, the elements of the iterator may share their memory. This
535+ means that an element returned by the iterator may be overwritten 'in place' in
536+ the next iteration step. This may result in significantly fewer memory allocations.
529537"""
530538function exponent_vectors (a:: MPolyRingElem{T} ; inplace:: Bool = false ) where T <: RingElement
531539 return Generic. MPolyExponentVectors (a, inplace= inplace)
@@ -536,20 +544,28 @@ function exponent_vectors(::Type{Vector{S}}, a::MPolyRingElem{T}; inplace::Bool
536544end
537545
538546@doc raw """
539- monomials(a::MPolyRingElem{T}) where T <: RingElement
547+ monomials(a::MPolyRingElem{T}; inplace::Bool = false ) where T <: RingElement
540548
541549Return an iterator for the monomials of the given polynomial. To retrieve
542550an array of the monomials, use `collect(monomials(a))`.
551+
552+ If `inplace` is `true`, the elements of the iterator may share their memory. This
553+ means that an element returned by the iterator may be overwritten 'in place' in
554+ the next iteration step. This may result in significantly fewer memory allocations.
543555"""
544556function monomials (a:: MPolyRingElem{T} ; inplace:: Bool = false ) where T <: RingElement
545557 return Generic. MPolyMonomials (a, inplace= inplace)
546558end
547559
548560@doc raw """
549- terms(a::MPolyRingElem{T}) where T <: RingElement
561+ terms(a::MPolyRingElem{T}; inplace::Bool = false ) where T <: RingElement
550562
551563Return an iterator for the terms of the given polynomial. To retrieve
552564an array of the terms, use `collect(terms(a))`.
565+
566+ If `inplace` is `true`, the elements of the iterator may share their memory. This
567+ means that an element returned by the iterator may be overwritten 'in place' in
568+ the next iteration step. This may result in significantly fewer memory allocations.
553569"""
554570function terms (a:: MPolyRingElem{T} ; inplace:: Bool = false ) where T <: RingElement
555571 return Generic. MPolyTerms (a, inplace= inplace)
0 commit comments