Eigen 3.4.90
doc
examples
TutorialLinAlgExSolveColPivHouseholderQR.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <
Eigen/Dense
>
3
4
int
main
()
5
{
6
Eigen::Matrix3f
A
;
7
Eigen::Vector3f
b
;
8
A
<< 1,2,3, 4,5,6, 7,8,10;
9
b
<< 3, 3, 4;
10
std::cout <<
"Here is the matrix A:\n"
<<
A
<< std::endl;
11
std::cout <<
"Here is the vector b:\n"
<<
b
<< std::endl;
12
Eigen::Vector3f
x
=
A
.colPivHouseholderQr().solve(
b
);
13
std::cout <<
"The solution is:\n"
<<
x
<< std::endl;
14
}
b
Array< int, 3, 1 > b
Definition:
Array_variadic_ctor_cxx11.cpp:2
x
x
Definition:
BiCGSTAB_simple.cpp:7
A
MatrixXcf A
Definition:
ComplexEigenSolver_compute.cpp:1
Dense
main
int main()
Definition:
TutorialLinAlgExSolveColPivHouseholderQR.cpp:4
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition:
Matrix.h:182