I am moving to Eingen library, which is a native template library ready to use. Just download it. Then in Visual Studio edit the proprierties of your project and in C++ add the appropriate include path. Then compile it, without any problem.
Eingensolver is defined in this class. Here a toy code example of use.
#include
#include
// import most common Eigen types USING_PART_OF_NAMESPACE_EIGEN
int main(int, char *[])
{
using namespace Eigen;
Matrix3f m3;
m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
Matrix4f m4 = Matrix4f::Identity();
Vector4i v4(1, 2, 3, 4);
EigenSolverm_solve(m3);
Vector3f m_solved_val = m_solve.eigenvalues().real();
std::cout << "m3\n" << m3 << "\nm4:\n"
<< m4 << "\nv4:\n" << v4
<< "\neigen:\n" << m_solved_val << "\n" << std::endl;
std::string a;
std::cin >> a;
}
No comments:
Post a Comment