From 39732bb627932ee51f148d0b5824e6de5813f2d3 Mon Sep 17 00:00:00 2001 From: kalmar Date: Fri, 9 Jun 2017 09:36:20 +0200 Subject: [PATCH] make splaplacian spvector of Float64 by default --- src/PropertyT.jl | 2 +- src/sdps.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PropertyT.jl b/src/PropertyT.jl index 63d5981..2af00f8 100644 --- a/src/PropertyT.jl +++ b/src/PropertyT.jl @@ -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 diff --git a/src/sdps.jl b/src/sdps.jl index 27fa87e..60ca75f 100644 --- a/src/sdps.jl +++ b/src/sdps.jl @@ -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