mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-10-19 09:05:36 +02: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
|
return constraints
|
||||||
end
|
end
|
||||||
|
|
||||||
function splaplacian(RG::GroupRing, S, basis, n=length(basis))
|
function splaplacian(RG::GroupRing, S, basis, n=length(basis), T::Type=Int)
|
||||||
result = RG(spzeros(n))
|
result = RG(spzeros(T, n))
|
||||||
result[RG.group()] = float(length(S))
|
result[RG.group()] = T(length(S))
|
||||||
for s in S
|
for s in S
|
||||||
result[s] += -1.0
|
result[s] -= one(T)
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user