diff dsp/tempotracking/TempoTrackV2.h @ 493:bb78ca3fe7de

Remove "using" from some headers
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 31 May 2019 17:24:50 +0100
parents 701233f8ed41
children
line wrap: on
line diff
--- a/dsp/tempotracking/TempoTrackV2.h	Fri May 31 16:55:25 2019 +0100
+++ b/dsp/tempotracking/TempoTrackV2.h	Fri May 31 17:24:50 2019 +0100
@@ -17,7 +17,6 @@
 #define QM_DSP_TEMPOTRACKV2_H
 
 #include <vector>
-using namespace std;
 
 //!!! Question: how far is this actually sample rate dependent?  I
 // think it does produce plausible results for e.g. 48000 as well as
@@ -35,47 +34,47 @@
      * Currently the sample rate and increment are used only for the
      * conversion from beat frame location to bpm in the tempo array.
      */
-    TempoTrackV2(float sampleRate, size_t dfIncrement);
+    TempoTrackV2(float sampleRate, int dfIncrement);
     ~TempoTrackV2();
 
     // Returned beat periods are given in df increment units; inputtempo and tempi in bpm
-    void calculateBeatPeriod(const vector<double> &df,
-                             vector<double> &beatPeriod,
-                             vector<double> &tempi) {
+    void calculateBeatPeriod(const std::vector<double> &df,
+                             std::vector<double> &beatPeriod,
+                             std::vector<double> &tempi) {
         calculateBeatPeriod(df, beatPeriod, tempi, 120.0, false);
     }
 
     // Returned beat periods are given in df increment units; inputtempo and tempi in bpm
     // MEPD 28/11/12 Expose inputtempo and constraintempo parameters
     // Note, if inputtempo = 120 and constraintempo = false, then functionality is as it was before
-    void calculateBeatPeriod(const vector<double> &df,
-                             vector<double> &beatPeriod,
-                             vector<double> &tempi,
+    void calculateBeatPeriod(const std::vector<double> &df,
+                             std::vector<double> &beatPeriod,
+                             std::vector<double> &tempi,
                              double inputtempo, bool constraintempo);
 
     // Returned beat positions are given in df increment units
-    void calculateBeats(const vector<double> &df,
-                        const vector<double> &beatPeriod,
-                        vector<double> &beats) {
+    void calculateBeats(const std::vector<double> &df,
+                        const std::vector<double> &beatPeriod,
+                        std::vector<double> &beats) {
         calculateBeats(df, beatPeriod, beats, 0.9, 4.0);
     }
 
     // Returned beat positions are given in df increment units
     // MEPD 28/11/12 Expose alpha and tightness parameters
     // Note, if alpha = 0.9 and tightness = 4, then functionality is as it was before
-    void calculateBeats(const vector<double> &df,
-                        const vector<double> &beatPeriod,
-                        vector<double> &beats,
+    void calculateBeats(const std::vector<double> &df,
+                        const std::vector<double> &beatPeriod,
+                        std::vector<double> &beats,
                         double alpha, double tightness);
 
 private:
-    typedef vector<int> i_vec_t;
-    typedef vector<vector<int> > i_mat_t;
-    typedef vector<double> d_vec_t;
-    typedef vector<vector<double> > d_mat_t;
+    typedef std::vector<int> i_vec_t;
+    typedef std::vector<std::vector<int> > i_mat_t;
+    typedef std::vector<double> d_vec_t;
+    typedef std::vector<std::vector<double> > d_mat_t;
 
     float m_rate;
-    size_t m_increment;
+    int m_increment;
 
     void adapt_thresh(d_vec_t &df);
     double mean_array(const d_vec_t &dfin, int start, int end);