From 99527865c00b74a3a48daa2e1e5eb7c71bd861b5 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Tue, 22 Aug 2017 07:56:07 +0000 Subject: Fixes matrix checks - looking saner now - Matrix checks as described in https://github.com/genetics-statistics/GEMMA/issues/72 - introduces -strict switch which will exit on certain conditions - zero small eigenvalues in EigenDecomp_Zeroed which also checks for negative values - commented out float versions of functions in lapack.cpp (pre-removal) - reverted on disabled regression tests (GEMMA shows its previous behaviour now) --- src/mvlmm.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/mvlmm.cpp') diff --git a/src/mvlmm.cpp b/src/mvlmm.cpp index 358038f..be9fd78 100644 --- a/src/mvlmm.cpp +++ b/src/mvlmm.cpp @@ -257,14 +257,7 @@ double EigenProc(const gsl_matrix *V_g, const gsl_matrix *V_e, gsl_vector *D_l, gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, V_e_hi, VgVehi, 0.0, Lambda); // Eigen decomposition of Lambda. - EigenDecomp(Lambda, U_l, D_l, 0); - - for (size_t i = 0; i < d_size; i++) { - d = gsl_vector_get(D_l, i); - if (d < 0) { - gsl_vector_set(D_l, i, 0); - } - } + EigenDecomp_Zeroed(Lambda, U_l, D_l, 0); // Calculate UltVeh and UltVehi. gsl_blas_dgemm(CblasTrans, CblasNoTrans, 1.0, U_l, V_e_h, 0.0, UltVeh); -- cgit v1.2.3