Re: [eigen] Inconsistency in multiplication of complex with real |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Inconsistency in multiplication of complex with real
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sun, 20 Jun 2010 00:36:00 +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=mzEAmMaA5R/NBCr6H1VLMStaNnAR21O9PDeMWE4Isd4=; b=Uyiu8fCU6kAUdERQdHr5Or/LZG8ePIU06lWru0ISXHmtE/qUGYo/mA/gIKc9uDTgg1 4RH7l4sbLggPE1fQLbsp2FZk4PhLFaJhrVlCh5x/oduo9F4bwPwtb3bzT2/IYdWYC+EL INmH3Z9AYAKF6NscUIMUi8wnKY3jQ0aQ32UE8=
- 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=QB5CKYg3m0mYbA/ARfN2Tb2mgVMqVXXuqZ/KTUiv05rmwd5LEL1yP+/B6fASDAePIw Y8Usi/VaUlxJhF3JQxJ2InRQj7iD8VT7wLJvBrlpIKAkKWOg3vICy0JDSVPWxu/5GGuo dCro83ZrkIni3x1Nx8dKS52Bf9SSlpbShOdp0=
problem solved.
gael
On Sat, Jun 19, 2010 at 7:06 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> right, this is a bug, needs to be fixed.
>
> 2010/6/19 Johan Pauwels <johan.pauwels@xxxxxxxxxxxxx>:
>> Hello all,
>>
>> I think I found a little inconsistency when multiplying a complex with a real array. See the snippet below
>>
>> #include <iostream>
>> #include <Eigen/Core>
>>
>> int main()
>> {
>> Eigen::ArrayXcd complexArray = Eigen::ArrayXcd::Random(5);
>> Eigen::ArrayXd realArray = Eigen::ArrayXd::Random(5);
>> complexArray = complexArray * realArray;
>> std::cout << complexArray << std::endl;
>> complexArray *= realArray;
>> std::cout << complexArray << std::endl;
>> }
>>
>> The first multiplication just works, but the second causes 'YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY' at compilation (Mac OS 10.6.3 - gcc 4.2.1, Eigen head). You would expect them to do the same, no?
>>
>> Regards,
>> Johan
>>
>>
>
>
>