Re: [eigen] Support for trace of tensors |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
HiI am evaluating Eigen::Tensor, it is very nice and allows to reduce some of my code a lot.In tensor calculus the trace is an important operation.could it be supported by Eigen:Tensor ?For exampleEigen::Tensor<double,3> S( 2,2,2 );Eigen::array<DimPair, 1> dims = {{DimPair(0, 1)}};
// compute the trace of S along the first and second dimensionsEigen::Tensor<double,1> V=S.trace( dims );Best regardsC.--Christophe Prud'hommeFeel++ Project ManagerProfessor in Applied Mathematics@ Université de Strasbourg (France)
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |