Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly depend on DynamicPolynomials and Bijections for CompatHelper #965

Merged
merged 3 commits into from
Sep 6, 2023
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
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ version = "5.5.1"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Bijections = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04"
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
DynamicPolynomials = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4"
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Expand Down Expand Up @@ -41,12 +43,14 @@ SymbolicsSymPyExt = "SymPy"

[compat]
ArrayInterface = "6, 7"
Bijections = "0.1"
ConstructionBase = "1.1, 1.2"
DataStructures = "0.18"
DiffRules = "1.4"
Distributions = "0.23, 0.24, 0.25"
DocStringExtensions = "0.7, 0.8, 0.9"
DomainSets = "0.6"
DynamicPolynomials = "0.5"
Groebner = "0.3, 0.4"
IfElse = "0.1"
LaTeXStrings = "1.3"
Expand Down
8 changes: 4 additions & 4 deletions src/groebner_basis.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using DynamicPolynomials
using Bijections

DP = SymbolicUtils.DynamicPolynomials
Bijections = SymbolicUtils.Bijections

const DP = DynamicPolynomials
# extracting underlying polynomial and coefficient type from Polyforms
underlyingpoly(x::Number) = x
underlyingpoly(pf::PolyForm) = pf.p
Expand Down Expand Up @@ -30,7 +30,7 @@ function symbol_to_poly(sympolys::AbstractArray)
# Convert all to DP.Polynomial, so that coefficients are of same type,
# and constants are treated as polynomials
# We also need this because Groebner does not support abstract types as input
polynoms = Vector{DP.Polynomial{true,commontype}}(undef, length(sympolys))
polynoms = Vector{DP.Polynomial{DP.Commutative{DP.CreationOrder}, Graded{LexOrder}, commontype}}(undef, length(sympolys))
for (i, pf) in enumerate(polyforms)
polynoms[i] = underlyingpoly(pf)
end
Expand Down
Loading