From dbed75103eb6c2243ef2c277f91aeb18241851c4 Mon Sep 17 00:00:00 2001 From: kalmar Date: Sat, 1 Apr 2017 14:21:01 +0200 Subject: [PATCH] allow check_distance_to_positive_cone return Interval --- src/PropertyT.jl | 3 +++ src/checksolution.jl | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PropertyT.jl b/src/PropertyT.jl index 702dab1..e9b8b30 100644 --- a/src/PropertyT.jl +++ b/src/PropertyT.jl @@ -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)) diff --git a/src/checksolution.jl b/src/checksolution.jl index abf50aa..4d0a9cc 100644 --- a/src/checksolution.jl +++ b/src/checksolution.jl @@ -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, Δ_ℚ)