mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-26 02:30:29 +01:00
rename Delta -> Laplacian, splaplacian -> spLaplacian
This commit is contained in:
parent
b43482325d
commit
13f49027dd
@ -182,7 +182,7 @@ function compute_orbit_data{T<:GroupElem}(logger, name::String, G::Nemo.Group, S
|
|||||||
info(logger, "Product matrix")
|
info(logger, "Product matrix")
|
||||||
@logtime logger pm = GroupRings.create_pm(E_2R, E_rdict, sizes[radius], twisted=true)
|
@logtime logger pm = GroupRings.create_pm(E_2R, E_rdict, sizes[radius], twisted=true)
|
||||||
RG = GroupRing(G, E_2R, E_rdict, pm)
|
RG = GroupRing(G, E_2R, E_rdict, pm)
|
||||||
Δ = PropertyT.splaplacian(RG, S)
|
Δ = PropertyT.spLaplacian(RG, S)
|
||||||
@assert GroupRings.augmentation(Δ) == 0
|
@assert GroupRings.augmentation(Δ) == 0
|
||||||
save(joinpath(name, "delta.jld"), "Δ", Δ.coeffs)
|
save(joinpath(name, "delta.jld"), "Δ", Δ.coeffs)
|
||||||
save(joinpath(name, "pm.jld"), "pm", pm)
|
save(joinpath(name, "pm.jld"), "pm", pm)
|
||||||
|
@ -80,7 +80,7 @@ filename(prefix::String, ::Type{Val{:Δ}}) = joinpath(prefix, "delta.jld")
|
|||||||
filename(prefix::String, ::Type{Val{:λ}}) = joinpath(prefix, "lambda.jld")
|
filename(prefix::String, ::Type{Val{:λ}}) = joinpath(prefix, "lambda.jld")
|
||||||
filename(prefix::String, ::Type{Val{:P}}) = joinpath(prefix, "SDPmatrix.jld")
|
filename(prefix::String, ::Type{Val{:P}}) = joinpath(prefix, "SDPmatrix.jld")
|
||||||
|
|
||||||
function Delta(name::String, G::Group)
|
function Laplacian(name::String, G::Group)
|
||||||
info(LOGGER, "Loading precomputed Δ...")
|
info(LOGGER, "Loading precomputed Δ...")
|
||||||
if exists(filename(name, :Δ)) && exists(filename(name, :pm))
|
if exists(filename(name, :Δ)) && exists(filename(name, :pm))
|
||||||
RG = GroupRing(G, load(filename(name, :pm), "pm"))
|
RG = GroupRing(G, load(filename(name, :pm), "pm"))
|
||||||
@ -91,15 +91,15 @@ function Delta(name::String, G::Group)
|
|||||||
return Δ
|
return Δ
|
||||||
end
|
end
|
||||||
|
|
||||||
function Delta{T<:GroupElem}(name::String, S::Vector{T}, Id::T; radius::Int=2)
|
function Laplacian{T<:GroupElem}(name::String, S::Vector{T}, Id::T; radius::Int=2)
|
||||||
info(LOGGER, "Computing multiplication table, Δ...")
|
info(LOGGER, "Computing multiplication table, Δ...")
|
||||||
Δ = Delta(S, Id, radius=radius)
|
Δ = Laplacian(S, Id, radius=radius)
|
||||||
save(filename(name, :pm), "pm", parent(Δ).pm)
|
save(filename(name, :pm), "pm", parent(Δ).pm)
|
||||||
save(filename(name, :Δ), "Δ", Δ.coeffs)
|
save(filename(name, :Δ), "Δ", Δ.coeffs)
|
||||||
return Δ
|
return Δ
|
||||||
end
|
end
|
||||||
|
|
||||||
function Delta{T<:GroupElem}(S::Vector{T}, Id::T; radius::Int=2)
|
function Laplacian{T<:GroupElem}(S::Vector{T}, Id::T; radius::Int=2)
|
||||||
info(LOGGER, "Generating metric ball of radius $radius...")
|
info(LOGGER, "Generating metric ball of radius $radius...")
|
||||||
@logtime LOGGER E_R, sizes = Groups.generate_balls(S, Id, radius=2*radius)
|
@logtime LOGGER E_R, sizes = Groups.generate_balls(S, Id, radius=2*radius)
|
||||||
info(LOGGER, "Generated balls of sizes $sizes.")
|
info(LOGGER, "Generated balls of sizes $sizes.")
|
||||||
@ -188,10 +188,10 @@ function check_property_T(name::String, S, Id, solver, upper_bound, tol, radius)
|
|||||||
|
|
||||||
if exists(filename(name, :pm)) && exists(filename(name, :Δ))
|
if exists(filename(name, :pm)) && exists(filename(name, :Δ))
|
||||||
# cached
|
# cached
|
||||||
Δ = Delta(name, parent(S[1]))
|
Δ = Laplacian(name, parent(S[1]))
|
||||||
else
|
else
|
||||||
# compute
|
# compute
|
||||||
Δ = Delta(name, S, Id, radius=radius)
|
Δ = Laplacian(name, S, Id, radius=radius)
|
||||||
end
|
end
|
||||||
|
|
||||||
if exists(filename(name, :λ)) && exists(filename(name, :P))
|
if exists(filename(name, :λ)) && exists(filename(name, :P))
|
||||||
|
@ -13,7 +13,7 @@ function constraints(pm, total_length=maximum(pm))
|
|||||||
return constraints
|
return constraints
|
||||||
end
|
end
|
||||||
|
|
||||||
function splaplacian(RG::GroupRing, S, T::Type=Float64)
|
function spLaplacian(RG::GroupRing, S, T::Type=Float64)
|
||||||
result = RG(T)
|
result = RG(T)
|
||||||
result[RG.group()] = T(length(S))
|
result[RG.group()] = T(length(S))
|
||||||
for s in S
|
for s in S
|
||||||
@ -22,7 +22,7 @@ function splaplacian(RG::GroupRing, S, T::Type=Float64)
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function splaplacian{TT<:Ring}(RG::GroupRing{TT}, S, T::Type=Float64)
|
function spLaplacian{TT<:Ring}(RG::GroupRing{TT}, S, T::Type=Float64)
|
||||||
result = RG(T)
|
result = RG(T)
|
||||||
result[one(RG.group)] = T(length(S))
|
result[one(RG.group)] = T(length(S))
|
||||||
for s in S
|
for s in S
|
||||||
|
Loading…
Reference in New Issue
Block a user