Mercurial > hg > qm-dsp
diff dsp/tonal/ChangeDetectionFunction.h @ 505:930b5b0f707d
Merge branch 'codestyle-and-tidy'
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 05 Jun 2019 12:55:15 +0100 |
parents | bb78ca3fe7de |
children |
line wrap: on
line diff
--- a/dsp/tonal/ChangeDetectionFunction.h Thu May 30 16:18:13 2019 +0100 +++ b/dsp/tonal/ChangeDetectionFunction.h Wed Jun 05 12:55:15 2019 +0100 @@ -13,36 +13,33 @@ COPYING included with this distribution for more information. */ -#ifndef _CHANGEDETECTIONFUNCTION_ -#define _CHANGEDETECTIONFUNCTION_ - -//#define DEBUG_CHANGE_DETECTION_FUNCTION 1 +#ifndef QM_DSP_CHANGEDETECTIONFUNCTION_H +#define QM_DSP_CHANGEDETECTIONFUNCTION_H #include "TCSgram.h" #include <valarray> -using std::valarray; -typedef valarray<double> ChangeDistance; +typedef std::valarray<double> ChangeDistance; struct ChangeDFConfig { - int smoothingWidth; + int smoothingWidth; }; class ChangeDetectionFunction { public: - ChangeDetectionFunction(ChangeDFConfig); - ~ChangeDetectionFunction(); - ChangeDistance process(const TCSGram& rTCSGram); + ChangeDetectionFunction(ChangeDFConfig); + ~ChangeDetectionFunction(); + ChangeDistance process(const TCSGram& rTCSGram); private: - void setFilterWidth(const int iWidth); - + void setFilterWidth(const int iWidth); + private: - valarray<double> m_vaGaussian; - double m_dFilterSigma; - int m_iFilterWidth; + std::valarray<double> m_vaGaussian; + double m_dFilterSigma; + int m_iFilterWidth; }; #endif // _CHANGDETECTIONFUNCTION_