From 22cc2e74634993dbeb35558128a2284ad457dfd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 26 Sep 2021 00:02:00 +0000 Subject: [PATCH 1/8] CompatHelper: bump compat for "AbstractAlgebra" to "0.22" --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 06f39350f..bc000ed11 100644 --- a/Project.toml +++ b/Project.toml @@ -21,7 +21,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TestSetExtensions = "98d24dd4-01ad-11ea-1b02-c9a08f80db04" [compat] -AbstractAlgebra = "0.13, 0.18, 0.19, 0.20, 0.21" +AbstractAlgebra = "0.13, 0.18, 0.19, 0.20, 0.21, 0.22" DataStructures = "0.18" GroebnerBasis = "0.1, 0.2, 0.3" IterTools = "1" From 47c4eb8bcaa5caa4755a1f0b237616dc7acd065f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 Sep 2021 00:01:37 +0000 Subject: [PATCH 2/8] CompatHelper: bump compat for "Nemo" to "0.27" --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 06f39350f..8d157b37d 100644 --- a/Project.toml +++ b/Project.toml @@ -27,7 +27,7 @@ GroebnerBasis = "0.1, 0.2, 0.3" IterTools = "1" MacroTools = "0.5" ModelingToolkit = "6" -Nemo = "0.24, 0.25, 0.26" +Nemo = "0.24, 0.25, 0.26, 0.27" Primes = "0.5" Singular = "0.4, 0.5, 0.6" SpecialFunctions = "1" From ee03dfef815eacefd2e7f61554ca95f51f8108c2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 Oct 2021 00:02:04 +0000 Subject: [PATCH 3/8] CompatHelper: bump compat for "Singular" to "0.8" --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index df8973aaa..075aa270c 100644 --- a/Project.toml +++ b/Project.toml @@ -29,7 +29,7 @@ MacroTools = "0.5" ModelingToolkit = "6" Nemo = "0.24, 0.25, 0.26, 0.27" Primes = "0.5" -Singular = "0.4, 0.5, 0.6, 0.7" +Singular = "0.4, 0.5, 0.6, 0.7, 0.8" SpecialFunctions = "1" TestSetExtensions = "2" julia = "1.5" From 7b972e5375a6443148533dd8ca9634f3bf19f2dc Mon Sep 17 00:00:00 2001 From: Ilia Ilmer Date: Fri, 12 Nov 2021 09:19:06 -0500 Subject: [PATCH 4/8] replace Singular based factorisation with nemo --- src/util.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util.jl b/src/util.jl index ca7d53b8b..174d51a9c 100644 --- a/src/util.jl +++ b/src/util.jl @@ -206,7 +206,10 @@ function fast_factor(poly::MPolyElem{fmpq}) prelim_factors = uncertain_factorization(poly) cert_factors = map(pair -> pair[1], filter(f -> f[2], prelim_factors)) uncert_factors = map(pair -> pair[1], filter(f -> !f[2], prelim_factors)) - append!(cert_factors, factor_via_singular(uncert_factors)) + for p in uncert_factors + factors = Nemo.factor(p) + append!(cert_factors, factors[1]) + end return cert_factors end From 92949e50a759d3cd4fa80f08307b437b2e9adfa7 Mon Sep 17 00:00:00 2001 From: Ilia Ilmer Date: Fri, 12 Nov 2021 11:11:32 -0500 Subject: [PATCH 5/8] trying to iterate over the Nemo.factor output --- src/util.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util.jl b/src/util.jl index 174d51a9c..f6015a73b 100644 --- a/src/util.jl +++ b/src/util.jl @@ -207,8 +207,9 @@ function fast_factor(poly::MPolyElem{fmpq}) cert_factors = map(pair -> pair[1], filter(f -> f[2], prelim_factors)) uncert_factors = map(pair -> pair[1], filter(f -> !f[2], prelim_factors)) for p in uncert_factors - factors = Nemo.factor(p) - append!(cert_factors, factors[1]) + for (f, e) in Nemo.factor(p) + append!(cert_factors, f) + end end return cert_factors end From d119739afccc962a66a99be3d664f556bc373e45 Mon Sep 17 00:00:00 2001 From: Ilia Ilmer Date: Sun, 14 Nov 2021 13:53:03 -0500 Subject: [PATCH 6/8] fixed the iteration error --- src/util.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.jl b/src/util.jl index f6015a73b..cf6f47f56 100644 --- a/src/util.jl +++ b/src/util.jl @@ -207,9 +207,9 @@ function fast_factor(poly::MPolyElem{fmpq}) cert_factors = map(pair -> pair[1], filter(f -> f[2], prelim_factors)) uncert_factors = map(pair -> pair[1], filter(f -> !f[2], prelim_factors)) for p in uncert_factors - for (f, e) in Nemo.factor(p) - append!(cert_factors, f) - end + for f in Nemo.factor(p) + push!(cert_factors, f[1]) + end end return cert_factors end From f3a6909297ea607bd6dd8880451a61322461b5d2 Mon Sep 17 00:00:00 2001 From: Ilia Ilmer Date: Sun, 14 Nov 2021 13:53:24 -0500 Subject: [PATCH 7/8] update version? --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 80f43d47e..545d84c6a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StructuralIdentifiability" uuid = "220ca800-aa68-49bb-acd8-6037fa93a544" authors = ["Ruiwen Dong, Christian Goodbrake, Heather Harrington, Gleb Pogudin "] -version = "0.3.0" +version = "0.3.1" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" From 560fc51d388f0a665c6db3fb6405c7e216d929b1 Mon Sep 17 00:00:00 2001 From: Ilia Ilmer Date: Sun, 14 Nov 2021 15:07:07 -0500 Subject: [PATCH 8/8] update version? --- src/util.jl | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/util.jl b/src/util.jl index cf6f47f56..288b78343 100644 --- a/src/util.jl +++ b/src/util.jl @@ -181,27 +181,6 @@ end # ------------------------------------------------------------------------------ -function factor_via_singular(polys::Array{<: MPolyElem{fmpq},1}) - if isempty(polys) - return [] - end - original_ring = parent(polys[1]) - R_sing, var_sing = Singular.PolynomialRing(Singular.QQ, map(string, symbols(original_ring))) - result = Array{typeof(polys[1]),1}() - for p in polys - @debug "\t Factoring with Singular a polynomial of size $(length(p))" - @debug p - p_sing = parent_ring_change(p, R_sing) - for f in Singular.factor(p_sing) - @debug f - push!(result, parent_ring_change(f[1], original_ring)) - end - end - return result -end - -# ------------------------------------------------------------------------------ - function fast_factor(poly::MPolyElem{fmpq}) prelim_factors = uncertain_factorization(poly) cert_factors = map(pair -> pair[1], filter(f -> f[2], prelim_factors))