[eigen] Implementation of M.transpose()*M & M*M.transpose()

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

I'm curious how M.transpose()*M and M*M.transpose() is implemented in Eigen by using _expression_ Template. Or it's just the same as the usual multiplication of two matrices?
The fact that the resultant matrix is symmetric can be used to save computation cost especially for large matrix. For example, the Hessian matrix, often used in nonlinear optimization/minimization, is actually obtained as Jacobian.transpose() * Jacobian. It is trivial to write a efficient function to do this by considering the symmetry. But anyway it is less elegant in the sense that the code does not look nice, e.g. Matrix hessian = MT_Mult_M(Jacobian).
Any idea to do this efficiently by sticking to _expression_ Template? A different but somewhat similar case is the multiplication of normal matrix by diagonal matrix.
Jinglei Hu

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/