| 
					
							 Registered Member  
						
					
  | 
				
					 
							Hi, 
						
						I'm using Eigen2 and I want a function to accept arbitrarily size matrices. But since the matrix size is specified as a template, I'm at a loss how to do this. Any help is appreciated.  | 
			
| 
					
							 Registered Member  
						
					
  | 
				
					 
							Example function taking any expression as argument: 
						
						
 If you want a function that accepts only plain matrices, just replace MatrixBase by Matrix and make it template in the 6 template parameters of Matrix... 
								Last edited by bjacob on Sun Jun 07, 2009 8:49 pm, edited 1 time in total.
								
							 
						
							
								Join us on Eigen's IRC channel: #eigen on irc.freenode.net
 
						
					Have a serious interest in Eigen? Then join the mailing list!  | 
			
| 
					
							 Registered Member  
						
					
  | 
				
					 
							Thanks for your reply. 
						
						I don't know the size of the matrix at compile time, so I presume I can't use that. And I'm only interested in plain Matrices. Edit: Seems that using MatrixBase will solve the problem. But I don't think it's possible with Matrix. 
								Last edited by inktomi on Sun Jun 07, 2009 9:33 pm, edited 1 time in total.
								
							 
						
					 | 
			
| 
					
							 Registered Member  
						
					
  | 
				
					 
							Nevermind, I noticed I have to use Dynamic
						 
						
						 | 
			
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]