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

complex support

Tags: None
(comma "," separated)
duetosymmetry
Registered Member
Posts
18
Karma
0

complex support

Wed Jul 14, 2010 2:53 pm
I am not on the devel mailing list, but I took a look over there and saw that complex vectorization support is under way. Am I correct in understanding that this is vectorization of std::complex<> ? The old documentation suggested that there would be a custom eigen complex class (for some technical reason which is beyond my scope). Is this no longer the case?

I also don't understand some issue with copy constructors from real to complex. I have some code (still using an old revision of Eigen :< ) which tries to initialize a complex vector from a real vector. The underlying types support this - there exists a constructor std::complex<T>(const T& real) where the imaginary part is assumed to be zero. Instead I must write

complexVector c( realVectorExpression.cast<complexType>() );

Is this the right/wrong way to do it?

Cheers
Leo
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: complex support  Topic is solved

Wed Jul 14, 2010 5:08 pm
duetosymmetry wrote:I am not on the devel mailing list, but I took a look over there and saw that complex vectorization support is under way. Am I correct in understanding that this is vectorization of std::complex<> ?


This is vectorizing std::complex<> for Eigen's objects, just like float or double.

The old documentation suggested that there would be a custom eigen complex class (for some technical reason which is beyond my scope). Is this no longer the case?


Indeed, we are not introducing any new complex class anymore.

I also don't understand some issue with copy constructors from real to complex. I have some code (still using an old revision of Eigen :< ) which tries to initialize a complex vector from a real vector. The underlying types support this - there exists a constructor std::complex<T>(const T& real) where the imaginary part is assumed to be zero. Instead I must write

complexVector c( realVectorExpression.cast<complexType>() );

Is this the right/wrong way to do it?


Yes that's the right way. Allowing to implicitly convert a real matrix to a complex one looks scary.
wendingmai
Registered Member
Posts
16
Karma
0

Re: complex support

Mon Jul 11, 2016 11:14 am
Sorry, prob. solve, anyone interest could refer to:
viewtopic.php?f=74&t=102168


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]