List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
utl::TabulatedFunctionComplexLgAmpPhase Class Reference

Class to hold collection (x,y) points and provide interpolation between them, where y are complex numbers. More...

#include "utl/TabulatedFunctionComplexLgAmpPhase.h"

Public Types

typedef std::vector< double > Array
 
typedef std::vector
< utl::ComplexLgAmpPhase
ArrayComplex
 
typedef
ConstTabulatedFunctionComplexLgAmpPhaseIterator 
ConstIterator
 
typedef
TabulatedFunctionComplexLgAmpPhaseIterator 
Iterator
 

Public Member Functions

Iterator Begin ()
 
ConstIterator Begin () const
 
void Clear ()
 
Iterator End ()
 
ConstIterator End () const
 
ConstIterator FindX (const double x) const
 
ConstIterator FindY (const utl::ComplexLgAmpPhase &y) const
 
double GetBoundaryTolerance () const
 
unsigned int GetNPoints () const
 
const double & GetX (const unsigned int idx) const
 
double & GetX (const unsigned int idx)
 
const utl::ComplexLgAmpPhaseGetY (const unsigned int idx) const
 Interpolate the Y value with a polyDegree polynomial. More...
 
utl::ComplexLgAmpPhaseGetY (const unsigned int idx)
 
Iterator Insert (const double x, const utl::ComplexLgAmpPhase &y)
 
bool IsInValidRange (const double x) const
 
bool operator!= (const TabulatedFunctionComplexLgAmpPhase &t) const
 
TabulatedFunctionComplexLgAmpPhaseoperator*= (const TabulatedFunctionComplexLgAmpPhase &rhs)
 multiply the current TabulatedFunctionComplexLgAmpPhase with another one More...
 
bool operator== (const TabulatedFunctionComplexLgAmpPhase &t) const
 
PairComplexLgAmpPhase operator[] (const int idx) const
 Note: cannot be used in assignment. More...
 
void Pow (const double power)
 calculate the power of a TabulatedFunctionComplexLgAmpPhase (correctly treating amplitude and phase) More...
 
void PushBack (const double x, const utl::ComplexLgAmpPhase &y)
 
void SetBoundaryTolerance (const double tolerance)
 
double SumX () const
 return the sum of X values More...
 
 TabulatedFunctionComplexLgAmpPhase (const double boundaryTolerance=1e-3)
 
 TabulatedFunctionComplexLgAmpPhase (const std::vector< double > &xValues, const std::vector< utl::ComplexLgAmpPhase > &yValues, const double boundaryTolerance=1e-3)
 
Array::const_reference XBack () const
 read-only reference to back of array of X More...
 
Array::iterator XBegin ()
 begin of array of X More...
 
Array::const_iterator XBegin () const
 begin of array of X More...
 
Array::iterator XEnd ()
 end of array of X More...
 
Array::const_iterator XEnd () const
 end of array of X More...
 
Array::const_reference XFront () const
 read-only reference to front of array of X More...
 
utl::ComplexLgAmpPhase Y (const double x) const
 Get or interpolate the Y value that corresponds to parameter x. More...
 
ArrayComplex::const_reference YBack () const
 read-only reference to back of array of Y More...
 
ArrayComplex::iterator YBegin ()
 begin of array of Y More...
 
ArrayComplex::const_iterator YBegin () const
 begin of array of Y More...
 
ArrayComplex::iterator YEnd ()
 end of array of Y More...
 
ArrayComplex::const_iterator YEnd () const
 end of array of Y More...
 
ArrayComplex::const_reference YFront () const
 read-only reference to front of array of Y More...
 
virtual ~TabulatedFunctionComplexLgAmpPhase ()
 

Protected Member Functions

void FillTable (const std::vector< double > &xValues, const std::vector< utl::ComplexLgAmpPhase > &yValues)
 

Protected Attributes

double fBoundaryTolerance
 
Array fX
 
ArrayComplex fY
 

Detailed Description

Class to hold collection (x,y) points and provide interpolation between them, where y are complex numbers.

Author
Luis Prado Jr. et al. Tabulated Function for complex numbers which are internally stored with log10(amplitude) and phase. This allows retention of phases bigger than 2*pi, which is important both for interpolation and operations like pow(). A nicer solution would actually be a templated TabulatedFunction class.
Date
10 Jun 2009

Definition at line 33 of file TabulatedFunctionComplexLgAmpPhase.h.

Member Typedef Documentation

Definition at line 36 of file TabulatedFunctionComplexLgAmpPhase.h.

Definition at line 37 of file TabulatedFunctionComplexLgAmpPhase.h.

Definition at line 39 of file TabulatedFunctionComplexLgAmpPhase.h.

Definition at line 38 of file TabulatedFunctionComplexLgAmpPhase.h.

Constructor & Destructor Documentation

utl::TabulatedFunctionComplexLgAmpPhase::TabulatedFunctionComplexLgAmpPhase ( const double  boundaryTolerance = 1e-3)
inline

Definition at line 41 of file TabulatedFunctionComplexLgAmpPhase.h.

utl::TabulatedFunctionComplexLgAmpPhase::TabulatedFunctionComplexLgAmpPhase ( const std::vector< double > &  xValues,
const std::vector< utl::ComplexLgAmpPhase > &  yValues,
const double  boundaryTolerance = 1e-3 
)
inline

Definition at line 44 of file TabulatedFunctionComplexLgAmpPhase.h.

References FillTable().

virtual utl::TabulatedFunctionComplexLgAmpPhase::~TabulatedFunctionComplexLgAmpPhase ( )
inlinevirtual

Definition at line 52 of file TabulatedFunctionComplexLgAmpPhase.h.

Member Function Documentation

Iterator utl::TabulatedFunctionComplexLgAmpPhase::Begin ( )
inline
ConstIterator utl::TabulatedFunctionComplexLgAmpPhase::Begin ( ) const
inline

Definition at line 69 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX, and fY.

void utl::TabulatedFunctionComplexLgAmpPhase::Clear ( )
inline

Definition at line 59 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX, and fY.

Iterator utl::TabulatedFunctionComplexLgAmpPhase::End ( )
inline
ConstIterator utl::TabulatedFunctionComplexLgAmpPhase::End ( ) const
inline

Definition at line 72 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX, and fY.

void TabulatedFunctionComplexLgAmpPhase::FillTable ( const std::vector< double > &  xValues,
const std::vector< utl::ComplexLgAmpPhase > &  yValues 
)
protected

Definition at line 26 of file TabulatedFunctionComplexLgAmpPhase.cc.

References ERROR, and std::swap().

Referenced by TabulatedFunctionComplexLgAmpPhase().

ConstTabulatedFunctionComplexLgAmpPhaseIterator TabulatedFunctionComplexLgAmpPhase::FindX ( const double  x) const

Definition at line 128 of file TabulatedFunctionComplexLgAmpPhase.cc.

ConstTabulatedFunctionComplexLgAmpPhaseIterator TabulatedFunctionComplexLgAmpPhase::FindY ( const utl::ComplexLgAmpPhase y) const

Definition at line 143 of file TabulatedFunctionComplexLgAmpPhase.cc.

double utl::TabulatedFunctionComplexLgAmpPhase::GetBoundaryTolerance ( ) const
inline

Definition at line 145 of file TabulatedFunctionComplexLgAmpPhase.h.

References fBoundaryTolerance.

unsigned int utl::TabulatedFunctionComplexLgAmpPhase::GetNPoints ( ) const
inline
const double& utl::TabulatedFunctionComplexLgAmpPhase::GetX ( const unsigned int  idx) const
inline

Definition at line 129 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

Referenced by operator*=(), and RDetectorTest::testRModel().

double& utl::TabulatedFunctionComplexLgAmpPhase::GetX ( const unsigned int  idx)
inline

Definition at line 131 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

const utl::ComplexLgAmpPhase& utl::TabulatedFunctionComplexLgAmpPhase::GetY ( const unsigned int  idx) const
inline

Interpolate the Y value with a polyDegree polynomial.

Definition at line 126 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

Referenced by RDetectorTest::testRModel().

utl::ComplexLgAmpPhase& utl::TabulatedFunctionComplexLgAmpPhase::GetY ( const unsigned int  idx)
inline

Definition at line 132 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

TabulatedFunctionComplexLgAmpPhaseIterator TabulatedFunctionComplexLgAmpPhase::Insert ( const double  x,
const utl::ComplexLgAmpPhase y 
)

Definition at line 154 of file TabulatedFunctionComplexLgAmpPhase.cc.

bool TabulatedFunctionComplexLgAmpPhase::IsInValidRange ( const double  x) const

Definition at line 165 of file TabulatedFunctionComplexLgAmpPhase.cc.

bool utl::TabulatedFunctionComplexLgAmpPhase::operator!= ( const TabulatedFunctionComplexLgAmpPhase t) const
inline

Definition at line 142 of file TabulatedFunctionComplexLgAmpPhase.h.

References operator==().

TabulatedFunctionComplexLgAmpPhase & TabulatedFunctionComplexLgAmpPhase::operator*= ( const TabulatedFunctionComplexLgAmpPhase rhs)

multiply the current TabulatedFunctionComplexLgAmpPhase with another one

Definition at line 190 of file TabulatedFunctionComplexLgAmpPhase.cc.

References ERROR, GetNPoints(), GetX(), max, XBegin(), and Y().

bool utl::TabulatedFunctionComplexLgAmpPhase::operator== ( const TabulatedFunctionComplexLgAmpPhase t) const
inline

Definition at line 139 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX, and fY.

Referenced by operator!=().

PairComplexLgAmpPhase utl::TabulatedFunctionComplexLgAmpPhase::operator[] ( const int  idx) const
inline

Note: cannot be used in assignment.

Definition at line 57 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX, and fY.

void TabulatedFunctionComplexLgAmpPhase::Pow ( const double  power)

calculate the power of a TabulatedFunctionComplexLgAmpPhase (correctly treating amplitude and phase)

Definition at line 182 of file TabulatedFunctionComplexLgAmpPhase.cc.

Referenced by RdChannelResponseIncorporator::RdChannelResponseIncorporator::CalculateOverallResponse().

void TabulatedFunctionComplexLgAmpPhase::PushBack ( const double  x,
const utl::ComplexLgAmpPhase y 
)
void utl::TabulatedFunctionComplexLgAmpPhase::SetBoundaryTolerance ( const double  tolerance)
inline

Definition at line 147 of file TabulatedFunctionComplexLgAmpPhase.h.

References fBoundaryTolerance.

double utl::TabulatedFunctionComplexLgAmpPhase::SumX ( ) const
inline

return the sum of X values

Definition at line 135 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

Array::const_reference utl::TabulatedFunctionComplexLgAmpPhase::XBack ( ) const
inline

read-only reference to back of array of X

Definition at line 106 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

Array::iterator utl::TabulatedFunctionComplexLgAmpPhase::XBegin ( )
inline

begin of array of X

Definition at line 76 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

Referenced by operator*=().

Array::const_iterator utl::TabulatedFunctionComplexLgAmpPhase::XBegin ( ) const
inline

begin of array of X

Definition at line 79 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

Array::iterator utl::TabulatedFunctionComplexLgAmpPhase::XEnd ( )
inline

end of array of X

Definition at line 88 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

Array::const_iterator utl::TabulatedFunctionComplexLgAmpPhase::XEnd ( ) const
inline

end of array of X

Definition at line 91 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

Array::const_reference utl::TabulatedFunctionComplexLgAmpPhase::XFront ( ) const
inline

read-only reference to front of array of X

Definition at line 100 of file TabulatedFunctionComplexLgAmpPhase.h.

References fX.

ComplexLgAmpPhase TabulatedFunctionComplexLgAmpPhase::Y ( const double  x) const

Get or interpolate the Y value that corresponds to parameter x.

return the y value corresponding to x or do a linear interpolation throw OutOfBoundException if necessary

Definition at line 81 of file TabulatedFunctionComplexLgAmpPhase.cc.

References ERROR, and un2::Interpolate().

Referenced by RdChannelResponseIncorporator::RdChannelResponseIncorporator::ApplyResponse(), operator*=(), testTabulatedFunctionComplexLgAmpPhase::testInterpolation(), testTabulatedFunctionComplexLgAmpPhase::testMultiplication(), and RDetectorTest::testRModel().

ArrayComplex::const_reference utl::TabulatedFunctionComplexLgAmpPhase::YBack ( ) const
inline

read-only reference to back of array of Y

Definition at line 109 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

ArrayComplex::iterator utl::TabulatedFunctionComplexLgAmpPhase::YBegin ( )
inline

begin of array of Y

Definition at line 82 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

ArrayComplex::const_iterator utl::TabulatedFunctionComplexLgAmpPhase::YBegin ( ) const
inline

begin of array of Y

Definition at line 85 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

ArrayComplex::iterator utl::TabulatedFunctionComplexLgAmpPhase::YEnd ( )
inline

end of array of Y

Definition at line 94 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

ArrayComplex::const_iterator utl::TabulatedFunctionComplexLgAmpPhase::YEnd ( ) const
inline

end of array of Y

Definition at line 97 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

ArrayComplex::const_reference utl::TabulatedFunctionComplexLgAmpPhase::YFront ( ) const
inline

read-only reference to front of array of Y

Definition at line 103 of file TabulatedFunctionComplexLgAmpPhase.h.

References fY.

Member Data Documentation

double utl::TabulatedFunctionComplexLgAmpPhase::fBoundaryTolerance
protected
Array utl::TabulatedFunctionComplexLgAmpPhase::fX
protected
ArrayComplex utl::TabulatedFunctionComplexLgAmpPhase::fY
protected

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

, generated on Tue Sep 26 2023.