Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/hostext/PluginSummarisingAdapter.h @ 180:9a58bd07aa4d
* Part way to providing support for continuous-time averaging summaries
author | cannam |
---|---|
date | Wed, 03 Sep 2008 15:59:09 +0000 |
parents | 72bf540da84f |
children | 1e4c6f25ded6 |
comparison
equal
deleted
inserted
replaced
179:72bf540da84f | 180:9a58bd07aa4d |
---|---|
79 Count = 8, | 79 Count = 8, |
80 | 80 |
81 UnknownSummaryType = 999 | 81 UnknownSummaryType = 999 |
82 }; | 82 }; |
83 | 83 |
84 FeatureList getSummaryForOutput(int output, SummaryType type); | 84 /** |
85 FeatureSet getSummaryForAllOutputs(SummaryType type); | 85 * AveragingMethod indicates how the adapter should handle |
86 * average-based summaries of features whose results are not | |
87 * equally spaced in time. | |
88 * | |
89 * If SampleAverage is specified, summary types based on averages | |
90 * will be calculated by treating each result individually without | |
91 * regard to its time: for example, the mean will be the sum of | |
92 * all values divided by the number of values. | |
93 * | |
94 * If ContinuousTimeAverage is specified, each feature will be | |
95 * considered to have a duration, either as specified in the | |
96 * feature's duration field, or until the following feature: thus, | |
97 * for example, the mean will be the sum of the products of values | |
98 * and durations, divided by the total duration. | |
99 * | |
100 * Although SampleAverage is useful for many types of feature, | |
101 * ContinuousTimeAverage is essential for some situations, for | |
102 * example finding the result that spans the largest proportion of | |
103 * the input given a feature that emits a new result only when the | |
104 * value changes (the modal value integrated over time). | |
105 */ | |
106 enum AveragingMethod { | |
107 SampleAverage = 0, | |
108 ContinuousTimeAverage = 1, | |
109 }; | |
110 | |
111 FeatureList getSummaryForOutput(int output, | |
112 SummaryType type, | |
113 AveragingMethod method = SampleAverage); | |
114 | |
115 FeatureSet getSummaryForAllOutputs(SummaryType type, | |
116 AveragingMethod method = SampleAverage); | |
86 | 117 |
87 protected: | 118 protected: |
88 class Impl; | 119 class Impl; |
89 Impl *m_impl; | 120 Impl *m_impl; |
90 }; | 121 }; |