mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-23 08:15:29 +01:00
Move Generation of Laplacian to julia (for Linear Groups)
This commit is contained in:
parent
9257f57aef
commit
5b3f944cd0
@ -52,6 +52,26 @@ function create_product_matrix(basis::Array{Array{Float64,2},1}, limit::Int)
|
|||||||
return product_matrix, constraints
|
return product_matrix, constraints
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Laplacian_sparse(S::Array{Array{Float64,2},1},
|
||||||
|
basis::Array{Array{Float64,2},1})
|
||||||
|
|
||||||
|
squares = unique(vcat([basis[1]], S, products(S,S)))
|
||||||
|
|
||||||
|
result = spzeros(length(basis))
|
||||||
|
result[1] = length(S)
|
||||||
|
for s in S
|
||||||
|
ind = find(x -> x==s, basis)
|
||||||
|
result[ind] += -1
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
function Laplacian(S::Array{Array{Float64,2},1},
|
||||||
|
basis:: Array{Array{Float64,2},1})
|
||||||
|
|
||||||
|
return full(Laplacian_sparse(S,basis))
|
||||||
|
end
|
||||||
|
|
||||||
function create_SDP_problem(matrix_constraints,
|
function create_SDP_problem(matrix_constraints,
|
||||||
Δ²::GroupAlgebraElement, Δ::GroupAlgebraElement)
|
Δ²::GroupAlgebraElement, Δ::GroupAlgebraElement)
|
||||||
N = length(Δ)
|
N = length(Δ)
|
||||||
|
Loading…
Reference in New Issue
Block a user