Skip to content

Commit 9f7ca6d

Browse files
committed
📝 AbstractPolynomialType -> AbstractPolynomialLike
1 parent 0308049 commit 9f7ca6d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/MultivariatePolynomials.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export AbstractPolynomialLike, AbstractTermLike, AbstractMonomialLike
66
"""
77
AbstractPolynomialLike{T}
88
9-
Abstract type for a value that can act like a polynomial. For instance, an `AbstractTerm{T}` is an `AbstractPolynomialType{T}` since it can act as a polynomial of only one term.
9+
Abstract type for a value that can act like a polynomial. For instance, an
10+
`AbstractTerm{T}` is an `AbstractPolynomialLike{T}` since it can act as a
11+
polynomial of only one term.
1012
"""
1113
abstract type AbstractPolynomialLike{T} end
1214
"""

src/monomial.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ Calling `powers(3x^4*y) should return `((x, 4), (y, 1))`.
101101
powers(t::AbstractTermLike) = tuplezip(variables(t), exponents(t))
102102

103103
"""
104-
constantmonomial(p::AbstractPolynomialType)
104+
constantmonomial(p::AbstractPolynomialLike)
105105
106106
Returns a constant monomial of the monomial type of `p` with the same variables as `p`.
107107
108-
constantmonomial(::Type{PT}) where {PT<:AbstractPolynomialType}
108+
constantmonomial(::Type{PT}) where {PT<:AbstractPolynomialLike}
109109
110110
Returns a constant monomial of the monomial type of a polynomial of type `PT`.
111111
"""

src/term.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ monomial(m::AbstractMonomial) = m
106106
107107
Creates a constant term with coefficient α and the same variables as p.
108108
109-
constantterm(α, ::Type{PT} where {PT<:AbstractPolynomialType}
109+
constantterm(α, ::Type{PT} where {PT<:AbstractPolynomialLike}
110110
111111
Creates a constant term of the term type of a polynomial of type `PT`.
112112
"""
@@ -122,7 +122,7 @@ constantterm(α, p) = α * constantmonomial(p)
122122
123123
Equivalent to `constantterm(zero(T), p)`.
124124
125-
zeroterm(α, ::Type{PT} where {T, PT<:AbstractPolynomialType{T}}
125+
zeroterm(α, ::Type{PT} where {T, PT<:AbstractPolynomialLike{T}}
126126
127127
Equivalent to `constantterm(zero(T), PT)`.
128128
"""

0 commit comments

Comments
 (0)