use PropertyT package

This commit is contained in:
kalmar 2017-03-14 16:13:05 +01:00
parent 59e6e6d07f
commit 161aa6aac8
2 changed files with 9 additions and 15 deletions

View File

@ -1,8 +1,3 @@
using JLD
using JuMP
import SCS: SCSSolver
import Mosek: MosekSolver
using Groups using Groups
using ProgressMeter using ProgressMeter
@ -146,20 +141,19 @@ function ΔandSDPconstraints(identity::AutWord, S::Vector{AutWord})
# @assert length(B₄_images) == 3425657 # @assert length(B₄_images) == 3425657
println("Creating product matrix...") println("Creating product matrix...")
@time pm = create_product_matrix(B₂, B₄_images) @time pm = PropertyT.create_product_matrix(B₂, B₄_images)
println("Creating sdp_constratints...") println("Creating sdp_constratints...")
@time sdp_constraints = constraints_from_pm(pm) @time sdp_constraints = PropertyT.constraints_from_pm(pm)
L_coeff = splaplacian_coeff(S, B₂, length(B₄_images)) L_coeff = PropertyT.splaplacian_coeff(S, B₂, length(B₄_images))
Δ = GroupAlgebraElement(L_coeff, Array{Int,2}(pm)) Δ = PropertyT.GroupAlgebraElement(L_coeff, Array{Int,2}(pm))
return Δ, sdp_constraints return Δ, sdp_constraints
end end
@everywhere push!(LOAD_PATH, "./")
using GroupAlgebras using GroupAlgebras
include("property(T).jl") using PropertyT
const symbols = [FGSymbol("x₁",1), FGSymbol("x₂",1), FGSymbol("x₃",1), FGSymbol("x₄",1), FGSymbol("x₅",1), FGSymbol("x₆",1)] const symbols = [FGSymbol("x₁",1), FGSymbol("x₂",1), FGSymbol("x₃",1), FGSymbol("x₄",1), FGSymbol("x₅",1), FGSymbol("x₆",1)]

View File

@ -93,16 +93,16 @@ function products{T}(U::AbstractVector{T}, V::AbstractVector{T})
return unique(result) return unique(result)
end end
function ΔandSDPconstraints(identity, S) function ΔandSDPconstraints{T<:Number}(identity::Array{T,2}, S::Vector{Array{T,2}})
B₁ = vcat([identity], S) B₁ = vcat([identity], S)
B₂ = products(B₁, B₁); B₂ = products(B₁, B₁);
B₃ = products(B₁, B₂); B₃ = products(B₁, B₂);
B₄ = products(B₁, B₃); B₄ = products(B₁, B₃);
@assert B₄[1:length(B₂)] == B₂ @assert B₄[1:length(B₂)] == B₂
product_matrix = create_product_matrix(B₄,length(B₂)); product_matrix = PropertyT.create_product_matrix(B₄,length(B₂));
sdp_constraints = constraints_from_pm(product_matrix, length(B₄)) sdp_constraints = PropertyT.constraints_from_pm(product_matrix, length(B₄))
L_coeff = splaplacian_coeff(S, B₂, length(B₄)); L_coeff = PropertyT.splaplacian_coeff(S, B₂, length(B₄));
Δ = GroupAlgebraElement(L_coeff, product_matrix) Δ = GroupAlgebraElement(L_coeff, product_matrix)
return Δ, sdp_constraints return Δ, sdp_constraints