mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-09-13 08:35:40 +02: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
|
return constraints
|
||||||
end
|
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 = RG(T)
|
||||||
result[Id] = T(length(S))
|
result[RG.group()] = T(length(S))
|
||||||
for s in S
|
for s in S
|
||||||
result[s] -= one(T)
|
result[s] -= one(T)
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
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 = RG(T)
|
||||||
result[Id] = T(length(S))
|
result[one(RG.group)] = T(length(S))
|
||||||
for s in S
|
for s in S
|
||||||
result[s] -= one(T)
|
result[s] -= one(T)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user