You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							18 lines
						
					
					
						
							418 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							18 lines
						
					
					
						
							418 B
						
					
					
				
								#include <iostream>
							 | 
						|
								#include <Eigen/Core>
							 | 
						|
								using namespace Eigen;
							 | 
						|
								
							 | 
						|
								template <typename Derived>
							 | 
						|
								void print_size(const EigenBase<Derived>& b)
							 | 
						|
								{
							 | 
						|
								  std::cout << "size (rows, cols): " << b.size() << " (" << b.rows()
							 | 
						|
								            << ", " << b.cols() << ")" << std::endl;
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								int main()
							 | 
						|
								{
							 | 
						|
								    Vector3f v;
							 | 
						|
								    print_size(v);
							 | 
						|
								    // v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression
							 | 
						|
								    print_size(v.asDiagonal());
							 | 
						|
								}
							 |