[eigen] Tensor Diagonal Operation

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


Hello,

I have a very simple question: does the Eigen Tensor library have
something that can extract the diagonal from a tensor? Basically I'm
looking for something like the existing "trace()" function, but
instead of summing along the diagonal, just returns the values that
would be used to calculate the trace.

If this is not implemented at the moment, would a pull request be
welcome? I imagine that this would involve doing something like
modifying the "chip()" operation to return the diagonal instead of a
specific row.

Graham



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