CLAM-Development  1.4.0
Public Member Functions | Protected Member Functions | Friends
CLAM::SpectralPeak Class Reference

Class SpectralPeak is a basic spectral domain Processing Data class. More...

#include <SpectralPeak.hxx>

List of all members.

Public Member Functions

 DYNAMIC_TYPE_USING_INTERFACE (SpectralPeak, 6, ProcessingData)
 DYN_ATTRIBUTE (0, public, EScale, Scale)
 DYN_ATTRIBUTE (1, public, TData, Freq)
 DYN_ATTRIBUTE (2, public, TData, Mag)
 DYN_ATTRIBUTE (3, public, TData, BinPos)
 DYN_ATTRIBUTE (4, public, TData, Phase)
 DYN_ATTRIBUTE (5, public, int, BinWidth)
TData operator| (const SpectralPeak &a) const
 Operator for computing distance between spectral peaks only taking into account their frequency.
- Public Member Functions inherited from CLAM::ProcessingData
 ProcessingData (const int n)
 Constructor of an object that will contain the number of attributes passed by parameter.
 ProcessingData (const ProcessingData &prototype, bool shareData=false, bool deep=true)
 Copy constructor of a ProcessingData object.
virtual ~ProcessingData ()
- Public Member Functions inherited from CLAM::DynamicType
 DynamicType (const int nAttr)
 Constructs a DynamicType object that can hold.
 DynamicType (const DynamicType &prototype, const bool shareData, const bool deepCopy)
 Copy constructor of a dynamic Type.
 DynamicType (const DynamicType &prototype)
virtual ~DynamicType ()
virtual const char * GetClassName () const =0
 Return the class name.
void CopyInit (const DynamicType &dt)
 This method allows custom code for the copy-constructor of a dynamic type, since the copy-constructor is macro expanded and can not be overwritted.
bool UpdateData ()
 Method used to resize the data space of the dynamic type, necessary when some AddXXX() / RemoveXXX() (where XXX is an attribute name) has been done.
unsigned GetNDynamicAttributes () const
const char * GetDynamicAttributeName (unsigned i)
virtual const std::type_info & GetTypeId (unsigned i) const =0
bool AttributeIsComponent (unsigned i) const
bool AttributeIsDynamictype (unsigned i) const
bool IsAttributeInstantiated (unsigned i) const
const void * GetAttributeAsVoidPtr (unsigned i) const
const ComponentGetAttributeAsComponent (unsigned i) const
ComponentGetAttributeAsComponent (unsigned i)
void FullfilsInvariant () const
virtual ComponentDeepCopy () const
void Debug () const
virtual void StoreOn (CLAM::Storage &storage) const
 Stores component's subitems on the given Storage.
virtual void LoadFrom (CLAM::Storage &storage)
 Loads component's subitems from the given Storage.
- Public Member Functions inherited from CLAM::Component
virtual ~Component ()

Protected Member Functions

void DefaultInit ()
 Configuration constructor.

Friends

SpectralPeak operator* (const SpectralPeak &peak, int factor)
 Operator for multiplying a spectral peak by a given factor, just influences its magnitude TODO: does not take into account if the scale is logarithmic or not, should it?

Detailed Description

Class SpectralPeak is a basic spectral domain Processing Data class.

Contains frequency, magnitude, phase, bin position and bin width of a given spectral peak. An array of Spectral Peaks is created by means of the SpectralPeakArray class

See also:
ProcessingData
SpectralPeakArray
Author:
Xavier Amatriain

Definition at line 62 of file SpectralPeak.hxx.


Member Function Documentation

void CLAM::SpectralPeak::DefaultInit ( void  )
protected

Configuration constructor.

Reimplemented from CLAM::DynamicType.

Definition at line 36 of file SpectralPeak.cxx.

References CLAM::EScale::eLinear, and CLAM::DynamicType::UpdateData().

CLAM::SpectralPeak::DYN_ATTRIBUTE ( ,
public  ,
EScale  ,
Scale   
)
CLAM::SpectralPeak::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Freq   
)
CLAM::SpectralPeak::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Mag   
)
CLAM::SpectralPeak::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
BinPos   
)
CLAM::SpectralPeak::DYN_ATTRIBUTE ( ,
public  ,
TData  ,
Phase   
)
CLAM::SpectralPeak::DYN_ATTRIBUTE ( ,
public  ,
int  ,
BinWidth   
)
CLAM::SpectralPeak::DYNAMIC_TYPE_USING_INTERFACE ( SpectralPeak  ,
,
ProcessingData   
)
TData CLAM::SpectralPeak::operator| ( const SpectralPeak a) const
inline

Operator for computing distance between spectral peaks only taking into account their frequency.

Returns:
the frequency distance in Hz (TData)

Definition at line 86 of file SpectralPeak.hxx.

References CLAM::Abs().


Friends And Related Function Documentation

SpectralPeak operator* ( const SpectralPeak peak,
int  factor 
)
friend

Operator for multiplying a spectral peak by a given factor, just influences its magnitude TODO: does not take into account if the scale is logarithmic or not, should it?

Parameters:
peakA reference to the peak
factorthe multiplying factor

Definition at line 97 of file SpectralPeak.hxx.


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