liuxiaolong
2021-07-20 58d904a328c0d849769b483e901a0be9426b8209
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
///////////////////////////////////////////////////////////////////////////////
// statistics_fwd.hpp
//
//  Copyright 2005 Eric Niebler. Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
#ifndef BOOST_ACCUMULATORS_STATISTICS_STATISTICS_FWD_HPP_EAN_23_11_2005
#define BOOST_ACCUMULATORS_STATISTICS_STATISTICS_FWD_HPP_EAN_23_11_2005
 
#include <boost/mpl/apply_fwd.hpp> // for mpl::na
#include <boost/mpl/print.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/accumulators/accumulators_fwd.hpp>
#include <boost/accumulators/framework/depends_on.hpp>
#include <boost/accumulators/framework/extractor.hpp>
 
namespace boost { namespace accumulators
{
 
///////////////////////////////////////////////////////////////////////////////
// base struct and base extractor for quantiles
namespace tag
{
    struct quantile
      : depends_on<>
    {
        typedef mpl::print<class ____MISSING_SPECIFIC_QUANTILE_FEATURE_IN_ACCUMULATOR_SET____ > impl;
    };
}
namespace extract
{
    extractor<tag::quantile> const quantile = {};
 
    BOOST_ACCUMULATORS_IGNORE_GLOBAL(quantile)
}
using extract::quantile;
 
///////////////////////////////////////////////////////////////////////////////
// base struct and base extractor for *coherent* tail means
namespace tag
{
    struct tail_mean
      : depends_on<>
    {
        typedef mpl::print<class ____MISSING_SPECIFIC_TAIL_MEAN_FEATURE_IN_ACCUMULATOR_SET____ > impl;
    };
}
namespace extract
{
    extractor<tag::tail_mean> const tail_mean = {};
 
    BOOST_ACCUMULATORS_IGNORE_GLOBAL(tail_mean)
}
using extract::tail_mean;
 
namespace tag
{
    ///////////////////////////////////////////////////////////////////////////////
    // Variates tags
    struct weights;
    struct covariate1;
    struct covariate2;
 
    ///////////////////////////////////////////////////////////////////////////////
    // Statistic tags
    struct count;
    template<typename VariateType, typename VariateTag>
    struct covariance;
    struct density;
    template<typename Feature>
    struct error_of;
    struct extended_p_square;
    struct extended_p_square_quantile;
    struct extended_p_square_quantile_quadratic;
    struct kurtosis;
    struct max;
    struct mean;
    struct immediate_mean;
    struct mean_of_weights;
    struct immediate_mean_of_weights;
    template<typename VariateType, typename VariateTag>
    struct mean_of_variates;
    template<typename VariateType, typename VariateTag>
    struct immediate_mean_of_variates;
    struct median;
    struct with_density_median;
    struct with_p_square_cumulative_distribution_median;
    struct min;
    template<int N>
    struct moment;
    template<typename LeftRight>
    struct peaks_over_threshold;
    template<typename LeftRight>
    struct peaks_over_threshold_prob;
    template<typename LeftRight>
    struct pot_tail_mean;
    template<typename LeftRight>
    struct pot_tail_mean_prob;
    template<typename LeftRight>
    struct pot_quantile;
    template<typename LeftRight>
    struct pot_quantile_prob;
    struct p_square_cumulative_distribution;
    struct p_square_quantile;
    struct p_square_quantile_for_median;
    struct skewness;
    struct sum;
    struct sum_of_weights;
    template<typename VariateType, typename VariateTag>
    struct sum_of_variates;
    struct sum_kahan;
    struct sum_of_weights_kahan;
    template<typename VariateType, typename VariateTag>
    struct sum_of_variates_kahan;
    template<typename LeftRight>
    struct tail;
    template<typename LeftRight>
    struct coherent_tail_mean;
    template<typename LeftRight>
    struct non_coherent_tail_mean;
    template<typename LeftRight>
    struct tail_quantile;
    template<typename VariateType, typename VariateTag, typename LeftRight>
    struct tail_variate;
    template<typename LeftRight>
    struct tail_weights;
    template<typename VariateType, typename VariateTag, typename LeftRight>
    struct right_tail_variate;
    template<typename VariateType, typename VariateTag, typename LeftRight>
    struct left_tail_variate;
    template<typename LeftRight, typename VariateType, typename VariateTag>
    struct tail_variate_means;
    template<typename LeftRight, typename VariateType, typename VariateTag>
    struct absolute_tail_variate_means;
    template<typename LeftRight, typename VariateType, typename VariateTag>
    struct relative_tail_variate_means;
    struct lazy_variance;
    struct variance;
    template<typename VariateType, typename VariateTag>
    struct weighted_covariance;
    struct weighted_density;
    struct weighted_kurtosis;
    struct weighted_mean;
    struct immediate_weighted_mean;
    template<typename VariateType, typename VariateTag>
    struct weighted_mean_of_variates;
    template<typename VariateType, typename VariateTag>
    struct immediate_weighted_mean_of_variates;
    struct weighted_median;
    struct with_density_weighted_median;
    struct with_p_square_cumulative_distribution_weighted_median;
    struct weighted_extended_p_square;
    struct weighted_extended_p_square_quantile;
    struct weighted_extended_p_square_quantile_quadratic;
    template<int N>
    struct weighted_moment;
    template<typename LeftRight>
    struct weighted_peaks_over_threshold;
    template<typename LeftRight>
    struct weighted_peaks_over_threshold_prob;
    template<typename LeftRight>
    struct weighted_pot_quantile;
    template<typename LeftRight>
    struct weighted_pot_quantile_prob;
    template<typename LeftRight>
    struct weighted_pot_tail_mean;
    template<typename LeftRight>
    struct weighted_pot_tail_mean_prob;
    struct weighted_p_square_cumulative_distribution;
    struct weighted_p_square_quantile;
    struct weighted_p_square_quantile_for_median;
    struct weighted_skewness;
    template<typename LeftRight>
    struct weighted_tail_quantile;
    template<typename LeftRight>
    struct non_coherent_weighted_tail_mean;
    template<typename LeftRight>
    struct weighted_tail_quantile;
    template<typename LeftRight, typename VariateType, typename VariateTag>
    struct weighted_tail_variate_means;
    template<typename LeftRight, typename VariateType, typename VariateTag>
    struct absolute_weighted_tail_variate_means;
    template<typename LeftRight, typename VariateType, typename VariateTag>
    struct relative_weighted_tail_variate_means;
    struct lazy_weighted_variance;
    struct weighted_variance;
    struct weighted_sum;
    template<typename VariateType, typename VariateTag>
    struct weighted_sum_of_variates;
    struct rolling_window_plus1;
    struct rolling_window;
    struct rolling_sum;
    struct rolling_count;
    struct rolling_mean;
} // namespace tag
 
namespace impl
{
    ///////////////////////////////////////////////////////////////////////////////
    // Statistics impls
    struct count_impl;
 
    template<typename Sample, typename VariateType, typename VariateTag>
    struct covariance_impl;
 
    template<typename Sample>
    struct density_impl;
 
    template<typename Sample, typename Feature>
    struct error_of_impl;
 
    template<typename Sample, typename Variance>
    struct error_of_mean_impl;
 
    template<typename Sample>
    struct extended_p_square_impl;
 
    template<typename Sample, typename Impl1, typename Impl2>
    struct extended_p_square_quantile_impl;
 
    template<typename Sample>
    struct kurtosis_impl;
 
    template<typename Sample>
    struct max_impl;
 
    template<typename Sample>
    struct median_impl;
 
    template<typename Sample>
    struct with_density_median_impl;
 
    template<typename Sample>
    struct with_p_square_cumulative_distribution_median_impl;
 
    template<typename Sample>
    struct min_impl;
 
    template<typename Sample, typename SumFeature = tag::sum>
    struct mean_impl;
 
    template<typename Sample, typename Tag = tag::sample>
    struct immediate_mean_impl;
 
    template<typename N, typename Sample>
    struct moment_impl;
 
    template<typename Sample, typename LeftRight>
    struct peaks_over_threshold_prob_impl;
 
    template<typename Sample, typename Impl, typename LeftRight>
    struct pot_quantile_impl;
 
    template<typename Sample, typename Impl, typename LeftRight>
    struct pot_tail_mean_impl;
 
    template<typename Sample>
    struct p_square_cumulative_distribution_impl;
 
    template<typename Sample, typename Impl>
    struct p_square_quantile_impl;
 
    template<typename Sample>
    struct skewness_impl;
 
    template<typename Sample, typename Tag = tag::sample>
    struct sum_impl;
 
    template<typename Sample, typename Tag>
    struct sum_kahan_impl;
 
    template<typename Sample, typename LeftRight>
    struct tail_impl;
 
    template<typename Sample, typename LeftRight>
    struct coherent_tail_mean_impl;
 
    template<typename Sample, typename LeftRight>
    struct non_coherent_tail_mean_impl;
 
    template<typename Sample, typename LeftRight>
    struct tail_quantile_impl;
 
    template<typename VariateType, typename VariateTag, typename LeftRight>
    struct tail_variate_impl;
 
    template<typename Sample, typename Impl, typename LeftRight, typename VariateTag>
    struct tail_variate_means_impl;
 
    template<typename Sample, typename MeanFeature>
    struct lazy_variance_impl;
 
    template<typename Sample, typename MeanFeature, typename Tag>
    struct variance_impl;
 
    template<typename Sample, typename Weight, typename VariateType, typename VariateTag>
    struct weighted_covariance_impl;
 
    template<typename Sample, typename Weight>
    struct weighted_density_impl;
 
    template<typename Sample, typename Weight>
    struct weighted_kurtosis_impl;
 
    template<typename Sample>
    struct weighted_median_impl;
 
    template<typename Sample>
    struct with_density_weighted_median_impl;
 
    template<typename Sample, typename Weight>
    struct with_p_square_cumulative_distribution_weighted_median_impl;
 
    template<typename Sample, typename Weight, typename Tag>
    struct weighted_mean_impl;
 
    template<typename Sample, typename Weight, typename Tag>
    struct immediate_weighted_mean_impl;
 
    template<typename Sample, typename Weight, typename LeftRight>
    struct weighted_peaks_over_threshold_impl;
 
    template<typename Sample, typename Weight, typename LeftRight>
    struct weighted_peaks_over_threshold_prob_impl;
 
    template<typename Sample, typename Weight>
    struct with_p_square_cumulative_distribution_weighted_median_impl;
 
    template<typename Sample, typename Weight>
    struct weighted_extended_p_square_impl;
 
    template<typename N, typename Sample, typename Weight>
    struct weighted_moment_impl;
 
    template<typename Sample, typename Weight>
    struct weighted_p_square_cumulative_distribution_impl;
 
    template<typename Sample, typename Weight, typename Impl>
    struct weighted_p_square_quantile_impl;
 
    template<typename Sample, typename Weight>
    struct weighted_skewness_impl;
 
    template<typename Sample, typename Weight, typename Tag>
    struct weighted_sum_impl;
 
    template<typename Sample, typename Weight, typename Tag>
    struct weighted_sum_kahan_impl;
 
    template<typename Sample, typename Weight, typename LeftRight>
    struct non_coherent_weighted_tail_mean_impl;
 
    template<typename Sample, typename Weight, typename LeftRight>
    struct weighted_tail_quantile_impl;
 
    template<typename Sample, typename Weight, typename Impl, typename LeftRight, typename VariateType>
    struct weighted_tail_variate_means_impl;
 
    template<typename Sample, typename Weight, typename MeanFeature>
    struct lazy_weighted_variance_impl;
 
    template<typename Sample, typename Weight, typename MeanFeature, typename Tag>
    struct weighted_variance_impl;
 
    template<typename Sample>
    struct rolling_window_plus1_impl;
 
    template<typename Sample>
    struct rolling_window_impl;
 
    template<typename Sample>
    struct rolling_sum_impl;
 
    template<typename Sample>
    struct rolling_count_impl;
 
    template<typename Sample>
    struct rolling_mean_impl;
} // namespace impl
 
///////////////////////////////////////////////////////////////////////////////
// stats
//      A more descriptive name for an MPL sequence of statistics.
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
struct stats;
 
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
struct with_error;
 
// modifiers for the mean and variance stats
struct lazy {};
struct immediate {};
 
// modifiers for the variance stat
// struct fast {};
// struct accurate {};
 
// modifiers for order
struct right {};
struct left {};
// typedef right default_order_tag_type;
 
// modifiers for the tail_variate_means stat
struct absolute {};
struct relative {};
 
// modifiers for median and weighted_median stats
struct with_density {};
struct with_p_square_cumulative_distribution {};
struct with_p_square_quantile {};
 
// modifiers for peaks_over_threshold stat
struct with_threshold_value {};
struct with_threshold_probability {};
 
// modifiers for extended_p_square_quantile and weighted_extended_p_square_quantile stats
struct weighted {};
struct unweighted {};
struct linear {};
struct quadratic {};
 
// modifiers for p_square_quantile
struct regular {};
struct for_median {};
 
// modifier for sum_kahan, sum_of_weights_kahan, sum_of_variates_kahan, weighted_sum_kahan
struct kahan {};
 
}} // namespace boost::accumulators
 
#endif