splaplacian_coeff -> splaplacian returns GroupRingElem

This commit is contained in:
kalmar 2017-06-05 13:18:46 +02:00
parent b35ee6bfdb
commit 8b0033da58
1 changed files with 4 additions and 5 deletions

View File

@ -38,12 +38,11 @@ end
constraints_from_pm(pm) = constraints_from_pm(pm, maximum(pm)) constraints_from_pm(pm) = constraints_from_pm(pm, maximum(pm))
function splaplacian_coeff(S, basis, n=length(basis)) function splaplacian(RG::GroupRing, S, basis, n=length(basis))
result = spzeros(n) result = RG(spzeros(n))
result[1] = float(length(S)) result[RG.group()] = float(length(S))
for s in S for s in S
ind = findfirst(basis, s) result[s] += -1.0
result[ind] += -1.0
end end
return result return result
end end