Correct signature
This commit is contained in:
parent
717e5a6200
commit
ef33b8ee10
@ -31,7 +31,7 @@ if n_pos + n_neg == size(gram, 1)
|
|||||||
else
|
else
|
||||||
printbad("Degenerate subspace")
|
printbad("Degenerate subspace")
|
||||||
end
|
end
|
||||||
sig_rem = Int64[ones(2-n_pos); -ones(3-n_neg)]
|
sig_rem = Int64[ones(1-n_pos); -ones(4-n_neg)]
|
||||||
unk = hcat(a, b, c)
|
unk = hcat(a, b, c)
|
||||||
M = matrix_space(F, 5, 5)
|
M = matrix_space(F, 5, 5)
|
||||||
big_gram = M(F.([
|
big_gram = M(F.([
|
||||||
@ -75,3 +75,11 @@ else
|
|||||||
printbad("Didn't recover Gram matrix. Instead, got:")
|
printbad("Didn't recover Gram matrix. Instead, got:")
|
||||||
end
|
end
|
||||||
display(big_gram_recovered)
|
display(big_gram_recovered)
|
||||||
|
|
||||||
|
# this should be a solution
|
||||||
|
hand_solution = [0 0 1 0 0; 0 0 -1 2 2; 0 0 0 1 -1; 1 0 0 0 0; 0 1 0 0 0]
|
||||||
|
unmix = Rational{Int64}[[1//2 1//2; 1//2 -1//2] zeros(Int64, 2, 3); zeros(Int64, 3, 2) Matrix{Int64}(I, 3, 3)]
|
||||||
|
hand_solution_diag = unmix * hand_solution
|
||||||
|
big_gram_hand_recovered = transpose(hand_solution_diag) * diagm([1; -ones(Int64, 4)]) * hand_solution_diag
|
||||||
|
println("Gram matrix from hand-written solution:")
|
||||||
|
display(big_gram_hand_recovered)
|
Loading…
Reference in New Issue
Block a user