mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2025-03-08 07:06:43 +01:00
we don't need to pass id element -- it could be derived from S
This commit is contained in:
parent
32c020fd88
commit
94c9a75a21
@ -13,18 +13,18 @@ function constraints_from_pm(pm, total_length=maximum(pm))
|
||||
return constraints
|
||||
end
|
||||
|
||||
function splaplacian{TT<:Group}(RG::GroupRing{TT}, S, Id=RG.group(), T::Type=Float64)
|
||||
function splaplacian(RG::GroupRing, S, T::Type=Float64)
|
||||
result = RG(T)
|
||||
result[Id] = T(length(S))
|
||||
result[RG.group()] = T(length(S))
|
||||
for s in S
|
||||
result[s] -= one(T)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
function splaplacian{TT<:Ring}(RG::GroupRing{TT}, S, Id=one(RG.group), T::Type=Float64)
|
||||
function splaplacian{TT<:Ring}(RG::GroupRing{TT}, S, T::Type=Float64)
|
||||
result = RG(T)
|
||||
result[Id] = T(length(S))
|
||||
result[one(RG.group)] = T(length(S))
|
||||
for s in S
|
||||
result[s] -= one(T)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user