mirror of
				https://github.com/PaddlePaddle/FastDeploy.git
				synced 2025-10-31 20:02:53 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			8 lines
		
	
	
		
			302 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			302 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| MatrixXf A(MatrixXf::Random(5, 3)), thinQ(MatrixXf::Identity(5, 3)), Q;
 | |
| A.setRandom();
 | |
| HouseholderQR<MatrixXf> qr(A);
 | |
| Q = qr.householderQ();
 | |
| thinQ = qr.householderQ() * thinQ;
 | |
| std::cout << "The complete unitary matrix Q is:\n" << Q << "\n\n";
 | |
| std::cout << "The thin matrix Q is:\n" << thinQ << "\n\n";
 | 
