Engine prototype #13

Open
Vectornaut wants to merge 117 commits from engine-proto into main
Showing only changes of commit a02b76544a - Show all commits

View File

@ -8,21 +8,21 @@ using Random
J = Int64[]
K = Int64[]
values = BigFloat[]
for j in 1:10
for k in 1:10
for j in 1:11
for k in 1:11
filled = false
if j == 10
if j == 11
if k <= 4
push!(values, 0)
filled = true
end
elseif k == 10
elseif k == 11
if j <= 4
push!(values, 0)
filled = true
end
elseif j == k
push!(values, j <= 5 ? 1 : 0)
push!(values, j <= 6 ? 1 : 0)
filled = true
elseif j <= 4
if k <= 4
@ -31,7 +31,7 @@ for j in 1:10
elseif k == 5
push!(values, -1)
filled = true
elseif k <= 9 && k - j != 5
elseif 7 <= k <= 10 && k - j != 6
push!(values, 0)
filled = true
end
@ -39,10 +39,13 @@ for j in 1:10
if j == 5
push!(values, -1)
filled = true
elseif j <= 9 && j - k != 5
elseif 7 <= j <= 10 && j - k != 6
push!(values, 0)
filled = true
end
elseif j == 6 && 7 <= k <= 10 || k == 6 && 7 <= j <= 10
push!(values, 0)
filled = true
end
if filled
push!(J, j)
@ -56,12 +59,12 @@ gram = sparse(J, K, values)
Random.seed!(99230)
guess = hcat(
sqrt(1/BigFloat(3)) * BigFloat[
1 1 -1 -1 0
1 -1 1 -1 0
1 -1 -1 1 0
0 0 0 0 -1.5
1 1 1 1 -0.5
] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 5)),
1 1 -1 -1 0 0
1 -1 1 -1 0 0
1 -1 -1 1 0 0
0 0 0 0 -1.5 -3
1 1 1 1 -0.5 -1
] + 0.2*Engine.rand_on_shell(fill(BigFloat(-1), 6)),
Engine.point([-1, -1, -1]),
Engine.point([-1, 1, 1]),
Engine.point([ 1, -1, 1]),
@ -69,8 +72,8 @@ guess = hcat(
BigFloat[0, 0, 0, 0, 1]
)
frozen = vcat(
[CartesianIndex(4, k) for k in 6:9],
[CartesianIndex(j, 10) for j in 1:5]
[CartesianIndex(4, k) for k in 7:10],
[CartesianIndex(j, 11) for j in 1:5]
)
# complete the gram matrix