Re: [eigen] Assignment of Complex Number |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen development <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Assignment of Complex Number
- From: Rhys Ulerich <rhys.ulerich@xxxxxxxxx>
- Date: Wed, 11 Jun 2014 11:54:54 -0500
- Cc: Gokturk <poyrazoglu@xxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=GYMbqrQ49SfXFOwilQwF7KKGsae4OFXylpNwTapxp/I=; b=jYG0xP2qdYeyLk64mHSym8aqpGzHzDR+whMpt9B7kUiKb6o7aInmKmE7gyEdScitLY Fp+DoroxFUreMtpX9cZFeW65AbZUif68BDXLs7C5z0Tf5qqYdXot4nnmGKPrH0W7XqWG L+UjeYASazDk+oMNr81nv+iKpA9xEry52YDdqAUwRN4jJNw2Yh/qzkg4Izcs+QTttaDR ZotwY6k5AeHAwmsBUoM2I4CJokc6wptCPP2tzWvy91yxGyKPJKf9t2WW5bJ/IXU8qIwC aTtNl5aqA/WvRs6oGwYsa/eydK2BPG3HQkI/4V2MK5OW7t4vm9dnn7M1EMOuC6Kv4QHE mn4A==
> you could replace the
> entire loop by the following two statements, Eigen will take care of the
> rest internally:
>
> ComplexVector.real() = FirstVector;
> ComplexVector.imag() = SecondVector;
Any feel for that (two passes over memory) vs one pass (with likely
useless multiplication):
ComplexVector = FirstVector * std::complex<double>(0,1)*SecondVector;
- Rhys