formatting

This commit is contained in:
kalmar 2017-06-09 22:06:25 +02:00
parent 692a51c53e
commit 044cdb06e8
2 changed files with 5 additions and 3 deletions

View File

@ -130,7 +130,9 @@ end
function reconstructP(m::JuMP.Model, data::OrbitData) function reconstructP(m::JuMP.Model, data::OrbitData)
computedPs = [getvalue(P) for P in data.Ps] computedPs = [getvalue(P) for P in data.Ps]
return sum(data.dims[π]*data.Us[π]*computedPs[π]*data.Us[π]' for π in 1:endof(data.Ps)) return sum(
data.dims[π]*transform(data.Us[π]',computedPs[π], sparse=false)
for π in 1:endof(data.Ps))
end end
function create_SDP_problem(name::String; upper_bound=Inf) function create_SDP_problem(name::String; upper_bound=Inf)

View File

@ -125,8 +125,8 @@ function rankOne_projections(BN::WreathProducts.WreathProduct, T::Type=Rational{
for i in 1:N-1 for i in 1:N-1
Sk_first = [RBN(p, g->incl(0,g)) for p in SNprojs_nc[i]] Sk_first = [RBN(p, g->incl(0,g)) for p in SNprojs_nc[i]]
Sk_last = [RBN(p, g->incl(i,g)) for p in SNprojs_nc[N-i]] Sk_last = [RBN(p, g->incl(i,g)) for p in SNprojs_nc[N-i]]
append!(all_projs, [Qs[i+1]*p1*p2 append!(all_projs,
for (p1,p2) in Base.product(Sk_first,Sk_last)]) [Qs[i+1]*p1*p2 for (p1,p2) in Base.product(Sk_first,Sk_last)])
end end
append!(all_projs, [Qs[N+1]*RBN(p, g-> incl(0,g)) for p in SNprojs_nc[N]]) append!(all_projs, [Qs[N+1]*RBN(p, g-> incl(0,g)) for p in SNprojs_nc[N]])