1 ///////////////////////////////////////////////////////////////////////////////
4 // Copyright 2005 Eric Niebler. Distributed under the Boost
5 // Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_ACCUMULATORS_STATISTICS_STATISTICS_FWD_HPP_EAN_23_11_2005
9 #define BOOST_ACCUMULATORS_STATISTICS_STATISTICS_FWD_HPP_EAN_23_11_2005
11 #include <boost/mpl/apply_fwd.hpp> // for mpl::na
12 #include <boost/mpl/print.hpp>
13 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
14 #include <boost/accumulators/accumulators_fwd.hpp>
15 #include <boost/accumulators/framework/depends_on.hpp>
16 #include <boost/accumulators/framework/extractor.hpp>
18 namespace boost { namespace accumulators
21 ///////////////////////////////////////////////////////////////////////////////
22 // base struct and base extractor for quantiles
28 typedef mpl::print<class ____MISSING_SPECIFIC_QUANTILE_FEATURE_IN_ACCUMULATOR_SET____ > impl;
33 extractor<tag::quantile> const quantile = {};
35 BOOST_ACCUMULATORS_IGNORE_GLOBAL(quantile)
37 using extract::quantile;
39 ///////////////////////////////////////////////////////////////////////////////
40 // base struct and base extractor for *coherent* tail means
46 typedef mpl::print<class ____MISSING_SPECIFIC_TAIL_MEAN_FEATURE_IN_ACCUMULATOR_SET____ > impl;
51 extractor<tag::tail_mean> const tail_mean = {};
53 BOOST_ACCUMULATORS_IGNORE_GLOBAL(tail_mean)
55 using extract::tail_mean;
59 ///////////////////////////////////////////////////////////////////////////////
65 ///////////////////////////////////////////////////////////////////////////////
68 template<typename VariateType, typename VariateTag>
71 template<typename Feature>
73 struct extended_p_square;
74 struct extended_p_square_quantile;
75 struct extended_p_square_quantile_quadratic;
79 struct immediate_mean;
80 struct mean_of_weights;
81 struct immediate_mean_of_weights;
82 template<typename VariateType, typename VariateTag>
83 struct mean_of_variates;
84 template<typename VariateType, typename VariateTag>
85 struct immediate_mean_of_variates;
87 struct with_density_median;
88 struct with_p_square_cumulative_distribution_median;
92 template<typename LeftRight>
93 struct peaks_over_threshold;
94 template<typename LeftRight>
95 struct peaks_over_threshold_prob;
96 template<typename LeftRight>
98 template<typename LeftRight>
99 struct pot_tail_mean_prob;
100 template<typename LeftRight>
102 template<typename LeftRight>
103 struct pot_quantile_prob;
104 struct p_square_cumulative_distribution;
105 struct p_square_quantile;
106 struct p_square_quantile_for_median;
109 struct sum_of_weights;
110 template<typename VariateType, typename VariateTag>
111 struct sum_of_variates;
113 struct sum_of_weights_kahan;
114 template<typename VariateType, typename VariateTag>
115 struct sum_of_variates_kahan;
116 template<typename LeftRight>
118 template<typename LeftRight>
119 struct coherent_tail_mean;
120 template<typename LeftRight>
121 struct non_coherent_tail_mean;
122 template<typename LeftRight>
123 struct tail_quantile;
124 template<typename VariateType, typename VariateTag, typename LeftRight>
126 template<typename LeftRight>
128 template<typename VariateType, typename VariateTag, typename LeftRight>
129 struct right_tail_variate;
130 template<typename VariateType, typename VariateTag, typename LeftRight>
131 struct left_tail_variate;
132 template<typename LeftRight, typename VariateType, typename VariateTag>
133 struct tail_variate_means;
134 template<typename LeftRight, typename VariateType, typename VariateTag>
135 struct absolute_tail_variate_means;
136 template<typename LeftRight, typename VariateType, typename VariateTag>
137 struct relative_tail_variate_means;
138 struct lazy_variance;
140 template<typename VariateType, typename VariateTag>
141 struct weighted_covariance;
142 struct weighted_density;
143 struct weighted_kurtosis;
144 struct weighted_mean;
145 struct immediate_weighted_mean;
146 template<typename VariateType, typename VariateTag>
147 struct weighted_mean_of_variates;
148 template<typename VariateType, typename VariateTag>
149 struct immediate_weighted_mean_of_variates;
150 struct weighted_median;
151 struct with_density_weighted_median;
152 struct with_p_square_cumulative_distribution_weighted_median;
153 struct weighted_extended_p_square;
154 struct weighted_extended_p_square_quantile;
155 struct weighted_extended_p_square_quantile_quadratic;
157 struct weighted_moment;
158 template<typename LeftRight>
159 struct weighted_peaks_over_threshold;
160 template<typename LeftRight>
161 struct weighted_peaks_over_threshold_prob;
162 template<typename LeftRight>
163 struct weighted_pot_quantile;
164 template<typename LeftRight>
165 struct weighted_pot_quantile_prob;
166 template<typename LeftRight>
167 struct weighted_pot_tail_mean;
168 template<typename LeftRight>
169 struct weighted_pot_tail_mean_prob;
170 struct weighted_p_square_cumulative_distribution;
171 struct weighted_p_square_quantile;
172 struct weighted_p_square_quantile_for_median;
173 struct weighted_skewness;
174 template<typename LeftRight>
175 struct weighted_tail_quantile;
176 template<typename LeftRight>
177 struct non_coherent_weighted_tail_mean;
178 template<typename LeftRight>
179 struct weighted_tail_quantile;
180 template<typename LeftRight, typename VariateType, typename VariateTag>
181 struct weighted_tail_variate_means;
182 template<typename LeftRight, typename VariateType, typename VariateTag>
183 struct absolute_weighted_tail_variate_means;
184 template<typename LeftRight, typename VariateType, typename VariateTag>
185 struct relative_weighted_tail_variate_means;
186 struct lazy_weighted_variance;
187 struct weighted_variance;
189 template<typename VariateType, typename VariateTag>
190 struct weighted_sum_of_variates;
191 struct rolling_window_plus1;
192 struct rolling_window;
194 struct rolling_count;
200 ///////////////////////////////////////////////////////////////////////////////
204 template<typename Sample, typename VariateType, typename VariateTag>
205 struct covariance_impl;
207 template<typename Sample>
210 template<typename Sample, typename Feature>
211 struct error_of_impl;
213 template<typename Sample, typename Variance>
214 struct error_of_mean_impl;
216 template<typename Sample>
217 struct extended_p_square_impl;
219 template<typename Sample, typename Impl1, typename Impl2>
220 struct extended_p_square_quantile_impl;
222 template<typename Sample>
223 struct kurtosis_impl;
225 template<typename Sample>
228 template<typename Sample>
231 template<typename Sample>
232 struct with_density_median_impl;
234 template<typename Sample>
235 struct with_p_square_cumulative_distribution_median_impl;
237 template<typename Sample>
240 template<typename Sample, typename SumFeature = tag::sum>
243 template<typename Sample, typename Tag = tag::sample>
244 struct immediate_mean_impl;
246 template<typename N, typename Sample>
249 template<typename Sample, typename LeftRight>
250 struct peaks_over_threshold_prob_impl;
252 template<typename Sample, typename Impl, typename LeftRight>
253 struct pot_quantile_impl;
255 template<typename Sample, typename Impl, typename LeftRight>
256 struct pot_tail_mean_impl;
258 template<typename Sample>
259 struct p_square_cumulative_distribution_impl;
261 template<typename Sample, typename Impl>
262 struct p_square_quantile_impl;
264 template<typename Sample>
265 struct skewness_impl;
267 template<typename Sample, typename Tag = tag::sample>
270 template<typename Sample, typename Tag>
271 struct sum_kahan_impl;
273 template<typename Sample, typename LeftRight>
276 template<typename Sample, typename LeftRight>
277 struct coherent_tail_mean_impl;
279 template<typename Sample, typename LeftRight>
280 struct non_coherent_tail_mean_impl;
282 template<typename Sample, typename LeftRight>
283 struct tail_quantile_impl;
285 template<typename VariateType, typename VariateTag, typename LeftRight>
286 struct tail_variate_impl;
288 template<typename Sample, typename Impl, typename LeftRight, typename VariateTag>
289 struct tail_variate_means_impl;
291 template<typename Sample, typename MeanFeature>
292 struct lazy_variance_impl;
294 template<typename Sample, typename MeanFeature, typename Tag>
295 struct variance_impl;
297 template<typename Sample, typename Weight, typename VariateType, typename VariateTag>
298 struct weighted_covariance_impl;
300 template<typename Sample, typename Weight>
301 struct weighted_density_impl;
303 template<typename Sample, typename Weight>
304 struct weighted_kurtosis_impl;
306 template<typename Sample>
307 struct weighted_median_impl;
309 template<typename Sample>
310 struct with_density_weighted_median_impl;
312 template<typename Sample, typename Weight>
313 struct with_p_square_cumulative_distribution_weighted_median_impl;
315 template<typename Sample, typename Weight, typename Tag>
316 struct weighted_mean_impl;
318 template<typename Sample, typename Weight, typename Tag>
319 struct immediate_weighted_mean_impl;
321 template<typename Sample, typename Weight, typename LeftRight>
322 struct weighted_peaks_over_threshold_impl;
324 template<typename Sample, typename Weight, typename LeftRight>
325 struct weighted_peaks_over_threshold_prob_impl;
327 template<typename Sample, typename Weight>
328 struct with_p_square_cumulative_distribution_weighted_median_impl;
330 template<typename Sample, typename Weight>
331 struct weighted_extended_p_square_impl;
333 template<typename N, typename Sample, typename Weight>
334 struct weighted_moment_impl;
336 template<typename Sample, typename Weight>
337 struct weighted_p_square_cumulative_distribution_impl;
339 template<typename Sample, typename Weight, typename Impl>
340 struct weighted_p_square_quantile_impl;
342 template<typename Sample, typename Weight>
343 struct weighted_skewness_impl;
345 template<typename Sample, typename Weight, typename Tag>
346 struct weighted_sum_impl;
348 template<typename Sample, typename Weight, typename Tag>
349 struct weighted_sum_kahan_impl;
351 template<typename Sample, typename Weight, typename LeftRight>
352 struct non_coherent_weighted_tail_mean_impl;
354 template<typename Sample, typename Weight, typename LeftRight>
355 struct weighted_tail_quantile_impl;
357 template<typename Sample, typename Weight, typename Impl, typename LeftRight, typename VariateType>
358 struct weighted_tail_variate_means_impl;
360 template<typename Sample, typename Weight, typename MeanFeature>
361 struct lazy_weighted_variance_impl;
363 template<typename Sample, typename Weight, typename MeanFeature, typename Tag>
364 struct weighted_variance_impl;
366 template<typename Sample>
367 struct rolling_window_plus1_impl;
369 template<typename Sample>
370 struct rolling_window_impl;
372 template<typename Sample>
373 struct rolling_sum_impl;
375 template<typename Sample>
376 struct rolling_count_impl;
378 template<typename Sample>
379 struct rolling_mean_impl;
382 ///////////////////////////////////////////////////////////////////////////////
384 // A more descriptive name for an MPL sequence of statistics.
385 template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
388 template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
391 // modifiers for the mean and variance stats
395 // modifiers for the variance stat
397 // struct accurate {};
399 // modifiers for order
402 // typedef right default_order_tag_type;
404 // modifiers for the tail_variate_means stat
408 // modifiers for median and weighted_median stats
409 struct with_density {};
410 struct with_p_square_cumulative_distribution {};
411 struct with_p_square_quantile {};
413 // modifiers for peaks_over_threshold stat
414 struct with_threshold_value {};
415 struct with_threshold_probability {};
417 // modifiers for extended_p_square_quantile and weighted_extended_p_square_quantile stats
419 struct unweighted {};
423 // modifiers for p_square_quantile
425 struct for_median {};
427 // modifier for sum_kahan, sum_of_weights_kahan, sum_of_variates_kahan, weighted_sum_kahan
430 }} // namespace boost::accumulators