aboutsummaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
authorPjotr Prins2018-09-07 10:13:42 +0000
committerPjotr Prins2018-09-07 10:13:42 +0000
commit0dc693328dcbd660f9bdb823a8f7acf0d272caa8 (patch)
tree922cb6c68ac8570c748979665688492f87bc753d /src/debug.cpp
parent2ac63853ba5a836a5e4477bad0c1c56f0fa1dfa8 (diff)
downloadpangemma-0dc693328dcbd660f9bdb823a8f7acf0d272caa8.tar.gz
Matrices positive definite issues
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}