From 0dc693328dcbd660f9bdb823a8f7acf0d272caa8 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 7 Sep 2018 10:13:42 +0000 Subject: Matrices positive definite issues --- src/debug.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/debug.cpp') diff --git a/src/debug.cpp b/src/debug.cpp index 529d603..3a62d2a 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -332,11 +332,11 @@ void do_validate_K(const gsl_matrix *K, const char *__pretty_function, const cha warning_at_msg(__file,__line,"K is ill conditioned!"); if (!isMatrixSymmetric(K)) warnfail_at_msg(is_strict_mode(),__pretty_function,__file,__line,"K is not symmetric!" ); - const bool negative_values = has_negative_values_but_one(eigenvalues); - if (negative_values) { + const bool negative_eigen_values = has_negative_values_but_one(eigenvalues); + if (negative_eigen_values) { warning_at_msg(__file,__line,"K has more than one negative eigenvalues!"); } - if (count_small>1 && negative_values && !isMatrixPositiveDefinite(K)) + if (count_small>1 && negative_eigen_values && !isMatrixPositiveDefinite(K)) warnfail_at_msg(is_strict_mode(),__pretty_function,__file,__line,"K is not positive definite!"); gsl_vector_free(eigenvalues); } -- cgit v1.2.3