Re: [eigen] problem with selfadjointView |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] problem with selfadjointView
- From: Ben Goodrich <bgokgm@xxxxxxxxxxxxxx>
- Date: Sun, 22 Aug 2010 11:23:16 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KIZVGMMMzIyKqwbwiu+4vTEeQKji9zJ47dQI3cQK+SQ=; b=mJ080tvHDu8icT0yms3ahuJHurISxxgxAmiF84AnTkz3K0mtwosOelkCUOEA7/O1+Y Tl5eB/pI6zwKP8Mnv3Y5RsclbIHFw6Yams8eHikeCLNOQHEKf5X/g75+Ld+ZeSWNIetw evSNGB6/9IjwwJ+7DTtk5WjLZQRiJbhupT6IQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=JBiMtzZjMAQWPycmvxZXXHuZXqHPEke4aV8L+PDugzi3Hp8JpEXY06YE0VP7mRqzya D84Q/s9KnWzR2nPeURREApCrGJXExGNklgS3u5LEqpjYWovXLFjMGyM4aM9j7MCxu0eL yWSNIElcIsYRaHD0/4/3O39RFKnuBoycUXsUk=
On Sun, Aug 22, 2010 at 7:39 AM, Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx> wrote:
> On Sat, 21 Aug 2010, Ben Goodrich wrote:
>
>> Thanks for implementing that. Is there something special needed to
>> make it work with templates? I would have expected
>>
>> template <typename Derived>
>> void bar(const MatrixBase<Derived> &x, const MatrixBase<Derived> &A,
>> MatrixBase<Derived> &z) {
>> z = x.transpose() * A.selfadjointView<Lower>() * x;
>> }
>>
>> to work now, but the compiler throws an expected primary-expression error.
>
> Perhaps you need to add the 'template' keyword, as in:
>
> z = x.transpose() * A.template selfadjointView<Lower>() * x;
>
> Warning: I did not try it out.
>
>
> Jitse
I had tried that yesterday but forgot to mention it. It doesn't work
for me, but maybe the .template() trick should be mentioned somewhere
in the documentation?
Ben