Engine prototype #13

Merged
glen merged 133 commits from engine-proto into main 2024-10-21 03:18:48 +00:00
Showing only changes of commit a02b76544a - Show all commits

View File

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