mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 15:25:29 +01:00
add type argument to splaplacian
This commit is contained in:
parent
4f14b0eff7
commit
aa0f0f3034
@ -13,11 +13,11 @@ function constraints_from_pm(pm, total_length=maximum(pm))
|
||||
return constraints
|
||||
end
|
||||
|
||||
function splaplacian(RG::GroupRing, S, basis, n=length(basis))
|
||||
result = RG(spzeros(n))
|
||||
result[RG.group()] = float(length(S))
|
||||
function splaplacian(RG::GroupRing, S, basis, n=length(basis), T::Type=Int)
|
||||
result = RG(spzeros(T, n))
|
||||
result[RG.group()] = T(length(S))
|
||||
for s in S
|
||||
result[s] += -1.0
|
||||
result[s] -= one(T)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user