constraints_from_pm now have default total_length

This commit is contained in:
kalmar 2017-06-05 13:19:57 +02:00
parent 8b0033da58
commit 148bab5af2
1 changed files with 1 additions and 3 deletions

View File

@ -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))