|Re: [eigen] Re: ArrayXXf::matrix().applyOnTheLeft(...)|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: Eigen development <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Re: ArrayXXf::matrix().applyOnTheLeft(...)
- From: Rhys Ulerich <rhys.ulerich@xxxxxxxxx>
- Date: Mon, 2 Jun 2014 09:31:56 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=hHhxcGV/MK8H8wBBegvPeytc28C/uDQNKy6yg8zWDkA=; b=uilNR2KW26DJg1LLdsI3Ils1trZgAuWqQ1PLhsHWQWkxzENZr3t0SGOW0DIRDrv3Ik UhfX6zyMbiBJ8idEBQCXKh/yubIEpUgFPN1/NCjxxrHMui56szJytkXaZzgDSku5DrKA rqMyYLDuE9lw2m7D2nG0+Zz9K8vG3CRjPCI6MiERd1pgtkuTCaFyE7x26r83Ru81/sBa VnI54fOz7QOgaWZINxYpzfJdNf9CuF8xsPseIJKaAIURSkwZkBrg0+bdrhBva8XZnSYs V8QiS0HyQMox03t4t9GzRuOF+4ZszxWub0vOj32+m7Vj6nuTEAMLBCy19XxHCShEaTtq 8Syw==
Thank you for looking into it Christoph.
> This does work:
> B = (x.transpose()*B.matrix()).eval();
Aha. I always forget about eval().
> I'd say this is a bug in Eigen, not a usage error on your side!
Would you like me to file this, along with a pointer to our
discussion, as a low-priority ticket in the bug tracker?
> Is there a reason why you need B to be an Array instead of a Matrix?
Conformance with another API which intended to convey pointwise data
rather than linear algebra concepts. That API can be changed, which
is what I'll do.
> And do you really save anything by reusing B for the result variable? The
> operation can't be performed in-place anyways.
Very true. This is from a routine that processes some data in stages.
At each stage, it gets transformed in some way. I was trying to
avoid introducing new names for temporaries so that the person after
me doesn't use (now invalid) data from an older stage.