Re: [eigen] Inverse of an array through .matrix() |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Inverse of an array through .matrix()
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sun, 27 Jun 2010 15:16:57 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=spmMkTiDX6eiXaU1l49zD/3S45mYHjq7es0DYzeX9G0=; b=La3XMQpKehsGoqW4g6Jib4vM0IEFmV/4TtOqdxfB80w1ApV6xEOlUq4MEZ+cMgjoKM Q6hx+VIrqPDJYw0GpgF1vWGYZhqNkK7OY7PmIARBXtF0gPxFpPOnBgK7mkSAtsTp65Am srdq2sH6OfoAuYwfPpCfyEx617gGNENL3KLPI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=N24pG/DoseP8LAFGSJVsUG6BvMQq9IgkpUjpWEPqGOaLxmCStaiGAyp+HTJCdUNH/g 2GsVNgjp8XXCRm3BT63zgmlDAw2Tp/gQJOLwvkgmozUFA5L6egF00IKPEO7SJlGCgo7y 1argeYBxA8tQ6Mh53IK4jm3+/87HsCuwaGuL0=
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