mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2025-03-16 17:02:13 +01:00
move checking logic to check_distance_to_cone function
This commit is contained in:
parent
b2f4360ef4
commit
3066046fdb
@ -116,21 +116,19 @@ function distance_to_cone(elt::GroupRingElem, λ::T, Q::AbstractArray{T,2}, wlen
|
|||||||
return int_distance
|
return int_distance
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function check_distance_to_cone(Δ::GroupRingElem, λ, Q, wlen::Int, logger)
|
||||||
|
|
||||||
|
fp_distance = distance_to_cone(EOI(Δ, λ), λ, Q, wlen, logger)
|
||||||
|
|
||||||
if fp_distance ≤ 0
|
if fp_distance ≤ 0
|
||||||
return fp_distance
|
return fp_distance
|
||||||
end
|
end
|
||||||
|
|
||||||
info(logger, "")
|
|
||||||
Q = augIdproj(Q, logger)
|
|
||||||
|
|
||||||
info(logger, "Checking in interval arithmetic")
|
|
||||||
λ = @interval(λ)
|
λ = @interval(λ)
|
||||||
Δ = GroupRingElem([@interval(c) for c in Δ.coeffs], parent(Δ))
|
Δ = GroupRingElem([@interval(c) for c in Δ.coeffs], parent(Δ))
|
||||||
Δ²_λΔ = EOI(Δ, λ)
|
Q = augIdproj(Q, logger)
|
||||||
|
|
||||||
@logtime logger Interval_dist_to_ΣSq = λ - distance_to_cone(Δ²_λΔ, Q, wlen)
|
int_distance = distance_to_cone(EOI(Δ, λ), λ, Q, wlen, logger)
|
||||||
info(logger, "The Augmentation-projected actual distance (to positive cone) ∈ $(Interval_dist_to_ΣSq)")
|
|
||||||
info(logger, "------------------------------------------------------------")
|
|
||||||
|
|
||||||
return Interval_dist_to_ΣSq
|
return int_distance.lo
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user