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*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Thu, 22 Jul 2010 07:54:03 +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=XFC/Tpbvjjwyr++69uJVnn+bukRjv6n0rNfGsMiH+t8=; b=vOY8OiT+HmkMdojgiIikyRgObTLxenHTcPEtFzu4bG1DbnzvEDucajbCEE7ZdUsR2f q/o/X1CgAL8Afhzu6hK+1dnavudWH/wWpEkTDquRrOu7ZMjpnVjPCqPy+KLvLLhbFQPL G63yWnBgZxHLI5Ku63op/Di8YvWBFm1OhhjN8=*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=Tcp3OoXwLvUdtDZdOqt0Q22S9FaHXOUn4V9MuzW7CBJx2nA2RWvH9TUZtRaKTxnh79 lWwO65iiZlgUy8DgC5ZBBtYZgagl6vtobxQZXZ2zZLnmBveD4gjFFhWVKhFUfIbjNC2v 3zIHgergzKXDYGoeXH3M7tJHE/rXBRUh6rqj4=

On Thu, Jul 22, 2010 at 12:17 AM, Christoph Hertzberg <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(); there is no such vectorwise normalized() function yet, but it could be 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 > ---------------------------------------------- > > >

**Follow-Ups**:**Re: [eigen] Complex number divided by real***From:*Carlos Becker

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

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

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Complex number divided by real** - Next by Date:
**Re: [eigen] Complex number divided by real** - 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/ |