Re: [eigen] Problem extending MatrixBase |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Problem extending MatrixBase
- From: Aron Ahmadia <aja2111@xxxxxxxxxxxx>
- Date: Sun, 17 Jan 2010 21:56:28 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=K0N+3EwHt+yBKu/MpySmm9g9UQ+8UIAXlWgunD9uZTE=; b=EBFYkuwStP7YB7892w3/qLPDPG8veEFkNsQbZUdlh0LqbYNZSJZhosMA8AEyEpcYxm nyXcswbg0pH4ssH04OnGTaZFB9Usl5L9ZrRcEIHB0FQ5vN//Snrf3huEwA1YD2oAgX0b 3Wr20pr5zhgOYBiajsnTT5+JgMdTTZW3ji1hM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=r9gg8fgse5gApjexqwOcRudtnPZEEzNixw52X0VXMT65VCldbAWcLHEWt2JasQ604n /jhivOpeFeUCusjrDQxTvKtONjfoqTS+oVigmD36eEi3XFh92O+ICtkN81hsaROLl9v/ B43Ndoddbdl1fWAF/T6qnF1uLzOqQtIi8BkMA=
Gael, did you mean to modify one of those lines?
> const CwiseUnaryOp<ei_scalar_add_op<Scalar>, Derived>
> const CwiseUnaryOp<ei_scalar_add_op<Scalar>, Derived>
A
On Sun, Jan 17, 2010 at 9:53 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> I guess this is because of a recursive dependency. To make it work, in
> the last two functions, replace:
>
> const CwiseUnaryOp<ei_scalar_add_op<Scalar>, Derived>
>
> by
>
> const CwiseUnaryOp<ei_scalar_add_op<Scalar>, Derived>
>
> gael
>
> On Sun, Jan 17, 2010 at 6:42 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Le 17 janvier 2010 05:46, Raphaël Poncet <raphael.poncet@xxxxxxxxx> a écrit :
>>> Hello list,
>>>
>>> I'm running into problems while trying to extending MatrixBase as explained
>>> in the wiki:
>>> http://eigen.tuxfamily.org/dox/CustomizingEigen.html#ExtendingMatrixBase
>>>
>>> I copied/pasted MatrixBaseAddons.h in my working directory. This code
>>> doesn't compile
>>> (with g++-4.4 or g++-4.3, using Eigen 2.0.5, the version packaged in my
>>> Ubuntu distro) :
>> [snip]
>>>
>>> However, If i comment out the last 2 declarations in MatrixBaseAddons.h (the
>>> ones with operator+),
>>> it does compile. What am I doing wrong ?
>>
>> Nothing it seems, I am really puzzled. I fixed an error in our
>> example, there was a missing semicolon, but that wasn't it. I don't
>> understand what ConstantReturnType has to do with it.
>>
>>>
>>> P.S. Btw, I want to extend MatrixBase because I'm only using Array
>>> capabilities in Eigen
>>> in my code atm, and want to get rid of all the cwise()
>>
>> Then why don't you give the development branch a try. It has a Array
>> class where all operations are implicitly cwise.
>>
>> Benoit
>>
>>
>>
>
>
>