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*: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>*Date*: Sun, 22 Aug 2010 11:28:45 -0400*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=9/Q8XXX/M8Vm6F/yBk7GXGBoz6V9z/qmuPUhUhImWr8=; b=UPOthz0bkn1xpiwYeZdCi1uLYJu/VWRBwvyW606rs8MaYmdw+mDnpQFUZJHqFLeOdc ONT0PTOQoTLSrU8TWrPRbm8ssBo0PtNodOvB3MY4DIACcwbUutk483q8EQzepED6rhlz TVXopVg/j204pUYJBsFFaOi6BvWww7D7rhscc=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=saDDshhtdgbW6I+0Wgj6rM5da8TqpvrfuwnlcL+A++mZgD26NQ2KMHr6bDwg2IV0LE M9n4S2mWan2ILAvb0xklcqVgEhhakav6/BzqGfc1efFQClXR7BHNJju40FH9OIvVB6FG gkQGg46PPorjvZMNnA9jHyoVPFCmL4zpeNwRM=

2010/8/22 Ben Goodrich <bgokgm@xxxxxxxxxxxxxx>

I confirm what Jitse says, but since it's a general C++ syntax quirk, it's hard for us to document it everywhere where needed.

Can you paste the whole compiler error that you're getting?

Benoit

I had tried that yesterday but forgot to mention it. It doesn't workOn 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

for me, but maybe the .template() trick should be mentioned somewhere

in the documentation?

I confirm what Jitse says, but since it's a general C++ syntax quirk, it's hard for us to document it everywhere where needed.

Can you paste the whole compiler error that you're getting?

Benoit

Ben

**Follow-Ups**:**Re: [eigen] problem with selfadjointView***From:*Ben Goodrich

**References**:**[eigen] problem with selfadjointView***From:*Ben Goodrich

**Re: [eigen] problem with selfadjointView***From:*Gael Guennebaud

**Re: [eigen] problem with selfadjointView***From:*Gael Guennebaud

**Re: [eigen] problem with selfadjointView***From:*Ben Goodrich

**Re: [eigen] problem with selfadjointView***From:*Jitse Niesen

**Re: [eigen] problem with selfadjointView***From:*Ben Goodrich

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] problem with selfadjointView** - Next by Date:
**Re: [eigen] problem with selfadjointView** - Previous by thread:
**Re: [eigen] problem with selfadjointView** - Next by thread:
**Re: [eigen] problem with selfadjointView**

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