mirror of
https://github.com/BachoSeven/homotopy-continuation.git
synced 2026-10-06 22:55:15 +00:00
use monomials of all degrees <= max; use @spawnat
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ module RandomPoly
|
||||
x = [TypedPolynomials.Variable{Symbol("x[$i]")}() for i in 1:m]
|
||||
|
||||
monomial_powers=collect(Iterators.product([0:n for _ in 1:m]...))
|
||||
monomials = [prod(x.^i) for i in monomial_powers if sum(i) == n]
|
||||
monomials = [prod(x.^i) for i in monomial_powers if sum(i) <= n && sum(i) != 0]
|
||||
|
||||
return sum(map(m -> rand(Normal()) * m, monomials))
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ function solve(F, G, roots)
|
||||
|
||||
result = Array{Future}(undef, length(roots))
|
||||
for i in eachindex(roots)
|
||||
result[i] = @spawn compute_root(H, roots[i])
|
||||
result[i] = @spawnat :any compute_root(H, roots[i])
|
||||
end
|
||||
|
||||
sols = Array{ComplexF64,2}(undef, length(roots), length(F))
|
||||
|
||||
Reference in New Issue
Block a user