A class to store complex numbers which are internally represented by log10(amplitude) and phase (and not real and imaginary part). This is needed for some operations like interpolation and pow(). More...
#include "utl/ComplexLgAmpPhase.h"
Public Member Functions | |
ComplexLgAmpPhase () | |
Standard constructor initializing to zero. More... | |
ComplexLgAmpPhase (const double lgamp, const double phase=0) | |
Constructor using log10(amplitude) and phase (in radians) More... | |
double | GetAmplitude () const |
Get the amplitude. More... | |
std::complex< double > | GetComplex () const |
Get the complex number in standard notation; this clips the phase to 2*pi! More... | |
double | GetImag () const |
Get the imaginary part. More... | |
double | GetLgAmplitude () const |
Get log10(amplitude) More... | |
double | GetPhase () const |
Get the phase in radians, can be bigger than 2*pi. More... | |
double | GetReal () const |
Get the real part. More... | |
ComplexLgAmpPhase | operator* (const ComplexLgAmpPhase &rhs) const |
ComplexLgAmpPhase & | operator*= (const ComplexLgAmpPhase &rhs) |
ComplexLgAmpPhase | operator/ (const ComplexLgAmpPhase &rhs) const |
ComplexLgAmpPhase & | operator/= (const ComplexLgAmpPhase &rhs) |
bool | operator== (const ComplexLgAmpPhase &rhs) const |
ComplexLgAmpPhase & | Pow (double power) |
Private Attributes | |
double | fLgAmplitude |
double | fPhase |
A class to store complex numbers which are internally represented by log10(amplitude) and phase (and not real and imaginary part). This is needed for some operations like interpolation and pow().
Definition at line 31 of file ComplexLgAmpPhase.h.
|
inline |
Standard constructor initializing to zero.
Definition at line 35 of file ComplexLgAmpPhase.h.
Referenced by operator*(), and operator/().
|
inline |
Constructor using log10(amplitude) and phase (in radians)
Definition at line 38 of file ComplexLgAmpPhase.h.
|
inline |
Get the amplitude.
Definition at line 46 of file ComplexLgAmpPhase.h.
References fLgAmplitude, and std::pow().
|
inline |
Get the complex number in standard notation; this clips the phase to 2*pi!
Definition at line 54 of file ComplexLgAmpPhase.h.
References fLgAmplitude, fPhase, and std::pow().
Referenced by RdChannelResponseIncorporator::RdChannelResponseIncorporator::ApplyResponse(), GetImag(), and GetReal().
|
inline |
|
inline |
Get log10(amplitude)
Definition at line 42 of file ComplexLgAmpPhase.h.
References fLgAmplitude.
Referenced by utl::Interpolate(), testTabulatedFunctionComplexLgAmpPhase::testInterpolation(), testTabulatedFunctionComplexLgAmpPhase::testMultiplication(), and RDetectorTest::testRModel().
|
inline |
Get the phase in radians, can be bigger than 2*pi.
Definition at line 50 of file ComplexLgAmpPhase.h.
References fPhase.
Referenced by utl::Interpolate(), testTabulatedFunctionComplexLgAmpPhase::testInterpolation(), testTabulatedFunctionComplexLgAmpPhase::testMultiplication(), and RDetectorTest::testRModel().
|
inline |
|
inline |
Definition at line 68 of file ComplexLgAmpPhase.h.
References ComplexLgAmpPhase(), fLgAmplitude, and fPhase.
|
inline |
Definition at line 84 of file ComplexLgAmpPhase.h.
References fLgAmplitude, and fPhase.
|
inline |
Definition at line 76 of file ComplexLgAmpPhase.h.
References ComplexLgAmpPhase(), fLgAmplitude, and fPhase.
|
inline |
Definition at line 92 of file ComplexLgAmpPhase.h.
References fLgAmplitude, and fPhase.
|
inline |
Definition at line 100 of file ComplexLgAmpPhase.h.
References fLgAmplitude, and fPhase.
|
inline |
Definition at line 104 of file ComplexLgAmpPhase.h.
References fLgAmplitude, fPhase, and utl::power.
|
private |
Definition at line 112 of file ComplexLgAmpPhase.h.
Referenced by GetAmplitude(), GetComplex(), GetLgAmplitude(), operator*(), operator*=(), operator/(), operator/=(), operator==(), and Pow().
|
private |
Definition at line 113 of file ComplexLgAmpPhase.h.
Referenced by GetComplex(), GetPhase(), operator*(), operator*=(), operator/(), operator/=(), operator==(), and Pow().