Mercurial > hg > qm-dsp
comparison dsp/segmentation/Segmenter.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 |
comparison
equal
deleted
inserted
replaced
492:2892ecc40f86 | 493:bb78ca3fe7de |
---|---|
18 #define QM_DSP_SEGMENTER_H | 18 #define QM_DSP_SEGMENTER_H |
19 | 19 |
20 #include <vector> | 20 #include <vector> |
21 #include <iostream> | 21 #include <iostream> |
22 | 22 |
23 using std::vector; | |
24 using std::ostream; | |
25 | |
26 class Segment | 23 class Segment |
27 { | 24 { |
28 public: | 25 public: |
29 int start; // in samples | 26 int start; // in samples |
30 int end; | 27 int end; |
34 class Segmentation | 31 class Segmentation |
35 { | 32 { |
36 public: | 33 public: |
37 int nsegtypes; // number of segment types, so possible types are {0,1,...,nsegtypes-1} | 34 int nsegtypes; // number of segment types, so possible types are {0,1,...,nsegtypes-1} |
38 int samplerate; | 35 int samplerate; |
39 vector<Segment> segments; | 36 std::vector<Segment> segments; |
40 }; | 37 }; |
41 | 38 |
42 ostream& operator<<(ostream& os, const Segmentation& s); | 39 std::ostream& operator<<(std::ostream& os, const Segmentation& s); |
43 | 40 |
44 class Segmenter | 41 class Segmenter |
45 { | 42 { |
46 public: | 43 public: |
47 Segmenter() {} | 44 Segmenter() {} |
53 virtual void segment() = 0; // call once all the features have been extracted | 50 virtual void segment() = 0; // call once all the features have been extracted |
54 virtual void segment(int m) = 0; // specify desired number of segment-types | 51 virtual void segment(int m) = 0; // specify desired number of segment-types |
55 virtual void clear() { features.clear(); } | 52 virtual void clear() { features.clear(); } |
56 const Segmentation& getSegmentation() const { return segmentation; } | 53 const Segmentation& getSegmentation() const { return segmentation; } |
57 protected: | 54 protected: |
58 vector<vector<double> > features; | 55 std::vector<std::vector<double> > features; |
59 Segmentation segmentation; | 56 Segmentation segmentation; |
60 int samplerate; | 57 int samplerate; |
61 }; | 58 }; |
62 | 59 |
63 #endif | 60 #endif |