forked from StudioInfinity/dyna3
Move random cut routine into engine
This commit is contained in:
parent
6f18d4efcc
commit
1f173708eb
2 changed files with 18 additions and 21 deletions
|
|
@ -82,25 +82,7 @@ n_planes = 36
|
|||
for through_trivial in [false, true]
|
||||
samples = []
|
||||
for _ in 1:n_planes
|
||||
cut_matrix = transpose(hcat(
|
||||
(normalize(randn(length(gens(coordring)))) for _ in 1:freedom)...
|
||||
))
|
||||
##cut_matrix = rand(binom, freedom, length(gens(coordring))) .- max_slope
|
||||
##cut_matrix = [
|
||||
## 1 1 1 1 0 1 1 0 1 1 0;
|
||||
## 1 2 1 2 0 1 1 0 1 1 0;
|
||||
## 1 1 0 1 0 1 2 0 2 0 0
|
||||
##]
|
||||
## display(cut_matrix) ## [verbose]
|
||||
if through_trivial
|
||||
cut_offset = [sum(cf[sph_z_ind]) for cf in eachrow(cut_matrix)]
|
||||
## display(cut_offset) ## [verbose]
|
||||
cut_subspace = LinearSubspace(cut_matrix, cut_offset)
|
||||
else
|
||||
cut_subspace = LinearSubspace(cut_matrix, fill(0., freedom))
|
||||
end
|
||||
wtns = witness_set(system, cut_subspace)
|
||||
real_solns = solution.(filter(isreal, results(wtns)))
|
||||
real_solns = solution.(Engine.Numerical.real_samples(system, freedom))
|
||||
nontrivial_solns = filter(is_nontrivial, real_solns)
|
||||
println("$(length(real_solns) - length(nontrivial_solns)) trivial solutions found")
|
||||
for soln in nontrivial_solns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue