move sqrtm out och check_distance_to_positive_cone
This commit is contained in:
parent
9c3a1d56c7
commit
ee08c52305
@ -228,7 +228,13 @@ function orbit_check_propertyT(logger, sett::Settings)
|
|||||||
info(logger, "minimum(P) = $(minimum(P))")
|
info(logger, "minimum(P) = $(minimum(P))")
|
||||||
|
|
||||||
if λ > 0
|
if λ > 0
|
||||||
sgap = PropertyT.check_distance_to_positive_cone(Δ, λ, P, 2*sett.radius, tol=sett.tol, rational=false)
|
|
||||||
|
isapprox(eigvals(P), abs(eigvals(P)), atol=sett.tol) ||
|
||||||
|
warn("The solution matrix doesn't seem to be positive definite!")
|
||||||
|
# @assert P == Symmetric(P)
|
||||||
|
Q = real(sqrtm(Symmetric(P)))
|
||||||
|
|
||||||
|
sgap = PropertyT.check_distance_to_positive_cone(Δ, λ, Q, 2*sett.radius, tol=sett.tol, rational=false)
|
||||||
if isa(sgap, Interval)
|
if isa(sgap, Interval)
|
||||||
sgap = sgap.lo
|
sgap = sgap.lo
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user