From 148bab5af2d48a17b83f434a4ffdca525672e37b Mon Sep 17 00:00:00 2001 From: kalmar Date: Mon, 5 Jun 2017 13:19:57 +0200 Subject: [PATCH] constraints_from_pm now have default total_length --- src/sdps.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sdps.jl b/src/sdps.jl index 455a111..834218a 100644 --- a/src/sdps.jl +++ b/src/sdps.jl @@ -24,7 +24,7 @@ end create_product_matrix{T}(basis::Vector{T}; twisted=twisted) = create_product_matrix(basis, length(basis); twisted=twisted) -function constraints_from_pm(pm, total_length) +function constraints_from_pm(pm, total_length=maximum(pm)) n = size(pm,1) constraints = constraints = [Array{Int,1}[] for x in 1:total_length] for j in 1:n @@ -36,8 +36,6 @@ function constraints_from_pm(pm, total_length) return constraints end -constraints_from_pm(pm) = constraints_from_pm(pm, maximum(pm)) - function splaplacian(RG::GroupRing, S, basis, n=length(basis)) result = RG(spzeros(n)) result[RG.group()] = float(length(S))