mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-25 10:20:30 +01:00
update PropertyT.jl top changes in CheckSolution.jl
This commit is contained in:
parent
68a3cca76d
commit
ddfc4dc47b
@ -152,29 +152,7 @@ function λandP(name::String, SDP::JuMP.Model, varλ, varP, warmstart=true)
|
||||
return λ, P
|
||||
end
|
||||
|
||||
Kazhdan_from_sgap(λ,N) = sqrt(2*λ/N)
|
||||
|
||||
function check_λ(name, S, λ, P, radius, logger)
|
||||
|
||||
RG = GroupRing(parent(first(S)), load(filename(name, :pm), "pm"))
|
||||
Δ = GroupRingElem(load(filename(name, :Δ), "Δ")[:, 1], RG)
|
||||
|
||||
@logtime logger Q = real(sqrtm(Symmetric(P)))
|
||||
|
||||
sgap = check_distance_to_cone(Δ, λ, Q, 2*radius, logger)
|
||||
|
||||
if sgap > 0
|
||||
info(logger, "λ($name, S) ≥ $(Float64(trunc(sgap,12)))")
|
||||
Kazhdan_κ = Kazhdan_from_sgap(sgap, length(S))
|
||||
Kazhdan_κ = Float64(trunc(Kazhdan_κ, 12))
|
||||
info(logger, "κ($name, S) ≥ $Kazhdan_κ: Group HAS property (T)!")
|
||||
return true
|
||||
else
|
||||
sgap = Float64(trunc(sgap, 12))
|
||||
info(logger, "λ($name, S) ≥ $sgap: Group may NOT HAVE property (T)!")
|
||||
return false
|
||||
end
|
||||
end
|
||||
Kazhdan(λ::Number,N::Integer) = sqrt(2*λ/N)
|
||||
|
||||
function check_property_T(name::String, S, Id, solver, upper_bound, tol, radius, warm::Bool=false)
|
||||
|
||||
@ -219,7 +197,17 @@ function check_property_T(name::String, S, Id, solver, upper_bound, tol, radius,
|
||||
warn("The solution matrix doesn't seem to be positive definite!")
|
||||
|
||||
if λ > 0
|
||||
return check_λ(name, S, λ, P, radius, LOGGER)
|
||||
|
||||
RG = GroupRing(parent(first(S)), load(filename(name, :pm), "pm"))
|
||||
Δ = RG(load(filename(name, :Δ), "Δ")[:, 1])
|
||||
@logtime logger Q = real(sqrtm(Symmetric(P)))
|
||||
|
||||
sgap = distance_to_cone(Δ, λ, Q, wlen=2*radius, logger=LOGGER)
|
||||
Kazhdan_κ = Kazhdan(sgap, length(S))
|
||||
if Kazhdan_κ > 0
|
||||
info(logger, "κ($name, S) ≥ $Kazhdan_κ: Group HAS property (T)!")
|
||||
return true
|
||||
end
|
||||
end
|
||||
info(LOGGER, "κ($name, S) ≥ $λ < 0: Tells us nothing about property (T)")
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user