|
From: Joseph W. <jo...@gn...> - 2006-10-03 04:55:50
|
=E5=9C=A8 Monday 02 October 2006 03:31=EF=BC=8CLuigi Ballabio =E5=86=99=E9= =81=93=EF=BC=9A > On Sun, 2006-10-01 at 18:44 -0500, Joseph Wang wrote: > > Looking over Numerical Recipes in C++, they suggest implementing a list > > of N complex numbers as an array of 2*N floats because they argue that > > you maintain control of how the complex number calculations are > > implemented. > > That pretty much defeats the purpose of having a std::complex class in > the standard library, doesn't it? It's like arguing that one should > implement his own containers to maintain control. That was my first reaction. Any objections to creating an implementation agnostic ComplexArray class th= at=20 using valarray and complex? The reason for creating a separate class is th= at=20 I'd like to have a nice interface that interoperates with the Array class. |