Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:42:46

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // statistics_fwd.hpp
0003 //
0004 //  Copyright 2005 Eric Niebler. Distributed under the Boost
0005 //  Software License, Version 1.0. (See accompanying file
0006 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 
0008 #ifndef BOOST_ACCUMULATORS_STATISTICS_STATISTICS_FWD_HPP_EAN_23_11_2005
0009 #define BOOST_ACCUMULATORS_STATISTICS_STATISTICS_FWD_HPP_EAN_23_11_2005
0010 
0011 #include <boost/mpl/apply_fwd.hpp> // for mpl::na
0012 #include <boost/mpl/print.hpp>
0013 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
0014 #include <boost/accumulators/accumulators_fwd.hpp>
0015 #include <boost/accumulators/framework/depends_on.hpp>
0016 #include <boost/accumulators/framework/extractor.hpp>
0017 
0018 namespace boost { namespace accumulators
0019 {
0020 
0021 ///////////////////////////////////////////////////////////////////////////////
0022 // base struct and base extractor for quantiles
0023 namespace tag
0024 {
0025     struct quantile
0026       : depends_on<>
0027     {
0028         typedef mpl::print<class ____MISSING_SPECIFIC_QUANTILE_FEATURE_IN_ACCUMULATOR_SET____ > impl;
0029     };
0030 }
0031 namespace extract
0032 {
0033     extractor<tag::quantile> const quantile = {};
0034 
0035     BOOST_ACCUMULATORS_IGNORE_GLOBAL(quantile)
0036 }
0037 using extract::quantile;
0038 
0039 ///////////////////////////////////////////////////////////////////////////////
0040 // base struct and base extractor for *coherent* tail means
0041 namespace tag
0042 {
0043     struct tail_mean
0044       : depends_on<>
0045     {
0046         typedef mpl::print<class ____MISSING_SPECIFIC_TAIL_MEAN_FEATURE_IN_ACCUMULATOR_SET____ > impl;
0047     };
0048 }
0049 namespace extract
0050 {
0051     extractor<tag::tail_mean> const tail_mean = {};
0052 
0053     BOOST_ACCUMULATORS_IGNORE_GLOBAL(tail_mean)
0054 }
0055 using extract::tail_mean;
0056 
0057 namespace tag
0058 {
0059     ///////////////////////////////////////////////////////////////////////////////
0060     // Variates tags
0061     struct weights;
0062     struct covariate1;
0063     struct covariate2;
0064 
0065     ///////////////////////////////////////////////////////////////////////////////
0066     // Statistic tags
0067     struct count;
0068     template<typename VariateType, typename VariateTag>
0069     struct covariance;
0070     struct density;
0071     template<typename Feature>
0072     struct error_of;
0073     struct extended_p_square;
0074     struct extended_p_square_quantile;
0075     struct extended_p_square_quantile_quadratic;
0076     struct kurtosis;
0077     struct max;
0078     struct mean;
0079     struct immediate_mean;
0080     struct mean_of_weights;
0081     struct immediate_mean_of_weights;
0082     template<typename VariateType, typename VariateTag>
0083     struct mean_of_variates;
0084     template<typename VariateType, typename VariateTag>
0085     struct immediate_mean_of_variates;
0086     struct median;
0087     struct with_density_median;
0088     struct with_p_square_cumulative_distribution_median;
0089     struct min;
0090     template<int N>
0091     struct moment;
0092     template<typename LeftRight>
0093     struct peaks_over_threshold;
0094     template<typename LeftRight>
0095     struct peaks_over_threshold_prob;
0096     template<typename LeftRight>
0097     struct pot_tail_mean;
0098     template<typename LeftRight>
0099     struct pot_tail_mean_prob;
0100     template<typename LeftRight>
0101     struct pot_quantile;
0102     template<typename LeftRight>
0103     struct pot_quantile_prob;
0104     struct p_square_cumulative_distribution;
0105     struct p_square_quantile;
0106     struct p_square_quantile_for_median;
0107     struct skewness;
0108     struct sum;
0109     struct sum_of_weights;
0110     template<typename VariateType, typename VariateTag>
0111     struct sum_of_variates;
0112     struct sum_kahan;
0113     struct sum_of_weights_kahan;
0114     template<typename VariateType, typename VariateTag>
0115     struct sum_of_variates_kahan;
0116     template<typename LeftRight>
0117     struct tail;
0118     template<typename LeftRight>
0119     struct coherent_tail_mean;
0120     template<typename LeftRight>
0121     struct non_coherent_tail_mean;
0122     template<typename LeftRight>
0123     struct tail_quantile;
0124     template<typename VariateType, typename VariateTag, typename LeftRight>
0125     struct tail_variate;
0126     template<typename LeftRight>
0127     struct tail_weights;
0128     template<typename VariateType, typename VariateTag, typename LeftRight>
0129     struct right_tail_variate;
0130     template<typename VariateType, typename VariateTag, typename LeftRight>
0131     struct left_tail_variate;
0132     template<typename LeftRight, typename VariateType, typename VariateTag>
0133     struct tail_variate_means;
0134     template<typename LeftRight, typename VariateType, typename VariateTag>
0135     struct absolute_tail_variate_means;
0136     template<typename LeftRight, typename VariateType, typename VariateTag>
0137     struct relative_tail_variate_means;
0138     struct lazy_variance;
0139     struct variance;
0140     template<typename VariateType, typename VariateTag>
0141     struct weighted_covariance;
0142     struct weighted_density;
0143     struct weighted_kurtosis;
0144     struct weighted_mean;
0145     struct immediate_weighted_mean;
0146     template<typename VariateType, typename VariateTag>
0147     struct weighted_mean_of_variates;
0148     template<typename VariateType, typename VariateTag>
0149     struct immediate_weighted_mean_of_variates;
0150     struct weighted_median;
0151     struct with_density_weighted_median;
0152     struct with_p_square_cumulative_distribution_weighted_median;
0153     struct weighted_extended_p_square;
0154     struct weighted_extended_p_square_quantile;
0155     struct weighted_extended_p_square_quantile_quadratic;
0156     template<int N>
0157     struct weighted_moment;
0158     template<typename LeftRight>
0159     struct weighted_peaks_over_threshold;
0160     template<typename LeftRight>
0161     struct weighted_peaks_over_threshold_prob;
0162     template<typename LeftRight>
0163     struct weighted_pot_quantile;
0164     template<typename LeftRight>
0165     struct weighted_pot_quantile_prob;
0166     template<typename LeftRight>
0167     struct weighted_pot_tail_mean;
0168     template<typename LeftRight>
0169     struct weighted_pot_tail_mean_prob;
0170     struct weighted_p_square_cumulative_distribution;
0171     struct weighted_p_square_quantile;
0172     struct weighted_p_square_quantile_for_median;
0173     struct weighted_skewness;
0174     template<typename LeftRight>
0175     struct weighted_tail_quantile;
0176     template<typename LeftRight>
0177     struct non_coherent_weighted_tail_mean;
0178     template<typename LeftRight>
0179     struct weighted_tail_quantile;
0180     template<typename LeftRight, typename VariateType, typename VariateTag>
0181     struct weighted_tail_variate_means;
0182     template<typename LeftRight, typename VariateType, typename VariateTag>
0183     struct absolute_weighted_tail_variate_means;
0184     template<typename LeftRight, typename VariateType, typename VariateTag>
0185     struct relative_weighted_tail_variate_means;
0186     struct lazy_weighted_variance;
0187     struct weighted_variance;
0188     struct weighted_sum;
0189     template<typename VariateType, typename VariateTag>
0190     struct weighted_sum_of_variates;
0191     struct rolling_window_plus1;
0192     struct rolling_window;
0193     struct rolling_sum;
0194     struct rolling_count;
0195     struct rolling_mean;
0196 } // namespace tag
0197 
0198 namespace impl
0199 {
0200     ///////////////////////////////////////////////////////////////////////////////
0201     // Statistics impls
0202     struct count_impl;
0203 
0204     template<typename Sample, typename VariateType, typename VariateTag>
0205     struct covariance_impl;
0206 
0207     template<typename Sample>
0208     struct density_impl;
0209 
0210     template<typename Sample, typename Feature>
0211     struct error_of_impl;
0212 
0213     template<typename Sample, typename Variance>
0214     struct error_of_mean_impl;
0215 
0216     template<typename Sample>
0217     struct extended_p_square_impl;
0218 
0219     template<typename Sample, typename Impl1, typename Impl2>
0220     struct extended_p_square_quantile_impl;
0221 
0222     template<typename Sample>
0223     struct kurtosis_impl;
0224 
0225     template<typename Sample>
0226     struct max_impl;
0227 
0228     template<typename Sample>
0229     struct median_impl;
0230 
0231     template<typename Sample>
0232     struct with_density_median_impl;
0233 
0234     template<typename Sample>
0235     struct with_p_square_cumulative_distribution_median_impl;
0236 
0237     template<typename Sample>
0238     struct min_impl;
0239 
0240     template<typename Sample, typename SumFeature = tag::sum>
0241     struct mean_impl;
0242 
0243     template<typename Sample, typename Tag = tag::sample>
0244     struct immediate_mean_impl;
0245 
0246     template<typename N, typename Sample>
0247     struct moment_impl;
0248 
0249     template<typename Sample, typename LeftRight>
0250     struct peaks_over_threshold_prob_impl;
0251 
0252     template<typename Sample, typename Impl, typename LeftRight>
0253     struct pot_quantile_impl;
0254 
0255     template<typename Sample, typename Impl, typename LeftRight>
0256     struct pot_tail_mean_impl;
0257 
0258     template<typename Sample>
0259     struct p_square_cumulative_distribution_impl;
0260 
0261     template<typename Sample, typename Impl>
0262     struct p_square_quantile_impl;
0263 
0264     template<typename Sample>
0265     struct skewness_impl;
0266 
0267     template<typename Sample, typename Tag = tag::sample>
0268     struct sum_impl;
0269 
0270     template<typename Sample, typename Tag>
0271     struct sum_kahan_impl;
0272 
0273     template<typename Sample, typename LeftRight>
0274     struct tail_impl;
0275 
0276     template<typename Sample, typename LeftRight>
0277     struct coherent_tail_mean_impl;
0278 
0279     template<typename Sample, typename LeftRight>
0280     struct non_coherent_tail_mean_impl;
0281 
0282     template<typename Sample, typename LeftRight>
0283     struct tail_quantile_impl;
0284 
0285     template<typename VariateType, typename VariateTag, typename LeftRight>
0286     struct tail_variate_impl;
0287 
0288     template<typename Sample, typename Impl, typename LeftRight, typename VariateTag>
0289     struct tail_variate_means_impl;
0290 
0291     template<typename Sample, typename MeanFeature>
0292     struct lazy_variance_impl;
0293 
0294     template<typename Sample, typename MeanFeature, typename Tag>
0295     struct variance_impl;
0296 
0297     template<typename Sample, typename Weight, typename VariateType, typename VariateTag>
0298     struct weighted_covariance_impl;
0299 
0300     template<typename Sample, typename Weight>
0301     struct weighted_density_impl;
0302 
0303     template<typename Sample, typename Weight>
0304     struct weighted_kurtosis_impl;
0305 
0306     template<typename Sample>
0307     struct weighted_median_impl;
0308 
0309     template<typename Sample>
0310     struct with_density_weighted_median_impl;
0311 
0312     template<typename Sample, typename Weight>
0313     struct with_p_square_cumulative_distribution_weighted_median_impl;
0314 
0315     template<typename Sample, typename Weight, typename Tag>
0316     struct weighted_mean_impl;
0317 
0318     template<typename Sample, typename Weight, typename Tag>
0319     struct immediate_weighted_mean_impl;
0320 
0321     template<typename Sample, typename Weight, typename LeftRight>
0322     struct weighted_peaks_over_threshold_impl;
0323 
0324     template<typename Sample, typename Weight, typename LeftRight>
0325     struct weighted_peaks_over_threshold_prob_impl;
0326 
0327     template<typename Sample, typename Weight>
0328     struct with_p_square_cumulative_distribution_weighted_median_impl;
0329 
0330     template<typename Sample, typename Weight>
0331     struct weighted_extended_p_square_impl;
0332 
0333     template<typename N, typename Sample, typename Weight>
0334     struct weighted_moment_impl;
0335 
0336     template<typename Sample, typename Weight>
0337     struct weighted_p_square_cumulative_distribution_impl;
0338 
0339     template<typename Sample, typename Weight, typename Impl>
0340     struct weighted_p_square_quantile_impl;
0341 
0342     template<typename Sample, typename Weight>
0343     struct weighted_skewness_impl;
0344 
0345     template<typename Sample, typename Weight, typename Tag>
0346     struct weighted_sum_impl;
0347 
0348     template<typename Sample, typename Weight, typename Tag>
0349     struct weighted_sum_kahan_impl;
0350 
0351     template<typename Sample, typename Weight, typename LeftRight>
0352     struct non_coherent_weighted_tail_mean_impl;
0353 
0354     template<typename Sample, typename Weight, typename LeftRight>
0355     struct weighted_tail_quantile_impl;
0356 
0357     template<typename Sample, typename Weight, typename Impl, typename LeftRight, typename VariateType>
0358     struct weighted_tail_variate_means_impl;
0359 
0360     template<typename Sample, typename Weight, typename MeanFeature>
0361     struct lazy_weighted_variance_impl;
0362 
0363     template<typename Sample, typename Weight, typename MeanFeature, typename Tag>
0364     struct weighted_variance_impl;
0365 
0366     template<typename Sample>
0367     struct rolling_window_plus1_impl;
0368 
0369     template<typename Sample>
0370     struct rolling_window_impl;
0371 
0372     template<typename Sample>
0373     struct rolling_sum_impl;
0374 
0375     template<typename Sample>
0376     struct rolling_count_impl;
0377 
0378     template<typename Sample>
0379     struct rolling_mean_impl;
0380 } // namespace impl
0381 
0382 ///////////////////////////////////////////////////////////////////////////////
0383 // stats
0384 //      A more descriptive name for an MPL sequence of statistics.
0385 template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
0386 struct stats;
0387 
0388 template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
0389 struct with_error;
0390 
0391 // modifiers for the mean and variance stats
0392 struct lazy {};
0393 struct immediate {};
0394 
0395 // modifiers for the variance stat
0396 // struct fast {};
0397 // struct accurate {};
0398 
0399 // modifiers for order
0400 struct right {};
0401 struct left {};
0402 // typedef right default_order_tag_type;
0403 
0404 // modifiers for the tail_variate_means stat
0405 struct absolute {};
0406 struct relative {};
0407 
0408 // modifiers for median and weighted_median stats
0409 struct with_density {};
0410 struct with_p_square_cumulative_distribution {};
0411 struct with_p_square_quantile {};
0412 
0413 // modifiers for peaks_over_threshold stat
0414 struct with_threshold_value {};
0415 struct with_threshold_probability {};
0416 
0417 // modifiers for extended_p_square_quantile and weighted_extended_p_square_quantile stats
0418 struct weighted {};
0419 struct unweighted {};
0420 struct linear {};
0421 struct quadratic {};
0422 
0423 // modifiers for p_square_quantile
0424 struct regular {};
0425 struct for_median {};
0426 
0427 // modifier for sum_kahan, sum_of_weights_kahan, sum_of_variates_kahan, weighted_sum_kahan
0428 struct kahan {};
0429 
0430 }} // namespace boost::accumulators
0431 
0432 #endif