Brief description of class still missing. More...
#include <ComplexSignal.h>
Public Member Functions | |
DoubleSignal * | abs () const |
ComplexSignal () | |
ComplexSignal (int n) | |
ComplexSignal (const ComplexSignal &o) | |
void | debugPrint () const |
bool | multiply (double d) |
bool | sqrt () |
bool | square () |
DoubleSignal * | toDouble () const |
Brief description of class still missing.
Full description of class still missing
GeopsyCore::ComplexSignal::ComplexSignal | ( | ) | [inline] |
: SignalTemplate<Complex>() {}
GeopsyCore::ComplexSignal::ComplexSignal | ( | int | n | ) | [inline] |
: SignalTemplate<Complex>(n) {}
GeopsyCore::ComplexSignal::ComplexSignal | ( | const ComplexSignal & | o | ) | [inline] |
: SignalTemplate<Complex>(o) {}
DoubleSignal * GeopsyCore::ComplexSignal::abs | ( | ) | const |
Retruns a double signal with the absolute value
References GeopsyCore::SignalTemplate< Complex >::_nSamples, CONST_LOCK_SAMPLES, LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.
Referenced by HVStationSignals::horizontal(), and GeopsyCore::SubSignalPool::waveletTransform().
{ TRACE; DoubleSignal * sig=new DoubleSignal(_nSamples); CONST_LOCK_SAMPLES(Complex, thisSamples, this) LOCK_SAMPLES(double, sigSamples, sig) for(int i=0;i < _nSamples;i++ ) { sigSamples[ i ]=thisSamples[ i ].abs(); } UNLOCK_SAMPLES(sig) UNLOCK_SAMPLES(this) return sig; }
void GeopsyCore::ComplexSignal::debugPrint | ( | ) | const |
References GeopsyCore::SignalTemplate< Complex >::_nSamples, CONST_LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.
{ TRACE; printf( "Debug samples for signal %s\n", debugName().toAscii().data()); CONST_LOCK_SAMPLES(Complex, thisSamples, this) for(int i=0;i < _nSamples;i++ ) printf( "%i\t%lg\t%lg\n", i, thisSamples[ i ].re(), thisSamples[ i ].im()); UNLOCK_SAMPLES(this) }
bool GeopsyCore::ComplexSignal::multiply | ( | double | d | ) |
Multiplies all samples by d
References GeopsyCore::SignalTemplate< Complex >::_nSamples, LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.
Referenced by HVStationSignals::horizontal().
{ TRACE; LOCK_SAMPLES(Complex, thisSamples, this) for(int i=0;i < _nSamples;i++ ) thisSamples[ i ]*=d; UNLOCK_SAMPLES(this) else return false; return true; }
bool GeopsyCore::ComplexSignal::sqrt | ( | ) |
Takes the square root of all samples
References GeopsyCore::SignalTemplate< Complex >::_nSamples, LOCK_SAMPLES, QGpCoreTools::sqrt(), TRACE, and UNLOCK_SAMPLES.
{ TRACE; LOCK_SAMPLES(Complex, thisSamples, this) for(int i=0;i < _nSamples;i++ ) thisSamples[ i ]=QGpCoreTools::sqrt(thisSamples[ i ]); UNLOCK_SAMPLES(this) else return false; return true; }
bool GeopsyCore::ComplexSignal::square | ( | ) |
Takes the square of all samples
References GeopsyCore::SignalTemplate< Complex >::_nSamples, LOCK_SAMPLES, TRACE, and UNLOCK_SAMPLES.
{ TRACE; LOCK_SAMPLES(Complex, thisSamples, this) for(int i=0;i < _nSamples;i++ ) thisSamples[ i ] *= thisSamples[ i ]; UNLOCK_SAMPLES(this) else return false; return true; }
DoubleSignal * GeopsyCore::ComplexSignal::toDouble | ( | ) | const |
Retruns a double signal with complex numbers arranged according to real Fourier transform
References TRACE.
{ TRACE; /*TODO DoubleSignal * sig=new DoubleSignal(_nSamples); CONST_LOCK_SAMPLES(Complex, thisSamples, this) LOCK_SAMPLES(double, sigSamples, sig) for(int i=0;i < _nSamples;i++ ) { sigSamples[ i ]=thisSamples[ i ].abs(); } UNLOCK_SAMPLES(sig) UNLOCK_SAMPLES(this)*/ return 0; }