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: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 19 Jun 2010 13:06:59 -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=zRmoS630PVnRMfzKvCuLCndsLPMFlaLrycuWEhqBKX4=; b=N05sTLCuCqPif6WMF5n68tS9AuEyVeGyqR6xITJxOLzhol8Ph+HO8LJ/1DHjc0mq1s TYyMyaiLuKsSTQFWGAHw/EuW0HbG5Pd6S9yJHEFmnfYeO+G2AmG1il89mPi/ZcefUpXh VZRTmlhCcJ7sbulBRCu2w93p3jhRIpQTQYfRM=
- 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=OKz2mrLwLGOncD6865gD6PxmCguMKfaCnGK4M3LIm0+HMoDxhAA9WcU6W6PXKRQQwG x0qIEeDJcKW8WtN/DS0aZT3U+eF60CrTlNrf9aaDhtzb5bcbGcXhokInsH61wJ4MDJ5I 4Xuj6yvxDaQlhE/Fe4GmkhzAn/de6K3O8hWes=
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
>
>