From ee08c5230535f706eefd9f8d89fa6969bb22c200 Mon Sep 17 00:00:00 2001 From: kalmar Date: Thu, 22 Jun 2017 12:04:24 +0200 Subject: [PATCH] move sqrtm out och check_distance_to_positive_cone --- Orb_AutFN.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Orb_AutFN.jl b/Orb_AutFN.jl index 0120ba8..a474786 100644 --- a/Orb_AutFN.jl +++ b/Orb_AutFN.jl @@ -228,7 +228,13 @@ function orbit_check_propertyT(logger, sett::Settings) info(logger, "minimum(P) = $(minimum(P))") 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) sgap = sgap.lo end