|   Registered Member   
 | 
							Hi, I'm trying to customize MatrixBase to add a few methods I often used. I have followed the instructions: http://eigen.tuxfamily.org/api/CustomizingEigen.html And I generated the following MatrixBaseAddons.h: 
 and the following CwiseUnaryOps.h: 
 It's only the third test that doesn't work. Thanks ricard 
								Last edited by bjacob on Fri Jan 09, 2009 8:04 pm, edited 1 time in total.
								
							 | 
|   Moderator   
 | 
							Hi, by "doesn't work" I guess you meant that it does not compile because you forgot the const qualifier to function max: 
 Also, I would recommend you to define your own eigen header file (eg. MyEigen.h) like this: 
 such that CwiseMaxOp is not nested in the class MatrixBase, and then, throughout your project you include "MyEigen.h" instead of .... | 
|   Registered Member   
 | 
							Thanks! That was exactly it. Maybe when I learn more C++ I will even be able to help, instead of always ask for help. In my program I do have a core.h where I put the eigen related stuff, however I did this a few days ago and some things are still not done well. Thanks for the suggestion, will take care of it. ricard 
 | 
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell
 
		 
		 
		 
		