Re: [eigen] problem with operator() in development branch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] problem with operator() in development branch
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 28 May 2010 01:16:37 -0400
- Cc: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- 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:cc:content-type :content-transfer-encoding; bh=S1OiFiqm5b2X5WqQd8r3DNTlEsZXHQ54dTyhTDBlGR0=; b=undF8UMT4xkADr7UrpHnHLBSZPxTVJbtu7qkcDyE2us+yOqvM0re9THqREpwthypQr LUf5uT8u4+EQiWn2s5vhLHD+Wp0Br79OqV5WvPOoOM38aB6GRFJ9d4r89AcLMTpa9VOl w5DcPpMPYBAsi72cHqKYQHfNmE6j4FWgKtqWI=
- 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 :cc:content-type:content-transfer-encoding; b=gcBvRXo+J61sWeHU074wDZ8nOJq24wDwnFos1laOnEBHmeVm7ekvArJPvyUfY/bPPU eeqI/FVArOu+OwGAb7rLlZyZzzj67HpEBWwj14axR1k99AgvnNr6CmfZwnZm+QNyDVVZ cBRng7gHu47bxwMeKjUjILcWk55Ns8OqrixLo=
ok, i seem to remember that there was a serious reason why we couldn't
allow it, but it escapes me. Can you please remind me?
Benoit
2010/5/26 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> oh, I know about this issue.
>
> Gael: the issue is that ProductBase doesn't allow coeff-based access.
> But it inherits DenseBase. Honestly I think that it would be far
> simpler if we said that by convention, and xpr inheriting DenseBase
> has (usable) coeff methods. Is that OK? Do you see a big difficulty
> with allowing that? If you think that's really not possible, then do
> you agree that ProductBase should not inherit DenseBase anymore?
>
> Benoit
>
> 2010/5/26 Bill Greene <w.h.greene@xxxxxxxxx>:
>> I'm running with a very recent version of Eigen from the development branch.
>> The following code snippet works fine with Eigen 2
>>
>> Eigen::MatrixXd a(1,2), b(2,1);
>> a << 1, 2;
>> b << 2, 3;
>> double c = (a*b)(0,0);
>> std::cout << "c=" << c << std::endl;
>>
>> but I get a compilation error with VC++ 2008 and the development branch Eigen
>>
>> d:\u_drive\src\eigen\dev_branch\eigen\eigen\src\core\densecoeffsbase.h(92)
>> : error C2248: 'Eigen::ProductBase<Derived,Lhs,Rhs>::coeff' : cannot
>> access private member declared in class
>> 'Eigen::ProductBase<Derived,Lhs,Rhs>'
>> 1>
>>
>> Thanks.
>>
>> Bill Greene
>>
>>
>>
>