Re: [eigen] SelfAdjointView<> as LHS expression for optimizations?

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


Thanks a lot for the help and the work, I tested it and it's OK!

Just to complete this thread, here's the code for the case one also
wants the resulting matrix with both triangular parts filled instead
of just one lo/up triangular part:

template <typename MAT_H, typename MAT_C, typename MAT_R>
inline void multiply_HCHt(
	const MAT_H &H,
	const MAT_C &C,
	MAT_R &R)
{
	R  = ( (H * C.template selfadjointView<Eigen::Lower>()).eval() *
H.adjoint()).eval().template selfadjointView<Eigen::Lower>();
}

Best,
JL



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