#include <SpectralPeakArray.hxx>
This is accomplished by actually storing in memory an independent buffer for each of the attributes of a spectral peak. The interface to use SpectralPeak class is simulated adding an interface that constructs these objects on the fly, whenever a Peak is accessed. Furthermore, this class holds an array of indices that can be used for different purposes such as sorting, assigning tracks...Any peak can be accessed throug its actual position in the array or its associated index
Definition at line 68 of file SpectralPeakArray.hxx.
Public Member Functions | |
DYNAMIC_TYPE_USING_INTERFACE (SpectralPeakArray, 8, ProcessingData) | |
DYN_ATTRIBUTE (0, public, EScale, Scale) | |
DYN_ATTRIBUTE (1, public, DataArray, MagBuffer) | |
DYN_ATTRIBUTE (2, public, DataArray, FreqBuffer) | |
DYN_ATTRIBUTE (3, public, DataArray, PhaseBuffer) | |
DYN_ATTRIBUTE (4, public, DataArray, BinPosBuffer) | |
DYN_ATTRIBUTE (5, public, DataArray, BinWidthBuffer) | |
DYN_ATTRIBUTE (6, public, IndexArray, IndexArray) | |
DYN_ATTRIBUTE (7, public, bool, MinimizeResizes) | |
SpectralPeakArray (const SpectralPeak &prototype) | |
Accessory Constructor method Constructs the spectral peak array given a peak structure used as prototype and instantiating the needed dynamic attributes. | |
void | InitFromPrototype (const SpectralPeak &spectralPeak) |
Accessory Initialitation method Initializes the spectral peak array given a peak structure used as prototype and instantiating the needed dynamic attributes. | |
void | InitPeak (SpectralPeak &spectralPeak) const |
Accessory Initialitation method Initializes the spectral peak according to peak array prototype and instantiating the needed dynamic attributes. | |
TData | GetMag (TIndex pos) const |
Accessory getter . | |
TData | GetFreq (TIndex pos) const |
Accessory getter . | |
TData | GetPhase (TIndex pos) const |
Accessory getter . | |
TData | GetBinPos (TIndex pos) const |
Accessory getter . | |
int | GetBinWidth (TIndex pos) const |
Accessory getter . | |
void | SetMag (TIndex pos, TData newMag) |
Accessory setter . | |
void | SetFreq (TIndex pos, TData newFreq) |
Accessory setter . | |
void | SetPhase (TIndex pos, TData newPhase) |
Accessory setter . | |
void | SetBinPos (TIndex pos, TData newBinPos) |
Accessory setter . | |
void | SetBinWidth (TIndex pos, int newBinWidth) |
Accessory setter . | |
TIndex | GetMaxMagPos () const |
Additional interface. | |
TIndex | GetMaxMagIndex () const |
Additional interface. | |
void | InitSpectralPeak (SpectralPeak &spectralPeak) const |
Accessory method offering interface for working with SpectralPeak class. | |
bool | IsCorrectPrototype (const SpectralPeak &spectralPeak) const |
Accessory method offering interface for working with SpectralPeak class. | |
SpectralPeak | GetSpectralPeak (TIndex pos) const |
Accessory getter offering interface for working with SpectralPeak class. | |
SpectralPeak | GetThruIndexSpectralPeak (TIndex pos) const |
Accessory getter offering interface for working with SpectralPeak class. | |
void | SetSpectralPeak (TIndex pos, const SpectralPeak &spectralPeak, TIndex index=-1) |
Accessory setter offering interface for working with SpectralPeak class. | |
void | InsertSpectralPeak (TIndex pos, const SpectralPeak &spectralPeak, bool insertIndex=false, TIndex index=-1) |
Accessory method offering interface for working with SpectralPeak class. | |
void | AddSpectralPeak (const SpectralPeak &spectralPeak, bool addIndex=false, TIndex index=-1) |
Accessory method offering interface for working with SpectralPeak class. | |
void | DeleteSpectralPeak (TIndex pos, bool deleteIndex=false) |
Accessory method offering interface for working with SpectralPeak class. | |
int | GetnIndexedPeaks () const |
Additional interface for working with indices. | |
TIndex | GetPositionFromIndex (TIndex index) const |
Additional interface for working with indices. | |
void | SetIndex (TIndex pos, TIndex index) |
Additional interface for working with indices. | |
TIndex | GetIndex (TIndex pos) const |
Additional interface for working with indices. | |
void | DeleteIndex (TIndex index) |
Additional interface for working with indices. | |
void | ResetIndices () |
Additional interface for working with indices resizes index array according to the current number of peaks and assigns subsecuent indices starting with 0 and finishing with nPeaks-1. | |
void | InitIndices () |
Additional interface for working with indices resizes index array according to the current number of peaks and sets each ç index to -1 (which is usually interpreted as "no valid index". | |
void | SetIndicesTo (TIndex val) |
Additional interface for working with indices sets all indices to a given value. | |
void | AddIndex (TIndex index) |
Additional interface for working with indices. | |
TIndex | GetFirstNonValidIndexPosition (TIndex beginAt) const |
Additional interface for working with indices returns first position in index array to have a value of -1. | |
bool | IsValidIndex (TIndex position) const |
Additional interface for working with indices. | |
TIndex | IsIndexExisting (TIndex index) const |
Additional interface for working with indices. | |
TIndex | GetMaxIndex () const |
Additional interface for working with indices. | |
TSize | GetnPeaks () const |
Returns the actual size of the different instantiated buffers which should be consistent in size (this is guaranteed if this interface is used but not if the user sets the buffer size directly accessing the arrays. | |
void | SetnPeaks (TSize npeaks) |
Sets the actual size of the different instantiated buffers keeping them consistent. | |
void | SetnMaxPeaks (TSize npeaks) |
Sets the actual allocated size of the different instantiated buffers keeping them consistent. | |
TSize | GetnMaxPeaks () const |
Returns the actual allocated size of the different instantiated buffers which should be consistent in size (this is guaranteed if this interface is used but not if the user resizes buffers directly accessing the arrays. | |
double | GetThruIndexFreq (TIndex pos) const |
double | GetThruIndexMag (TIndex pos) const |
double | GetThruIndexPhase (TIndex pos) const |
double | GetThruIndexBinPos (TIndex pos) const |
TSize | GetThruIndexBinWidth (TIndex pos) const |
void | SetThruIndexFreq (TIndex pos, double freq) |
void | SetThruIndexMag (TIndex pos, double mag) |
void | SetThruIndexPhase (TIndex pos, double phase) |
void | SetThruIndexBinPos (TIndex pos, double binPos) |
void | SetThruIndexBinWidth (TIndex pos, TSize binWidth) |
void | SetThruIndexSpectralPeak (TIndex pos, SpectralPeak &peak) |
void | SetIsIndexUpToDate (bool isUpToDate) |
void | TodB () |
Converts linear magnitude data to dB. | |
void | ToLinear () |
Converts dB magnitude data to linear. | |
void | CopyMembers (SpectralPeakArray &sourceSpectralPeakArray) |
Copies all of the spectral peak data from the given objects member arrays -- FreqBuffer, MagBuffer, PhaseBuffer, BinPosBuffer, BinWidthBuffer, and IndexArray -- to the member arrays of this object. | |
SpectralPeakArray | operator+ (const SpectralPeakArray &in) |
Protected Member Functions | |
void | DefaultInit () |
The concrete dynamic type constructor calls DefaultInit(). |
CLAM::SpectralPeakArray::SpectralPeakArray | ( | const SpectralPeak & | prototype | ) |
Accessory Constructor method Constructs the spectral peak array given a peak structure used as prototype and instantiating the needed dynamic attributes.
SpectralPeak | used as prototype |
Definition at line 41 of file SpectralPeakArray.cxx.
References InitFromPrototype().
CLAM::SpectralPeakArray::DYNAMIC_TYPE_USING_INTERFACE | ( | SpectralPeakArray | , | |
8 | , | |||
ProcessingData | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 0 | , | |
public | , | |||
EScale | , | |||
Scale | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 1 | , | |
public | , | |||
DataArray | , | |||
MagBuffer | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 2 | , | |
public | , | |||
DataArray | , | |||
FreqBuffer | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 3 | , | |
public | , | |||
DataArray | , | |||
PhaseBuffer | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 4 | , | |
public | , | |||
DataArray | , | |||
BinPosBuffer | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 5 | , | |
public | , | |||
DataArray | , | |||
BinWidthBuffer | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 6 | , | |
public | , | |||
IndexArray | , | |||
IndexArray | ||||
) |
CLAM::SpectralPeakArray::DYN_ATTRIBUTE | ( | 7 | , | |
public | , | |||
bool | , | |||
MinimizeResizes | ||||
) |
void CLAM::SpectralPeakArray::DefaultInit | ( | void | ) | [protected] |
The concrete dynamic type constructor calls DefaultInit().
This allows user to initialize his/her object. But we define DefaultInit() here because we don't want to force writting one DefaultInit() function for each concrete dynamic type. If a dynamic type concrete class defines some (not-default) constructors, this should also call the DefaultInit().
Reimplemented from CLAM::DynamicType.
Definition at line 47 of file SpectralPeakArray.cxx.
References CLAM::EScale::eLinear, SetnPeaks(), and CLAM::DynamicType::UpdateData().
void CLAM::SpectralPeakArray::InitFromPrototype | ( | const SpectralPeak & | spectralPeak | ) |
Accessory Initialitation method Initializes the spectral peak array given a peak structure used as prototype and instantiating the needed dynamic attributes.
SpectralPeak | used as prototype |
Definition at line 91 of file SpectralPeakArray.cxx.
References CLAM::DynamicType::UpdateData().
Referenced by SpectralPeakArray().
void CLAM::SpectralPeakArray::InitPeak | ( | SpectralPeak & | spectralPeak | ) | const |
Accessory Initialitation method Initializes the spectral peak according to peak array prototype and instantiating the needed dynamic attributes.
SpectralPeak | to initialize |
Definition at line 70 of file SpectralPeakArray.cxx.
References CLAM::DynamicType::UpdateData().
Accessory getter .
Note: for efficiency you need to work directly on the buffer
Position | in the array |
Definition at line 111 of file SpectralPeakArray.hxx.
Referenced by CLAM::FundFreqDetect::Do(), GetSpectralPeak(), and GetThruIndexMag().
Accessory getter .
Note: for efficiency you need to work directly on the buffer
Position | in the array |
Definition at line 116 of file SpectralPeakArray.hxx.
Referenced by CLAM::SpectralPeakArrayAdder::Do(), CLAM::PhaseManagement::DoPhaseAlignment(), CLAM::PhaseManagement::DoRandomPhases(), GetSpectralPeak(), and GetThruIndexFreq().
Accessory getter .
Note: for efficiency you need to work directly on the buffer
Position | in the array |
Definition at line 121 of file SpectralPeakArray.hxx.
Referenced by CLAM::PhaseManagement::DoPhaseAlignment(), GetSpectralPeak(), and GetThruIndexPhase().
Accessory getter .
Note: for efficiency you need to work directly on the buffer
Position | in the array |
Definition at line 126 of file SpectralPeakArray.hxx.
Referenced by GetSpectralPeak(), and GetThruIndexBinPos().
Accessory getter .
Note: for efficiency you need to work directly on the buffer
Position | in the array |
Definition at line 131 of file SpectralPeakArray.hxx.
Referenced by GetSpectralPeak(), and GetThruIndexBinWidth().
Accessory setter .
Note: for efficiency you need to work directly on the buffer
Position | in the array | |
new | value for magnitude of the peak in the given position |
Definition at line 136 of file SpectralPeakArray.hxx.
Referenced by SetThruIndexMag().
Accessory setter .
Note: for efficiency you need to work directly on the buffer
Position | in the array | |
new | value for frequency of the peak in the given position |
Definition at line 141 of file SpectralPeakArray.hxx.
Referenced by SetThruIndexFreq().
Accessory setter .
Note: for efficiency you need to work directly on the buffer
Position | in the array | |
new | value for phase of the peak in the given position |
Definition at line 146 of file SpectralPeakArray.hxx.
Referenced by CLAM::PhaseManagement::DoPhaseAlignment(), CLAM::PhaseManagement::DoRandomPhases(), and SetThruIndexPhase().
Accessory setter .
Note: for efficiency you need to work directly on the buffer
Position | in the array | |
new | value for bin position of the peak in the given position |
Definition at line 151 of file SpectralPeakArray.hxx.
Referenced by SetThruIndexBinPos().
Accessory setter .
Note: for efficiency you need to work directly on the buffer
Position | in the array | |
new | value for bin width of the peak in the given position |
Definition at line 156 of file SpectralPeakArray.hxx.
Referenced by SetThruIndexBinWidth().
TIndex CLAM::SpectralPeakArray::GetMaxMagPos | ( | ) | const |
Additional interface.
Definition at line 268 of file SpectralPeakArray.cxx.
References GetnPeaks().
Referenced by CLAM::FundFreqDetect::Do().
TIndex CLAM::SpectralPeakArray::GetMaxMagIndex | ( | ) | const |
Additional interface.
Definition at line 288 of file SpectralPeakArray.cxx.
References CLAM_ASSERT.
Referenced by CLAM::FundFreqDetect::Do().
void CLAM::SpectralPeakArray::InitSpectralPeak | ( | SpectralPeak & | spectralPeak | ) | const |
Accessory method offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer Initializes a given peak structure according to structure of array instantiating the needed dynamic attributes
SpectralPeak | to be initialized |
Definition at line 117 of file SpectralPeakArray.cxx.
References CLAM::DynamicType::UpdateData().
Referenced by GetSpectralPeak().
bool CLAM::SpectralPeakArray::IsCorrectPrototype | ( | const SpectralPeak & | spectralPeak | ) | const |
Accessory method offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer Checks that spectral peak prototype is consistent with spectral array structure
SpectralPeak | to be checked |
Definition at line 133 of file SpectralPeakArray.cxx.
Referenced by AddSpectralPeak(), InsertSpectralPeak(), and SetSpectralPeak().
SpectralPeak CLAM::SpectralPeakArray::GetSpectralPeak | ( | TIndex | pos | ) | const |
Accessory getter offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer
position | in the array |
Definition at line 154 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, GetBinPos(), GetBinWidth(), GetFreq(), GetMag(), GetnPeaks(), GetPhase(), and InitSpectralPeak().
Referenced by CLAM::SpectralPeakArrayAdder::Do(), CLAM::SMSSinusoidalGain::Do(), CLAM::PhaseManagement::DoRandomPhases(), and GetThruIndexSpectralPeak().
SpectralPeak CLAM::SpectralPeakArray::GetThruIndexSpectralPeak | ( | TIndex | pos | ) | const |
Accessory getter offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer
index | position in the index array |
Definition at line 149 of file SpectralPeakArray.cxx.
References GetSpectralPeak().
void CLAM::SpectralPeakArray::SetSpectralPeak | ( | TIndex | pos, | |
const SpectralPeak & | spectralPeak, | |||
TIndex | index = -1 | |||
) |
Accessory setter offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer
position | in the array | |
SpectralPeak | to set in the given position | |
Index | value of the given SpectralPeak, set by default to -1 |
Definition at line 175 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, GetnPeaks(), and IsCorrectPrototype().
Referenced by CLAM::SMSSinusoidalGain::Do(), and SetThruIndexSpectralPeak().
void CLAM::SpectralPeakArray::InsertSpectralPeak | ( | TIndex | pos, | |
const SpectralPeak & | spectralPeak, | |||
bool | insertIndex = false , |
|||
TIndex | index = -1 | |||
) |
Accessory method offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer Inserts a peak (or rather the values of its attributes) at the given position moving the ones in next positions
position | in the array where to insert | |
SpectralPeak | to set in the given position | |
boolean | value indicating if the index array should be modified or not | |
Index | value of the given SpectralPeak, set by default to -1 |
Definition at line 195 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, GetnPeaks(), and IsCorrectPrototype().
void CLAM::SpectralPeakArray::AddSpectralPeak | ( | const SpectralPeak & | spectralPeak, | |
bool | addIndex = false , |
|||
TIndex | index = -1 | |||
) |
Accessory method offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer Adds a peak (or rather the values of its attributes) at the end of the array
SpectralPeak | to add | |
boolean | value indicating if the index array should be modified or not | |
Index | value of the given SpectralPeak, set by default to -1 |
Definition at line 214 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and IsCorrectPrototype().
Referenced by CLAM::SpectralPeakArrayAdder::Do().
Accessory method offering interface for working with SpectralPeak class.
Note: for efficiency you need to work directly on the buffer Deletes a peak (or rather the values of its attributes) at a given position
position | of the peak to delete | |
boolean | value indicating if the index array should be modified or not |
Definition at line 232 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and GetnPeaks().
int CLAM::SpectralPeakArray::GetnIndexedPeaks | ( | ) | const |
Additional interface for working with indices.
Definition at line 384 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and CLAM::Array< T >::Size().
Additional interface for working with indices.
index | to find in index array |
Definition at line 252 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and CLAM::Array< T >::Size().
Referenced by DeleteIndex(), CLAM::SpectralPeakArrayInterpolator::Do(), and CLAM::PhaseManagement::DoPhaseContinuation().
Additional interface for working with indices.
position | where to set the given index | |
index | to set |
Definition at line 247 of file SpectralPeakArray.hxx.
Additional interface for working with indices.
position | in the index array |
Definition at line 252 of file SpectralPeakArray.hxx.
Referenced by CLAM::SpectralPeakArrayInterpolator::Do(), CLAM::PhaseManagement::DoPhaseContinuation(), and CLAM::PhaseManagement::DoRandomPhases().
void CLAM::SpectralPeakArray::DeleteIndex | ( | TIndex | index | ) |
Additional interface for working with indices.
position | where to delete an index |
Definition at line 358 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and GetPositionFromIndex().
Referenced by CLAM::FundFreqDetect::Do().
void CLAM::SpectralPeakArray::ResetIndices | ( | ) |
Additional interface for working with indices resizes index array according to the current number of peaks and assigns subsecuent indices starting with 0 and finishing with nPeaks-1.
Definition at line 312 of file SpectralPeakArray.cxx.
References CLAM::Array< T >::AllocatedSize(), CLAM_ASSERT, GetnMaxPeaks(), GetnPeaks(), CLAM::IndexArray::Reset(), CLAM::Array< T >::Resize(), and CLAM::Array< T >::SetSize().
Referenced by CopyMembers(), and CLAM::FundFreqDetect::Do().
void CLAM::SpectralPeakArray::InitIndices | ( | ) |
Additional interface for working with indices resizes index array according to the current number of peaks and sets each ç index to -1 (which is usually interpreted as "no valid index".
Definition at line 328 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, GetnMaxPeaks(), GetnPeaks(), CLAM::Array< T >::Resize(), and CLAM::Array< T >::SetSize().
void CLAM::SpectralPeakArray::SetIndicesTo | ( | TIndex | val | ) |
Additional interface for working with indices sets all indices to a given value.
value | to set all indices to |
Definition at line 344 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and GetnPeaks().
void CLAM::SpectralPeakArray::AddIndex | ( | TIndex | index | ) |
Additional interface for working with indices.
index | to add at the end of the index array |
Definition at line 366 of file SpectralPeakArray.cxx.
References CLAM_ASSERT.
Additional interface for working with indices returns first position in index array to have a value of -1.
position | to begin search |
Definition at line 372 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and CLAM::Array< T >::Size().
Additional interface for working with indices.
position | of the index to validate |
Additional interface for working with indices.
index | to find |
TIndex CLAM::SpectralPeakArray::GetMaxIndex | ( | ) | const |
Additional interface for working with indices.
TSize CLAM::SpectralPeakArray::GetnPeaks | ( | ) | const [inline] |
Returns the actual size of the different instantiated buffers which should be consistent in size (this is guaranteed if this interface is used but not if the user sets the buffer size directly accessing the arrays.
Definition at line 305 of file SpectralPeakArray.hxx.
Referenced by CLAM::DataUtil::CheckMembers(), CopyMembers(), DeleteSpectralPeak(), CLAM::SpectralPeakArrayInterpolator::Do(), CLAM::SpectralPeakArrayAdder::Do(), CLAM::SpectralEnvelopeExtract::Do(), CLAM::SpectralEnvelopeApply::Do(), CLAM::SMSSinusoidalGain::Do(), CLAM::SMSSineFilter::Do(), CLAM::SMSPitchShift::Do(), CLAM::SMSOddEvenHarmonicRatio::Do(), CLAM::SMSFreqShift::Do(), CLAM::SDIFOut::Do(), CLAM::FundFreqDetect::Do(), CLAM::PhaseManagement::DoPhaseAlignment(), CLAM::PhaseManagement::DoPhaseContinuation(), CLAM::PhaseManagement::DoRandomPhases(), GetMaxMagPos(), GetSpectralPeak(), InitIndices(), InsertSpectralPeak(), operator+(), CLAM::DataUtil::PrintSpectralPeakArray(), ResetIndices(), SetIndicesTo(), CLAM::PhaseManagement::SetLastPhasesAndFreqs(), SetSpectralPeak(), TodB(), and ToLinear().
void CLAM::SpectralPeakArray::SetnPeaks | ( | TSize | npeaks | ) | [inline] |
Sets the actual size of the different instantiated buffers keeping them consistent.
If allocated size is less than npeaks, a resize is automatically performed on all buffers.
Definition at line 321 of file SpectralPeakArray.hxx.
References GetnMaxPeaks(), and SetnMaxPeaks().
Referenced by CopyMembers(), DefaultInit(), CLAM::SpectralPeakDetect::Do(), CLAM::SpectralPeakArrayInterpolator::Do(), CLAM::SpectralPeakArrayAdder::Do(), CLAM::SpectralEnvelopeApply::Do(), CLAM::SMSSinusoidalGain::Do(), CLAM::SMSPitchShift::Do(), and operator+().
void CLAM::SpectralPeakArray::SetnMaxPeaks | ( | TSize | npeaks | ) | [inline] |
Sets the actual allocated size of the different instantiated buffers keeping them consistent.
Useful for reducing the number of allocations in run time.
Definition at line 349 of file SpectralPeakArray.hxx.
Referenced by CopyMembers(), CLAM::SpectralPeakDetect::Do(), CLAM::SpectralEnvelopeApply::Do(), CLAM::SMSSinusoidalGain::Do(), CLAM::FundFreqDetect::Do(), operator+(), and SetnPeaks().
TSize CLAM::SpectralPeakArray::GetnMaxPeaks | ( | ) | const [inline] |
Returns the actual allocated size of the different instantiated buffers which should be consistent in size (this is guaranteed if this interface is used but not if the user resizes buffers directly accessing the arrays.
Definition at line 382 of file SpectralPeakArray.hxx.
Referenced by CopyMembers(), CLAM::SpectralPeakDetect::Do(), CLAM::SpectralEnvelopeApply::Do(), CLAM::SMSSinusoidalGain::Do(), CLAM::FundFreqDetect::Do(), InitIndices(), operator+(), ResetIndices(), and SetnPeaks().
double CLAM::SpectralPeakArray::GetThruIndexFreq | ( | TIndex | pos | ) | const |
double CLAM::SpectralPeakArray::GetThruIndexMag | ( | TIndex | pos | ) | const |
double CLAM::SpectralPeakArray::GetThruIndexPhase | ( | TIndex | pos | ) | const |
double CLAM::SpectralPeakArray::GetThruIndexBinPos | ( | TIndex | pos | ) | const |
void CLAM::SpectralPeakArray::SetThruIndexFreq | ( | TIndex | pos, | |
double | freq | |||
) |
void CLAM::SpectralPeakArray::SetThruIndexMag | ( | TIndex | pos, | |
double | mag | |||
) |
void CLAM::SpectralPeakArray::SetThruIndexPhase | ( | TIndex | pos, | |
double | phase | |||
) |
void CLAM::SpectralPeakArray::SetThruIndexBinPos | ( | TIndex | pos, | |
double | binPos | |||
) |
void CLAM::SpectralPeakArray::SetThruIndexSpectralPeak | ( | TIndex | pos, | |
SpectralPeak & | peak | |||
) |
Definition at line 439 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, and SetSpectralPeak().
void CLAM::SpectralPeakArray::SetIsIndexUpToDate | ( | bool | isUpToDate | ) | [inline] |
Definition at line 405 of file SpectralPeakArray.hxx.
Referenced by CLAM::PhaseManagement::DoPhaseAlignment(), CLAM::PhaseManagement::DoPhaseContinuation(), CLAM::PhaseManagement::DoRandomPhases(), CLAM::PhaseManagement::Init(), and CLAM::PhaseManagement::SetLastPhasesAndFreqs().
void CLAM::SpectralPeakArray::TodB | ( | ) |
Converts linear magnitude data to dB.
Definition at line 489 of file SpectralPeakArray.cxx.
References CLAM_20log10(), CLAM::EScale::eLog, and GetnPeaks().
Referenced by CLAM::SpectralPeakArrayInterpolator::Do().
void CLAM::SpectralPeakArray::ToLinear | ( | ) |
Converts dB magnitude data to linear.
Definition at line 503 of file SpectralPeakArray.cxx.
References CLAM::EScale::eLinear, GetnPeaks(), and log2lin().
Referenced by CLAM::SpectralPeakArrayInterpolator::Do(), and CLAM::SDIFOut::Do().
void CLAM::SpectralPeakArray::CopyMembers | ( | SpectralPeakArray & | sourceSpectralPeakArray | ) |
Copies all of the spectral peak data from the given objects member arrays -- FreqBuffer, MagBuffer, PhaseBuffer, BinPosBuffer, BinWidthBuffer, and IndexArray -- to the member arrays of this object.
Copies the properties Scale and MinimizeResizes too.
Definition at line 517 of file SpectralPeakArray.cxx.
References GetnMaxPeaks(), GetnPeaks(), ResetIndices(), SetnMaxPeaks(), and SetnPeaks().
Referenced by CLAM::DataUtil::CopySpectralPeakArraysMembers().
SpectralPeakArray CLAM::SpectralPeakArray::operator+ | ( | const SpectralPeakArray & | in | ) |
Definition at line 555 of file SpectralPeakArray.cxx.
References CLAM_ASSERT, GetnMaxPeaks(), GetnPeaks(), SetnMaxPeaks(), SetnPeaks(), and CLAM::DynamicType::UpdateData().