Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101937821
TutorialLinAlgSelfAdjointEigenSolver.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 15, 08:54
Size
534 B
Mime Type
text/x-c
Expires
Mon, Feb 17, 08:54 (2 d)
Engine
blob
Format
Raw Data
Handle
24249209
Attached To
rDLMA Diffusion limited mixed aggregation
TutorialLinAlgSelfAdjointEigenSolver.cpp
View Options
#include <iostream>
#include <Eigen/Dense>
using
namespace
std
;
using
namespace
Eigen
;
int
main
()
{
Matrix2f
A
;
A
<<
1
,
2
,
2
,
3
;
cout
<<
"Here is the matrix A:
\n
"
<<
A
<<
endl
;
SelfAdjointEigenSolver
<
Matrix2f
>
eigensolver
(
A
);
if
(
eigensolver
.
info
()
!=
Success
)
abort
();
cout
<<
"The eigenvalues of A are:
\n
"
<<
eigensolver
.
eigenvalues
()
<<
endl
;
cout
<<
"Here's a matrix whose columns are eigenvectors of A
\n
"
<<
"corresponding to these eigenvalues:
\n
"
<<
eigensolver
.
eigenvectors
()
<<
endl
;
}
Event Timeline
Log In to Comment