From f433ab8e6e4c880c247f09f275e6910c11b6d286 Mon Sep 17 00:00:00 2001 From: kalmar Date: Wed, 21 Dec 2016 16:03:19 +0100 Subject: [PATCH] Final changes to incorporate full *-product matrix & constraints --- property(T).jl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/property(T).jl b/property(T).jl index c0c6e27..cd46ae1 100644 --- a/property(T).jl +++ b/property(T).jl @@ -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,9 +44,7 @@ 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 + push!(constraints[index],[i,j]) end end return product_matrix, constraints @@ -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();