List of all members | Public Member Functions | Private Attributes
utl::ComplexLgAmpPhase Class Reference

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
 
ComplexLgAmpPhaseoperator*= (const ComplexLgAmpPhase &rhs)
 
ComplexLgAmpPhase operator/ (const ComplexLgAmpPhase &rhs) const
 
ComplexLgAmpPhaseoperator/= (const ComplexLgAmpPhase &rhs)
 
bool operator== (const ComplexLgAmpPhase &rhs) const
 
ComplexLgAmpPhasePow (double power)
 

Private Attributes

double fLgAmplitude
 
double fPhase
 

Detailed Description

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().

Author
Tim Huege

Definition at line 31 of file ComplexLgAmpPhase.h.

Constructor & Destructor Documentation

utl::ComplexLgAmpPhase::ComplexLgAmpPhase ( )
inline

Standard constructor initializing to zero.

Definition at line 35 of file ComplexLgAmpPhase.h.

Referenced by operator*(), and operator/().

utl::ComplexLgAmpPhase::ComplexLgAmpPhase ( const double  lgamp,
const double  phase = 0 
)
inline

Constructor using log10(amplitude) and phase (in radians)

Definition at line 38 of file ComplexLgAmpPhase.h.

Member Function Documentation

double utl::ComplexLgAmpPhase::GetAmplitude ( ) const
inline

Get the amplitude.

Definition at line 46 of file ComplexLgAmpPhase.h.

References fLgAmplitude, and std::pow().

std::complex<double> utl::ComplexLgAmpPhase::GetComplex ( ) const
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().

double utl::ComplexLgAmpPhase::GetImag ( ) const
inline

Get the imaginary part.

Definition at line 62 of file ComplexLgAmpPhase.h.

References GetComplex().

double utl::ComplexLgAmpPhase::GetLgAmplitude ( ) const
inline
double utl::ComplexLgAmpPhase::GetPhase ( ) const
inline
double utl::ComplexLgAmpPhase::GetReal ( ) const
inline

Get the real part.

Definition at line 58 of file ComplexLgAmpPhase.h.

References GetComplex().

ComplexLgAmpPhase utl::ComplexLgAmpPhase::operator* ( const ComplexLgAmpPhase rhs) const
inline

Definition at line 68 of file ComplexLgAmpPhase.h.

References ComplexLgAmpPhase(), fLgAmplitude, and fPhase.

ComplexLgAmpPhase& utl::ComplexLgAmpPhase::operator*= ( const ComplexLgAmpPhase rhs)
inline

Definition at line 84 of file ComplexLgAmpPhase.h.

References fLgAmplitude, and fPhase.

ComplexLgAmpPhase utl::ComplexLgAmpPhase::operator/ ( const ComplexLgAmpPhase rhs) const
inline

Definition at line 76 of file ComplexLgAmpPhase.h.

References ComplexLgAmpPhase(), fLgAmplitude, and fPhase.

ComplexLgAmpPhase& utl::ComplexLgAmpPhase::operator/= ( const ComplexLgAmpPhase rhs)
inline

Definition at line 92 of file ComplexLgAmpPhase.h.

References fLgAmplitude, and fPhase.

bool utl::ComplexLgAmpPhase::operator== ( const ComplexLgAmpPhase rhs) const
inline

Definition at line 100 of file ComplexLgAmpPhase.h.

References fLgAmplitude, and fPhase.

ComplexLgAmpPhase& utl::ComplexLgAmpPhase::Pow ( double  power)
inline

Definition at line 104 of file ComplexLgAmpPhase.h.

References fLgAmplitude, fPhase, and utl::power.

Member Data Documentation

double utl::ComplexLgAmpPhase::fLgAmplitude
private
double utl::ComplexLgAmpPhase::fPhase
private

The documentation for this class was generated from the following file:

, generated on Tue Sep 26 2023.