From f776c061a17faf47bcebcd087d3d28d32e3f478a Mon Sep 17 00:00:00 2001 From: Desire NUENTSA Date: Thu, 29 Mar 2012 14:53:42 +0200 Subject: Correct a small bug in sparse_solver --- test/sparse_solver.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'test/sparse_solver.h') diff --git a/test/sparse_solver.h b/test/sparse_solver.h index 62c0e9495..1bbaeb2dd 100644 --- a/test/sparse_solver.h +++ b/test/sparse_solver.h @@ -74,17 +74,6 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A, VERIFY(x.isApprox(refX,test_precision())); } -template -inline std::string get_matrixfolder() -{ - std::string mat_folder = EIGEN_MATRIXDIR; - if( internal::is_same >::value || internal::is_same >::value ) - mat_folder = mat_folder + static_cast("/complex/"); - else - mat_folder = mat_folder + static_cast("/real/"); - return mat_folder; -} - template void check_sparse_solving_real_cases(Solver& solver, const typename Solver::MatrixType& A, const Rhs& b, const Rhs& refX) { @@ -167,6 +156,20 @@ int generate_sparse_spd_problem(Solver& , typename Solver::MatrixType& A, typena return size; } + +#ifdef TEST_REAL_CASES +template +inline std::string get_matrixfolder() +{ + std::string mat_folder = TEST_REAL_CASES; + if( internal::is_same >::value || internal::is_same >::value ) + mat_folder = mat_folder + static_cast("/complex/"); + else + mat_folder = mat_folder + static_cast("/real/"); + return mat_folder; +} +#endif + template void check_sparse_spd_solving(Solver& solver) { typedef typename Solver::MatrixType Mat; @@ -199,7 +202,7 @@ template void check_sparse_spd_solving(Solver& solver) } // First, get the folder -#ifdef EIGEN_MATRIXDIR +#ifdef TEST_REAL_CASES if (internal::is_same::value || internal::is_same >::value) return ; @@ -278,7 +281,7 @@ template void check_sparse_square_solving(Solver& solver) } // First, get the folder -#ifdef EIGEN_MATRIXDIR +#ifdef TEST_REAL_CASES if (internal::is_same::value || internal::is_same >::value) return ; -- cgit v1.2.3