mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -1,20 +1,19 @@
|
||||
#include <iostream>
|
||||
#include <Eigen/Dense>
|
||||
|
||||
int main()
|
||||
{
|
||||
Eigen::Matrix2f A, b;
|
||||
Eigen::LLT<Eigen::Matrix2f> llt;
|
||||
A << 2, -1, -1, 3;
|
||||
b << 1, 2, 3, 1;
|
||||
std::cout << "Here is the matrix A:\n" << A << std::endl;
|
||||
std::cout << "Here is the right hand side b:\n" << b << std::endl;
|
||||
std::cout << "Computing LLT decomposition..." << std::endl;
|
||||
llt.compute(A);
|
||||
std::cout << "The solution is:\n" << llt.solve(b) << std::endl;
|
||||
A(1,1)++;
|
||||
std::cout << "The matrix A is now:\n" << A << std::endl;
|
||||
std::cout << "Computing LLT decomposition..." << std::endl;
|
||||
llt.compute(A);
|
||||
std::cout << "The solution is now:\n" << llt.solve(b) << std::endl;
|
||||
int main() {
|
||||
Eigen::Matrix2f A, b;
|
||||
Eigen::LLT<Eigen::Matrix2f> llt;
|
||||
A << 2, -1, -1, 3;
|
||||
b << 1, 2, 3, 1;
|
||||
std::cout << "Here is the matrix A:\n" << A << std::endl;
|
||||
std::cout << "Here is the right hand side b:\n" << b << std::endl;
|
||||
std::cout << "Computing LLT decomposition..." << std::endl;
|
||||
llt.compute(A);
|
||||
std::cout << "The solution is:\n" << llt.solve(b) << std::endl;
|
||||
A(1, 1)++;
|
||||
std::cout << "The matrix A is now:\n" << A << std::endl;
|
||||
std::cout << "Computing LLT decomposition..." << std::endl;
|
||||
llt.compute(A);
|
||||
std::cout << "The solution is now:\n" << llt.solve(b) << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user