Registered Member
|
Hello,
I would like to wrap the Eigen::Block into my own struct with the typedef (so to have some abstraction, that I dont want to use directly Eigen stuff in my code). But I dont know how to write this with templates, because I dont know how to access the template parameter (-1 or any integer) for Row and COL? So there must be a way of getting to the underlying type of this integer. The class DynamicBlock works, but how do I write StaticBlock?
I would like to write
How do I do this? THanks alot!! |
Registered Member
|
Are you looking for MatrixType::RowsAtCompileTime and MatrixType::ColsAtCompileTime ?
|
Registered Member
|
Yes, I think this is it ?
Is this the correct template parameter? Or how do we call these? |
Registered Member
|
Yes you can use it as template parameter
|
Registered Member
|
I have found the solution to wrap the eigen type:
like
lets me write stuff like this:
Can somebody tell me if this make sense to use like this or if there are some disadantages? Thanks!! |
Moderator
|
That sounds overkill, why not directly using VectorBlock<MyMatrix::VectorQObj,4> and VectorBlock<const MyMatrix::VectorQObj,4> ??
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]