1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
restart
needsPackage "NAGtools"
--setDefault(Software=>M2)
setRandomSeed 0
needsPackage "ExampleIdeals"
///
n = 6
///
S = gens cyclicRoots(n,CC)
R = ring S
polys = flatten entries S
ind = flatten apply(#polys,i-> -- parameteric coefficients
apply(exponents polys#i, t->(i,t))
)
AR = CC[apply(ind,i->A_i)][gens R]
polysP = for i to #polys-1 list -- parameteric coefficients
sum(exponents polys#i, t->A_(i,t)*AR_(t))
SP = matrix{polysP}
c0 = point{
flatten apply(polys,f->(
r := # exponents f;
t := apply(r-1, i->random CC);
t | { -sum t }
))
}
coordinates c0
pre0 = point{toList(n:1_CC)}
coordinates pre0
end ----------------------------------------------------------------------------
restart
n = 12
load "NumericalAlgebraicGeometry/SYSTEMS/monodromy/sparse-system-via-polynomials.m2"
needsPackage "PHCpack"
debug NumericalAlgebraicGeometry
phcF = toRingXphc flatten entries S
elapsedTime mv = mixedVolume(phcF,StartSystem => false)
stop = (n,L)->#L>=mv
getDefault Software
-*
setDefault(Software=>PHCPACK)
*-
elapsedTime sols = solveViaMonodromy(SP,c0,{pre0},
StoppingCriterion=>stop);
---------- PHCpack timing ------------------------
restart
loadPackage "PHCpack"
needsPackage "ExampleIdeals"
n = 9
I = cyclicRoots(n,CC);
R = CC[x_1..x_(numgens ring I)]
toR = map(R,ring I,vars R)
elapsedTime (mv,q,qsols) = mixedVolume(I_*/toR,StartSystem => true);
|