1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-23 08:15:29 +01:00

allow check_distance_to_positive_cone return Interval

This commit is contained in:
kalmar 2017-04-01 14:21:01 +02:00
parent b20cd02d5b
commit dbed75103e
2 changed files with 5 additions and 2 deletions

View File

@ -167,6 +167,9 @@ function check_property_T(name::String, generating_set::Function,
if κ > 0
spectral_gap = check_distance_to_positive_cone(Δ, κ, A, tol=tol, rational=false)
if isa(spectral_gap, Interval)
spectral_gap = spectral_gap.lo
end
if spectral_gap > 0
Kazhdan_κ = sqrt(2*spectral_gap/S)
Kazhdan_κ = Float64(trunc(Kazhdan_κ, 12))

View File

@ -144,11 +144,11 @@ function check_distance_to_positive_cone(Δ::GroupAlgebraElement, κ, A;
A_sqrt__augⁱⁿᵗ = Float64.(A_sqrt__aug) ± δ
t = @timed Interval_dist_to_Σ² = distance_to_cone(κ_, A_sqrt__augⁱⁿᵗ, Δ_)
info(logger, timed_msg(t))
info(logger, "The Augmentation-projected actual distance (to positive cone) $(@sprintf("%.10f", Interval_dist_to_Σ².lo))")
info(logger, "The Augmentation-projected actual distance (to positive cone) $(Interval_dist_to_Σ²)")
info(logger, "------------------------------------------------------------")
if Interval_dist_to_Σ².lo 0 || !rational
return Interval_dist_to_Σ².lo
return Interval_dist_to_Σ²
else
info(logger, "Checking Projected SOS decomposition in exact rational arithmetic...")
t = @timed _dist_to_Σ² = distance_to_cone(κ_, A_sqrt__aug, Δ_)