From fa63e6d717d1ce9842cc5db05cdcd8136f705f33 Mon Sep 17 00:00:00 2001 From: conrad Date: Tue, 7 Apr 2026 11:33:04 +1000 Subject: [PATCH] distinguish between default and user supplied tolerance --- include/armadillo_bits/gmm_diag_meat.hpp | 2 +- include/armadillo_bits/gmm_full_meat.hpp | 2 +- include/armadillo_bits/op_orth_null_meat.hpp | 4 ++-- include/armadillo_bits/op_pinv_meat.hpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/armadillo_bits/gmm_diag_meat.hpp b/include/armadillo_bits/gmm_diag_meat.hpp index bd697f93..918d1fa4 100644 --- a/include/armadillo_bits/gmm_diag_meat.hpp +++ b/include/armadillo_bits/gmm_diag_meat.hpp @@ -685,7 +685,7 @@ gmm_diag::learn arma_conform_check( (dist_mode_ok == false), "gmm_diag::learn(): dist_mode must be eucl_dist or maha_dist" ); arma_conform_check( (seed_mode_ok == false), "gmm_diag::learn(): unknown seed_mode" ); - arma_conform_check( ((var_floor >= eT(0)) == false), "gmm_diag::learn(): variance floor must be >= 0" ); + arma_conform_check( ((var_floor >= eT(0)) == false), "gmm_diag::learn(): variance floor must be > 0" ); const unwrap tmp_X(data.get_ref()); const Mat& X = tmp_X.M; diff --git a/include/armadillo_bits/gmm_full_meat.hpp b/include/armadillo_bits/gmm_full_meat.hpp index aab2c4db..d8cd16a3 100644 --- a/include/armadillo_bits/gmm_full_meat.hpp +++ b/include/armadillo_bits/gmm_full_meat.hpp @@ -724,7 +724,7 @@ gmm_full::learn arma_conform_check( (dist_mode_ok == false), "gmm_full::learn(): dist_mode must be eucl_dist or maha_dist" ); arma_conform_check( (seed_mode_ok == false), "gmm_full::learn(): unknown seed_mode" ); - arma_conform_check( ((var_floor >= eT(0)) == false), "gmm_full::learn(): variance floor must be >= 0" ); + arma_conform_check( ((var_floor >= eT(0)) == false), "gmm_full::learn(): variance floor must be > 0" ); const unwrap tmp_X(data.get_ref()); const Mat& X = tmp_X.M; diff --git a/include/armadillo_bits/op_orth_null_meat.hpp b/include/armadillo_bits/op_orth_null_meat.hpp index 83c7ddcd..13308ff9 100644 --- a/include/armadillo_bits/op_orth_null_meat.hpp +++ b/include/armadillo_bits/op_orth_null_meat.hpp @@ -54,7 +54,7 @@ op_orth::apply_direct(Mat& out, const Base= T(0)) == false), "orth(): tolerance must be >= 0" ); + arma_conform_check( ((tol >= T(0)) == false), "orth(): tolerance must be > 0" ); Mat U; Col< T> s; @@ -141,7 +141,7 @@ op_null::apply_direct(Mat& out, const Base= T(0)) == false), "null(): tolerance must be >= 0" ); + arma_conform_check( ((tol >= T(0)) == false), "null(): tolerance must be > 0" ); Mat U; Col< T> s; diff --git a/include/armadillo_bits/op_pinv_meat.hpp b/include/armadillo_bits/op_pinv_meat.hpp index d15cef47..65365a2b 100644 --- a/include/armadillo_bits/op_pinv_meat.hpp +++ b/include/armadillo_bits/op_pinv_meat.hpp @@ -94,7 +94,7 @@ op_pinv::apply_direct(Mat& out, const Base= T(0)) == false), "pinv(): tolerance must be >= 0" ); + arma_conform_check( ((tol >= T(0)) == false), "pinv(): tolerance must be > 0" ); // method_id = 0 -> default setting // method_id = 1 -> use standard algorithm