Sampling Polynomial Systems
In this Julia package we deal with parametric polynomial systems with finitely many solutions for generic parameters. We use HomotopyContinuation.jl to sample such polynomial systems.
Run monodromy
DecomposingPolynomialSystems.run_monodromy — Functionrun_monodromy(F::Union{System, AbstractSystem}, xp₀=nothing; options...) -> SampledSystemRuns monodromy_solve on a given polynomial system F with starting solutions xp₀[1] and parameters xp₀[2] (if given).
julia> @var x a b;
julia> F = System([x^3+a*x+b]; variables=[x], parameters=[a,b]);
julia> F = run_monodromy(F, ([[1]], [1,-2]); max_loops_no_progress = 10)
SampledSystem with 3 samples
1 unknown: x
2 parameters: a, b
number of solutions: 3
sampled instances: 1run_monodromy(F::SampledSystem, xp₀=nothing; options...) -> SampledSystemReruns monodromy_solve on a given sampled polynomial system F.
SampledSystem
SampledSystem is a struct type that initially contains a polynomial system, the result of monodromy computations, and the solutions-parameters samples obtained with run_monodromy or sample!.
DecomposingPolynomialSystems.unknowns — Functionunknowns(F::SampledSystem) -> Vector{Variable}Returns the vector of unknowns of F.
HomotopyContinuation.ModelKit.parameters — Functionparameters(F::SampledSystem) -> Vector{Variable}Returns the vector of parameters of F.
DecomposingPolynomialSystems.variables — Functionvariables(F::SampledSystem) -> Vector{Variable}Returns the concatenated vector of unknowns and parameters of F.
DecomposingPolynomialSystems.nunknowns — Functionnunknowns(F::SampledSystem) -> IntReturns the number of unknowns of F.
HomotopyContinuation.ModelKit.nparameters — Functionnparameters(F::SampledSystem) -> IntReturns the number of parameters of F.
DecomposingPolynomialSystems.nvariables — Functionnvariables(F::SampledSystem) -> IntReturns the number of variables of F.
HomotopyContinuation.nsolutions — Functionnsolutions(F::SampledSystem) -> IntReturns the number of solutions of F obtained by run_monodromy method.
DecomposingPolynomialSystems.samples — Functionsamples(F::SampledSystem) -> Dict{Vector{Int}, Samples}Returns the dictionary of samples of a polynomial system F.
DecomposingPolynomialSystems.ninstances — Functionninstances(F::SampledSystem) -> IntReturns the number of sampled instances of F.
DecomposingPolynomialSystems.nsamples — Functionnsamples(F::SampledSystem) -> IntReturns the number of samples of F. Notice that ninstances(F)*nsolutions(F) doesn't have to be equal to nsamples(F).
DecomposingPolynomialSystems.monodromy_permutations — Functionmonodromy_permutations(F::SampledSystem) -> Vector{Vector{Int}}Returns the vector of monodromy permutations of F obtained by run_monodromy.
DecomposingPolynomialSystems.block_partitions — Functionblock_partitions(F::SampledSystem) -> Vector{Vector{Vector{Int}}}Returns the vector of all block partitions of the solutions of F.
DecomposingPolynomialSystems.deck_permutations — Functiondeck_permutations(F::SampledSystem) -> Vector{Vector{Int}}Returns the vector of deck permutations of the solutions (actions of deck transformations on the solutions) of F.
Sample system
DecomposingPolynomialSystems.sample! — Functionsample!(F::SampledSystem; path_ids=Vector(1:nsolutions(F)), n_instances=1) -> SampledSystemUses solve method to track the solutions of a poynomial system F with ids defined by path_ids to n_instances random parameters.