Re: [eigen] Complex number divided by real |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Complex number divided by real*From*: Carlos Becker <carlosbecker@xxxxxxxxx>*Date*: Thu, 22 Jul 2010 09:59:19 +0100*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; bh=zHaCcMH953jk96cmpDQE0eZOVOgh37l6/AvKhzHDJZw=; b=iccFctpxwtjTz/4SaRBwXi8f9m1VyU+KKSWnDlVLf6ESfshxqAJL49KzTMgJ+CgVga zD1Oy06diK6WhqfjPLnLTHwUDRQB0emGjt7tFdZxaEfpDTbdwASFfzdBxQ2l6pQv9c1J HrMJ3Ts5aHLN61MeIk+9nCYm/y2mDDkP27Sh8=*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; b=gT0qNh1rPJ5Dto/hTtUmP/usC8CJI2AHV8oe0ShsUiNY+hr9NG2hfDxBjdHx5RvCuc ClFvu8uJHE363GWzreFtHqciH4lziN0p0YctkHM2WHmRWkT9Y2/HRlgqAkDeN550mGTt DcbyMWcmX1qdq1fQD7qla+PQPEzwFo5ZyYMyc=

Oh ok then it makes sense. I will be glad to try it and see if there is any significant speed improvement (which I guess there should be).

Thanks a lot!

Carlos

Carlos

On Thu, Jul 22, 2010 at 6:54 AM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:

On Thu, Jul 22, 2010 at 12:17 AM, Christoph Hertzbergthere is no such vectorwise normalized() function yet, but it could be

<chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Carlos Becker wrote:

>>

>> Hi everyone,

>> (first, I am using the dev branch)

>>

>> I am trying to do something like (a.array() * b.array().conjugate()) / (

>> a.array().abs() * b.array().abs() ), where a and b are two VectorXcf.

>

> Wouldn't something like this work in your case? (I didn't actually try it

> ...)

>

> (a.array() * b.array().conjugate()).rowwise().normalized();

added I guess.

Now to answer new related Carlos's trouble:

[23:56] <artz> I was trying something different now and doesn't seem to work

[23:57] <artz> like this: VectorXf a; VectorXcf b,c; c = b.array() *

a.array().inverse()

[23:57] <artz> should it work?

Yes it should ;) With default branch it indeed fails to compile, with

my "complex" fork it does work fine.

Actually I'm tempted to do the merge today since here all tests

succeed with gcc on both a 64 and 32 bit systems...

gael

>

> Because:

> abs(a)*abs(b) = abs(a)*abs(conj(b)) = abs(a*conj(b))

>

> Actually, an elementwise signum function would be helpful in that case..

>

>

>

> --

> ----------------------------------------------

> Dipl.-Inf. Christoph Hertzberg

> Cartesium 0.051

> Universität Bremen

> Enrique-Schmidt-Straße 5

> 28359 Bremen

>

> Tel: (+49) 421-218-64252

> ----------------------------------------------

>

>

>

**References**:**[eigen] Complex number divided by real***From:*Carlos Becker

**Re: [eigen] Complex number divided by real***From:*Christoph Hertzberg

**Re: [eigen] Complex number divided by real***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Complex number divided by real** - Next by Date:
**[eigen] legal question** - Previous by thread:
**Re: [eigen] Complex number divided by real** - Next by thread:
**Re: [eigen] Complex number divided by real**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |