Say we have a matrix A of dimension MxN and a vector a of dimension Mx1. In Matlab, to multiply 'a' with all columns of 'A', we can do
bsxfun(@times, a, A)
Is there an equivalent approach in Eigen, without having to loop over the columns of the matrix?
I'm trying to do
M = bsxfun(@times, a, A) + bsxfun(@times, a2, A2)
and hoping that Eigen's lazy evaluation will make it more efficient.
Thanks!