Registered Member
|
Hi,
in continuum mechanics is very common to transform a skew-symmetric matrix into its correspondent axial vector v_{k}=1/2*epsilon_{ijk}*M_{ij} and viceversa: M_{ij}=epsilon_{ijk}*v_{k} where epsilon_{ijk} is the rank-3 permutation tensor. I would like to write an implementation of this such that I can write
and
How can I implement this efficiently using Eigen internal mechanisms? For example, if I have:
can I code asSkewMatrix() without creating temporaries? Thanks! |
Registered Member
|
I'm not sure if this is helpful, but it seems related:
http://eigen.tuxfamily.org/dox-devel/TopicFunctionTakingEigenTypes.html This explains how to pass expressions into functions without first converting to a temporary. |
Registered Member
|
Hi,
I'm also interested in this topic. The documentation in the link does not solve the problem, I think. I am particularly interested about the asSkew() method. Is there any Eigen-way with template expressions to implement it, rather than just creating a plain 3x3 matrix, fill the coefficients, and return by value? I understand that with a 3x3 it may be not worth to have a complex implementation, because temporaries are small. But the problem is actually more general: how do I turn a vector (of length n) into a matrix (eg nxn) whose coefficients are a function of the vector? Without using a temporary matrix, if there is a more efficient way. thanks a lot B |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]