This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Inplace conjugation

Tags: None
(comma "," separated)
landtuna
Registered Member
Posts
2
Karma
0

Inplace conjugation

Wed Jun 20, 2012 6:18 pm
Is there a way to do inplace conjugation? I understand I could make a complex<float> j(1.0f, -1.0f) and multiply my vector by it with *=, but that does unnecessary multiplications on the real part of the array.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Inplace conjugation  Topic is solved

Wed Jun 20, 2012 6:58 pm
The following will work in-place:
A = A.conjugate();
landtuna
Registered Member
Posts
2
Karma
0

Re: Inplace conjugation

Wed Jun 20, 2012 7:00 pm
ggael wrote:The following will work in-place:
A = A.conjugate();


Oh, I had assumed it wouldn't. Thanks!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Inplace conjugation

Wed Jun 20, 2012 7:03 pm
that's the beauty of expression templates!


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell