make splaplacian spvector of Float64 by default

This commit is contained in:
kalmar 2017-06-09 09:36:20 +02:00
parent d98d68004b
commit 39732bb627
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ function ΔandSDPconstraints{T<:GroupElem}(S::Vector{T}, Id::T; radius::Int=2)
RG = GroupRing(parent(Id), B, pm)
Δ = splaplacian(RG, S, Id, Float64)
Δ = splaplacian(RG, S, Id)
return Δ, sdp_constraints
end

View File

@ -13,7 +13,7 @@ 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=Int)
function splaplacian{TT<:Group}(RG::GroupRing{TT}, S, Id=RG.group(), T::Type=Float64)
result = RG(T)
result[Id] = T(length(S))
for s in S
@ -22,7 +22,7 @@ function splaplacian{TT<:Group}(RG::GroupRing{TT}, S, Id=RG.group(), T::Type=Int
return result
end
function splaplacian{TT<:Ring}(RG::GroupRing{TT}, S, Id=one(RG.group), T::Type=Int)
function splaplacian{TT<:Ring}(RG::GroupRing{TT}, S, Id=one(RG.group), T::Type=Float64)
result = RG(T)
result[Id] = T(length(S))
for s in S