Re: [eigen] [eigen3] .cwise() vs .array() and static assertion |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] [eigen3] .cwise() vs .array() and static assertion
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Mon, 16 Aug 2010 11:08:14 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=ST1VBP4+oow1yv3kZv3+yT8uWdAvjQMzpot0+ZNOBv8=; b=dxuJ6OQDU7SS4cvb5bNMzrrll3rcNHKk5ZqVnWvCKocetA9R/gRfckRnf2wWEgJ45P GAANqc8NAIjo1GAqJRvAA66SGQSAaIdta5f8z4i9v/kQTKOPrwsL+9r8O9/KPZLkhMiG 7MYA9X6/PXHxEMhIyLxVvvo72idNnQKa7wsIo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=cnOANnbD6PpKLUfRXbhPOBF4GRc30K2QRG3Sqw4lc6NeTfjb8rxnTjBvbMG06gCqiy uRBvbRP38RftUYrE5fO28u9BYYXQH65wjmTZERa7Cbd8HsqVrro7cYDOuF3HwED+4+Fk gCd85eDoCEuKUNtcT0YYeUmpCVYDt52suuhL4=
Hi,
you now get the following error message:
Eigen/src/Core/MatrixBase.h:432:46: error: ‘Derived&
Eigen::MatrixBase<Derived>::operator+=(const
Eigen::ArrayBase<OtherDerived>&) [with OtherDerived =
Eigen::Array<float, -0x00000000000000001, 1>, Derived =
Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001>]’ is
protected
not ideal yet, but much better.
gael
On Wed, Aug 4, 2010 at 3:30 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> 2010/8/4 Christophe Prud'homme <christophe.prudhomme@xxxxxxxxxxxxxxx>:
>> Hi,
>>
>> I am starting using eigen3
>> I got this message
>>
>> THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS
>>
>> triggered by this code:
>>
>> tmp -= (0.5 * ii)*scalings().row( ii-1 ).array()*bs[ii].row( jj ).array();
>
> You are doing:
>
> matrix -= array;
>
> which amounts to:
>
> matrix = matrix - array;
>
> the mixing of matrices and arrays on the RHS is illegal, so you need to do:
>
> tmp.array() -= (0.5 * ii)*scalings().row( ii-1 ).array()*bs[ii].row(
> jj ).array();
>
> I do agree that the error message is not helpful, needs to be fixed.
>
> Benoit
>
>>
>> any idea what this means ?
>>
>> The code was compiling before with cwise()
>>
>> tmp -= (0.5 * ii)*scalings().row( ii-1 ).cwise()*bs[ii].row( jj );
>>
>> Best regards
>> C.
>> --
>> Christophe Prud'homme
>> Université de Grenoble christophe.prudhomme@xxxxxxxxxxxxxxx
>> LJK - Room 55 Tel: +33476635497
>> 51, rue des Mathématiques Fax: +33476631263
>> BP53 38041 Grenoble Cedex 9
>> <http://ljk.imag.fr/membres/Christophe.Prudhomme/>
>>
>>
>>
>
>
>