Files
ViewDesignEngine/eigen3/doc/examples/TutorialLinAlgExSolveLDLT.cpp
T
hm a10ff5ef3b
Build & Test / build-and-test (push) Canceled after 0s
VDE Build & Test / build-and-test (push) Canceled after 0s
Build & Test / python-bindings (push) Canceled after 0s
merge: resolve conflicts with remote main (VDE-493 factories, docs); preserve empty-weights fix
2026-08-05 12:29:37 +08:00

17 lines
356 B
C++

#include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
Matrix2f A, b;
A << 2, -1, -1, 3;
b << 1, 2, 3, 1;
cout << "Here is the matrix A:\n" << A << endl;
cout << "Here is the right hand side b:\n" << b << endl;
Matrix2f x = A.ldlt().solve(b);
cout << "The solution is:\n" << x << endl;
}