source: pacpussensors/trunk/Vislab/lib3dv/eigen/Eigen-install/doc/snippets/compile_HouseholderQR_householderQ.cpp@ 136

Last change on this file since 136 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 470 bytes
Line 
1#include <Eigen/Dense>
2#include <iostream>
3
4using namespace Eigen;
5using namespace std;
6
7int main(int, char**)
8{
9 cout.precision(3);
10 MatrixXf A(MatrixXf::Random(5,3)), thinQ(MatrixXf::Identity(5,3)), Q;
11A.setRandom();
12HouseholderQR<MatrixXf> qr(A);
13Q = qr.householderQ();
14thinQ = qr.householderQ() * thinQ;
15std::cout << "The complete unitary matrix Q is:\n" << Q << "\n\n";
16std::cout << "The thin matrix Q is:\n" << thinQ << "\n\n";
17
18 return 0;
19}
Note: See TracBrowser for help on using the repository browser.