mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -1,15 +1,14 @@
|
||||
#include <iostream>
|
||||
#include <Eigen/Dense>
|
||||
|
||||
int main()
|
||||
{
|
||||
Eigen::Matrix2f A;
|
||||
A << 1, 2, 2, 3;
|
||||
std::cout << "Here is the matrix A:\n" << A << std::endl;
|
||||
Eigen::SelfAdjointEigenSolver<Eigen::Matrix2f> eigensolver(A);
|
||||
if (eigensolver.info() != Eigen::Success) abort();
|
||||
std::cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << std::endl;
|
||||
std::cout << "Here's a matrix whose columns are eigenvectors of A \n"
|
||||
<< "corresponding to these eigenvalues:\n"
|
||||
<< eigensolver.eigenvectors() << std::endl;
|
||||
int main() {
|
||||
Eigen::Matrix2f A;
|
||||
A << 1, 2, 2, 3;
|
||||
std::cout << "Here is the matrix A:\n" << A << std::endl;
|
||||
Eigen::SelfAdjointEigenSolver<Eigen::Matrix2f> eigensolver(A);
|
||||
if (eigensolver.info() != Eigen::Success) abort();
|
||||
std::cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << std::endl;
|
||||
std::cout << "Here's a matrix whose columns are eigenvectors of A \n"
|
||||
<< "corresponding to these eigenvalues:\n"
|
||||
<< eigensolver.eigenvectors() << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user