More flexible S^n generation
This commit is contained in:
parent
a3091f7166
commit
e3cd93a5b2
24
SL.jl
24
SL.jl
@ -45,16 +45,22 @@ function products{T}(U::AbstractVector{T}, V::AbstractVector{T})
|
||||
return unique(result)
|
||||
end
|
||||
|
||||
function ΔandSDPconstraints{T<:Number}(identity::Array{T,2}, S::Vector{Array{T,2}})
|
||||
B₁ = vcat([identity], S)
|
||||
B₂ = products(B₁, B₁);
|
||||
B₃ = products(B₁, B₂);
|
||||
B₄ = products(B₁, B₃);
|
||||
@assert B₄[1:length(B₂)] == B₂
|
||||
function ΔandSDPconstraints(Id, S; radius::Int=4)
|
||||
k = div(radius,2)
|
||||
lengths = Vector{Int}()
|
||||
S = vcat([Id], S)
|
||||
B = S
|
||||
push!(lengths,length(B))
|
||||
for i in 2:radius
|
||||
B = products(S, B);
|
||||
push!(lengths, length(B))
|
||||
end
|
||||
k = div(radius,2)
|
||||
basis = B[1:lengths[k]]
|
||||
|
||||
product_matrix = PropertyT.create_product_matrix(B₄,length(B₂));
|
||||
sdp_constraints = PropertyT.constraints_from_pm(product_matrix, length(B₄))
|
||||
L_coeff = PropertyT.splaplacian_coeff(S, B₂, length(B₄));
|
||||
product_matrix = PropertyT.create_product_matrix(B,lengths[k]);
|
||||
sdp_constraints = PropertyT.constraints_from_pm(product_matrix, length(B))
|
||||
L_coeff = PropertyT.splaplacian_coeff(S, basis, length(B));
|
||||
Δ = GroupAlgebraElement(L_coeff, product_matrix)
|
||||
|
||||
return Δ, sdp_constraints
|
||||
|
Loading…
Reference in New Issue
Block a user