#include <EvtComplex.hh>
Definition at line 28 of file EvtComplex.hh.
EvtComplex::EvtComplex | ( | ) | [inline] |
EvtComplex::EvtComplex | ( | double | rpart, | |
double | ipart = 0.0 | |||
) | [inline] |
EvtComplex::EvtComplex | ( | const EvtComplex & | c | ) | [inline] |
EvtComplex & EvtComplex::operator *= | ( | EvtComplex | c | ) |
EvtComplex & EvtComplex::operator *= | ( | double | d | ) | [inline] |
int EvtComplex::operator!= | ( | const EvtComplex | c | ) | [inline] |
EvtComplex & EvtComplex::operator+= | ( | double | d | ) | [inline] |
Definition at line 97 of file EvtComplex.hh.
References _rpart.
00097 { 00098 00099 _rpart+=d; 00100 00101 return *this; 00102 }
EvtComplex & EvtComplex::operator+= | ( | const EvtComplex & | c | ) | [inline] |
EvtComplex & EvtComplex::operator-= | ( | double | d | ) | [inline] |
Definition at line 104 of file EvtComplex.hh.
References _rpart.
00104 { 00105 00106 _rpart-=d; 00107 00108 return *this; 00109 }
EvtComplex & EvtComplex::operator-= | ( | const EvtComplex & | c | ) | [inline] |
EvtComplex & EvtComplex::operator/= | ( | EvtComplex | c | ) |
Definition at line 47 of file EvtComplex.cc.
References _ipart, _rpart, and genRecEmupikp::i.
00047 { 00048 00049 double inv=1.0/(c._rpart*c._rpart+c._ipart*c._ipart); 00050 00051 double r=inv*(_rpart*c._rpart+_ipart*c._ipart); 00052 double i=inv*(_ipart*c._rpart-_rpart*c._ipart); 00053 00054 _rpart=r; 00055 _ipart=i; 00056 00057 return *this; 00058 00059 }
EvtComplex & EvtComplex::operator/= | ( | double | d | ) | [inline] |
EvtComplex & EvtComplex::operator= | ( | const EvtComplex & | c | ) | [inline] |
int EvtComplex::operator== | ( | const EvtComplex | c | ) | [inline] |
double abs | ( | const EvtComplex & | c | ) | [friend] |
double abs2 | ( | const EvtComplex & | c | ) | [friend] |
double arg | ( | const EvtComplex & | c | ) | [friend] |
Definition at line 227 of file EvtComplex.hh.
00227 { //added by FS 00228 if ((c._rpart==0)&&(c._ipart==0)) {return 0.0;} 00229 if (c._rpart==0){ 00230 if (c._ipart>0){ 00231 return EvtConst::pi/2; 00232 } else { 00233 return -EvtConst::pi/2; 00234 } 00235 } else { 00236 return atan2(c._ipart,c._rpart); 00237 } 00238 }
EvtComplex conj | ( | const EvtComplex & | c | ) | [friend] |
Definition at line 206 of file EvtComplex.hh.
00206 { 00207 00208 return EvtComplex(c._rpart,-c._ipart); 00209 00210 }
EvtComplex exp | ( | const EvtComplex & | c | ) | [friend] |
double imag | ( | const EvtComplex & | c | ) | [friend] |
EvtComplex operator * | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) | [friend] |
EvtComplex operator * | ( | const EvtComplex & | c, | |
double | d | |||
) | [friend] |
Definition at line 117 of file EvtComplex.hh.
00117 { 00118 00119 return EvtComplex(c._rpart*d,c._ipart*d); 00120 00121 }
EvtComplex operator * | ( | double | d, | |
const EvtComplex & | c | |||
) | [friend] |
Definition at line 111 of file EvtComplex.hh.
00111 { 00112 00113 return EvtComplex(c._rpart*d,c._ipart*d); 00114 00115 }
EvtComplex operator+ | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) | [friend] |
Definition at line 181 of file EvtComplex.hh.
00181 { 00182 00183 return EvtComplex(c1._rpart+c2._rpart,c1._ipart+c2._ipart); 00184 00185 }
EvtComplex operator- | ( | const EvtComplex & | c | ) | [friend] |
Definition at line 200 of file EvtComplex.hh.
00200 { 00201 00202 return EvtComplex(-c._rpart,-c._ipart); 00203 00204 }
EvtComplex operator- | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) | [friend] |
Definition at line 175 of file EvtComplex.hh.
00175 { 00176 00177 return EvtComplex(c1._rpart-c2._rpart,c1._ipart-c2._ipart); 00178 00179 }
EvtComplex operator/ | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) | [friend] |
EvtComplex operator/ | ( | double | d, | |
const EvtComplex & | c | |||
) | [friend] |
Definition at line 149 of file EvtComplex.hh.
00149 { 00150 00151 double Num=d/(c._rpart*c._rpart+c._ipart*c._ipart); 00152 00153 return EvtComplex( Num*c._rpart, -Num*c._ipart ); 00154 00155 }
EvtComplex operator/ | ( | const EvtComplex & | c, | |
double | d | |||
) | [friend] |
Definition at line 125 of file EvtComplex.hh.
00125 { 00126 00127 return EvtComplex(c._rpart/d,c._ipart/d); 00128 00129 }
std::ostream& operator<< | ( | std::ostream & | s, | |
const EvtComplex & | c | |||
) | [friend] |
double real | ( | const EvtComplex & | c | ) | [friend] |
double EvtComplex::_ipart [private] |
Definition at line 64 of file EvtComplex.hh.
Referenced by abs(), abs2(), arg(), conj(), exp(), imag(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), and operator==().
double EvtComplex::_rpart [private] |
Definition at line 64 of file EvtComplex.hh.
Referenced by abs(), abs2(), arg(), conj(), exp(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), and real().