Registered Member
|
Hello,
is there an efficient way to calculate the tensor product of two vectors (with the same dimension)? thanks in advance, David
did I mention that Eigen is great? |
Moderator
|
that's a standard matrix product:
c = a * b; and to avoid a temporary you can tell Eigen there is no aliasing: c.noalias() = a * b; |
Registered Member
|
Now that you mention it -- of course. Thank you.
What does aliasing mean? should I do it in any Mat-Mat product? I thought this lazy-evaluation stuff does it...? best, David |
Moderator
|
matrix products is the exception. This is to make sure that the common: X = X*X.adjoint; works fine.Using noalias makes sense only if you have the matrix product on the righ and side.
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]