comparison dsp/tonal/ChangeDetectionFunction.h @ 482:cbe668c7d724

Untabify, indent, tidy
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 31 May 2019 11:02:28 +0100
parents d5014ab8b0e5
children 701233f8ed41
comparison
equal deleted inserted replaced
481:de5f557a270f 482:cbe668c7d724
14 */ 14 */
15 15
16 #ifndef _CHANGEDETECTIONFUNCTION_ 16 #ifndef _CHANGEDETECTIONFUNCTION_
17 #define _CHANGEDETECTIONFUNCTION_ 17 #define _CHANGEDETECTIONFUNCTION_
18 18
19 //#define DEBUG_CHANGE_DETECTION_FUNCTION 1
20
21 #include "TCSgram.h" 19 #include "TCSgram.h"
22 20
23 #include <valarray> 21 #include <valarray>
24 using std::valarray; 22 using std::valarray;
25 23
26 typedef valarray<double> ChangeDistance; 24 typedef valarray<double> ChangeDistance;
27 25
28 struct ChangeDFConfig 26 struct ChangeDFConfig
29 { 27 {
30 int smoothingWidth; 28 int smoothingWidth;
31 }; 29 };
32 30
33 class ChangeDetectionFunction 31 class ChangeDetectionFunction
34 { 32 {
35 public: 33 public:
36 ChangeDetectionFunction(ChangeDFConfig); 34 ChangeDetectionFunction(ChangeDFConfig);
37 ~ChangeDetectionFunction(); 35 ~ChangeDetectionFunction();
38 ChangeDistance process(const TCSGram& rTCSGram); 36 ChangeDistance process(const TCSGram& rTCSGram);
39 private: 37 private:
40 void setFilterWidth(const int iWidth); 38 void setFilterWidth(const int iWidth);
41 39
42 private: 40 private:
43 valarray<double> m_vaGaussian; 41 valarray<double> m_vaGaussian;
44 double m_dFilterSigma; 42 double m_dFilterSigma;
45 int m_iFilterWidth; 43 int m_iFilterWidth;
46 }; 44 };
47 45
48 #endif // _CHANGDETECTIONFUNCTION_ 46 #endif // _CHANGDETECTIONFUNCTION_