TutorialLinAlgExSolveLDLT.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4 of file TutorialLinAlgExSolveLDLT.cpp.

5 {
7  A << 2, -1, -1, 3;
8  b << 1, 2, 3, 1;
9  std::cout << "Here is the matrix A:\n" << A << std::endl;
10  std::cout << "Here is the right hand side b:\n" << b << std::endl;
11  Eigen::Matrix2f x = A.ldlt().solve(b);
12  std::cout << "The solution is:\n" << x << std::endl;
13 }
Array< int, 3, 1 > b
MatrixXcf A
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182