Eigen 3.4.90
doc
examples
Tutorial_PartialLU_solve.cpp
Go to the documentation of this file.
1
#include <
Eigen/Core
>
2
#include <
Eigen/LU
>
3
#include <iostream>
4
5
int
main
()
6
{
7
Eigen::Matrix3f
A
;
8
Eigen::Vector3f
b
;
9
A
<< 1,2,3, 4,5,6, 7,8,10;
10
b
<< 3, 3, 4;
11
std::cout <<
"Here is the matrix A:"
<< std::endl <<
A
<< std::endl;
12
std::cout <<
"Here is the vector b:"
<< std::endl <<
b
<< std::endl;
13
Eigen::Vector3f
x
=
A
.lu().solve(
b
);
14
std::cout <<
"The solution is:"
<< std::endl <<
x
<< std::endl;
15
}
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
Core
LU
main
int main()
Definition:
Tutorial_PartialLU_solve.cpp:5
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition:
Matrix.h:182