1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-14 06:10:28 +01:00

less unicode

This commit is contained in:
kalmar 2017-06-05 17:24:45 +02:00
parent 54b6fda9e8
commit 936c285155

View File

@ -91,7 +91,7 @@ function distance_to_cone{T<:Rational, S<:Interval}(λ::T, sqrt_matrix::Array{S,
info(logger, "ɛ(Δ² - λΔ - ∑ξᵢ*ξᵢ) ∈ $(ɛ_dist)")
info(logger, "‖Δ² - λΔ - ∑ξᵢ*ξᵢ‖₁ ∈ $(eoi_SOS_L1_dist)")
distance_to_cone = λ - 2^(len-1)*eoi_SOS_L_dist
distance_to_cone = λ - 2^(len-1)*eoi_SOS_L1_dist
return distance_to_cone
end
@ -99,14 +99,14 @@ function distance_to_cone{T<:AbstractFloat}(λ::T, sqrt_matrix::Array{T,2}, Δ::
SOS = compute_SOS(sqrt_matrix, Δ)
SOS_diff = EOI(Δ, λ) - SOS
eoi_SOS_L_dist = norm(SOS_diff,1)
eoi_SOS_L1_dist = norm(SOS_diff,1)
info(logger, "λ = ")
ɛ_dist = GroupRings.augmentation(SOS_diff)
info(logger, "ɛ(Δ² - λΔ - ∑ξᵢ*ξᵢ) ≈ $(@sprintf("%.10f", ɛ_dist))")
info(logger, "‖Δ² - λΔ - ∑ξᵢ*ξᵢ‖₁ ≈ $(@sprintf("%.10f", eoi_SOS_L_dist))")
info(logger, "‖Δ² - λΔ - ∑ξᵢ*ξᵢ‖₁ ≈ $(@sprintf("%.10f", eoi_SOS_L1_dist))")
distance_to_cone = λ - 2^(len-1)*eoi_SOS_L_dist
distance_to_cone = λ - 2^(len-1)*eoi_SOS_L1_dist
return distance_to_cone
end
@ -140,20 +140,20 @@ function check_distance_to_positive_cone(Δ::GroupRingElem, λ, P;
info(logger, "Checking in interval arithmetic")
Q_ω_int = Float64.(Q_ω) ± δ
t = @timed Interval_dist_to_Σ² = distance_to_cone(λ_, Q_ω_int, Δ_, len=len)
t = @timed Interval_dist_to_ΣSq = distance_to_cone(λ_, Q_ω_int, Δ_, len=len)
info(logger, timed_msg(t))
info(logger, "The Augmentation-projected actual distance (to positive cone) ∈ $(Interval_dist_to_Σ²)")
info(logger, "The Augmentation-projected actual distance (to positive cone) ∈ $(Interval_dist_to_ΣSq)")
info(logger, "------------------------------------------------------------")
if Interval_dist_to_Σ².lo 0 || !rational
return Interval_dist_to_Σ²
if Interval_dist_to_ΣSq.lo 0 || !rational
return Interval_dist_to_ΣSq
else
info(logger, "Checking Projected SOS decomposition in exact rational arithmetic...")
t = @timed _dist_to_Σ² = distance_to_cone(λ_, Q_ω, Δ_, len=len)
t = @timed _dist_to_ΣSq = distance_to_cone(λ_, Q_ω, Δ_, len=len)
info(logger, timed_msg(t))
@assert isa(_dist_to_Σ², Rational)
info(logger, "Augmentation-projected rational distance (to positive cone) ≥ $(Float64(trunc(_dist_to_Σ²,8)))")
@assert isa(_dist_to_ΣSq, Rational)
info(logger, "Augmentation-projected rational distance (to positive cone) ≥ $(Float64(trunc(_dist_to_ΣSq,8)))")
info(logger, "------------------------------------------------------------")
return _dist_to_Σ²
return _dist_to_ΣSq
end
end