TutorialLinAlgSelfAdjointEigenSolver.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Eigen/Dense>
00003 
00004 using namespace std;
00005 using namespace Eigen;
00006 
00007 int main()
00008 {
00009    Matrix2f A;
00010    A << 1, 2, 2, 3;
00011    cout << "Here is the matrix A:\n" << A << endl;
00012    SelfAdjointEigenSolver<Matrix2f> eigensolver(A);
00013    cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << endl;
00014    cout << "Here's a matrix whose columns are eigenvectors of A "
00015         << "corresponding to these eigenvalues:\n"
00016         << eigensolver.eigenvectors() << endl;
00017 }


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:56