Files
FastDeploy/third_party/eigen/doc/snippets/FullPivLU_kernel.cpp
Jack Zhou 355382ad63 Move eigen to third party (#282)
* remove useless statement

* Add eigen to third_party dir

* remove reducdant lines
2022-09-26 19:24:02 +08:00

9 lines
325 B
C++

MatrixXf m = MatrixXf::Random(3, 5);
cout << "Here is the matrix m:" << endl << m << endl;
MatrixXf ker = m.fullPivLu().kernel();
cout << "Here is a matrix whose columns form a basis of the kernel of m:"
<< endl
<< ker << endl;
cout << "By definition of the kernel, m*ker is zero:" << endl
<< m * ker << endl;