33 Double_t newRe =
re*rhs.
re -
im*rhs.
im;
34 Double_t newIm =
im*rhs.
re +
re*rhs.
im;
67 Double_t norm = rhs.getAbsSq();
68 (*this) *= rhs.conj();
74 inline void setMagPhase(
double mag,
double phase){
75 re = mag*TMath::Cos(phase);
76 im = mag*TMath::Sin(phase);
79 inline double getAbs()
const{
83 inline double getAbsSq()
const{
87 inline double getPhase()
const{
88 return TMath::ATan2(
im,
re);
91 operator std::complex<double>()
93 return std::complex<double>(
re,
im);
107 std::ostream& operator<<(std::ostream& os,
const FFTWComplex& val);
110 #endif // FFTWCOMPLEX_H double im
The imaginary part.
This is a wrapper class for a complex number.
FFTWComplex(const std::complex< double > &c)
~FFTWComplex()
Default constructor.