11 #include <Eigen/Dense> 12 #include <gtest/gtest.h> 14 using namespace Eigen;
18 #if defined(__BORLANDC__) 19 #define __CURRENT_FUNCTION_NAME__ __FUNC__ 20 #elif defined(_MSC_VER) && (_MSC_VER>=1300) 21 #define __CURRENT_FUNCTION_NAME__ __FUNCTION__ 22 #elif defined(_MSC_VER) && (_MSC_VER<1300) 24 #define __CURRENT_FUNCTION_NAME__ ::system::extractFileName(__FILE__).c_str() 26 #define __CURRENT_FUNCTION_NAME__ __PRETTY_FUNCTION__ 31 template <
int ColRowOrder>
32 void do_test_EigenVal4x4_sym_vs_generic_eigen()
34 typedef Matrix<double,4,4,ColRowOrder> Mat44;
36 const double dat_C1[] = {
37 13.737245,10.248641,-5.839599,11.108320,
38 10.248641,14.966139,-5.259922,11.662222,
39 -5.839599,-5.259922,9.608822,-4.342505,
40 11.108320,11.662222,-4.342505,12.121940 };
41 const Mat44 C1(dat_C1);
45 Eigen::SelfAdjointEigenSolver<Mat44> eigensolver(C1);
50 <<
"SelfAdjointEigenSolver:\n" 51 <<
"eigvecs: " << endl << eigensolver.eigenvectors() << endl
52 <<
"eigvals: " << endl << eigensolver.eigenvalues() << endl;
55 Eigen::EigenSolver<Mat44> es(C1,
true);
61 <<
"eigvecs: " << endl << es.eigenvectors() << endl
62 <<
"eigvals: " << endl << es.eigenvalues() << endl;
66 TEST(MatricesEigen,EigenVal4x4_sym_vs_generic)
68 do_test_EigenVal4x4_sym_vs_generic_eigen<Eigen::ColMajor>();
69 do_test_EigenVal4x4_sym_vs_generic_eigen<Eigen::RowMajor>();
TEST(Compress, DataBlockGZ)
#define __CURRENT_FUNCTION_NAME__
A macro for obtaining the name of the current function: