Mercurial > hg > sonic-annotator
comparison runner/FeatureExtractionManager.cpp @ 102:fae326c22df5
Fix failure to support summary-only flag when reading transforms with summaries from a transform file
author | Chris Cannam |
---|---|
date | Wed, 01 Oct 2014 14:55:17 +0100 |
parents | 010fbf2a3fba |
children | de76b2df518f 78a7c77ba432 |
comparison
equal
deleted
inserted
replaced
101:f254f74d6b14 | 102:fae326c22df5 |
---|---|
97 if (name == "sd") return PluginSummarisingAdapter::StandardDeviation; | 97 if (name == "sd") return PluginSummarisingAdapter::StandardDeviation; |
98 if (name == "count") return PluginSummarisingAdapter::Count; | 98 if (name == "count") return PluginSummarisingAdapter::Count; |
99 return PluginSummarisingAdapter::UnknownSummaryType; | 99 return PluginSummarisingAdapter::UnknownSummaryType; |
100 } | 100 } |
101 | 101 |
102 bool FeatureExtractionManager::setSummaryTypes(const set<string> &names, | 102 bool |
103 bool summariesOnly, | 103 FeatureExtractionManager::setSummaryTypes(const set<string> &names, |
104 const PluginSummarisingAdapter::SegmentBoundaries &boundaries) | 104 const PluginSummarisingAdapter::SegmentBoundaries &boundaries) |
105 { | 105 { |
106 for (SummaryNameSet::const_iterator i = names.begin(); | 106 for (SummaryNameSet::const_iterator i = names.begin(); |
107 i != names.end(); ++i) { | 107 i != names.end(); ++i) { |
108 if (getSummaryType(*i) == PluginSummarisingAdapter::UnknownSummaryType) { | 108 if (getSummaryType(*i) == PluginSummarisingAdapter::UnknownSummaryType) { |
109 cerr << "ERROR: Unknown summary type \"" << *i << "\"" << endl; | 109 cerr << "ERROR: Unknown summary type \"" << *i << "\"" << endl; |
110 return false; | 110 return false; |
111 } | 111 } |
112 } | 112 } |
113 m_summaries = names; | 113 m_summaries = names; |
114 m_summariesOnly = summariesOnly; | |
115 m_boundaries = boundaries; | 114 m_boundaries = boundaries; |
116 return true; | 115 return true; |
116 } | |
117 | |
118 void | |
119 FeatureExtractionManager::setSummariesOnly(bool summariesOnly) | |
120 { | |
121 m_summariesOnly = summariesOnly; | |
117 } | 122 } |
118 | 123 |
119 static PluginInputDomainAdapter::WindowType | 124 static PluginInputDomainAdapter::WindowType |
120 convertWindowType(WindowType t) | 125 convertWindowType(WindowType t) |
121 { | 126 { |