1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-19 07:20:28 +01:00

Final changes to incorporate full *-product matrix & constraints

This commit is contained in:
kalmar 2016-12-21 16:03:19 +01:00
parent 5b3f944cd0
commit f433ab8e6e

View File

@ -28,7 +28,7 @@ end
function create_product_matrix(basis::Array{Array{Float64,2},1}, limit::Int)
product_matrix = Array{Int}(limit,limit)
constraints = constraints = [Array{Int,1}[] for x in 1:121]
constraints = [Array{Int,1}[] for x in 1:length(basis)]
for i in 1:limit
x_inv = inv(basis[i])
@ -44,11 +44,9 @@ function create_product_matrix(basis::Array{Array{Float64,2},1}, limit::Int)
end
index = findfirst(f, basis)
product_matrix[i,j] = index
if index limit
push!(constraints[index],[i,j])
end
end
end
return product_matrix, constraints
end
@ -74,7 +72,7 @@ end
function create_SDP_problem(matrix_constraints,
Δ²::GroupAlgebraElement, Δ::GroupAlgebraElement)
N = length(Δ)
N = size(Δ.product_matrix,1)
@assert length(Δ) == length(Δ²)
@assert length(Δ) == length(matrix_constraints)
m = Model();