Test lots of uniformly distributed hyperplanes
This commit is contained in:
parent
621c4c5776
commit
6f18d4efcc
@ -78,7 +78,7 @@ is_nontrivial = soln -> norm2(abs.(real.(soln)) - trivial_soln) > 1e-4*length(ge
|
|||||||
##max_slope = 5
|
##max_slope = 5
|
||||||
##binom = Binomial(2max_slope, 1/2)
|
##binom = Binomial(2max_slope, 1/2)
|
||||||
Random.seed!(6071)
|
Random.seed!(6071)
|
||||||
n_planes = 3
|
n_planes = 36
|
||||||
for through_trivial in [false, true]
|
for through_trivial in [false, true]
|
||||||
samples = []
|
samples = []
|
||||||
for _ in 1:n_planes
|
for _ in 1:n_planes
|
||||||
@ -91,10 +91,10 @@ for through_trivial in [false, true]
|
|||||||
## 1 2 1 2 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
|
## 1 1 0 1 0 1 2 0 2 0 0
|
||||||
##]
|
##]
|
||||||
display(cut_matrix) ## [verbose]
|
## display(cut_matrix) ## [verbose]
|
||||||
if through_trivial
|
if through_trivial
|
||||||
cut_offset = [sum(cf[sph_z_ind]) for cf in eachrow(cut_matrix)]
|
cut_offset = [sum(cf[sph_z_ind]) for cf in eachrow(cut_matrix)]
|
||||||
display(cut_offset) ## [verbose]
|
## display(cut_offset) ## [verbose]
|
||||||
cut_subspace = LinearSubspace(cut_matrix, cut_offset)
|
cut_subspace = LinearSubspace(cut_matrix, cut_offset)
|
||||||
else
|
else
|
||||||
cut_subspace = LinearSubspace(cut_matrix, fill(0., freedom))
|
cut_subspace = LinearSubspace(cut_matrix, fill(0., freedom))
|
||||||
@ -104,7 +104,7 @@ for through_trivial in [false, true]
|
|||||||
nontrivial_solns = filter(is_nontrivial, real_solns)
|
nontrivial_solns = filter(is_nontrivial, real_solns)
|
||||||
println("$(length(real_solns) - length(nontrivial_solns)) trivial solutions found")
|
println("$(length(real_solns) - length(nontrivial_solns)) trivial solutions found")
|
||||||
for soln in nontrivial_solns
|
for soln in nontrivial_solns
|
||||||
##[test] for soln in filter(is_nontrivial, solution.(filter(isreal, results(wtns))))
|
## [test] for soln in filter(is_nontrivial, solution.(filter(isreal, results(wtns))))
|
||||||
if all(norm2(soln - samp) > 1e-4*length(gens(coordring)) for samp in samples)
|
if all(norm2(soln - samp) > 1e-4*length(gens(coordring)) for samp in samples)
|
||||||
push!(samples, soln)
|
push!(samples, soln)
|
||||||
end
|
end
|
||||||
@ -117,7 +117,7 @@ for through_trivial in [false, true]
|
|||||||
end
|
end
|
||||||
println("$(length(samples)) sample solutions, not including the trivial one:")
|
println("$(length(samples)) sample solutions, not including the trivial one:")
|
||||||
for soln in samples
|
for soln in samples
|
||||||
## [verbose] display([vbls round.(soln, digits = 6)])
|
## display([vbls round.(soln, digits = 6)]) ## [verbose]
|
||||||
k_sq = abs2(soln[1])
|
k_sq = abs2(soln[1])
|
||||||
if abs2(soln[end-2]) > 1e-12
|
if abs2(soln[end-2]) > 1e-12
|
||||||
if k_sq < 1e-12
|
if k_sq < 1e-12
|
||||||
|
Loading…
Reference in New Issue
Block a user