Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
- version: '1'
os: ubuntu-latest
arch: x64
- version: '1.6'
os: ubuntu-latest
arch: x64
- version: '1.10'
os: ubuntu-latest
arch: x64
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
ChainRulesCore = "1"
DataStructures = "0.19"
MutableArithmetics = "0.3, 1"
julia = "1.6"
julia = "1.10"
10 changes: 2 additions & 8 deletions src/gcd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,8 @@ function deflation(p::AbstractPolynomialLike)
shift_defl = shift_deflation.(p, variables(p))
shift = getindex.(shift_defl, 1)
defl = getindex.(shift_defl, 2)
s = prod(
variables(p) .^ shift;
init = constant_monomial(p),
)::monomial_type(p)
d = prod(
variables(p) .^ defl;
init = constant_monomial(p),
)::monomial_type(p)
s = monomial(variables(p), shift)
d = monomial(variables(p), defl)
return s, d
end

Expand Down
11 changes: 11 additions & 0 deletions src/term.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ Returns the monomial of the term `t`.
### Examples

Calling `monomial` on ``4x^2y`` should return ``x^2y``.

monomial(variables, exponents)

Returns the monomial corresponding to `prod(variables .^ exponents)`

### Examples

In order to create `x^2 * y`,

* with DynamicPolynomials, use `monomial([x, y], [2, 1])`,
* with TypedPolynomials, use `monomial((x, y), (2, 1))`.
"""
function monomial end
monomial(t::AbstractTerm) = t.monomial # by convention, the field should be `monomial`.
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ TypedPolynomials = "afbbf031-7a57-5f58-a1b9-b774a0fad08d"

[compat]
DynamicPolynomials = "0.6"
TypedPolynomials = "0.4"
TypedPolynomials = "0.4.2"