Registered Member
|
I know that
sets the first 3 elements of b to the vector a. However, supose, instead, that I have a function, f, which sets the first 3 elements of a vector:
The following does not compile
Do I need to construct a 3-vector, pass it to f, and then copy the result into b.head(3)? In many matrix libraries, a block matric may be treated as any othe matrix, but it seems not in Eigen. |
Moderator
|
See this page of the doc: http://eigen.tuxfamily.org/dox-devel/To ... Types.html
|
Registered Member
|
Thanks. Great reference, and essesntial to understand for using Eigen more fully. In my case, I will need to do a further hack to make things work, since my function is actually a virtual member function of a class, and, so, cannot be templatized. I suppose I will need to replace the virtual mechanism by having a new template paramaeter to the class for the derived type (as Eigen does), and set a pointer to the derived type in the constructor. I am new at Eigen. I hope this is all worth it ... |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell