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: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 4 Aug 2010 09:30:49 -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 :content-transfer-encoding; bh=E7FmQSHnjlU3+r1nmE512DWd4JstOdU//+n1ROiypiI=; b=ASu0UyCrYQOjo2+5pAvFagCJ7KpoLvU7TWbIOT/2JQX+W3YC9qmeIccGY1mJNF4Kgi SqTzhPQHMRcOWwmpGMIfSpsltYh0EuQhZS77j3PZT0m6g8JOAcCvgYAlEz8pHMXb/ft+ 9Hb9BQ5iIiJbk+YkVEdGTiemOL6eNKWz891mE=
- 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:content-transfer-encoding; b=leeIBfjcFBE3Xb+5HI1QjyhnJLtcssyhw+aAyUW8TLNJde7JULsOvQgrXlUNjCwx7v wG5hxSZRcOnNRso6knBeEAq1IIFOe2d7cwcJuvBHQ4RLbwN0ZsRKafbENZNQF/RU16X5 uz0H8jiUXcxRgOF7gOF+mbU9oB6MpTSTvEy+U=
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/>
>
>
>