Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2008-07-06 22:35:26


Author: troy
Date: 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
New Revision: 47157
URL: http://svn.boost.org/trac/boost/changeset/47157

Log:
Merged revisions 47122,47125,47137,47139,47150 via svnmerge from
https://svn.boost.org/svn/boost/branches/release

................
  r47122 | igaztanaga | 2008-07-05 18:45:36 -0400 (Sat, 05 Jul 2008) | 1 line
  
  Ticket #2073: slist::swap doesn't work properly under certain conditions
................
  r47125 | eric_niebler | 2008-07-06 00:50:32 -0400 (Sun, 06 Jul 2008) | 9 lines
  
  Merged revisions 47124 via svnmerge from
  https://svn.boost.org/svn/boost/trunk
  
  ........
    r47124 | eric_niebler | 2008-07-05 21:31:15 -0700 (Sat, 05 Jul 2008) | 1 line
    
    add missing docs for some weighted stats, how to extend the numeric operators library, and note in which headers each statistical accumulator resides
  ........
................
  r47137 | dgregor | 2008-07-06 14:42:59 -0400 (Sun, 06 Jul 2008) | 1 line
  
  Merged from trunk
................
  r47139 | dgregor | 2008-07-06 15:14:39 -0400 (Sun, 06 Jul 2008) | 1 line
  
  Merged topological_sort doc fix from trunk
................
  r47150 | danieljames | 2008-07-06 18:00:18 -0400 (Sun, 06 Jul 2008) | 34 lines
  
  Make the unordered constructors from allocators explicit.
  And clean of the FNV-1 example & documentation a little.
  
  Merged revisions 47085,47132,47143-47146 via svnmerge from
  https://svn.boost.org/svn/boost/trunk
  
  ........
    r47085 | danieljames | 2008-07-04 23:57:20 +0100 (Fri, 04 Jul 2008) | 4 lines
    
    Require explicit conversion from allocators.
    
    (Not what it says in the draft standard, but I think that might be a defect).
  ........
    r47132 | danieljames | 2008-07-06 13:41:09 +0100 (Sun, 06 Jul 2008) | 2 lines
    
    'Bias' should be 'basis'.
  ........
    r47143 | danieljames | 2008-07-06 22:06:52 +0100 (Sun, 06 Jul 2008) | 1 line
    
    Clean up the FNV-1 comments.
  ........
    r47144 | danieljames | 2008-07-06 22:07:31 +0100 (Sun, 06 Jul 2008) | 1 line
    
    I've only got one hash function for release, so no need for its own directory.
  ........
    r47145 | danieljames | 2008-07-06 22:08:11 +0100 (Sun, 06 Jul 2008) | 1 line
    
    Remove the hash_functions directory (for now).
  ........
    r47146 | danieljames | 2008-07-06 22:29:47 +0100 (Sun, 06 Jul 2008) | 1 line
    
    Update the docs for the new location of FNV-1.
  ........
................

Added:
   branches/CMake/release/libs/unordered/examples/fnv1.hpp
      - copied unchanged from r47150, /branches/release/libs/unordered/examples/fnv1.hpp
Removed:
   branches/CMake/release/libs/unordered/examples/hash_functions/
Properties modified:
   branches/CMake/release/ (props changed)
Text files modified:
   branches/CMake/release/boost/intrusive/detail/common_slist_algorithms.hpp | 2
   branches/CMake/release/boost/unordered_map.hpp | 5
   branches/CMake/release/boost/unordered_set.hpp | 6
   branches/CMake/release/libs/accumulators/doc/accumulators.qbk | 689 +++++++++++++++++++++++++++++++++++++++
   branches/CMake/release/libs/graph/doc/topological_sort.html | 3
   branches/CMake/release/libs/mpi/doc/mpi.qbk | 19 -
   branches/CMake/release/libs/unordered/doc/hash_equality.qbk | 4
   branches/CMake/release/libs/unordered/doc/ref.xml | 10
   branches/CMake/release/libs/unordered/doc/src_code/dictionary.cpp | 2
   9 files changed, 697 insertions(+), 43 deletions(-)

Modified: branches/CMake/release/boost/intrusive/detail/common_slist_algorithms.hpp
==============================================================================
--- branches/CMake/release/boost/intrusive/detail/common_slist_algorithms.hpp (original)
+++ branches/CMake/release/boost/intrusive/detail/common_slist_algorithms.hpp 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -76,7 +76,7 @@
 
    static void transfer_after(node_ptr p, node_ptr b, node_ptr e)
    {
- if (p != b && p != e) {
+ if (p != b && p != e && b != e) {
          node_ptr next_b = NodeTraits::get_next(b);
          node_ptr next_e = NodeTraits::get_next(e);
          node_ptr next_p = NodeTraits::get_next(p);

Modified: branches/CMake/release/boost/unordered_map.hpp
==============================================================================
--- branches/CMake/release/boost/unordered_map.hpp (original)
+++ branches/CMake/release/boost/unordered_map.hpp 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -107,8 +107,7 @@
         {
         }
 
- // TODO: Should this be explicit?
- unordered_map(allocator_type const& a)
+ explicit unordered_map(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {
@@ -504,7 +503,7 @@
         {
         }
 
- unordered_multimap(allocator_type const& a)
+ explicit unordered_multimap(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {

Modified: branches/CMake/release/boost/unordered_set.hpp
==============================================================================
--- branches/CMake/release/boost/unordered_set.hpp (original)
+++ branches/CMake/release/boost/unordered_set.hpp 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -104,8 +104,7 @@
         {
         }
 
- // TODO: Should this be explicit?
- unordered_set(allocator_type const& a)
+ explicit unordered_set(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {
@@ -473,8 +472,7 @@
         {
         }
 
- // TODO: Should this be explicit?
- unordered_multiset(allocator_type const& a)
+ explicit unordered_multiset(allocator_type const& a)
             : base(boost::unordered_detail::default_initial_bucket_count,
                 hasher(), key_equal(), a)
         {

Modified: branches/CMake/release/libs/accumulators/doc/accumulators.qbk
==============================================================================
--- branches/CMake/release/libs/accumulators/doc/accumulators.qbk (original)
+++ branches/CMake/release/libs/accumulators/doc/accumulators.qbk 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -823,15 +823,158 @@
 handles this by allowing several different accumulators satisfy the same
 feature.
 
+[*Aliasing feature dependencies with [^feature_of<>]]
 
-* Mapping multiple impls to the same feature with feature_of
-* Creating aliases for features with as_feature
+Imagine that you would like to implement the hypothetical ['fubar] statistic,
+and that you know two ways to calculate fubar on a bunch of samples: an
+accurate but slow calculation and an approximate but fast calculation. You
+might opt to make the accurate calculation the default, so you implement
+two accumulators and call them `impl::fubar_impl` and `impl::fast_fubar_impl`.
+You would also define the `tag::fubar` and `tag::fast_fubar` features as described
+[link accumulators.user_s_guide.the_accumulators_framework.extending_the_accumulators_framework.defining_a_new_feature above].
+Now, you would like to inform the Accumulators Framework that these two features
+are the same from the point of view of dependency resolution. You can do that
+with _feature_of_, as follows:
+
+ namespace boost { namespace accumulators
+ {
+ // For the purposes of feature-based dependency resolution,
+ // fast_fubar provides the same feature as fubar
+ template<>
+ struct feature_of<tag::fast_fubar>
+ : feature_of<tag::fubar>
+ {
+ };
+ }}
+
+The above code instructs the Accumulators Framework that, if another accumulator
+in the set depends on the `tag::fubar` feature, the `tag::fast_fubar` feature
+is an acceptable substitute.
+
+[*Registering feature variants with [^as_feature<>]]
+
+You may hve noticed that some feature variants in the Accumulators Framework can be
+specified with a nicer syntax. For instance, instead of `tag::mean` and `tag::immediate_mean`
+you can specify them with `tag::mean(lazy)` and `tag::mean(immediate)` respectively.
+These are merely aliases, but the syntax makes the relationship between the two clearer.
+You can create these feature aliases with the _as_feature_ trait. Given the fubar example
+above, you might decide to alias `tag::fubar(accurate)` with `tag::fubar` and
+`tag::fubar(fast)` with `tag::fast_fubar`. You would do that as follows:
+
+ namespace boost { namespace accumulators
+ {
+ struct fast {}; // OK to leave these tags empty
+ struct accurate {};
+
+ template<>
+ struct as_feature<tag::fubar(accurate)>
+ {
+ typedef tag::fubar type;
+ };
+
+ template<>
+ struct as_feature<tag::fubar(fast)>
+ {
+ typedef tag::fast_fubar type;
+ };
+ }}
+
+Once you have done this, users of your fubar accumulator can request the `tag::fubar(fast)`
+and `tag::fubar(accurate)` features when defining their `accumulator_set`s and get the correct
+accumulator.
 
 [endsect]
 
-[section:operators_ex Adding or Specializing Operator (Meta-) Functions]
+[section:operators_ex Specializing Numeric Operators]
+
+This section describes how to adapt third-party numeric types to work with the Accumulator
+Framework.
+
+Rather than relying on the built-in operators, the Accumulators Framework relies on functions
+and operator overloads defined in the
+[link accumulators.user_s_guide.the_accumulators_framework.numeric_operators_sub_library
+Numeric Operators Sub-Library] for many of its numeric operations. This is so that it
+is possible to assign non-standard meanings to arithmetic operations. For instance, when
+calculating an average by dividing two integers, the standard integer division behavior
+would be mathematically incorrect for most statistical quantities. So rather than use `x / y`,
+the Accumulators Framework uses `numeric::average(x, y)`, which does floating-point division
+even if both `x` and `y` are integers.
+
+Another example where the Numeric Operators Sub-Library is useful is when a type does not
+define the operator overloads required to use it for some statistical calculations. For instance,
+`std::vector<>` does not overload any arithmetic operators, yet it may be useful to use
+`std::vector<>` as a sample or variate type. The Numeric Operators Sub-Library
+defines the necessary operator overloads in the `boost::numeric::operators` namespace,
+which is brought into scope by the Accumulators Framework with a using directive.
+
+[*Numeric Function Objects and Tag Dispatching]
+
+How are the numeric function object defined by the Numeric Operators Sub-Library made
+to work with types such as `std::vector<>`? The free functions in the `boost::numeric` namespace
+are implemented in terms of the function objects in the `boost::numeric::functional` namespace,
+so to make `boost::numeric::average()` do something sensible with a `std::vector<>`, for instance,
+we'll need to partially specialize the `boost::numeric::functional::average<>` function object.
+
+The functional objects make use of a technique known as
+[@http://www.boost.org/community/generic_programming.html#tag_dispatching ['tag dispatching]] to
+select the proper implementation for the given operands. It works as follows:
 
-TODO
+ namespace boost { namespace numeric { namespace functional
+ {
+ // Metafunction for looking up the tag associated with
+ // a given numeric type T.
+ template<typename T>
+ struct tag
+ {
+ // by default, all types have void as a tag type
+ typedef void type;
+ };
+
+ // Forward declaration looks up the tag types of each operand
+ template<
+ typename Left
+ , typename Right
+ , typename LeftTag = typename tag<Left>::type
+ , typename RightTag = typename tag<Right>::type
+ >
+ struct average;
+ }}}
+
+If you have some user-defined type `MyDouble` for which you would like to customimze the behavior
+of `numeric::average()`, you would specialize `numeric::functional::average<>` by
+first defining a tag type, as shown below:
+
+ namespace boost { namespace numeric { namespace functional
+ {
+ // Tag type for MyDouble
+ struct MyDoubleTag {};
+
+ // Specialize tag<> for MyDouble.
+ // This only needs to be done once.
+ template<>
+ struct tag<MyDouble>
+ {
+ typedef MyDoubleTag type;
+ };
+
+ // Specify how to divide a MyDouble by an integral count
+ template<typename Left, typename Right>
+ struct average<Left, Right, MyDoubleTag, void>
+ {
+ // Define the type of the result
+ typedef ... result_type;
+
+ result_type operator()(Left & left, Right & right) const
+ {
+ return ...;
+ }
+ };
+ }}}
+
+Once you have done this, `numeric::average()` will use your specialization
+of `numeric::functional::average<>` when the first argument is a `MyDouble`
+object. All of the function objects in the Numeric Operators Sub-Library can
+be customized in a similar fashion.
 
 [endsect]
 
@@ -906,6 +1049,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _COUNT_HPP_ [headerref boost/accumulators/statistics/count.hpp]]
+
+ #include <_COUNT_HPP_>
+
 [*Example]
 
     accumulator_set<int, features<tag::count> > acc;
@@ -941,6 +1089,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _COVARIANCE_HPP_ [headerref boost/accumulators/statistics/covariance.hpp]]
+
+ #include <_COVARIANCE_HPP_>
+
 [*Example]
 
     accumulator_set<double, stats<tag::covariance<double, tag::covariate1> > > acc;
@@ -983,6 +1136,11 @@
     [[Extractor Complexity] [O(N), when N is `density::num_bins`]]
 ]
 
+[*Header]
+[def _DENSITY_HPP_ [headerref boost/accumulators/statistics/density.hpp]]
+
+ #include <_DENSITY_HPP_>
+
 [/ TODO add example ]
 
 [*See also]
@@ -1012,6 +1170,13 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _ERROR_OF_HPP_ [headerref boost/accumulators/statistics/error_of.hpp]]
+[def _ERROR_OF_MEAN_HPP_ [headerref boost/accumulators/statistics/error_of_mean.hpp]]
+
+ #include <_ERROR_OF_HPP_>
+ #include <_ERROR_OF_MEAN_HPP_>
+
 [*Example]
 
     accumulator_set<double, stats<tag::error_of<tag::mean> > > acc;
@@ -1048,6 +1213,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _EXTENDED_P_SQUARE_HPP_ [headerref boost/accumulators/statistics/extended_p_square.hpp]]
+
+ #include <_EXTENDED_P_SQUARE_HPP_>
+
 [*Example]
 
     boost::array<double> probs = {0.001,0.01,0.1,0.25,0.5,0.75,0.9,0.99,0.999};
@@ -1100,6 +1270,11 @@
     [[Extractor Complexity] [O(N) where N is the count of probabilities.]]
 ]
 
+[*Header]
+[def _EXTENDED_P_SQUARE_QUANTILE_HPP_ [headerref boost/accumulators/statistics/extended_p_square_quantile.hpp]]
+
+ #include <_EXTENDED_P_SQUARE_QUANTILE_HPP_>
+
 [*Example]
 
     typedef accumulator_set<double, stats<tag::extended_p_square_quantile> >
@@ -1185,6 +1360,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _KURTOSIS_HPP_ [headerref boost/accumulators/statistics/kurtosis.hpp]]
+
+ #include <_KURTOSIS_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::kurtosis > > acc;
@@ -1226,6 +1406,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _MAX_HPP_ [headerref boost/accumulators/statistics/max.hpp]]
+
+ #include <_MAX_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::max> > acc;
@@ -1273,6 +1458,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _MEAN_HPP_ [headerref boost/accumulators/statistics/mean.hpp]]
+
+ #include <_MEAN_HPP_>
+
 [*Example]
 
     accumulator_set<
@@ -1371,6 +1561,11 @@
     [[Extractor Complexity] [TODO]]
 ]
 
+[*Header]
+[def _MEDIAN_HPP_ [headerref boost/accumulators/statistics/median.hpp]]
+
+ #include <_MEDIAN_HPP_>
+
 [*Example]
 
     // two random number generators
@@ -1426,6 +1621,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _MIN_HPP_ [headerref boost/accumulators/statistics/min.hpp]]
+
+ #include <_MIN_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::min> > acc;
@@ -1463,6 +1663,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _MOMENT_HPP_ [headerref boost/accumulators/statistics/moment.hpp]]
+
+ #include <_MOMENT_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::moment<2> > > acc1;
@@ -1517,6 +1722,11 @@
     [[Extractor Complexity] [O(N) where N is `num_cells`]]
 ]
 
+[*Header]
+[def _P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_ [headerref boost/accumulators/statistics/p_square_cumulative_distribution.hpp]]
+
+ #include <_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_>
+
 [*Example]
 
     // tolerance in %
@@ -1573,6 +1783,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _P_SQUARE_QUANTILE_HPP_ [headerref boost/accumulators/statistics/p_square_quantile.hpp]]
+
+ #include <_P_SQUARE_QUANTILE_HPP_>
+
 [*Example]
 
     typedef accumulator_set<double, stats<tag::p_square_quantile> > accumulator_t;
@@ -1654,6 +1869,11 @@
     [[Extractor Complexity] [TODO]]
 ]
 
+[*Header]
+[def _PEAKS_OVER_THRESHOLD_HPP_ [headerref boost/accumulators/statistics/peaks_over_threshold.hpp]]
+
+ #include <_PEAKS_OVER_THRESHOLD_HPP_>
+
 [*Example]
 
 See example for [link accumulators.user_s_guide.the_statistical_accumulators_library.pot_quantile [^pot_quantile]].
@@ -1693,6 +1913,11 @@
     [[Extractor Complexity] [TODO]]
 ]
 
+[*Header]
+[def _POT_QUANTILE_HPP_ [headerref boost/accumulators/statistics/pot_quantile.hpp]]
+
+ #include <_POT_QUANTILE_HPP_>
+
 [*Example]
 
     // tolerance in %
@@ -1781,6 +2006,11 @@
     [[Extractor Complexity] [TODO]]
 ]
 
+[*Header]
+[def _POT_TAIL_MEAN_HPP_ [headerref boost/accumulators/statistics/pot_tail_mean.hpp]]
+
+ #include <_POT_TAIL_MEAN_HPP_>
+
 [*Example]
 
     // TODO
@@ -1812,6 +2042,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _SKEWNESS_HPP_ [headerref boost/accumulators/statistics/skewness.hpp]]
+
+ #include <_SKEWNESS_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::skewness > > acc2;
@@ -1827,7 +2062,6 @@
     BOOST_CHECK_EQUAL( moment<3>(acc2), 1171./5. );
     BOOST_CHECK_CLOSE( skewness(acc2), 0.406040288214, 1e-6 );
 
-
 [*See also]
 
 * [classref boost::accumulators::impl::skewness_impl [^skewness_impl]]
@@ -1856,6 +2090,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _SUM_HPP_ [headerref boost/accumulators/statistics/sum.hpp]]
+
+ #include <_SUM_HPP_>
+
 [*Example]
 
     accumulator_set<
@@ -1919,6 +2158,11 @@
     [[Extractor Complexity] [O(N log N), where N is the cache size]]
 ]
 
+[*Header]
+[def _TAIL_HPP_ [headerref boost/accumulators/statistics/tail.hpp]]
+
+ #include <_TAIL_HPP_>
+
 [*Example]
 
 See the Example for [link accumulators.user_s_guide.the_statistical_accumulators_library.tail_variate [^tail_variate]].
@@ -1951,6 +2195,11 @@
     [[Extractor Complexity] [O(N log N), where N is the cache size]]
 ]
 
+[*Header]
+[def _TAIL_MEAN_HPP_ [headerref boost/accumulators/statistics/tail_mean.hpp]]
+
+ #include <_TAIL_MEAN_HPP_>
+
 [*Example]
 
 See the example for
@@ -1988,6 +2237,11 @@
     [[Extractor Complexity] [O(N log N), where N is the cache size]]
 ]
 
+[*Header]
+[def _TAIL_MEAN_HPP_ [headerref boost/accumulators/statistics/tail_mean.hpp]]
+
+ #include <_TAIL_MEAN_HPP_>
+
 [*Example]
 
     // tolerance in %
@@ -2065,6 +2319,11 @@
     [[Extractor Complexity] [O(N log N), where N is the cache size]]
 ]
 
+[*Header]
+[def _TAIL_QUANTILE_HPP_ [headerref boost/accumulators/statistics/tail_quantile.hpp]]
+
+ #include <_TAIL_QUANTILE_HPP_>
+
 [*Example]
 
     // tolerance in %
@@ -2153,6 +2412,11 @@
     [[Extractor Complexity] [O(N log N), where N is the cache size]]
 ]
 
+[*Header]
+[def _TAIL_VARIATE_HPP_ [headerref boost/accumulators/statistics/tail_variate.hpp]]
+
+ #include <_TAIL_VARIATE_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::tail_variate<int, tag::covariate1, right> > > acc(
@@ -2224,6 +2488,11 @@
     [[Extractor Complexity] [O(N log N), where N is the cache size]]
 ]
 
+[*Header]
+[def _TAIL_VARIATE_MEANS_HPP_ [headerref boost/accumulators/statistics/tail_variate_means.hpp]]
+
+ #include <_TAIL_VARIATE_MEANS_HPP_>
+
 [*Example]
 
     std::size_t c = 5; // cache size
@@ -2359,6 +2628,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _VARIANCE_HPP_ [headerref boost/accumulators/statistics/variance.hpp]]
+
+ #include <_VARIANCE_HPP_>
+
 [*Example]
 
     // lazy variance
@@ -2431,6 +2705,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_COVARIANCE_HPP_ [headerref boost/accumulators/statistics/weighted_covariance.hpp]]
+
+ #include <_WEIGHTED_COVARIANCE_HPP_>
+
 [*Example]
 
     accumulator_set<double, stats<tag::weighted_covariance<double, tag::covariate1> >, double > acc;
@@ -2477,6 +2756,11 @@
     [[Extractor Complexity] [O(N), when N is `weighted_density::num_bins`]]
 ]
 
+[*Header]
+[def _WEIGHTED_DENSITY_HPP_ [headerref boost/accumulators/statistics/weighted_density.hpp]]
+
+ #include <_WEIGHTED_DENSITY_HPP_>
+
 [/ TODO add example ]
 
 [*See also]
@@ -2509,6 +2793,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_EXTENDED_P_SQUARE_HPP_ [headerref boost/accumulators/statistics/weighted_extended_p_square.hpp]]
+
+ #include <_WEIGHTED_EXTENDED_P_SQUARE_HPP_>
+
 [*Example]
 
     typedef accumulator_set<double, stats<tag::weighted_extended_p_square>, double> accumulator_t;
@@ -2598,6 +2887,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_KURTOSIS_HPP_ [headerref boost/accumulators/statistics/weighted_kurtosis.hpp]]
+
+ #include <_WEIGHTED_KURTOSIS_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::weighted_kurtosis>, int > acc2;
@@ -2646,6 +2940,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_MEAN_HPP_ [headerref boost/accumulators/statistics/weighted_mean.hpp]]
+
+ #include <_WEIGHTED_MEAN_HPP_>
+
 [*Example]
 
     accumulator_set<
@@ -2735,6 +3034,11 @@
     [[Extractor Complexity] [TODO]]
 ]
 
+[*Header]
+[def _WEIGHTED_MEDIAN_HPP_ [headerref boost/accumulators/statistics/weighted_median.hpp]]
+
+ #include <_WEIGHTED_MEDIAN_HPP_>
+
 [*Example]
 
     // Median estimation of normal distribution N(1,1) using samples from a narrow normal distribution N(1,0.01)
@@ -2798,6 +3102,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_MOMENT_HPP_ [headerref boost/accumulators/statistics/weighted_moment.hpp]]
+
+ #include <_WEIGHTED_MOMENT_HPP_>
+
 [*Example]
 
     accumulator_set<double, stats<tag::weighted_moment<2> >, double> acc2;
@@ -2849,6 +3158,11 @@
     [[Extractor Complexity] [O(N) where N is `num_cells`]]
 ]
 
+[*Header]
+[def _WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_ [headerref boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp]]
+
+ #include <_WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_>
+
 [*Example]
 
     // tolerance in %
@@ -2889,7 +3203,7 @@
     // than without importance sampling, i.e., with unweighted samples
     
     for (std::size_t i = 0; i < histogram_upper.size(); ++i)
- {
+ {
         // problem with small results: epsilon is relative (in percent), not absolute!
         
         // check upper region of distribution
@@ -2898,7 +3212,7 @@
         // check lower region of distribution
         if ( histogram_lower[i].second < -0.1 )
             BOOST_CHECK_CLOSE( 0.5 * (1.0 + erf( histogram_lower[i].first / sqrt(2.0) )), histogram_lower[i].second, epsilon );
- }
+ }
 
 [*See also]
 
@@ -2931,6 +3245,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_P_SQUARE_QUANTILE_HPP_ [headerref boost/accumulators/statistics/weighted_p_square_quantile.hpp]]
+
+ #include <_WEIGHTED_P_SQUARE_QUANTILE_HPP_>
+
 [*Example]
 
     typedef accumulator_set<double, stats<tag::weighted_p_square_quantile>, double> accumulator_t;
@@ -3002,6 +3321,54 @@
 
 [endsect]
 
+[section:weighted_peaks_over_threshold weighted_peaks_over_threshold ['and variants]]
+
+Weighted peaks over threshold method for weighted quantile and weighted tail mean estimation.
+For more implementation details,
+see [classref boost::accumulators::impl::weighted_peaks_over_threshold_impl [^weighted_peaks_over_threshold_impl]]
+and [classref boost::accumulators::impl::weighted_peaks_over_threshold_prob_impl [^weighted_peaks_over_threshold_prob_impl]].
+
+Both `tag::weighted_peaks_over_threshold<_left_or_right_>` and
+`tag::weighted_peaks_over_threshold_prob<_left_or_right_>` satisfy the
+`tag::weighted_peaks_over_threshold<_left_or_right_>` feature and can be extracted using the
+`weighted_peaks_over_threshold()` extractor.
+
+[variablelist
+ [[Result Type] [`tuple<float_type, float_type, float_type>` where `float_type` is
+ ``
+ numeric::functional::average<
+ numeric::functional::multiplies<_sample_type_, _weight_type_>::result_type
+ , std::size_t
+ >::result_type
+ ``]]
+ [[Depends On] [`weighted_peaks_over_threshold<_left_or_right_>` depends on `sum_of_weights` \n
+ `weighted_peaks_over_threshold_prob<_left_or_right_>` depends on `sum_of_weights` and `tail_weights<_left_or_right_>`]]
+ [[Variants] [`weighted_peaks_over_threshold_prob`]]
+ [[Initialization Parameters] [ `tag::peaks_over_threshold::threshold_value` \n
+ `tag::peaks_over_threshold_prob::threshold_probability` \n
+ `tag::tail<_left_or_right_>::cache_size` ]]
+ [[Accumulator Parameters] [`weight`]]
+ [[Extractor Parameters] [['none]]]
+ [[Accumulator Complexity] [TODO]]
+ [[Extractor Complexity] [O(1)]]
+]
+
+[*Header]
+[def _WEIGHTED_PEAKS_OVER_THRESHOLD_HPP_ [headerref boost/accumulators/statistics/weighted_peaks_over_threshold.hpp]]
+
+ #include <_WEIGHTED_PEAKS_OVER_THRESHOLD_HPP_>
+
+[/ TODO Add example]
+
+[*See also]
+
+* [classref boost::accumulators::impl::weighted_peaks_over_threshold_impl [^weighted_peaks_over_threshold_impl]]
+* [classref boost::accumulators::impl::weighted_peaks_over_threshold_prob_impl [^weighted_peaks_over_threshold_prob_impl]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.sum [^sum]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.tail [^tail]]
+
+[endsect]
+
 [section:weighted_skewness weighted_skewness]
 
 The skewness of a sample distribution is defined as the ratio of the 3rd central moment and the [^3/2]-th power
@@ -3028,6 +3395,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_SKEWNESS_HPP_ [headerref boost/accumulators/statistics/weighted_skewness.hpp]]
+
+ #include <_WEIGHTED_SKEWNESS_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::weighted_skewness>, int > acc2;
@@ -3070,6 +3442,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_SUM_HPP_ [headerref boost/accumulators/statistics/weighted_sum.hpp]]
+
+ #include <_WEIGHTED_SUM_HPP_>
+
 [*Example]
 
     accumulator_set<int, stats<tag::weighted_sum, tag::weighted_sum_of_variates<int, tag::covariate1> >, int> acc;
@@ -3092,6 +3469,299 @@
 
 [endsect]
 
+[section:non_coherent_weighted_tail_mean non_coherent_weighted_tail_mean]
+
+Estimation of the (non-coherent) weighted tail mean based on order statistics (for both left and right tails).
+The left non-coherent weighted tail mean feature is `tag::non_coherent_weighted_tail_mean<left>`, and the right
+non-choherent weighted tail mean feature is `tag::non_coherent_weighted_tail_mean<right>`. They both share the
+`tag::abstract_non_coherent_tail_mean` feature with the unweighted non-coherent tail mean accumulators and can
+be extracted with either the `non_coherent_tail_mean()` or the `non_coherent_weighted_tail_mean()` extractors.
+For more implementation details, see
+[classref boost::accumulators::impl::non_coherent_weighted_tail_mean_impl [^non_coherent_weighted_tail_mean_impl]].
+
+[variablelist
+ [[Result Type] [``
+ numeric::functional::average<
+ numeric::functional::multiplies<_sample_type_, _weight_type_>::result_type
+ , std::size_t
+ >::result_type
+ ``]]
+ [[Depends On] [`sum_of_weights` \n `tail_weights<_left_or_right_>`]]
+ [[Variants] [`abstract_non_coherent_tail_mean`]]
+ [[Initialization Parameters] [`tag::tail<_left_or_right_>::cache_size`]]
+ [[Accumulator Parameters] [['none]]]
+ [[Extractor Parameters] [`quantile_probability`]]
+ [[Accumulator Complexity] [O(log N), where N is the cache size]]
+ [[Extractor Complexity] [O(N log N), where N is the cache size]]
+]
+
+[*Header]
+[def _WEIGHTED_TAIL_MEAN_HPP_ [headerref boost/accumulators/statistics/weighted_tail_mean.hpp]]
+
+ #include <_WEIGHTED_TAIL_MEAN_HPP_>
+
+[*Example]
+
+ // tolerance in %
+ double epsilon = 1;
+
+ std::size_t n = 100000; // number of MC steps
+ std::size_t c = 25000; // cache size
+
+ accumulator_set<double, stats<tag::non_coherent_weighted_tail_mean<right> >, double >
+ acc0( right_tail_cache_size = c );
+ accumulator_set<double, stats<tag::non_coherent_weighted_tail_mean<left> >, double >
+ acc1( left_tail_cache_size = c );
+
+ // random number generators
+ boost::lagged_fibonacci607 rng;
+
+ for (std::size_t i = 0; i < n; ++i)
+ {
+ double smpl = std::sqrt(rng());
+ acc0(smpl, weight = 1./smpl);
+ }
+
+ for (std::size_t i = 0; i < n; ++i)
+ {
+ double smpl = rng();
+ acc1(smpl*smpl, weight = smpl);
+ }
+
+ // check uniform distribution
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc0, quantile_probability = 0.95), 0.975, epsilon );
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc0, quantile_probability = 0.975), 0.9875, epsilon );
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc0, quantile_probability = 0.99), 0.995, epsilon );
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc0, quantile_probability = 0.999), 0.9995, epsilon );
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc1, quantile_probability = 0.05), 0.025, epsilon );
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc1, quantile_probability = 0.025), 0.0125, epsilon );
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc1, quantile_probability = 0.01), 0.005, epsilon );
+ BOOST_CHECK_CLOSE( non_coherent_weighted_tail_mean(acc1, quantile_probability = 0.001), 0.0005, 5*epsilon );
+
+[*See also]
+
+* [classref boost::accumulators::impl::non_coherent_weighted_tail_mean_impl [^non_coherent_weighted_tail_mean_impl]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.sum [^sum]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.tail [^tail]]
+
+[endsect]
+
+[section:weighted_tail_quantile weighted_tail_quantile]
+
+Tail quantile estimation based on order statistics of weighted samples (for both left
+and right tails). The left weighted tail quantile feature is `tag::weighted_tail_quantile<left>`,
+and the right weighted tail quantile feature is `tag::weighted_tail_quantile<right>`. They both
+share the `tag::quantile` feature with the unweighted tail quantile accumulators and can be
+extracted with either the `quantile()` or the `weighted_tail_quantile()` extractors. For more
+implementation details, see
+[classref boost::accumulators::impl::weighted_tail_quantile_impl [^weighted_tail_quantile_impl]]
+
+[variablelist
+ [[Result Type] [``
+ _sample_type_
+ ``]]
+ [[Depends On] [`sum_of_weights` \n `tail_weights<_left_or_right_>`]]
+ [[Variants] [['none]]]
+ [[Initialization Parameters] [`tag::tail<_left_or_right_>::cache_size`]]
+ [[Accumulator Parameters] [['none]]]
+ [[Extractor Parameters] [`quantile_probability`]]
+ [[Accumulator Complexity] [O(log N), where N is the cache size]]
+ [[Extractor Complexity] [O(N log N), where N is the cache size]]
+]
+
+[*Header]
+[def _WEIGHTED_TAIL_QUANTILE_HPP_ [headerref boost/accumulators/statistics/weighted_tail_quantile.hpp]]
+
+ #include <_WEIGHTED_TAIL_QUANTILE_HPP_>
+
+[*Example]
+
+ // tolerance in %
+ double epsilon = 1;
+
+ std::size_t n = 100000; // number of MC steps
+ std::size_t c = 20000; // cache size
+
+ double mu1 = 1.0;
+ double mu2 = -1.0;
+ boost::lagged_fibonacci607 rng;
+ boost::normal_distribution<> mean_sigma1(mu1,1);
+ boost::normal_distribution<> mean_sigma2(mu2,1);
+ boost::variate_generator<boost::lagged_fibonacci607&, boost::normal_distribution<> > normal1(rng, mean_sigma1);
+ boost::variate_generator<boost::lagged_fibonacci607&, boost::normal_distribution<> > normal2(rng, mean_sigma2);
+
+ accumulator_set<double, stats<tag::weighted_tail_quantile<right> >, double>
+ acc1(right_tail_cache_size = c);
+
+ accumulator_set<double, stats<tag::weighted_tail_quantile<left> >, double>
+ acc2(left_tail_cache_size = c);
+
+ for (std::size_t i = 0; i < n; ++i)
+ {
+ double sample1 = normal1();
+ double sample2 = normal2();
+ acc1(sample1, weight = std::exp(-mu1 * (sample1 - 0.5 * mu1)));
+ acc2(sample2, weight = std::exp(-mu2 * (sample2 - 0.5 * mu2)));
+ }
+
+ // check standard normal distribution
+ BOOST_CHECK_CLOSE( quantile(acc1, quantile_probability = 0.975), 1.959963, epsilon );
+ BOOST_CHECK_CLOSE( quantile(acc1, quantile_probability = 0.999), 3.090232, epsilon );
+ BOOST_CHECK_CLOSE( quantile(acc2, quantile_probability = 0.025), -1.959963, epsilon );
+ BOOST_CHECK_CLOSE( quantile(acc2, quantile_probability = 0.001), -3.090232, epsilon );
+
+[*See also]
+
+* [classref boost::accumulators::impl::weighted_tail_quantile_impl [^weighted_tail_quantile_impl]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.sum [^sum]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.tail [^tail]]
+
+[endsect]
+
+[section:weighted_tail_variate_means weighted_tail_variate_means ['and variants]]
+
+Estimation of the absolute and relative weighted tail variate means (for both left and right tails)
+The absolute weighted tail variate means has the feature
+`tag::absolute_weighted_tail_variate_means<_left_or_right_, _variate_type_, _variate_tag_>`
+and the relative weighted tail variate mean has the feature
+`tag::relative_weighted_tail_variate_means<_left_or_right_, _variate_type_, _variate_tag_>`. All
+absolute weighted tail variate mean features share the `tag::abstract_absolute_tail_variate_means`
+feature with their unweighted variants and can be extracted with the `tail_variate_means()` and
+`weighted_tail_variate_means()` extractors. All the relative weighted tail variate mean features
+share the `tag::abstract_relative_tail_variate_means` feature with their unweighted variants
+and can be extracted with either the `relative_tail_variate_means()` or
+`relative_weighted_tail_variate_means()` extractors.
+
+For more implementation details, see
+[classref boost::accumulators::impl::weighted_tail_variate_means_impl [^weighted_tail_variate_means_impl]]
+
+[variablelist
+ [[Result Type] [``
+ boost::iterator_range<
+ numeric::functional::average<
+ numeric::functional::multiplies<_variate_type_, _weight_type_>::result_type
+ , _weight_type_
+ >::result_type::iterator
+ >
+ ``]]
+ [[Depends On] [`non_coherent_weighted_tail_mean<_left_or_right_>` \n
+ `tail_variate<_variate_type_, _variate_tag_, _left_or_right_>` \n
+ `tail_weights<_left_or_right_>`]]
+ [[Variants] [`tag::absolute_weighted_tail_variate_means<_left_or_right_, _variate_type_, _variate_tag_>` \n
+ `tag::relative_weighted_tail_variate_means<_left_or_right_, _variate_type_, _variate_tag_>`]]
+ [[Initialization Parameters] [`tag::tail<_left_or_right_>::cache_size`]]
+ [[Accumulator Parameters] [['none]]]
+ [[Extractor Parameters] [`quantile_probability`]]
+ [[Accumulator Complexity] [O(log N), where N is the cache size]]
+ [[Extractor Complexity] [O(N log N), where N is the cache size]]
+]
+
+[*Header]
+[def _WEIGHTED_TAIL_VARIATE_MEANS_HPP_ [headerref boost/accumulators/statistics/weighted_tail_variate_means.hpp]]
+
+ #include <_WEIGHTED_TAIL_VARIATE_MEANS_HPP_>
+
+[*Example]
+
+ std::size_t c = 5; // cache size
+
+ typedef double variate_type;
+ typedef std::vector<variate_type> variate_set_type;
+
+ accumulator_set<double, stats<tag::weighted_tail_variate_means<right, variate_set_type, tag::covariate1>(relative)>, double >
+ acc1( right_tail_cache_size = c );
+ accumulator_set<double, stats<tag::weighted_tail_variate_means<right, variate_set_type, tag::covariate1>(absolute)>, double >
+ acc2( right_tail_cache_size = c );
+ accumulator_set<double, stats<tag::weighted_tail_variate_means<left, variate_set_type, tag::covariate1>(relative)>, double >
+ acc3( left_tail_cache_size = c );
+ accumulator_set<double, stats<tag::weighted_tail_variate_means<left, variate_set_type, tag::covariate1>(absolute)>, double >
+ acc4( left_tail_cache_size = c );
+
+ variate_set_type cov1, cov2, cov3, cov4, cov5;
+ double c1[] = { 10., 20., 30., 40. }; // 100
+ double c2[] = { 26., 4., 17., 3. }; // 50
+ double c3[] = { 46., 64., 40., 50. }; // 200
+ double c4[] = { 1., 3., 70., 6. }; // 80
+ double c5[] = { 2., 2., 2., 14. }; // 20
+ cov1.assign(c1, c1 + sizeof(c1)/sizeof(variate_type));
+ cov2.assign(c2, c2 + sizeof(c2)/sizeof(variate_type));
+ cov3.assign(c3, c3 + sizeof(c3)/sizeof(variate_type));
+ cov4.assign(c4, c4 + sizeof(c4)/sizeof(variate_type));
+ cov5.assign(c5, c5 + sizeof(c5)/sizeof(variate_type));
+
+ acc1(100., weight = 0.8, covariate1 = cov1);
+ acc1( 50., weight = 0.9, covariate1 = cov2);
+ acc1(200., weight = 1.0, covariate1 = cov3);
+ acc1( 80., weight = 1.1, covariate1 = cov4);
+ acc1( 20., weight = 1.2, covariate1 = cov5);
+
+ acc2(100., weight = 0.8, covariate1 = cov1);
+ acc2( 50., weight = 0.9, covariate1 = cov2);
+ acc2(200., weight = 1.0, covariate1 = cov3);
+ acc2( 80., weight = 1.1, covariate1 = cov4);
+ acc2( 20., weight = 1.2, covariate1 = cov5);
+
+ acc3(100., weight = 0.8, covariate1 = cov1);
+ acc3( 50., weight = 0.9, covariate1 = cov2);
+ acc3(200., weight = 1.0, covariate1 = cov3);
+ acc3( 80., weight = 1.1, covariate1 = cov4);
+ acc3( 20., weight = 1.2, covariate1 = cov5);
+
+ acc4(100., weight = 0.8, covariate1 = cov1);
+ acc4( 50., weight = 0.9, covariate1 = cov2);
+ acc4(200., weight = 1.0, covariate1 = cov3);
+ acc4( 80., weight = 1.1, covariate1 = cov4);
+ acc4( 20., weight = 1.2, covariate1 = cov5);
+
+ // check relative risk contributions
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.7).begin() ), (0.8*10 + 1.0*46)/(0.8*100 + 1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.7).begin() + 1), (0.8*20 + 1.0*64)/(0.8*100 + 1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.7).begin() + 2), (0.8*30 + 1.0*40)/(0.8*100 + 1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.7).begin() + 3), (0.8*40 + 1.0*50)/(0.8*100 + 1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.3).begin() ), (0.9*26 + 1.2*2)/(0.9*50 + 1.2*20) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.3).begin() + 1), (0.9*4 + 1.2*2)/(0.9*50 + 1.2*20) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.3).begin() + 2), (0.9*17 + 1.2*2)/(0.9*50 + 1.2*20) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.3).begin() + 3), (0.9*3 + 1.2*14)/(0.9*50 + 1.2*20) );
+
+ // check absolute risk contributions
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.7).begin() ), (0.8*10 + 1.0*46)/1.8 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.7).begin() + 1), (0.8*20 + 1.0*64)/1.8 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.7).begin() + 2), (0.8*30 + 1.0*40)/1.8 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.7).begin() + 3), (0.8*40 + 1.0*50)/1.8 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.3).begin() ), (0.9*26 + 1.2*2)/2.1 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.3).begin() + 1), (0.9*4 + 1.2*2)/2.1 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.3).begin() + 2), (0.9*17 + 1.2*2)/2.1 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.3).begin() + 3), (0.9*3 + 1.2*14)/2.1 );
+
+ // check relative risk contributions
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.9).begin() ), 1.0*46/(1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.9).begin() + 1), 1.0*64/(1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.9).begin() + 2), 1.0*40/(1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc1, quantile_probability = 0.9).begin() + 3), 1.0*50/(1.0*200) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.1).begin() ), 1.2*2/(1.2*20) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.1).begin() + 1), 1.2*2/(1.2*20) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.1).begin() + 2), 1.2*2/(1.2*20) );
+ BOOST_CHECK_EQUAL( *(relative_weighted_tail_variate_means(acc3, quantile_probability = 0.1).begin() + 3), 1.2*14/(1.2*20) );
+
+ // check absolute risk contributions
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.9).begin() ), 1.0*46/1.0 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.9).begin() + 1), 1.0*64/1.0 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.9).begin() + 2), 1.0*40/1.0 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc2, quantile_probability = 0.9).begin() + 3), 1.0*50/1.0 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.1).begin() ), 1.2*2/1.2 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.1).begin() + 1), 1.2*2/1.2 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.1).begin() + 2), 1.2*2/1.2 );
+ BOOST_CHECK_EQUAL( *(weighted_tail_variate_means(acc4, quantile_probability = 0.1).begin() + 3), 1.2*14/1.2 );
+
+[*See also]
+
+* [classref boost::accumulators::impl::weighted_tail_variate_means_impl [^weighted_tail_variate_means_impl]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.non_coherent_weighted_tail_mean [^non_coherent_weighted_tail_mean]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.tail_variate [^tail_variate]]
+* [link accumulators.user_s_guide.the_statistical_accumulators_library.tail [^tail]]
+
+[endsect]
+
 [section:weighted_variance weighted_variance ['and variants]]
 
 Lazy or iterative calculation of the weighted variance. The lazy calculation is associated with the `tag::lazy_weighted_variance`
@@ -3118,6 +3788,11 @@
     [[Extractor Complexity] [O(1)]]
 ]
 
+[*Header]
+[def _WEIGHTED_VARIANCE_HPP_ [headerref boost/accumulators/statistics/weighted_variance.hpp]]
+
+ #include <_WEIGHTED_VARIANCE_HPP_>
+
 [*Example]
 
     // lazy weighted_variance

Modified: branches/CMake/release/libs/graph/doc/topological_sort.html
==============================================================================
--- branches/CMake/release/libs/graph/doc/topological_sort.html (original)
+++ branches/CMake/release/libs/graph/doc/topological_sort.html 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -45,7 +45,8 @@
 IN: <tt>VertexListGraph&amp; g</tt>
 <blockquote>
   A directed acylic graph (DAG). The graph type must
- be a model of Vertex List Graph.
+ be a model of Vertex List Graph
+ and Incidence Graph.
   If the graph is not a DAG then a not_a_dag
   exception will be thrown and the
   user should discard the contents of <tt>result</tt> range.<br>

Modified: branches/CMake/release/libs/mpi/doc/mpi.qbk
==============================================================================
--- branches/CMake/release/libs/mpi/doc/mpi.qbk (original)
+++ branches/CMake/release/libs/mpi/doc/mpi.qbk 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -29,10 +29,6 @@
 [def _LAM_ [@http://www.lam-mpi.org/ LAM/MPI]]
 [def _MPICH_ [@http://www-unix.mcs.anl.gov/mpi/mpich/ MPICH]]
 [def _OpenMPI_ [@http://www.open-mpi.org OpenMPI]]
-[def _boost_cvs_ [@http://sourceforge.net/cvs/?group_id=7586
- Boost CVS Repository]]
-[def _sandbox_cvs_ [@http://sourceforge.net/cvs/?group_id=53513
- Boost Sandbox CVS Repository]]
 [def _accumulate_ [@http://www.sgi.com/tech/stl/accumulate.html
                      `accumulate`]]
 
@@ -163,21 +159,6 @@
 appears to be working with a C++ compiler and we're ready to move on.
 [endsect]
 
-[section:getting Getting Boost.MPI]
-
-Boost.MPI is not available in any version of Boost prior to the 1.35.x
-series. You may need to retrieve the
-latest version of Boost from CVS using the commands below. When CVS
-asks for a password, just hit "enter".
-
-[pre
-cvs -d:pserver:anonymous_at_[hidden]:/cvsroot/boost login
-cvs -z3 -d:pserver:anonymous_at_[hidden]:/cvsroot/boost \
- co -P boost
-]
-
-[endsect]
-
 [section:config Configure and Build]
 
 Boost.MPI uses version 2 of the

Modified: branches/CMake/release/libs/unordered/doc/hash_equality.qbk
==============================================================================
--- branches/CMake/release/libs/unordered/doc/hash_equality.qbk (original)
+++ branches/CMake/release/libs/unordered/doc/hash_equality.qbk 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -23,8 +23,8 @@
 [import src_code/dictionary.cpp]
 [case_sensitive_dictionary_fnv]
 
-An example implementation of FNV-1, and some other hash functions are supplied
-in the examples directory.
+There is an [@../../libs/unordered/examples/fnv1.hpp implementation
+of FNV-1] in the examples directory.
 
 If you wish to use a different equality function,
 you will also need to use a matching hash function. For

Modified: branches/CMake/release/libs/unordered/doc/ref.xml
==============================================================================
--- branches/CMake/release/libs/unordered/doc/ref.xml (original)
+++ branches/CMake/release/libs/unordered/doc/ref.xml 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -181,7 +181,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -928,7 +928,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -1685,7 +1685,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -2483,7 +2483,7 @@
               <para>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</para>
             </description>
           </constructor>
- <constructor>
+ <constructor specifiers="explicit">
             <parameter name="a">
               <paramtype>Allocator const&amp;</paramtype>
             </parameter>
@@ -3062,4 +3062,4 @@
         </class>
       </namespace>
     </header>
- </library-reference>
\ No newline at end of file
+ </library-reference>

Modified: branches/CMake/release/libs/unordered/doc/src_code/dictionary.cpp
==============================================================================
--- branches/CMake/release/libs/unordered/doc/src_code/dictionary.cpp (original)
+++ branches/CMake/release/libs/unordered/doc/src_code/dictionary.cpp 2008-07-06 22:35:25 EDT (Sun, 06 Jul 2008)
@@ -6,7 +6,7 @@
 #include <boost/unordered_map.hpp>
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/algorithm/string/predicate.hpp>
-#include "../../examples/hash_functions/fnv-1.hpp"
+#include "../../examples/fnv1.hpp"
 
 //[case_insensitive_functions
     struct iequal_to


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk