Re: [eigen] Inverse of an array through .matrix()

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


On Sun, Jun 27, 2010 at 3:13 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> This
>> works:
>>
>>  ArrayXXf xx = m.matrix().inverse().array();

for the record,  m.matrix().inverse().array() creates one useless
temporary (m.matrix().inverse() has to be evaluated before being able
to view it as an array), and so a better solution is:

ArrayXXf xx;
xx.matrix() = m.matrix().inverse();

gael



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