Registered Member
|
I am doing a project using matrices. Eigen is the best C++ matrix library I've found. However, I am required to write my own API for matrix class. So I decide to write a wrapper matrix class based on Eigen.
I wanna to keep all the benefits of Eigen, and therefore I decide to make my wrapper class inherit from Eigen. Here, I found some tutorial, http://eigen.tuxfamily.org/dox-devel/Cu ... Eigen.html However, I wanna to prevent my wrapper class calling the Eigen functions directly. So, I wanna to make the inheritance private. Could anybody tell me if the private inheritance is a good thing to do? I met some problem even for simple multiplication operation. I guess it is because of the expression type. But I can't find the right type. Here is my sample codes
The above does not work for the product of three matrices. Could anybody give me some thought or a solution? Thank you so much! |
Moderator
|
there were many mistakes (typename, reference, wrong declaration):
|
Registered Member
|
Thank you very much for your reply. I am new to C++ and doing my first internship. Could you please give me some specific suggestions if I could use private inheritance? I really don't have too much experience with C++. Could you please give me a right direction for wrapping Eigen? I really appreciate your help.
|
Registered Member
|
A million thanks with your help! Now, it works well. I've spend one day on this problem. Thanks again for your professional help!
|
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]