Eigen 3.4.90
doc
examples
TutorialLinAlgSetThreshold.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <
Eigen/Dense
>
3
4
int
main
()
5
{
6
Eigen::Matrix2d
A
;
7
A
<< 2, 1,
8
2, 0.9999999999;
9
Eigen::FullPivLU<Eigen::Matrix2d>
lu
(
A
);
10
std::cout <<
"By default, the rank of A is found to be "
<<
lu
.rank() << std::endl;
11
lu
.setThreshold(1
e
-5);
12
std::cout <<
"With threshold 1e-5, the rank of A is found to be "
<<
lu
.rank() << std::endl;
13
}
A
MatrixXcf A
Definition:
ComplexEigenSolver_compute.cpp:1
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Dense
main
int main()
Definition:
TutorialLinAlgSetThreshold.cpp:4
Eigen::FullPivLU
LU decomposition of a matrix with complete pivoting, and related features.
Definition:
FullPivLU.h:64
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition:
Matrix.h:182
lu
cout<< "Here is the matrix m:"<< endl<< m<< endl;Eigen::FullPivLU< Matrix5x3 > lu(m)