Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-01-07 14:08:19


Author: eric_niebler
Date: 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
New Revision: 42571
URL: http://svn.boost.org/trac/boost/changeset/42571

Log:
add missing includes, fix signed/unsigned warnings, clean-up trailing whitespace, fixes #1552
Text files modified:
   trunk/boost/accumulators/framework/accumulator_set.hpp | 4
   trunk/boost/accumulators/framework/accumulators/droppable_accumulator.hpp | 7 +-
   trunk/boost/accumulators/framework/accumulators/reference_accumulator.hpp | 2
   trunk/boost/accumulators/framework/accumulators/value_accumulator.hpp | 2
   trunk/boost/accumulators/framework/depends_on.hpp | 8 +-
   trunk/boost/accumulators/framework/extractor.hpp | 2
   trunk/boost/accumulators/statistics/covariance.hpp | 24 ++++----
   trunk/boost/accumulators/statistics/density.hpp | 58 ++++++++++----------
   trunk/boost/accumulators/statistics/extended_p_square.hpp | 18 +++---
   trunk/boost/accumulators/statistics/extended_p_square_quantile.hpp | 42 +++++++-------
   trunk/boost/accumulators/statistics/kurtosis.hpp | 20 +++---
   trunk/boost/accumulators/statistics/median.hpp | 42 +++++++-------
   trunk/boost/accumulators/statistics/moment.hpp | 2
   trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp | 56 ++++++++++----------
   trunk/boost/accumulators/statistics/p_square_quantile.hpp | 16 ++--
   trunk/boost/accumulators/statistics/peaks_over_threshold.hpp | 108 ++++++++++++++++++++-------------------
   trunk/boost/accumulators/statistics/pot_quantile.hpp | 22 ++++----
   trunk/boost/accumulators/statistics/pot_tail_mean.hpp | 24 ++++----
   trunk/boost/accumulators/statistics/skewness.hpp | 16 ++--
   trunk/boost/accumulators/statistics/sum.hpp | 4
   trunk/boost/accumulators/statistics/tail.hpp | 8 +-
   trunk/boost/accumulators/statistics/tail_mean.hpp | 58 ++++++++++----------
   trunk/boost/accumulators/statistics/tail_quantile.hpp | 25 ++++----
   trunk/boost/accumulators/statistics/tail_variate.hpp | 4
   trunk/boost/accumulators/statistics/tail_variate_means.hpp | 64 +++++++++++-----------
   trunk/boost/accumulators/statistics/times2_iterator.hpp | 2
   trunk/boost/accumulators/statistics/variance.hpp | 30 +++++-----
   trunk/boost/accumulators/statistics/weighted_covariance.hpp | 18 +++---
   trunk/boost/accumulators/statistics/weighted_density.hpp | 54 ++++++++++----------
   trunk/boost/accumulators/statistics/weighted_extended_p_square.hpp | 52 +++++++++---------
   trunk/boost/accumulators/statistics/weighted_kurtosis.hpp | 24 ++++----
   trunk/boost/accumulators/statistics/weighted_mean.hpp | 6 +-
   trunk/boost/accumulators/statistics/weighted_median.hpp | 34 ++++++------
   trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp | 64 +++++++++++-----------
   trunk/boost/accumulators/statistics/weighted_p_square_quantile.hpp | 58 ++++++++++----------
   trunk/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp | 44 ++++++++--------
   trunk/boost/accumulators/statistics/weighted_skewness.hpp | 14 ++--
   trunk/boost/accumulators/statistics/weighted_sum.hpp | 8 +-
   trunk/boost/accumulators/statistics/weighted_tail_mean.hpp | 38 +++++++-------
   trunk/boost/accumulators/statistics/weighted_tail_quantile.hpp | 26 ++++----
   trunk/boost/accumulators/statistics/weighted_tail_variate_means.hpp | 66 ++++++++++++------------
   trunk/boost/accumulators/statistics/weighted_variance.hpp | 20 +++---
   trunk/boost/accumulators/statistics_fwd.hpp | 62 +++++++++++-----------
   43 files changed, 631 insertions(+), 625 deletions(-)

Modified: trunk/boost/accumulators/framework/accumulator_set.hpp
==============================================================================
--- trunk/boost/accumulators/framework/accumulator_set.hpp (original)
+++ trunk/boost/accumulators/framework/accumulator_set.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -317,9 +317,9 @@
     {
         // You can only drop the features that you have specified explicitly
         typedef typename apply<Feature>::type the_accumulator;
- BOOST_MPL_ASSERT((detail::contains_feature_of<Features, the_accumulator>));
+ BOOST_MPL_ASSERT((detail::contains_feature_of<Features, the_accumulator>));
 
- typedef
+ typedef
             typename feature_of<typename as_feature<Feature>::type>::type
         the_feature;
 

Modified: trunk/boost/accumulators/framework/accumulators/droppable_accumulator.hpp
==============================================================================
--- trunk/boost/accumulators/framework/accumulators/droppable_accumulator.hpp (original)
+++ trunk/boost/accumulators/framework/accumulators/droppable_accumulator.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -13,6 +13,7 @@
 #include <boost/mpl/apply.hpp>
 #include <boost/aligned_storage.hpp>
 #include <boost/accumulators/framework/depends_on.hpp> // for feature_of
+#include <boost/accumulators/framework/parameters/accumulator.hpp> // for accumulator
 
 namespace boost { namespace accumulators
 {
@@ -41,7 +42,7 @@
                 acc.add_ref(this->args_);
 
                 // Also add_ref accumulators that this feature depends on
- this->args_[accumulator].template
+ this->args_[accumulator].template
                     visit_if<detail::contains_feature_of_<dependencies> >(
                         *this
                 );
@@ -77,7 +78,7 @@
 
                     acc.drop(this->args_);
                     // Also drop accumulators that this feature depends on
- this->args_[accumulator].template
+ this->args_[accumulator].template
                         visit_if<detail::contains_feature_of_<dependencies> >(
                             *this
                     );
@@ -257,7 +258,7 @@
             typedef typename as_feature<Feature>::type feature_type;
             typedef typename feature_type::dependencies tmp_dependencies_;
 
- typedef
+ typedef
                 typename mpl::transform<
                     typename feature_type::dependencies
                   , as_droppable<mpl::_1>

Modified: trunk/boost/accumulators/framework/accumulators/reference_accumulator.hpp
==============================================================================
--- trunk/boost/accumulators/framework/accumulators/reference_accumulator.hpp (original)
+++ trunk/boost/accumulators/framework/accumulators/reference_accumulator.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -75,7 +75,7 @@
 using extract::reference;
 using extract::reference_tag;
 
-// Map all reference<V,T> features to reference_tag<T> so
+// Map all reference<V,T> features to reference_tag<T> so
 // that references can be extracted using reference_tag<T>
 // without specifying the referent type.
 template<typename ValueType, typename Tag>

Modified: trunk/boost/accumulators/framework/accumulators/value_accumulator.hpp
==============================================================================
--- trunk/boost/accumulators/framework/accumulators/value_accumulator.hpp (original)
+++ trunk/boost/accumulators/framework/accumulators/value_accumulator.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -75,7 +75,7 @@
 using extract::value;
 using extract::value_tag;
 
-// Map all value<V,T> features to value_tag<T> so
+// Map all value<V,T> features to value_tag<T> so
 // that values can be extracted using value_tag<T>
 // without specifying the value type.
 template<typename ValueType, typename Tag>

Modified: trunk/boost/accumulators/framework/depends_on.hpp
==============================================================================
--- trunk/boost/accumulators/framework/depends_on.hpp (original)
+++ trunk/boost/accumulators/framework/depends_on.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -67,7 +67,7 @@
         typedef Feature type;
     };
 
- namespace detail
+ namespace detail
     {
         ///////////////////////////////////////////////////////////////////////////
         // feature_tag
@@ -165,7 +165,7 @@
         };
 
         // This is to work around a bug in early versions of Fusion which caused
- // a compile error if contains_feature_of<List, mpl::_> is used as a
+ // a compile error if contains_feature_of<List, mpl::_> is used as a
         // predicate to fusion::find_if
         template<typename Features>
         struct contains_feature_of_
@@ -187,7 +187,7 @@
         struct build_acc_list<First, Last, true>
         {
             typedef fusion::nil type;
-
+
             template<typename Args>
             static fusion::nil
             call(Args const &, First const&, Last const&)
@@ -205,7 +205,7 @@
 
             typedef fusion::cons<
                 typename fusion::result_of::value_of<First>::type
- , typename next_build_acc_list::type>
+ , typename next_build_acc_list::type>
             type;
 
             template<typename Args>

Modified: trunk/boost/accumulators/framework/extractor.hpp
==============================================================================
--- trunk/boost/accumulators/framework/extractor.hpp (original)
+++ trunk/boost/accumulators/framework/extractor.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -99,7 +99,7 @@
     typename detail::extractor_result<Arg1, Feature>::type
     operator ()(Arg1 const &arg1) const
     {
- // Arg1 could be an accumulator_set or an argument pack containing
+ // Arg1 could be an accumulator_set or an argument pack containing
         // an accumulator_set. Dispatch accordingly.
         return detail::do_extract<Feature>(arg1, detail::is_accumulator_set<Arg1>());
     }

Modified: trunk/boost/accumulators/statistics/covariance.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/covariance.hpp (original)
+++ trunk/boost/accumulators/statistics/covariance.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -62,7 +62,7 @@
>
>
         {
- typedef
+ typedef
                 ublas::matrix<
                     typename functional::multiplies<
                         typename Left::value_type
@@ -78,7 +78,7 @@
                 std::size_t right_size = right.size();
                 result_type result(left_size, right_size);
                 for (std::size_t i = 0; i < left_size; ++i)
- for (std::size_t j = 0; j < right_size; ++j)
+ for (std::size_t j = 0; j < right_size; ++j)
                         result(i,j) = numeric::multiplies(left[i], right[j]);
                 return result;
             }
@@ -110,13 +110,13 @@
     /**
         @brief Covariance Estimator
 
- An iterative Monte Carlo estimator for the covariance \f$\mathrm{Cov}(X,X')\f$, where \f$X\f$ is a sample
+ An iterative Monte Carlo estimator for the covariance \f$\mathrm{Cov}(X,X')\f$, where \f$X\f$ is a sample
         and \f$X'\f$ is a variate, is given by:
 
         \f[
             \hat{c}_n = \frac{n-1}{n} \hat{c}_{n-1} + \frac{1}{n-1}(X_n - \hat{\mu}_n)(X_n' - \hat{\mu}_n'),\quad n\ge2,\quad\hat{c}_1 = 0,
         \f]
-
+
         \f$\hat{\mu}_n\f$ and \f$\hat{\mu}_n'\f$ being the means of the samples and variates.
     */
     template<typename Sample, typename VariateType, typename VariateTag>
@@ -127,7 +127,7 @@
         typedef typename numeric::functional::average<VariateType, std::size_t>::result_type variate_type;
         // for boost::result_of
         typedef typename numeric::functional::outer_product<sample_type, variate_type>::result_type result_type;
-
+
         template<typename Args>
         covariance_impl(Args const &args)
           : cov_(
@@ -138,16 +138,16 @@
             )
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             std::size_t cnt = count(args);
-
+
             if (cnt > 1)
             {
                 extractor<tag::mean_of_variates<VariateType, VariateTag> > const some_mean_of_variates = {};
-
+
                 this->cov_ = this->cov_*(cnt-1.)/cnt
                            + numeric::outer_product(
                                  some_mean_of_variates(args) - args[parameter::keyword<VariateTag>::get()]
@@ -164,7 +164,7 @@
     private:
         result_type cov_;
     };
-
+
 } // namespace impl
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -177,9 +177,9 @@
       : depends_on<count, mean, mean_of_variates<VariateType, VariateTag> >
     {
         typedef accumulators::impl::covariance_impl<mpl::_1, VariateType, VariateTag> impl;
- };
-
- struct abstract_covariance
+ };
+
+ struct abstract_covariance
       : depends_on<>
     {
     };

Modified: trunk/boost/accumulators/statistics/density.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/density.hpp (original)
+++ trunk/boost/accumulators/statistics/density.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -35,23 +35,23 @@
 BOOST_PARAMETER_NESTED_KEYWORD(tag, density_num_bins, num_bins)
 
 namespace impl
-{
+{
     ///////////////////////////////////////////////////////////////////////////////
     // density_impl
     // density histogram
     /**
         @brief Histogram density estimator
 
- The histogram density estimator returns a histogram of the sample distribution. The positions and sizes of the bins
- are determined using a specifiable number of cached samples (cache_size). The range between the minimum and the
- maximum of the cached samples is subdivided into a specifiable number of bins (num_bins) of same size. Additionally,
- an under- and an overflow bin is added to capture future under- and overflow samples. Once the bins are determined,
- the cached samples and all subsequent samples are added to the correct bins. At the end, a range of std::pair is
- return, where each pair contains the position of the bin (lower bound) and the samples count (normalized with the
+ The histogram density estimator returns a histogram of the sample distribution. The positions and sizes of the bins
+ are determined using a specifiable number of cached samples (cache_size). The range between the minimum and the
+ maximum of the cached samples is subdivided into a specifiable number of bins (num_bins) of same size. Additionally,
+ an under- and an overflow bin is added to capture future under- and overflow samples. Once the bins are determined,
+ the cached samples and all subsequent samples are added to the correct bins. At the end, a range of std::pair is
+ return, where each pair contains the position of the bin (lower bound) and the samples count (normalized with the
         total number of samples).
-
+
         @param density_cache_size Number of first samples used to determine min and max.
- @param density_num_bins Number of bins (two additional bins collect under- and overflow samples).
+ @param density_num_bins Number of bins (two additional bins collect under- and overflow samples).
     */
     template<typename Sample>
     struct density_impl
@@ -62,7 +62,7 @@
         typedef std::vector<float_type> array_type;
         // for boost::result_of
         typedef iterator_range<typename histogram_type::iterator> result_type;
-
+
         template<typename Args>
         density_impl(Args const &args)
             : cache_size(args[density_cache_size])
@@ -80,35 +80,35 @@
             , is_dirty(true)
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             this->is_dirty = true;
-
+
             std::size_t cnt = count(args);
-
+
             // Fill up cache with cache_size first samples
             if (cnt <= this->cache_size)
             {
                 this->cache[cnt - 1] = args[sample];
             }
-
- // Once cache_size samples have been accumulated, create num_bins bins of same size between
- // the minimum and maximum of the cached samples as well as an under- and and an overflow bin.
+
+ // Once cache_size samples have been accumulated, create num_bins bins of same size between
+ // the minimum and maximum of the cached samples as well as an under- and and an overflow bin.
             // Store their lower bounds (bin_positions) and fill the bins with the cached samples (samples_in_bin).
             if (cnt == this->cache_size)
             {
                 float_type minimum = numeric::average((min)(args), (std::size_t)1);
                 float_type maximum = numeric::average((max)(args), (std::size_t)1);
- float_type bin_size = numeric::average(maximum - minimum, this->num_bins );
-
+ float_type bin_size = numeric::average(maximum - minimum, this->num_bins );
+
                 // determine bin positions (their lower bounds)
- for (std::size_t i = 0; i < this->num_bins + 2; ++i)
+ for (std::size_t i = 0; i < this->num_bins + 2; ++i)
                 {
                     this->bin_positions[i] = minimum + (i - 1.) * bin_size;
                 }
-
+
                 for (typename array_type::const_iterator iter = this->cache.begin(); iter != this->cache.end(); ++iter)
                 {
                     if (*iter < this->bin_positions[1])
@@ -118,7 +118,7 @@
                     else if (*iter >= this->bin_positions[this->num_bins + 1])
                     {
                         ++(this->samples_in_bin[this->num_bins + 1]);
- }
+ }
                     else
                     {
                         typename array_type::iterator it = std::upper_bound(
@@ -126,7 +126,7 @@
                           , this->bin_positions.end()
                           , *iter
                         );
-
+
                         std::size_t d = std::distance(this->bin_positions.begin(), it);
                         ++(this->samples_in_bin[d - 1]);
                     }
@@ -150,11 +150,11 @@
                       , this->bin_positions.end()
                       , args[sample]
                     );
-
+
                     std::size_t d = std::distance(this->bin_positions.begin(), it);
                     ++(this->samples_in_bin[d - 1]);
                 }
- }
+ }
         }
 
         template<typename Args>
@@ -163,17 +163,17 @@
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 // creates a vector of std::pair where each pair i holds
                 // the values bin_positions[i] (x-axis of histogram) and
                 // samples_in_bin[i] / cnt (y-axis of histogram).
-
+
                 for (std::size_t i = 0; i < this->num_bins + 2; ++i)
                 {
                     this->histogram[i] = std::make_pair(this->bin_positions[i], numeric::average(this->samples_in_bin[i], count(args)));
                 }
             }
- // returns a range of pairs
+ // returns a range of pairs
             return make_iterator_range(this->histogram);
         }
 
@@ -202,7 +202,7 @@
         /// INTERNAL ONLY
         ///
         typedef accumulators::impl::density_impl<mpl::_1> impl;
-
+
         #ifdef BOOST_ACCUMULATORS_DOXYGEN_INVOKED
         /// tag::density::cache_size named parameter
         /// tag::density::num_bins named parameter
@@ -222,7 +222,7 @@
 
 using extract::density;
 
-// So that density can be automatically substituted
+// So that density can be automatically substituted
 // with weighted_density when the weight parameter is non-void.
 template<>
 struct as_weighted_feature<tag::density>

Modified: trunk/boost/accumulators/statistics/extended_p_square.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/extended_p_square.hpp (original)
+++ trunk/boost/accumulators/statistics/extended_p_square.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -43,15 +43,15 @@
         @brief Multiple quantile estimation with the extended \f$P^2\f$ algorithm
 
         Extended \f$P^2\f$ algorithm for estimation of several quantiles without storing samples.
- Assume that \f$m\f$ quantiles \f$\xi_{p_1}, \ldots, \xi_{p_m}\f$ are to be estimated.
- Instead of storing the whole sample cumulative distribution, the algorithm maintains only
- \f$m+2\f$ principal markers and \f$m+1\f$ middle markers, whose positions are updated
- with each sample and whose heights are adjusted (if necessary) using a piecewise-parablic
- formula. The heights of these central markers are the current estimates of the quantiles
+ Assume that \f$m\f$ quantiles \f$\xi_{p_1}, \ldots, \xi_{p_m}\f$ are to be estimated.
+ Instead of storing the whole sample cumulative distribution, the algorithm maintains only
+ \f$m+2\f$ principal markers and \f$m+1\f$ middle markers, whose positions are updated
+ with each sample and whose heights are adjusted (if necessary) using a piecewise-parablic
+ formula. The heights of these central markers are the current estimates of the quantiles
         and returned as an iterator range.
 
         For further details, see
-
+
         K. E. E. Raatikainen, Simultaneous estimation of several quantiles, Simulation, Volume 49,
         Number 4 (October), 1986, p. 159-164.
 
@@ -78,7 +78,7 @@
>
>
> result_type;
-
+
         template<typename Args>
         extended_p_square_impl(Args const &args)
           : probabilities(
@@ -125,7 +125,7 @@
 
             // m+2 principal markers and m+1 middle markers
             std::size_t num_markers = 2 * this->probabilities.size() + 3;
-
+
             // first accumulate num_markers samples
             if(cnt <= num_markers)
             {
@@ -273,7 +273,7 @@
 
 using extract::extended_p_square;
 
-// So that extended_p_square can be automatically substituted with
+// So that extended_p_square can be automatically substituted with
 // weighted_extended_p_square when the weight parameter is non-void
 template<>
 struct as_weighted_feature<tag::extended_p_square>

Modified: trunk/boost/accumulators/statistics/extended_p_square_quantile.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/extended_p_square_quantile.hpp (original)
+++ trunk/boost/accumulators/statistics/extended_p_square_quantile.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -42,7 +42,7 @@
     /**
         @brief Quantile estimation using the extended \f$P^2\f$ algorithm for weighted and unweighted samples
 
- Uses the quantile estimates calculated by the extended \f$P^2\f$ algorithm to compute
+ Uses the quantile estimates calculated by the extended \f$P^2\f$ algorithm to compute
         intermediate quantile estimates by means of quadratic interpolation.
 
         @param quantile_probability The probability of the quantile to be estimated.
@@ -63,7 +63,7 @@
> range_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         template<typename Args>
         extended_p_square_quantile_impl(Args const &args)
           : probabilities(
@@ -83,18 +83,18 @@
                   , tag::extended_p_square
>::type
             extended_p_square_tag;
-
+
             extractor<extended_p_square_tag> const some_extended_p_square = {};
-
+
             array_type heights(some_extended_p_square(args).size());
             std::copy(some_extended_p_square(args).begin(), some_extended_p_square(args).end(), heights.begin());
 
             this->probability = args[quantile_probability];
-
+
             typename array_type::const_iterator iter_probs = std::lower_bound(this->probabilities.begin(), this->probabilities.end(), this->probability);
             std::size_t dist = std::distance(this->probabilities.begin(), iter_probs);
             typename array_type::const_iterator iter_heights = heights.begin() + dist;
-
+
             // If this->probability is not in a valid range return NaN or throw exception
             if (this->probability < *this->probabilities.begin() || this->probability > *(this->probabilities.end() - 1))
             {
@@ -112,7 +112,7 @@
                 }
 
             }
-
+
             if (*iter_probs == this->probability)
             {
                 return heights[dist];
@@ -120,7 +120,7 @@
             else
             {
                 result_type result;
-
+
                 if (is_same<Impl2, linear>::value)
                 {
                     /////////////////////////////////////////////////////////////////////////////////
@@ -130,10 +130,10 @@
                     float_type p0 = *(iter_probs - 1);
                     float_type h1 = *iter_heights;
                     float_type h0 = *(iter_heights - 1);
-
+
                     float_type a = numeric::average(h1 - h0, p1 - p0);
                     float_type b = h1 - p1 * a;
-
+
                     result = a * this->probability + b;
                 }
                 else
@@ -143,7 +143,7 @@
                     //
                     float_type p0, p1, p2;
                     float_type h0, h1, h2;
-
+
                     if ( (dist == 1 || *iter_probs - this->probability <= this->probability - *(iter_probs - 1) ) && dist != this->probabilities.size() - 1 )
                     {
                         p0 = *(iter_probs - 1);
@@ -162,28 +162,28 @@
                         h1 = *(iter_heights - 1);
                         h2 = *iter_heights;
                     }
-
+
                     float_type hp21 = numeric::average(h2 - h1, p2 - p1);
                     float_type hp10 = numeric::average(h1 - h0, p1 - p0);
                     float_type p21 = numeric::average(p2 * p2 - p1 * p1, p2 - p1);
                     float_type p10 = numeric::average(p1 * p1 - p0 * p0, p1 - p0);
-
+
                     float_type a = numeric::average(hp21 - hp10, p21 - p10);
                     float_type b = hp21 - a * p21;
                     float_type c = h2 - a * p2 * p2 - b * p2;
-
+
                     result = a * this->probability * this-> probability + b * this->probability + c;
                 }
-
+
                 return result;
             }
-
+
         }
     private:
-
+
         array_type probabilities;
         mutable float_type probability;
-
+
     };
 
 } // namespace impl
@@ -261,7 +261,7 @@
 };
 
 // for the purposes of feature-based dependency resolution,
-// extended_p_square_quantile and weighted_extended_p_square_quantile
+// extended_p_square_quantile and weighted_extended_p_square_quantile
 // provide the same feature as quantile
 template<>
 struct feature_of<tag::extended_p_square_quantile>
@@ -273,7 +273,7 @@
   : feature_of<tag::quantile>
 {
 };
-// So that extended_p_square_quantile can be automatically substituted with
+// So that extended_p_square_quantile can be automatically substituted with
 // weighted_extended_p_square_quantile when the weight parameter is non-void
 template<>
 struct as_weighted_feature<tag::extended_p_square_quantile>
@@ -287,7 +287,7 @@
 {
 };
 
-// So that extended_p_square_quantile_quadratic can be automatically substituted with
+// So that extended_p_square_quantile_quadratic can be automatically substituted with
 // weighted_extended_p_square_quantile_quadratic when the weight parameter is non-void
 template<>
 struct as_weighted_feature<tag::extended_p_square_quantile_quadratic>

Modified: trunk/boost/accumulators/statistics/kurtosis.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/kurtosis.hpp (original)
+++ trunk/boost/accumulators/statistics/kurtosis.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -28,18 +28,18 @@
     /**
         @brief Kurtosis estimation
 
- The kurtosis of a sample distribution is defined as the ratio of the 4th central moment and the square of the 2nd central
- moment (the variance) of the samples, minus 3. The term \f$ -3 \f$ is added in order to ensure that the normal distribution
+ The kurtosis of a sample distribution is defined as the ratio of the 4th central moment and the square of the 2nd central
+ moment (the variance) of the samples, minus 3. The term \f$ -3 \f$ is added in order to ensure that the normal distribution
         has zero kurtosis. The kurtosis can also be expressed by the simple moments:
-
+
         \f[
- \hat{g}_2 =
+ \hat{g}_2 =
                 \frac
                 {\widehat{m}_n^{(4)}-4\widehat{m}_n^{(3)}\hat{\mu}_n+6\widehat{m}_n^{(2)}\hat{\mu}_n^2-3\hat{\mu}_n^4}
                 {\left(\widehat{m}_n^{(2)} - \hat{\mu}_n^{2}\right)^2} - 3,
         \f]
-
- where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
+
+ where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
         \f$ n \f$ samples.
     */
     template<typename Sample>
@@ -57,10 +57,10 @@
             return numeric::average(
                         moment<4>(args)
                         - 4. * moment<3>(args) * mean(args)
- + 6. * moment<2>(args) * mean(args) * mean(args)
+ + 6. * moment<2>(args) * mean(args) * mean(args)
                         - 3. * mean(args) * mean(args) * mean(args) * mean(args)
- , ( moment<2>(args) - mean(args) * mean(args) )
- * ( moment<2>(args) - mean(args) * mean(args) )
+ , ( moment<2>(args) - mean(args) * mean(args) )
+ * ( moment<2>(args) - mean(args) * mean(args) )
                     ) - 3.;
         }
     };
@@ -91,7 +91,7 @@
 
 using extract::kurtosis;
 
-// So that kurtosis can be automatically substituted with
+// So that kurtosis can be automatically substituted with
 // weighted_kurtosis when the weight parameter is non-void
 template<>
 struct as_weighted_feature<tag::kurtosis>

Modified: trunk/boost/accumulators/statistics/median.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/median.hpp (original)
+++ trunk/boost/accumulators/statistics/median.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -31,7 +31,7 @@
     //
     /**
         @brief Median estimation based on the \f$P^2\f$ quantile estimator
-
+
         The \f$P^2\f$ algorithm is invoked with a quantile probability of 0.5.
     */
     template<typename Sample>
@@ -40,9 +40,9 @@
     {
         // for boost::result_of
         typedef typename numeric::functional::average<Sample, std::size_t>::result_type result_type;
-
+
         median_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
@@ -54,9 +54,9 @@
     //
     /**
         @brief Median estimation based on the density estimator
-
- The algorithm determines the bin in which the \f$0.5*cnt\f$-th sample lies, \f$cnt\f$ being
- the total number of samples. It returns the approximate horizontal position of this sample,
+
+ The algorithm determines the bin in which the \f$0.5*cnt\f$-th sample lies, \f$cnt\f$ being
+ the total number of samples. It returns the approximate horizontal position of this sample,
         based on a linear interpolation inside the bin.
     */
     template<typename Sample>
@@ -68,7 +68,7 @@
         typedef iterator_range<typename histogram_type::iterator> range_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         template<typename Args>
         with_density_median_impl(Args const &args)
           : sum(numeric::average(args[sample | Sample()], (std::size_t)1))
@@ -81,14 +81,14 @@
             this->is_dirty = true;
         }
 
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 std::size_t cnt = count(args);
                 range_type histogram = density(args);
                 typename range_type::iterator it = histogram.begin();
@@ -101,7 +101,7 @@
                 float_type over = numeric::average(this->sum - 0.5 * cnt, it->second * cnt);
                 this->median = it->first * over + (it + 1)->first * (1. - over);
             }
-
+
             return this->median;
         }
 
@@ -116,9 +116,9 @@
     //
     /**
         @brief Median estimation based on the \f$P^2\f$ cumulative distribution estimator
-
- The algorithm determines the first (leftmost) bin with a height exceeding 0.5. It
- returns the approximate horizontal position of where the cumulative distribution
+
+ The algorithm determines the first (leftmost) bin with a height exceeding 0.5. It
+ returns the approximate horizontal position of where the cumulative distribution
         equals 0.5, based on a linear interpolation inside the bin.
     */
     template<typename Sample>
@@ -130,7 +130,7 @@
         typedef iterator_range<typename histogram_type::iterator> range_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         with_p_square_cumulative_distribution_median_impl(dont_care)
           : is_dirty(true)
         {
@@ -140,14 +140,14 @@
         {
             this->is_dirty = true;
         }
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 range_type histogram = p_square_cumulative_distribution(args);
                 typename range_type::iterator it = histogram.begin();
                 while (it->second < 0.5)
@@ -157,15 +157,15 @@
                 float_type over = numeric::average(it->second - 0.5, it->second - (it - 1)->second);
                 this->median = it->first * over + (it + 1)->first * ( 1. - over );
             }
-
+
             return this->median;
         }
     private:
-
+
         mutable bool is_dirty;
         mutable float_type median;
     };
-
+
 } // namespace impl
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -235,8 +235,8 @@
     typedef tag::with_p_square_cumulative_distribution_median type;
 };
 
-// for the purposes of feature-based dependency resolution,
-// with_density_median and with_p_square_cumulative_distribution_median
+// for the purposes of feature-based dependency resolution,
+// with_density_median and with_p_square_cumulative_distribution_median
 // provide the same feature as median
 template<>
 struct feature_of<tag::with_density_median>

Modified: trunk/boost/accumulators/statistics/moment.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/moment.hpp (original)
+++ trunk/boost/accumulators/statistics/moment.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -105,7 +105,7 @@
 
 using extract::moment;
 
-// So that moment<N> can be automatically substituted with
+// So that moment<N> can be automatically substituted with
 // weighted_moment<N> when the weight parameter is non-void
 template<int N>
 struct as_weighted_feature<tag::moment<N> >

Modified: trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp (original)
+++ trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -35,17 +35,17 @@
     /**
         @brief Histogram calculation of the cumulative distribution with the \f$P^2\f$ algorithm
 
- A histogram of the sample cumulative distribution is computed dynamically without storing samples
- based on the \f$ P^2 \f$ algorithm. The returned histogram has a specifiable amount (num_cells)
+ A histogram of the sample cumulative distribution is computed dynamically without storing samples
+ based on the \f$ P^2 \f$ algorithm. The returned histogram has a specifiable amount (num_cells)
         equiprobable (and not equal-sized) cells.
 
         For further details, see
-
- R. Jain and I. Chlamtac, The P^2 algorithmus for dynamic calculation of quantiles and
- histograms without storing observations, Communications of the ACM,
+
+ R. Jain and I. Chlamtac, The P^2 algorithmus for dynamic calculation of quantiles and
+ histograms without storing observations, Communications of the ACM,
         Volume 28 (October), Number 10, 1985, p. 1076-1085.
 
- @param p_square_cumulative_distribution_num_cells.
+ @param p_square_cumulative_distribution_num_cells.
     */
     template<typename Sample>
     struct p_square_cumulative_distribution_impl
@@ -56,7 +56,7 @@
         typedef std::vector<std::pair<float_type, float_type> > histogram_type;
         // for boost::result_of
         typedef iterator_range<typename histogram_type::iterator> result_type;
-
+
         template<typename Args>
         p_square_cumulative_distribution_impl(Args const &args)
           : num_cells(args[p_square_cumulative_distribution_num_cells])
@@ -68,20 +68,20 @@
           , is_dirty(true)
         {
             std::size_t b = this->num_cells;
-
+
             for (std::size_t i = 0; i < b + 1; ++i)
             {
                 this->actual_positions[i] = i + 1.;
                 this->desired_positions[i] = i + 1.;
                 this->positions_increments[i] = numeric::average(i, b);
- }
+ }
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             this->is_dirty = true;
-
+
             std::size_t cnt = count(args);
             std::size_t sample_cell = 1; // k
             std::size_t b = this->num_cells;
@@ -90,13 +90,13 @@
             if (cnt <= b + 1)
             {
                 this->heights[cnt - 1] = args[sample];
-
+
                 // complete the initialization of heights by sorting
                 if (cnt == b + 1)
                 {
                     std::sort(this->heights.begin(), this->heights.end());
                 }
- }
+ }
             else
             {
                 // find cell k such that heights[k-1] <= args[sample] < heights[k] and adjust extreme values
@@ -118,46 +118,46 @@
                       , this->heights.end()
                       , args[sample]
                     );
-
+
                     sample_cell = std::distance(this->heights.begin(), it);
                 }
-
+
                 // increment positions of markers above sample_cell
                 for (std::size_t i = sample_cell; i < b + 1; ++i)
                 {
                     ++this->actual_positions[i];
                 }
-
+
                 // update desired position of markers 2 to num_cells + 1
                 // (desired position of first marker is always 1)
                 for (std::size_t i = 1; i < b + 1; ++i)
                 {
                     this->desired_positions[i] += this->positions_increments[i];
                 }
-
+
                 // adjust heights of markers 2 to num_cells if necessary
                 for (std::size_t i = 1; i < b; ++i)
                 {
                     // offset to desire position
                     float_type d = this->desired_positions[i] - this->actual_positions[i];
-
+
                     // offset to next position
                     float_type dp = this->actual_positions[i + 1] - this->actual_positions[i];
-
+
                     // offset to previous position
                     float_type dm = this->actual_positions[i - 1] - this->actual_positions[i];
-
+
                     // height ds
                     float_type hp = (this->heights[i + 1] - this->heights[i]) / dp;
                     float_type hm = (this->heights[i - 1] - this->heights[i]) / dm;
-
+
                     if ( ( d >= 1. && dp > 1. ) || ( d <= -1. && dm < -1. ) )
                     {
                         short sign_d = static_cast<short>(d / std::abs(d));
-
+
                         // try adjusting heights[i] using p-squared formula
                         float_type h = this->heights[i] + sign_d / (dp - dm) * ( (sign_d - dm) * hp + (dp - sign_d) * hm );
-
+
                         if ( this->heights[i - 1] < h && h < this->heights[i + 1] )
                         {
                             this->heights[i] = h;
@@ -182,17 +182,17 @@
 
         template<typename Args>
         result_type result(Args const &args) const
- {
+ {
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 // creates a vector of std::pair where each pair i holds
                 // the values heights[i] (x-axis of histogram) and
                 // actual_positions[i] / cnt (y-axis of histogram)
-
+
                 std::size_t cnt = count(args);
-
+
                 for (std::size_t i = 0; i < this->histogram.size(); ++i)
                 {
                     this->histogram[i] = std::make_pair(this->heights[i], numeric::average(this->actual_positions[i], cnt));
@@ -239,7 +239,7 @@
 
 using extract::p_square_cumulative_distribution;
 
-// So that p_square_cumulative_distribution can be automatically substituted with
+// So that p_square_cumulative_distribution can be automatically substituted with
 // weighted_p_square_cumulative_distribution when the weight parameter is non-void
 template<>
 struct as_weighted_feature<tag::p_square_cumulative_distribution>

Modified: trunk/boost/accumulators/statistics/p_square_quantile.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/p_square_quantile.hpp (original)
+++ trunk/boost/accumulators/statistics/p_square_quantile.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -34,10 +34,10 @@
         @brief Single quantile estimation with the \f$P^2\f$ algorithm
 
         The \f$P^2\f$ algorithm estimates a quantile dynamically without storing samples. Instead of
- storing the whole sample cumulative distribution, only five points (markers) are stored. The heights
- of these markers are the minimum and the maximum of the samples and the current estimates of the
- \f$(p/2)\f$-, \f$p\f$- and \f$(1+p)/2\f$-quantiles. Their positions are equal to the number
- of samples that are smaller or equal to the markers. Each time a new samples is recorded, the
+ storing the whole sample cumulative distribution, only five points (markers) are stored. The heights
+ of these markers are the minimum and the maximum of the samples and the current estimates of the
+ \f$(p/2)\f$-, \f$p\f$- and \f$(1+p)/2\f$-quantiles. Their positions are equal to the number
+ of samples that are smaller or equal to the markers. Each time a new samples is recorded, the
         positions of the markers are updated and if necessary their heights are adjusted using a piecewise-
         parabolic formula.
 
@@ -76,7 +76,7 @@
             this->desired_positions[2] = 1. + 4. * this->p;
             this->desired_positions[3] = 3. + 2. * this->p;
             this->desired_positions[4] = 5.;
-
+
             this->positions_increments[0] = 0.;
             this->positions_increments[1] = this->p / 2.;
             this->positions_increments[2] = this->p;
@@ -103,7 +103,7 @@
             else
             {
                 std::size_t sample_cell = 1; // k
-
+
                 // find cell k such that heights[k-1] <= args[sample] < heights[k] and ajust extreme values
                 if (args[sample] < this->heights[0])
                 {
@@ -225,7 +225,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // extract::p_square_quantile
 // extract::p_square_quantile_for_median
-//
+//
 namespace extract
 {
     extractor<tag::p_square_quantile> const p_square_quantile = {};
@@ -235,7 +235,7 @@
 using extract::p_square_quantile;
 using extract::p_square_quantile_for_median;
 
-// So that p_square_quantile can be automatically substituted with
+// So that p_square_quantile can be automatically substituted with
 // weighted_p_square_quantile when the weight parameter is non-void
 template<>
 struct as_weighted_feature<tag::p_square_quantile>

Modified: trunk/boost/accumulators/statistics/peaks_over_threshold.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/peaks_over_threshold.hpp (original)
+++ trunk/boost/accumulators/statistics/peaks_over_threshold.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -12,6 +12,10 @@
 #include <limits>
 #include <numeric>
 #include <functional>
+#include <cmath> // pow
+#include <sstream> // stringstream
+#include <stdexcept> // runtime_error
+#include <boost/throw_exception.hpp>
 #include <boost/range.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/int.hpp>
@@ -39,26 +43,26 @@
 BOOST_PARAMETER_NESTED_KEYWORD(tag, pot_threshold_probability, threshold_probability)
 
 namespace impl
-{
+{
     ///////////////////////////////////////////////////////////////////////////////
     // peaks_over_threshold_impl
     // works with an explicit threshold value and does not depend on order statistics
     /**
         @brief Peaks over Threshold Method for Quantile and Tail Mean Estimation
-
- According to the theorem of Pickands-Balkema-de Haan, the distribution function \f$F_u(x)\f$ of
- the excesses \f$x\f$ over some sufficiently high threshold \f$u\f$ of a distribution function \f$F(x)\f$
+
+ According to the theorem of Pickands-Balkema-de Haan, the distribution function \f$F_u(x)\f$ of
+ the excesses \f$x\f$ over some sufficiently high threshold \f$u\f$ of a distribution function \f$F(x)\f$
         may be approximated by a generalized Pareto distribution
         \f[
             G_{\xi,\beta}(x) =
             \left\{
             \begin{array}{ll}
                 \beta^{-1}\left(1+\frac{\xi x}{\beta}\right)^{-1/\xi-1} & \textrm{if }\xi\neq0\\
- \beta^{-1}\exp\left(-\frac{x}{\beta}\right) & \textrm{if }\xi=0,
- \end{array}
+ \beta^{-1}\exp\left(-\frac{x}{\beta}\right) & \textrm{if }\xi=0,
+ \end{array}
             \right.
         \f]
- with suitable parameters \f$\xi\f$ and \f$\beta\f$ that can be estimated, e.g., with the method of moments, cf.
+ with suitable parameters \f$\xi\f$ and \f$\beta\f$ that can be estimated, e.g., with the method of moments, cf.
         Hosking and Wallis (1987),
         \f[
             \begin{array}{lll}
@@ -66,22 +70,22 @@
             \hat{\beta} & = & \frac{\hat{\mu}-u}{2}\left[\frac{(\hat{\mu}-u)^2}{\hat{\sigma}^2}+1\right],
             \end{array}
         \f]
- \f$\hat{\mu}\f$ and \f$\hat{\sigma}^2\f$ being the empirical mean and variance of the samples over
- the threshold \f$u\f$. Equivalently, the distribution function
- \f$F_u(x-u)\f$ of the exceedances \f$x-u\f$ can be approximated by
- \f$G_{\xi,\beta}(x-u)=G_{\xi,\beta,u}(x)\f$. Since for \f$x\geq u\f$ the distribution function \f$F(x)\f$
+ \f$\hat{\mu}\f$ and \f$\hat{\sigma}^2\f$ being the empirical mean and variance of the samples over
+ the threshold \f$u\f$. Equivalently, the distribution function
+ \f$F_u(x-u)\f$ of the exceedances \f$x-u\f$ can be approximated by
+ \f$G_{\xi,\beta}(x-u)=G_{\xi,\beta,u}(x)\f$. Since for \f$x\geq u\f$ the distribution function \f$F(x)\f$
         can be written as
         \f[
             F(x) = [1 - \P(X \leq u)]F_u(x - u) + \P(X \leq u)
         \f]
- and the probability \f$\P(X \leq u)\f$ can be approximated by the empirical distribution function
- \f$F_n(u)\f$ evaluated at \f$u\f$, an estimator of \f$F(x)\f$ is given by
+ and the probability \f$\P(X \leq u)\f$ can be approximated by the empirical distribution function
+ \f$F_n(u)\f$ evaluated at \f$u\f$, an estimator of \f$F(x)\f$ is given by
         \f[
             \widehat{F}(x) = [1 - F_n(u)]G_{\xi,\beta,u}(x) + F_n(u).
         \f]
- It can be shown that \f$\widehat{F}(x)\f$ is a generalized
- Pareto distribution \f$G_{\xi,\bar{\beta},\bar{u}}(x)\f$ with \f$\bar{\beta}=\beta[1-F_n(u)]^{\xi}\f$
- and \f$\bar{u}=u-\bar{\beta}\left\{[1-F_n(u)]^{-\xi}-1\right\}/\xi\f$. By inverting \f$\widehat{F}(x)\f$,
+ It can be shown that \f$\widehat{F}(x)\f$ is a generalized
+ Pareto distribution \f$G_{\xi,\bar{\beta},\bar{u}}(x)\f$ with \f$\bar{\beta}=\beta[1-F_n(u)]^{\xi}\f$
+ and \f$\bar{u}=u-\bar{\beta}\left\{[1-F_n(u)]^{-\xi}-1\right\}/\xi\f$. By inverting \f$\widehat{F}(x)\f$,
         one obtains an estimator for the \f$\alpha\f$-quantile,
         \f[
             \hat{q}_{\alpha} = \bar{u} + \frac{\bar{\beta}}{\xi}\left[(1-\alpha)^{-\xi}-1\right],
@@ -91,19 +95,19 @@
             \widehat{CTM}_{\alpha} = \hat{q}_{\alpha} - \frac{\bar{\beta}}{\xi-1}(1-\alpha)^{-\xi},
         \f]
         cf. McNeil and Frey (2000).
-
+
         Note that in case extreme values of the left tail are fitted, the distribution is mirrored with respect to the
- \f$y\f$ axis such that the left tail can be treated as a right tail. The computed fit parameters thus define
- the Pareto distribution that fits the mirrored left tail. When quantities like a quantile or a tail mean are
- computed using the fit parameters obtained from the mirrored data, the result is mirrored back, yielding the
+ \f$y\f$ axis such that the left tail can be treated as a right tail. The computed fit parameters thus define
+ the Pareto distribution that fits the mirrored left tail. When quantities like a quantile or a tail mean are
+ computed using the fit parameters obtained from the mirrored data, the result is mirrored back, yielding the
         correct result.
-
+
         For further details, see
-
- J. R. M. Hosking and J. R. Wallis, Parameter and quantile estimation for the generalized Pareto distribution,
+
+ J. R. M. Hosking and J. R. Wallis, Parameter and quantile estimation for the generalized Pareto distribution,
         Technometrics, Volume 29, 1987, p. 339-349
-
- A. J. McNeil and R. Frey, Estimation of Tail-Related Risk Measures for Heteroscedastic Financial Time Series:
+
+ A. J. McNeil and R. Frey, Estimation of Tail-Related Risk Measures for Heteroscedastic Financial Time Series:
         an Extreme Value Approach, Journal of Empirical Finance, Volume 7, 2000, p. 271-300
 
         @param quantile_probability
@@ -118,7 +122,7 @@
         typedef boost::tuple<float_type, float_type, float_type> result_type;
         // for left tail fitting, mirror the extreme values
         typedef mpl::int_<is_same<LeftRight, left>::value ? -1 : 1> sign;
-
+
         template<typename Args>
         peaks_over_threshold_impl(Args const &args)
           : Nu_(0)
@@ -129,12 +133,12 @@
           , is_dirty_(true)
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             this->is_dirty_ = true;
-
+
             if (sign::value * args[sample] > this->threshold_)
             {
                 this->mu_ += args[sample];
@@ -149,15 +153,15 @@
             if (this->is_dirty_)
             {
                 this->is_dirty_ = false;
-
+
                 std::size_t cnt = count(args);
-
+
                 this->mu_ = sign::value * numeric::average(this->mu_, this->Nu_);
                 this->sigma2_ = numeric::average(this->sigma2_, this->Nu_);
                 this->sigma2_ -= this->mu_ * this->mu_;
-
+
                 float_type threshold_probability = numeric::average(cnt - this->Nu_, cnt);
-
+
                 float_type tmp = numeric::average(( this->mu_ - this->threshold_ )*( this->mu_ - this->threshold_ ), this->sigma2_);
                 float_type xi_hat = 0.5 * ( 1. - tmp );
                 float_type beta_hat = 0.5 * ( this->mu_ - this->threshold_ ) * ( 1. + tmp );
@@ -165,7 +169,7 @@
                 float_type u_bar = this->threshold_ - beta_bar * ( std::pow(1. - threshold_probability, -xi_hat) - 1.)/xi_hat;
                 this->fit_parameters_ = boost::make_tuple(u_bar, beta_bar, xi_hat);
             }
-
+
             return this->fit_parameters_;
         }
 
@@ -185,7 +189,7 @@
         @brief Peaks over Threshold Method for Quantile and Tail Mean Estimation
 
         @sa peaks_over_threshold_impl
-
+
         @param quantile_probability
         @param pot_threshold_probability
     */
@@ -198,7 +202,7 @@
         typedef boost::tuple<float_type, float_type, float_type> result_type;
         // for left tail fitting, mirror the extreme values
         typedef mpl::int_<is_same<LeftRight, left>::value ? -1 : 1> sign;
-
+
         template<typename Args>
         peaks_over_threshold_prob_impl(Args const &args)
           : mu_(sign::value * numeric::average(args[sample | Sample()], (std::size_t)1))
@@ -208,28 +212,28 @@
           , is_dirty_(true)
         {
         }
-
+
         void operator ()(dont_care)
         {
             this->is_dirty_ = true;
         }
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             if (this->is_dirty_)
- {
+ {
                 this->is_dirty_ = false;
-
+
                 std::size_t cnt = count(args);
-
+
                 // the n'th cached sample provides an approximate threshold value u
                 std::size_t n = static_cast<std::size_t>(
                     std::ceil(
                         cnt * ( ( is_same<LeftRight, left>::value ) ? this->threshold_probability_ : 1. - this->threshold_probability_ )
                     )
                 );
-
+
                 // If n is in a valid range, return result, otherwise return NaN or throw exception
                 if ( n >= tail(args).size())
                 {
@@ -252,21 +256,21 @@
                 else
                 {
                     float_type u = *(tail(args).begin() + n - 1) * sign::value;
-
+
                     // compute mean and variance of samples above/under threshold value u
                     for (std::size_t i = 0; i < n; ++i)
                     {
                         mu_ += *(tail(args).begin() + i);
                         sigma2_ += *(tail(args).begin() + i) * (*(tail(args).begin() + i));
                     }
-
+
                     this->mu_ = sign::value * numeric::average(this->mu_, n);
                     this->sigma2_ = numeric::average(this->sigma2_, n);
                     this->sigma2_ -= this->mu_ * this->mu_;
-
+
                     if (is_same<LeftRight, left>::value)
                         this->threshold_probability_ = 1. - this->threshold_probability_;
-
+
                     float_type tmp = numeric::average(( this->mu_ - u )*( this->mu_ - u ), this->sigma2_);
                     float_type xi_hat = 0.5 * ( 1. - tmp );
                     float_type beta_hat = 0.5 * ( this->mu_ - u ) * ( 1. + tmp );
@@ -275,7 +279,7 @@
                     this->fit_parameters_ = boost::make_tuple(u_bar, beta_bar, xi_hat);
                 }
             }
-
+
             return this->fit_parameters_;
         }
 
@@ -283,10 +287,10 @@
         mutable float_type mu_; // mean of samples above threshold u
         mutable float_type sigma2_; // variance of samples above threshold u
         mutable float_type threshold_probability_;
- mutable result_type fit_parameters_; // boost::tuple that stores fit parameters
+ mutable result_type fit_parameters_; // boost::tuple that stores fit parameters
         mutable bool is_dirty_;
     };
-
+
 } // namespace impl
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -303,7 +307,7 @@
         ///
         typedef accumulators::impl::peaks_over_threshold_impl<mpl::_1, LeftRight> impl;
     };
-
+
     template<typename LeftRight>
     struct peaks_over_threshold_prob
       : depends_on<count, tail<LeftRight> >
@@ -313,7 +317,7 @@
         ///
         typedef accumulators::impl::peaks_over_threshold_prob_impl<mpl::_1, LeftRight> impl;
     };
-
+
     struct abstract_peaks_over_threshold
       : depends_on<>
     {
@@ -356,7 +360,7 @@
 {
 };
 
-// So that peaks_over_threshold can be automatically substituted
+// So that peaks_over_threshold can be automatically substituted
 // with weighted_peaks_over_threshold when the weight parameter is non-void.
 template<typename LeftRight>
 struct as_weighted_feature<tag::peaks_over_threshold<LeftRight> >
@@ -369,7 +373,7 @@
   : feature_of<tag::peaks_over_threshold<LeftRight> >
 {};
 
-// So that peaks_over_threshold_prob can be automatically substituted
+// So that peaks_over_threshold_prob can be automatically substituted
 // with weighted_peaks_over_threshold_prob when the weight parameter is non-void.
 template<typename LeftRight>
 struct as_weighted_feature<tag::peaks_over_threshold_prob<LeftRight> >

Modified: trunk/boost/accumulators/statistics/pot_quantile.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/pot_quantile.hpp (original)
+++ trunk/boost/accumulators/statistics/pot_quantile.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -34,16 +34,16 @@
 {
     ///////////////////////////////////////////////////////////////////////////////
     // pot_quantile_impl
- //
+ //
     /**
         @brief Quantile Estimation based on Peaks over Threshold Method (for both left and right tails)
-
+
         Computes an estimate
         \f[
             \hat{q}_{\alpha} = \bar{u} + \frac{\bar{\beta}}{\xi}\left[(1-\alpha)^{-\xi}-1\right]
         \f]
- for a right or left extreme quantile, \f$\bar[u]\f$, \f$\bar{\beta}\f$ and \f$\xi\f$ being the parameters of the
- generalized Pareto distribution that approximates the right tail of the distribution (or the mirrored left tail,
+ for a right or left extreme quantile, \f$\bar[u]\f$, \f$\bar{\beta}\f$ and \f$\xi\f$ being the parameters of the
+ generalized Pareto distribution that approximates the right tail of the distribution (or the mirrored left tail,
         in case the left tail is used). In the latter case, the result is mirrored back, yielding the correct result.
     */
     template<typename Sample, typename Impl, typename LeftRight>
@@ -53,7 +53,7 @@
         typedef typename numeric::functional::average<Sample, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         pot_quantile_impl(dont_care)
          : sign_((is_same<LeftRight, left>::value) ? -1 : 1)
         {
@@ -71,11 +71,11 @@
             peaks_over_threshold_tag;
 
             extractor<peaks_over_threshold_tag> const some_peaks_over_threshold = {};
-
+
             float_type u_bar = some_peaks_over_threshold(args).template get<0>();
             float_type beta_bar = some_peaks_over_threshold(args).template get<1>();
             float_type xi_hat = some_peaks_over_threshold(args).template get<2>();
-
+
                 return this->sign_*(u_bar + beta_bar/xi_hat * ( std::pow(
                         is_same<LeftRight, left>::value ? args[quantile_probability] : 1. - args[quantile_probability]
                     , -xi_hat
@@ -85,7 +85,7 @@
     private:
         short sign_; // if the fit parameters from the mirrored left tail extreme values are used, mirror back the result
     };
-
+
 } // namespace impl
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -159,7 +159,7 @@
 };
 
 // for the purposes of feature-based dependency resolution,
-// pot_quantile<LeftRight> and pot_quantile_prob<LeftRight> provide
+// pot_quantile<LeftRight> and pot_quantile_prob<LeftRight> provide
 // the same feature as quantile
 template<typename LeftRight>
 struct feature_of<tag::pot_quantile<LeftRight> >
@@ -173,7 +173,7 @@
 {
 };
 
-// So that pot_quantile can be automatically substituted
+// So that pot_quantile can be automatically substituted
 // with weighted_pot_quantile when the weight parameter is non-void.
 template<typename LeftRight>
 struct as_weighted_feature<tag::pot_quantile<LeftRight> >
@@ -187,7 +187,7 @@
 {
 };
 
-// So that pot_quantile_prob can be automatically substituted
+// So that pot_quantile_prob can be automatically substituted
 // with weighted_pot_quantile_prob when the weight parameter is non-void.
 template<typename LeftRight>
 struct as_weighted_feature<tag::pot_quantile_prob<LeftRight> >

Modified: trunk/boost/accumulators/statistics/pot_tail_mean.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/pot_tail_mean.hpp (original)
+++ trunk/boost/accumulators/statistics/pot_tail_mean.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -36,17 +36,17 @@
 {
     ///////////////////////////////////////////////////////////////////////////////
     // pot_tail_mean_impl
- //
+ //
     /**
         @brief Estimation of the (coherent) tail mean based on the peaks over threshold method (for both left and right tails)
-
+
         Computes an estimate for the (coherent) tail mean
         \f[
             \widehat{CTM}_{\alpha} = \hat{q}_{\alpha} - \frac{\bar{\beta}}{\xi-1}(1-\alpha)^{-\xi},
         \f]
- where \f$\bar[u]\f$, \f$\bar{\beta}\f$ and \f$\xi\f$ are the parameters of the
- generalized Pareto distribution that approximates the right tail of the distribution (or the
- mirrored left tail, in case the left tail is used). In the latter case, the result is mirrored
+ where \f$\bar[u]\f$, \f$\bar{\beta}\f$ and \f$\xi\f$ are the parameters of the
+ generalized Pareto distribution that approximates the right tail of the distribution (or the
+ mirrored left tail, in case the left tail is used). In the latter case, the result is mirrored
         back, yielding the correct result.
     */
     template<typename Sample, typename Impl, typename LeftRight>
@@ -56,12 +56,12 @@
         typedef typename numeric::functional::average<Sample, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         pot_tail_mean_impl(dont_care)
           : sign_((is_same<LeftRight, left>::value) ? -1 : 1)
         {
         }
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
@@ -83,10 +83,10 @@
 
             extractor<peaks_over_threshold_tag> const some_peaks_over_threshold = {};
             extractor<pot_quantile_tag> const some_pot_quantile = {};
-
+
             float_type beta_bar = some_peaks_over_threshold(args).get<1>();
             float_type xi_hat = some_peaks_over_threshold(args).get<2>();
-
+
             return some_pot_quantile(args) - this->sign_ * beta_bar/( xi_hat - 1. ) * std::pow(
                 is_same<LeftRight, left>::value ? args[quantile_probability] : 1. - args[quantile_probability]
               , -xi_hat);
@@ -165,7 +165,7 @@
 };
 
 // for the purposes of feature-based dependency resolution,
-// pot_tail_mean<LeftRight> and pot_tail_mean_prob<LeftRight> provide
+// pot_tail_mean<LeftRight> and pot_tail_mean_prob<LeftRight> provide
 // the same feature as tail_mean
 template<typename LeftRight>
 struct feature_of<tag::pot_tail_mean<LeftRight> >
@@ -179,7 +179,7 @@
 {
 };
 
-// So that pot_tail_mean can be automatically substituted
+// So that pot_tail_mean can be automatically substituted
 // with weighted_pot_tail_mean when the weight parameter is non-void.
 template<typename LeftRight>
 struct as_weighted_feature<tag::pot_tail_mean<LeftRight> >
@@ -193,7 +193,7 @@
 {
 };
 
-// So that pot_tail_mean_prob can be automatically substituted
+// So that pot_tail_mean_prob can be automatically substituted
 // with weighted_pot_tail_mean_prob when the weight parameter is non-void.
 template<typename LeftRight>
 struct as_weighted_feature<tag::pot_tail_mean_prob<LeftRight> >

Modified: trunk/boost/accumulators/statistics/skewness.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/skewness.hpp (original)
+++ trunk/boost/accumulators/statistics/skewness.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -29,18 +29,18 @@
     // skewness_impl
     /**
         @brief Skewness estimation
-
- The skewness of a sample distribution is defined as the ratio of the 3rd central moment and the \f$ 3/2 \f$-th power
+
+ The skewness of a sample distribution is defined as the ratio of the 3rd central moment and the \f$ 3/2 \f$-th power
         of the 2nd central moment (the variance) of the sampless 3. The skewness can also be expressed by the simple moments:
-
+
         \f[
             \hat{g}_1 =
                 \frac
                 {\widehat{m}_n^{(3)}-3\widehat{m}_n^{(2)}\hat{\mu}_n+2\hat{\mu}_n^3}
                 {\left(\widehat{m}_n^{(2)} - \hat{\mu}_n^{2}\right)^{3/2}}
         \f]
-
- where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
+
+ where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
         \f$ n \f$ samples.
     */
     template<typename Sample>
@@ -58,10 +58,10 @@
         result_type result(Args const &args) const
         {
             return numeric::average(
- moment<3>(args)
+ moment<3>(args)
                         - 3. * moment<2>(args) * mean(args)
                         + 2. * mean(args) * mean(args) * mean(args)
- , ( moment<2>(args) - mean(args) * mean(args) )
+ , ( moment<2>(args) - mean(args) * mean(args) )
                         * std::sqrt( moment<2>(args) - mean(args) * mean(args) )
                    );
         }
@@ -93,7 +93,7 @@
 
 using extract::skewness;
 
-// So that skewness can be automatically substituted with
+// So that skewness can be automatically substituted with
 // weighted_skewness when the weight parameter is non-void
 template<>
 struct as_weighted_feature<tag::skewness>

Modified: trunk/boost/accumulators/statistics/sum.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/sum.hpp (original)
+++ trunk/boost/accumulators/statistics/sum.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -81,7 +81,7 @@
         ///
         typedef accumulators::impl::sum_impl<mpl::_2, tag::weight> impl;
     };
-
+
     template<typename VariateType, typename VariateTag>
     struct sum_of_variates
       : depends_on<>
@@ -90,7 +90,7 @@
         ///
         typedef mpl::always<accumulators::impl::sum_impl<VariateType, VariateTag> > impl;
     };
-
+
     struct abstract_sum_of_variates
       : depends_on<>
     {

Modified: trunk/boost/accumulators/statistics/tail.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/tail.hpp (original)
+++ trunk/boost/accumulators/statistics/tail.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -122,7 +122,7 @@
       : mpl::true_
     {
     };
-
+
 } // namespace detail
 
 namespace impl
@@ -171,7 +171,7 @@
 
         // This just stores the heap and the samples.
         // In operator()() below, if we are adding a new sample
- // to the sample cache, we force all the
+ // to the sample cache, we force all the
         // tail_variates to update also. (It's not
         // good enough to wait for the accumulator_set to do it
         // for us because then information about whether a sample
@@ -239,7 +239,7 @@
         }
 
         ///////////////////////////////////////////////////////////////////////////////
- //
+ //
         struct indirect_cmp
           : std::binary_function<std::size_t, std::size_t, bool>
         {
@@ -300,7 +300,7 @@
         static boost::parameter::keyword<tail_cache_size_named_arg<LeftRight> > const cache_size;
         #endif
     };
-
+
     struct abstract_tail
       : depends_on<>
     {

Modified: trunk/boost/accumulators/statistics/tail_mean.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/tail_mean.hpp (original)
+++ trunk/boost/accumulators/statistics/tail_mean.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -33,23 +33,23 @@
 
 namespace impl
 {
-
+
     ///////////////////////////////////////////////////////////////////////////////
     // coherent_tail_mean_impl
     //
     /**
         @brief Estimation of the coherent tail mean based on order statistics (for both left and right tails)
 
- The coherent tail mean \f$\widehat{CTM}_{n,\alpha}(X)\f$ is equal to the non-coherent tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$
+ The coherent tail mean \f$\widehat{CTM}_{n,\alpha}(X)\f$ is equal to the non-coherent tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$
         plus a correction term that ensures coherence in case of non-continuous distributions.
-
+
         \f[
- \widehat{CTM}_{n,\alpha}^{\mathrm{right}}(X) = \widehat{NCTM}_{n,\alpha}^{\mathrm{right}}(X) +
+ \widehat{CTM}_{n,\alpha}^{\mathrm{right}}(X) = \widehat{NCTM}_{n,\alpha}^{\mathrm{right}}(X) +
             \frac{1}{\lceil n(1-\alpha)\rceil}\hat{q}_{n,\alpha}(X)\left(1 - \alpha - \frac{1}{n}\lceil n(1-\alpha)\rceil \right)
         \f]
-
+
         \f[
- \widehat{CTM}_{n,\alpha}^{\mathrm{left}}(X) = \widehat{NCTM}_{n,\alpha}^{\mathrm{left}}(X) +
+ \widehat{CTM}_{n,\alpha}^{\mathrm{left}}(X) = \widehat{NCTM}_{n,\alpha}^{\mathrm{left}}(X) +
             \frac{1}{\lceil n\alpha\rceil}\hat{q}_{n,\alpha}(X)\left(\alpha - \frac{1}{n}\lceil n\alpha\rceil \right)
         \f]
     */
@@ -60,22 +60,22 @@
         typedef typename numeric::functional::average<Sample, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         coherent_tail_mean_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             std::size_t cnt = count(args);
-
+
             std::size_t n = static_cast<std::size_t>(
                 std::ceil(
                     cnt * ( ( is_same<LeftRight, left>::value ) ? args[quantile_probability] : 1. - args[quantile_probability] )
                 )
             );
-
+
             extractor<tag::non_coherent_tail_mean<LeftRight> > const some_non_coherent_tail_mean = {};
-
+
             return some_non_coherent_tail_mean(args)
                  + numeric::average(quantile(args), n)
                  * (
@@ -84,28 +84,28 @@
                    );
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////////
     // non_coherent_tail_mean_impl
- //
+ //
     /**
         @brief Estimation of the (non-coherent) tail mean based on order statistics (for both left and right tails)
 
- An estimation of the non-coherent tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$ is given by the mean of the
- \f$\lceil n\alpha\rceil\f$ smallest samples (left tail) or the mean of the \f$\lceil n(1-\alpha)\rceil\f$
+ An estimation of the non-coherent tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$ is given by the mean of the
+ \f$\lceil n\alpha\rceil\f$ smallest samples (left tail) or the mean of the \f$\lceil n(1-\alpha)\rceil\f$
         largest samples (right tail), \f$n\f$ being the total number of samples and \f$\alpha\f$ the quantile level:
-
+
         \f[
             \widehat{NCTM}_{n,\alpha}^{\mathrm{right}}(X) = \frac{1}{\lceil n(1-\alpha)\rceil} \sum_{i=\lceil \alpha n \rceil}^n X_{i:n}
         \f]
-
+
         \f[
             \widehat{NCTM}_{n,\alpha}^{\mathrm{left}}(X) = \frac{1}{\lceil n\alpha\rceil} \sum_{i=1}^{\lceil \alpha n \rceil} X_{i:n}
         \f]
-
- It thus requires the caching of at least the \f$\lceil n\alpha\rceil\f$ smallest or the \f$\lceil n(1-\alpha)\rceil\f$
+
+ It thus requires the caching of at least the \f$\lceil n\alpha\rceil\f$ smallest or the \f$\lceil n(1-\alpha)\rceil\f$
         largest samples.
-
+
         @param quantile_probability
     */
     template<typename Sample, typename LeftRight>
@@ -115,22 +115,22 @@
         typedef typename numeric::functional::average<Sample, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         non_coherent_tail_mean_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             std::size_t cnt = count(args);
-
+
             std::size_t n = static_cast<std::size_t>(
                 std::ceil(
                     cnt * ( ( is_same<LeftRight, left>::value ) ? args[quantile_probability] : 1. - args[quantile_probability] )
                 )
             );
-
+
             // If n is in a valid range, return result, otherwise return NaN or throw exception
- if (n <= tail(args).size())
+ if (n <= static_cast<std::size_t>(tail(args).size()))
                 return numeric::average(
                     std::accumulate(
                         tail(args).begin()
@@ -152,7 +152,7 @@
                     boost::throw_exception(std::runtime_error(msg.str()));
                     return Sample(0);
                 }
- }
+ }
         }
     };
 
@@ -171,14 +171,14 @@
     {
         typedef accumulators::impl::coherent_tail_mean_impl<mpl::_1, LeftRight> impl;
     };
-
+
     template<typename LeftRight>
     struct non_coherent_tail_mean
       : depends_on<count, tail<LeftRight> >
     {
         typedef accumulators::impl::non_coherent_tail_mean_impl<mpl::_1, LeftRight> impl;
     };
-
+
     struct abstract_non_coherent_tail_mean
       : depends_on<>
     {
@@ -212,7 +212,7 @@
 {
 };
 
-// So that non_coherent_tail_mean can be automatically substituted
+// So that non_coherent_tail_mean can be automatically substituted
 // with weighted_non_coherent_tail_mean when the weight parameter is non-void.
 template<typename LeftRight>
 struct as_weighted_feature<tag::non_coherent_tail_mean<LeftRight> >

Modified: trunk/boost/accumulators/statistics/tail_quantile.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/tail_quantile.hpp (original)
+++ trunk/boost/accumulators/statistics/tail_quantile.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -13,6 +13,7 @@
 #include <functional>
 #include <sstream>
 #include <stdexcept>
+#include <cmath> // For ceil
 #include <boost/throw_exception.hpp>
 #include <boost/parameter/keyword.hpp>
 #include <boost/mpl/placeholders.hpp>
@@ -32,22 +33,22 @@
 {
 
 namespace impl
-{
+{
     ///////////////////////////////////////////////////////////////////////////////
     // tail_quantile_impl
     // Tail quantile estimation based on order statistics
     /**
         @brief Tail quantile estimation based on order statistics (for both left and right tails)
 
- The estimation of a tail quantile \f$\hat{q}\f$ with level \f$\alpha\f$ based on order statistics requires the
- chaching of at least the \f$\lceil n\alpha\rceil\f$ smallest or the \f$\lceil n(1-\alpha)\rceil\f$ largest samples,
- \f$n\f$ being the total number of samples. The largest of the \f$\lceil n\alpha\rceil\f$ smallest samples or the
+ The estimation of a tail quantile \f$\hat{q}\f$ with level \f$\alpha\f$ based on order statistics requires the
+ chaching of at least the \f$\lceil n\alpha\rceil\f$ smallest or the \f$\lceil n(1-\alpha)\rceil\f$ largest samples,
+ \f$n\f$ being the total number of samples. The largest of the \f$\lceil n\alpha\rceil\f$ smallest samples or the
         smallest of the \f$\lceil n(1-\alpha)\rceil\f$ largest samples provides an estimate for the quantile:
-
+
         \f[
             \hat{q}_{n,\alpha} = X_{\lceil \alpha n \rceil:n}
         \f]
-
+
         @param quantile_probability
     */
     template<typename Sample, typename LeftRight>
@@ -56,24 +57,24 @@
     {
         // for boost::result_of
         typedef Sample result_type;
-
+
         tail_quantile_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             std::size_t cnt = count(args);
-
+
             std::size_t n = static_cast<std::size_t>(
                 std::ceil(
                     cnt * ( ( is_same<LeftRight, left>::value ) ? args[quantile_probability] : 1. - args[quantile_probability] )
                 )
             );
-
+
             // If n is in a valid range, return result, otherwise return NaN or throw exception
- if ( n < tail(args).size())
+ if ( n < static_cast<std::size_t>(tail(args).size()))
             {
- // Note that the cached samples of the left are sorted in ascending order,
+ // Note that the cached samples of the left are sorted in ascending order,
                // whereas the samples of the right tail are sorted in descending order
                return *(boost::begin(tail(args)) + n - 1);
             }

Modified: trunk/boost/accumulators/statistics/tail_variate.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/tail_variate.hpp (original)
+++ trunk/boost/accumulators/statistics/tail_variate.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -87,7 +87,7 @@
         ///
         typedef mpl::always<accumulators::impl::tail_variate_impl<VariateType, VariateTag, LeftRight> > impl;
     };
-
+
     struct abstract_tail_variate
       : depends_on<>
     {
@@ -101,7 +101,7 @@
         ///
         typedef accumulators::impl::tail_variate_impl<mpl::_2, tag::weight, LeftRight> impl;
     };
-
+
     struct abstract_tail_weights
       : depends_on<>
     {

Modified: trunk/boost/accumulators/statistics/tail_variate_means.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/tail_variate_means.hpp (original)
+++ trunk/boost/accumulators/statistics/tail_variate_means.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -33,41 +33,41 @@
 {
 
 namespace impl
-{
+{
     /**
         @brief Estimation of the absolute and relative tail variate means (for both left and right tails)
 
- For all \f$j\f$-th variates associated to the \f$\lceil n(1-\alpha)\rceil\f$ largest samples (or the
- \f$\lceil n(1-\alpha)\rceil\f$ smallest samples in case of the left tail), the absolute tail means
- \f$\widehat{ATM}_{n,\alpha}(X, j)\f$ are computed and returned as an iterator range. Alternatively,
- the relative tail means \f$\widehat{RTM}_{n,\alpha}(X, j)\f$ are returned, which are the absolute
+ For all \f$j\f$-th variates associated to the \f$\lceil n(1-\alpha)\rceil\f$ largest samples (or the
+ \f$\lceil n(1-\alpha)\rceil\f$ smallest samples in case of the left tail), the absolute tail means
+ \f$\widehat{ATM}_{n,\alpha}(X, j)\f$ are computed and returned as an iterator range. Alternatively,
+ the relative tail means \f$\widehat{RTM}_{n,\alpha}(X, j)\f$ are returned, which are the absolute
         tail means normalized with the (non-coherent) sample tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$.
-
+
         \f[
- \widehat{ATM}_{n,\alpha}^{\mathrm{right}}(X, j) =
+ \widehat{ATM}_{n,\alpha}^{\mathrm{right}}(X, j) =
                 \frac{1}{\lceil n(1-\alpha) \rceil}
                 \sum_{i=\lceil \alpha n \rceil}^n \xi_{j,i}
         \f]
-
+
         \f[
- \widehat{ATM}_{n,\alpha}^{\mathrm{left}}(X, j) =
+ \widehat{ATM}_{n,\alpha}^{\mathrm{left}}(X, j) =
                 \frac{1}{\lceil n\alpha \rceil}
                 \sum_{i=1}^{\lceil n\alpha \rceil} \xi_{j,i}
         \f]
-
+
         \f[
- \widehat{RTM}_{n,\alpha}^{\mathrm{right}}(X, j) =
+ \widehat{RTM}_{n,\alpha}^{\mathrm{right}}(X, j) =
                 \frac{\sum_{i=\lceil n\alpha \rceil}^n \xi_{j,i}}
             {\lceil n(1-\alpha)\rceil\widehat{NCTM}_{n,\alpha}^{\mathrm{right}}(X)}
         \f]
-
+
         \f[
- \widehat{RTM}_{n,\alpha}^{\mathrm{left}}(X, j) =
+ \widehat{RTM}_{n,\alpha}^{\mathrm{left}}(X, j) =
                 \frac{\sum_{i=1}^{\lceil n\alpha \rceil} \xi_{j,i}}
             {\lceil n\alpha\rceil\widehat{NCTM}_{n,\alpha}^{\mathrm{left}}(X)}
         \f]
     */
-
+
     ///////////////////////////////////////////////////////////////////////////////
     // tail_variate_means_impl
     // by default: absolute tail_variate_means
@@ -79,37 +79,37 @@
         typedef std::vector<float_type> array_type;
         // for boost::result_of
         typedef iterator_range<typename array_type::iterator> result_type;
-
+
         tail_variate_means_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             std::size_t cnt = count(args);
-
+
             std::size_t n = static_cast<std::size_t>(
                 std::ceil(
                     cnt * ( ( is_same<LeftRight, left>::value ) ? args[quantile_probability] : 1. - args[quantile_probability] )
                 )
             );
-
+
             std::size_t num_variates = tail_variate(args).begin()->size();
-
+
             this->tail_means_.clear();
             this->tail_means_.resize(num_variates, Sample(0));
 
             // If n is in a valid range, return result, otherwise return NaN or throw exception
- if (n < tail(args).size())
- {
+ if (n < static_cast<std::size_t>(tail(args).size()))
+ {
                 this->tail_means_ = std::accumulate(
                     tail_variate(args).begin()
                   , tail_variate(args).begin() + n
                   , this->tail_means_
                   , numeric::plus
                 );
-
+
                 float_type factor = n * ( (is_same<Impl, relative>::value) ? non_coherent_tail_mean(args) : 1. );
-
+
                 using boost::lambda::_1;
 
                 std::transform(
@@ -117,8 +117,8 @@
                   , this->tail_means_.end()
                   , this->tail_means_.begin()
                   , _1 / factor
- );
- }
+ );
+ }
             else
             {
                 if (std::numeric_limits<float_type>::has_quiet_NaN)
@@ -135,16 +135,16 @@
                     msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")";
                     boost::throw_exception(std::runtime_error(msg.str()));
                 }
- }
+ }
             return make_iterator_range(this->tail_means_);
         }
 
     private:
-
+
         mutable array_type tail_means_;
-
+
     };
-
+
 } // namespace impl
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -159,7 +159,7 @@
     {
         typedef accumulators::impl::tail_variate_means_impl<mpl::_1, absolute, LeftRight, VariateTag> impl;
     };
- template<typename LeftRight, typename VariateType, typename VariateTag>
+ template<typename LeftRight, typename VariateType, typename VariateTag>
     struct relative_tail_variate_means
       : depends_on<count, non_coherent_tail_mean<LeftRight>, tail_variate<VariateType, VariateTag, LeftRight> >
     {
@@ -216,7 +216,7 @@
 {
 };
 
-// So that absolute_tail_means can be automatically substituted
+// So that absolute_tail_means can be automatically substituted
 // with absolute_weighted_tail_means when the weight parameter is non-void.
 template<typename LeftRight, typename VariateType, typename VariateTag>
 struct as_weighted_feature<tag::absolute_tail_variate_means<LeftRight, VariateType, VariateTag> >
@@ -230,7 +230,7 @@
 {
 };
 
-// So that relative_tail_means can be automatically substituted
+// So that relative_tail_means can be automatically substituted
 // with relative_weighted_tail_means when the weight parameter is non-void.
 template<typename LeftRight, typename VariateType, typename VariateTag>
 struct as_weighted_feature<tag::relative_tail_variate_means<LeftRight, VariateType, VariateTag> >

Modified: trunk/boost/accumulators/statistics/times2_iterator.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/times2_iterator.hpp (original)
+++ trunk/boost/accumulators/statistics/times2_iterator.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -34,7 +34,7 @@
         );
     }
 
-
+
     ///////////////////////////////////////////////////////////////////////////////
     // lvalue_index_iterator
     template<typename Base>

Modified: trunk/boost/accumulators/statistics/variance.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/variance.hpp (original)
+++ trunk/boost/accumulators/statistics/variance.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -30,12 +30,12 @@
         Default sample variance implementation based on the second moment \f$ M_n^{(2)} \f$ moment<2>, mean and count.
         \f[
             \sigma_n^2 = M_n^{(2)} - \mu_n^2.
- \f]
- where
+ \f]
+ where
         \f[
             \mu_n = \frac{1}{n} \sum_{i = 1}^n x_i.
- \f]
- is the estimate of the sample mean and \f$n\f$ is the number of samples.
+ \f]
+ is the estimate of the sample mean and \f$n\f$ is the number of samples.
     */
     template<typename Sample, typename MeanFeature>
     struct variance_impl
@@ -60,24 +60,24 @@
         Iterative calculation of sample variance \f$\sigma_n^2\f$ according to the formula
         \f[
             \sigma_n^2 = \frac{1}{n} \sum_{i = 1}^n (x_i - \mu_n)^2 = \frac{n-1}{n} \sigma_{n-1}^2 + \frac{1}{n-1}(x_n - \mu_n)^2.
- \f]
- where
+ \f]
+ where
         \f[
             \mu_n = \frac{1}{n} \sum_{i = 1}^n x_i.
- \f]
- is the estimate of the sample mean and \f$n\f$ is the number of samples.
-
+ \f]
+ is the estimate of the sample mean and \f$n\f$ is the number of samples.
+
         Note that the sample variance is not defined for \f$n <= 1\f$.
-
- A simplification can be obtained by the approximate recursion
+
+ A simplification can be obtained by the approximate recursion
         \f[
             \sigma_n^2 \approx \frac{n-1}{n} \sigma_{n-1}^2 + \frac{1}{n}(x_n - \mu_n)^2.
- \f]
- because the difference
+ \f]
+ because the difference
         \f[
             \left(\frac{1}{n-1} - \frac{1}{n}\right)(x_n - \mu_n)^2 = \frac{1}{n(n-1)}(x_n - \mu_n)^2.
- \f]
- converges to zero as \f$n \rightarrow \infty\f$. However, for small \f$ n \f$ the difference
+ \f]
+ converges to zero as \f$n \rightarrow \infty\f$. However, for small \f$ n \f$ the difference
         can be non-negligible.
     */
     template<typename Sample, typename MeanFeature, typename Tag>

Modified: trunk/boost/accumulators/statistics/weighted_covariance.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_covariance.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_covariance.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -36,22 +36,22 @@
 {
 
 namespace impl
-{
+{
     ///////////////////////////////////////////////////////////////////////////////
     // weighted_covariance_impl
     //
     /**
         @brief Weighted Covariance Estimator
 
- An iterative Monte Carlo estimator for the weighted covariance \f$\mathrm{Cov}(X,X')\f$, where \f$X\f$ is a sample
+ An iterative Monte Carlo estimator for the weighted covariance \f$\mathrm{Cov}(X,X')\f$, where \f$X\f$ is a sample
         and \f$X'\f$ a variate, is given by:
 
         \f[
             \hat{c}_n = \frac{\bar{w}_n-w_n}{\bar{w}_n} \hat{c}_{n-1} + \frac{w_n}{\bar{w}_n-w_n}(X_n - \hat{\mu}_n)(X_n' - \hat{\mu}_n'),
             \quad n\ge2,\quad\hat{c}_1 = 0,
         \f]
-
- \f$\hat{\mu}_n\f$ and \f$\hat{\mu}_n'\f$ being the weighted means of the samples and variates and
+
+ \f$\hat{\mu}_n\f$ and \f$\hat{\mu}_n'\f$ being the weighted means of the samples and variates and
         \f$\bar{w}_n\f$ the sum of the \f$n\f$ first weights \f$w_i\f$.
     */
     template<typename Sample, typename Weight, typename VariateType, typename VariateTag>
@@ -62,7 +62,7 @@
         typedef typename numeric::functional::multiplies<Weight, typename numeric::functional::average<VariateType, std::size_t>::result_type>::result_type weighted_variate_type;
         // for boost::result_of
         typedef typename numeric::functional::outer_product<weighted_sample_type, weighted_variate_type>::result_type result_type;
-
+
         template<typename Args>
         weighted_covariance_impl(Args const &args)
           : cov_(
@@ -75,16 +75,16 @@
             )
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             std::size_t cnt = count(args);
-
+
             if (cnt > 1)
             {
                 extractor<tag::weighted_mean_of_variates<VariateType, VariateTag> > const some_weighted_mean_of_variates = {};
-
+
                 this->cov_ = this->cov_ * (sum_of_weights(args) - args[weight]) / sum_of_weights(args)
                            + numeric::outer_product(
                                  some_weighted_mean_of_variates(args) - args[parameter::keyword<VariateTag>::get()]
@@ -101,7 +101,7 @@
     private:
         result_type cov_;
     };
-
+
 } // namespace impl
 
 ///////////////////////////////////////////////////////////////////////////////

Modified: trunk/boost/accumulators/statistics/weighted_density.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_density.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_density.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -28,23 +28,23 @@
 {
 
 namespace impl
-{
+{
     ///////////////////////////////////////////////////////////////////////////////
     // weighted_density_impl
     // density histogram for weighted samples
     /**
         @brief Histogram density estimator for weighted samples
 
- The histogram density estimator returns a histogram of the sample distribution. The positions and sizes of the bins
- are determined using a specifiable number of cached samples (cache_size). The range between the minimum and the
- maximum of the cached samples is subdivided into a specifiable number of bins (num_bins) of same size. Additionally,
- an under- and an overflow bin is added to capture future under- and overflow samples. Once the bins are determined,
- the cached samples and all subsequent samples are added to the correct bins. At the end, a range of std::pair is
- returned, where each pair contains the position of the bin (lower bound) and the sum of the weights (normalized with the
+ The histogram density estimator returns a histogram of the sample distribution. The positions and sizes of the bins
+ are determined using a specifiable number of cached samples (cache_size). The range between the minimum and the
+ maximum of the cached samples is subdivided into a specifiable number of bins (num_bins) of same size. Additionally,
+ an under- and an overflow bin is added to capture future under- and overflow samples. Once the bins are determined,
+ the cached samples and all subsequent samples are added to the correct bins. At the end, a range of std::pair is
+ returned, where each pair contains the position of the bin (lower bound) and the sum of the weights (normalized with the
         sum of all weights).
 
         @param density_cache_size Number of first samples used to determine min and max.
- @param density_num_bins Number of bins (two additional bins collect under- and overflow samples).
+ @param density_num_bins Number of bins (two additional bins collect under- and overflow samples).
     */
     template<typename Sample, typename Weight>
     struct weighted_density_impl
@@ -55,7 +55,7 @@
         typedef std::vector<float_type> array_type;
         // for boost::result_of
         typedef iterator_range<typename histogram_type::iterator> result_type;
-
+
         template<typename Args>
         weighted_density_impl(Args const &args)
             : cache_size(args[density_cache_size])
@@ -73,35 +73,35 @@
             , is_dirty(true)
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             this->is_dirty = true;
-
+
             std::size_t cnt = count(args);
-
+
             // Fill up cache with cache_size first samples
             if (cnt <= this->cache_size)
             {
                 this->cache[cnt - 1] = std::make_pair(args[sample], args[weight]);
             }
-
- // Once cache_size samples have been accumulated, create num_bins bins of same size between
- // the minimum and maximum of the cached samples as well as an under- and an overflow bin.
+
+ // Once cache_size samples have been accumulated, create num_bins bins of same size between
+ // the minimum and maximum of the cached samples as well as an under- and an overflow bin.
             // Store their lower bounds (bin_positions) and fill the bins with the cached samples (samples_in_bin).
             if (cnt == this->cache_size)
             {
                 float_type minimum = numeric::average((min)(args),(std::size_t)1);
                 float_type maximum = numeric::average((max)(args),(std::size_t)1);
                 float_type bin_size = numeric::average(maximum - minimum, this->num_bins);
-
+
                 // determine bin positions (their lower bounds)
- for (std::size_t i = 0; i < this->num_bins + 2; ++i)
+ for (std::size_t i = 0; i < this->num_bins + 2; ++i)
                 {
                     this->bin_positions[i] = minimum + (i - 1.) * bin_size;
                 }
-
+
                 for (typename histogram_type::const_iterator iter = this->cache.begin(); iter != this->cache.end(); ++iter)
                 {
                     if (iter->first < this->bin_positions[1])
@@ -111,7 +111,7 @@
                     else if (iter->first >= this->bin_positions[this->num_bins + 1])
                     {
                         this->samples_in_bin[this->num_bins + 1] += iter->second;
- }
+ }
                     else
                     {
                         typename array_type::iterator it = std::upper_bound(
@@ -119,7 +119,7 @@
                           , this->bin_positions.end()
                           , iter->first
                         );
-
+
                         std::size_t d = std::distance(this->bin_positions.begin(), it);
                         this->samples_in_bin[d - 1] += iter->second;
                     }
@@ -143,11 +143,11 @@
                       , this->bin_positions.end()
                       , args[sample]
                     );
-
+
                     std::size_t d = std::distance(this->bin_positions.begin(), it);
                     this->samples_in_bin[d - 1] += args[weight];
                 }
- }
+ }
         }
 
         template<typename Args>
@@ -156,18 +156,18 @@
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 // creates a vector of std::pair where each pair i holds
                 // the values bin_positions[i] (x-axis of histogram) and
                 // samples_in_bin[i] / cnt (y-axis of histogram).
-
+
                 for (std::size_t i = 0; i < this->num_bins + 2; ++i)
                 {
                     this->histogram[i] = std::make_pair(this->bin_positions[i], numeric::average(this->samples_in_bin[i], sum_of_weights(args)));
                 }
             }
-
- // returns a range of pairs
+
+ // returns a range of pairs
             return make_iterator_range(this->histogram);
         }
 
@@ -196,7 +196,7 @@
         /// INTERNAL ONLY
         ///
         typedef accumulators::impl::weighted_density_impl<mpl::_1, mpl::_2> impl;
-
+
         #ifdef BOOST_ACCUMULATORS_DOXYGEN_INVOKED
         static boost::parameter::keyword<density_cache_size> const cache_size;
         static boost::parameter::keyword<density_num_bins> const num_bins;

Modified: trunk/boost/accumulators/statistics/weighted_extended_p_square.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_extended_p_square.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_extended_p_square.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -40,17 +40,17 @@
     /**
         @brief Multiple quantile estimation with the extended \f$P^2\f$ algorithm for weighted samples
 
- This version of the extended \f$P^2\f$ algorithm extends the extended \f$P^2\f$ algorithm to
- support weighted samples. The extended \f$P^2\f$ algorithm dynamically estimates several
- quantiles without storing samples. Assume that \f$m\f$ quantiles
- \f$\xi_{p_1}, \ldots, \xi_{p_m}\f$ are to be estimated. Instead of storing the whole sample
- cumulative distribution, the algorithm maintains only \f$m+2\f$ principal markers and
- \f$m+1\f$ middle markers, whose positions are updated with each sample and whose heights
- are adjusted (if necessary) using a piecewise-parablic formula. The heights of the principal
+ This version of the extended \f$P^2\f$ algorithm extends the extended \f$P^2\f$ algorithm to
+ support weighted samples. The extended \f$P^2\f$ algorithm dynamically estimates several
+ quantiles without storing samples. Assume that \f$m\f$ quantiles
+ \f$\xi_{p_1}, \ldots, \xi_{p_m}\f$ are to be estimated. Instead of storing the whole sample
+ cumulative distribution, the algorithm maintains only \f$m+2\f$ principal markers and
+ \f$m+1\f$ middle markers, whose positions are updated with each sample and whose heights
+ are adjusted (if necessary) using a piecewise-parablic formula. The heights of the principal
         markers are the current estimates of the quantiles and are returned as an iterator range.
 
         For further details, see
-
+
         K. E. E. Raatikainen, Simultaneous estimation of several quantiles, Simulation, Volume 49,
         Number 4 (October), 1986, p. 159-164.
 
@@ -78,7 +78,7 @@
>
>
> result_type;
-
+
         template<typename Args>
         weighted_extended_p_square_impl(Args const &args)
           : probabilities(
@@ -97,29 +97,29 @@
             std::size_t cnt = count(args);
             std::size_t sample_cell = 1; // k
             std::size_t num_quantiles = this->probabilities.size();
-
+
             // m+2 principal markers and m+1 middle markers
             std::size_t num_markers = 2 * num_quantiles + 3;
-
+
             // first accumulate num_markers samples
             if(cnt <= num_markers)
             {
                 this->heights[cnt - 1] = args[sample];
                 this->actual_positions[cnt - 1] = args[weight];
-
+
                 // complete the initialization of heights (and actual_positions) by sorting
                 if(cnt == num_markers)
                 {
- // TODO: we need to sort the initial samples (in heights) in ascending order and
- // sort their weights (in actual_positions) the same way. The following lines do
+ // TODO: we need to sort the initial samples (in heights) in ascending order and
+ // sort their weights (in actual_positions) the same way. The following lines do
                     // it, but there must be a better and more efficient way of doing this.
                     typename array_type::iterator it_begin, it_end, it_min;
-
+
                     it_begin = this->heights.begin();
                     it_end = this->heights.end();
-
+
                     std::size_t pos = 0;
-
+
                     while (it_begin != it_end)
                     {
                         it_min = std::min_element(it_begin, it_end);
@@ -129,7 +129,7 @@
                         ++it_begin;
                         ++pos;
                     }
-
+
                     // calculate correct initial actual positions
                     for (std::size_t i = 1; i < num_markers; ++i)
                     {
@@ -160,7 +160,7 @@
                       , this->heights.end()
                       , args[sample]
                     );
-
+
                     sample_cell = std::distance(this->heights.begin(), it);
                 }
 
@@ -176,24 +176,24 @@
                     this->desired_positions[num_markers - 1] = sum_of_weights(args);
                     this->desired_positions[1] = (sum_of_weights(args) - this->actual_positions[0]) * probabilities[0]
                                               / 2. + this->actual_positions[0];
- this->desired_positions[num_markers - 2] = (sum_of_weights(args) - this->actual_positions[0])
- * (probabilities[num_quantiles - 1] + 1.)
+ this->desired_positions[num_markers - 2] = (sum_of_weights(args) - this->actual_positions[0])
+ * (probabilities[num_quantiles - 1] + 1.)
                                                             / 2. + this->actual_positions[0];
-
+
                     for (std::size_t i = 0; i < num_quantiles; ++i)
                     {
                         this->desired_positions[2 * i + 2] = (sum_of_weights(args) - this->actual_positions[0])
                                                           * probabilities[i] + this->actual_positions[0];
                     }
-
+
                     for (std::size_t i = 1; i < num_quantiles; ++i)
                     {
                         this->desired_positions[2 * i + 1] = (sum_of_weights(args) - this->actual_positions[0])
- * (probabilities[i - 1] + probabilities[i])
+ * (probabilities[i - 1] + probabilities[i])
                                                       / 2. + this->actual_positions[0];
                     }
                 }
-
+
                 // adjust heights and actual_positions of markers 1 to num_markers - 2 if necessary
                 for (std::size_t i = 1; i <= num_markers - 2; ++i)
                 {
@@ -251,7 +251,7 @@
               , make_permutation_iterator(this->heights.begin(), idx_end)
             );
         }
-
+
     private:
         array_type probabilities; // the quantile probabilities
         array_type heights; // q_i

Modified: trunk/boost/accumulators/statistics/weighted_kurtosis.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_kurtosis.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_kurtosis.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -29,21 +29,21 @@
     /**
         @brief Kurtosis estimation for weighted samples
 
- The kurtosis of a sample distribution is defined as the ratio of the 4th central moment and the square of the 2nd central
- moment (the variance) of the samples, minus 3. The term \f$ -3 \f$ is added in order to ensure that the normal distribution
+ The kurtosis of a sample distribution is defined as the ratio of the 4th central moment and the square of the 2nd central
+ moment (the variance) of the samples, minus 3. The term \f$ -3 \f$ is added in order to ensure that the normal distribution
         has zero kurtosis. The kurtosis can also be expressed by the simple moments:
-
+
         \f[
- \hat{g}_2 =
+ \hat{g}_2 =
                 \frac
                 {\widehat{m}_n^{(4)}-4\widehat{m}_n^{(3)}\hat{\mu}_n+6\widehat{m}_n^{(2)}\hat{\mu}_n^2-3\hat{\mu}_n^4}
                 {\left(\widehat{m}_n^{(2)} - \hat{\mu}_n^{2}\right)^2} - 3,
         \f]
-
- where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
+
+ where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
         \f$ n \f$ samples.
-
- The kurtosis estimator for weighted samples is formally identical to the estimator for unweighted samples, except that
+
+ The kurtosis estimator for weighted samples is formally identical to the estimator for unweighted samples, except that
         the weighted counterparts of all measures it depends on are to be taken.
     */
     template<typename Sample, typename Weight>
@@ -61,12 +61,12 @@
         template<typename Args>
         result_type result(Args const &args) const
         {
- return numeric::average(
- weighted_moment<4>(args)
+ return numeric::average(
+ weighted_moment<4>(args)
                         - 4. * weighted_moment<3>(args) * weighted_mean(args)
- + 6. * weighted_moment<2>(args) * weighted_mean(args) * weighted_mean(args)
+ + 6. * weighted_moment<2>(args) * weighted_mean(args) * weighted_mean(args)
                         - 3. * weighted_mean(args) * weighted_mean(args) * weighted_mean(args) * weighted_mean(args)
- , ( weighted_moment<2>(args) - weighted_mean(args) * weighted_mean(args) )
+ , ( weighted_moment<2>(args) - weighted_mean(args) * weighted_mean(args) )
                         * ( weighted_moment<2>(args) - weighted_mean(args) * weighted_mean(args) )
                    ) - 3.;
         }

Modified: trunk/boost/accumulators/statistics/weighted_mean.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_mean.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_mean.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -50,9 +50,9 @@
                   , tag::weighted_sum_of_variates<Sample, Tag>
>::type
             weighted_sum_tag;
-
+
             extractor<weighted_sum_tag> const some_weighted_sum = {};
-
+
             return numeric::average(some_weighted_sum(args), sum_of_weights(args));
         }
     };
@@ -148,7 +148,7 @@
 namespace extract
 {
     extractor<tag::mean> const weighted_mean = {};
- BOOST_ACCUMULATORS_DEFINE_EXTRACTOR(tag, weighted_mean_of_variates, (typename)(typename));
+ BOOST_ACCUMULATORS_DEFINE_EXTRACTOR(tag, weighted_mean_of_variates, (typename)(typename))
 }
 
 using extract::weighted_mean;

Modified: trunk/boost/accumulators/statistics/weighted_median.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_median.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_median.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -32,7 +32,7 @@
     //
     /**
         @brief Median estimation for weighted samples based on the \f$P^2\f$ quantile estimator
-
+
         The \f$P^2\f$ algorithm for weighted samples is invoked with a quantile probability of 0.5.
     */
     template<typename Sample>
@@ -41,9 +41,9 @@
     {
         // for boost::result_of
         typedef typename numeric::functional::average<Sample, std::size_t>::result_type result_type;
-
+
         weighted_median_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
@@ -56,9 +56,9 @@
     //
     /**
         @brief Median estimation for weighted samples based on the density estimator
-
- The algorithm determines the bin in which the \f$0.5*cnt\f$-th sample lies, \f$cnt\f$ being
- the total number of samples. It returns the approximate horizontal position of this sample,
+
+ The algorithm determines the bin in which the \f$0.5*cnt\f$-th sample lies, \f$cnt\f$ being
+ the total number of samples. It returns the approximate horizontal position of this sample,
         based on a linear interpolation inside the bin.
     */
     template<typename Sample>
@@ -70,7 +70,7 @@
         typedef iterator_range<typename histogram_type::iterator> range_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         template<typename Args>
         with_density_weighted_median_impl(Args const &args)
           : sum(numeric::average(args[sample | Sample()], (std::size_t)1))
@@ -82,14 +82,14 @@
         {
             this->is_dirty = true;
         }
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 std::size_t cnt = count(args);
                 range_type histogram = weighted_density(args);
                 typename range_type::iterator it = histogram.begin();
@@ -102,7 +102,7 @@
                 float_type over = numeric::average(this->sum - 0.5 * cnt, it->second * cnt);
                 this->median = it->first * over + (it + 1)->first * ( 1. - over );
             }
-
+
             return this->median;
         }
 
@@ -117,9 +117,9 @@
     //
     /**
         @brief Median estimation for weighted samples based on the \f$P^2\f$ cumulative distribution estimator
-
- The algorithm determines the first (leftmost) bin with a height exceeding 0.5. It
- returns the approximate horizontal position of where the cumulative distribution
+
+ The algorithm determines the first (leftmost) bin with a height exceeding 0.5. It
+ returns the approximate horizontal position of where the cumulative distribution
         equals 0.5, based on a linear interpolation inside the bin.
     */
     template<typename Sample, typename Weight>
@@ -132,13 +132,13 @@
         typedef iterator_range<typename histogram_type::iterator> range_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         template<typename Args>
         with_p_square_cumulative_distribution_weighted_median_impl(Args const &args)
           : is_dirty(true)
         {
         }
-
+
         void operator ()(dont_care)
         {
             this->is_dirty = true;
@@ -150,7 +150,7 @@
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 range_type histogram = weighted_p_square_cumulative_distribution(args);
                 typename range_type::iterator it = histogram.begin();
                 while (it->second < 0.5)
@@ -160,7 +160,7 @@
                 float_type over = numeric::average(it->second - 0.5, it->second - (it - 1)->second);
                 this->median = it->first * over + (it + 1)->first * ( 1. - over );
             }
-
+
             return this->median;
         }
     private:

Modified: trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -33,17 +33,17 @@
     /**
         @brief Histogram calculation of the cumulative distribution with the \f$P^2\f$ algorithm for weighted samples
 
- A histogram of the sample cumulative distribution is computed dynamically without storing samples
- based on the \f$ P^2 \f$ algorithm for weighted samples. The returned histogram has a specifiable
+ A histogram of the sample cumulative distribution is computed dynamically without storing samples
+ based on the \f$ P^2 \f$ algorithm for weighted samples. The returned histogram has a specifiable
         amount (num_cells) equiprobable (and not equal-sized) cells.
-
- Note that applying importance sampling results in regions to be more and other regions to be less
+
+ Note that applying importance sampling results in regions to be more and other regions to be less
         accurately estimated than without importance sampling, i.e., with unweighted samples.
 
         For further details, see
 
- R. Jain and I. Chlamtac, The P^2 algorithmus for dynamic calculation of quantiles and
- histograms without storing observations, Communications of the ACM,
+ R. Jain and I. Chlamtac, The P^2 algorithmus for dynamic calculation of quantiles and
+ histograms without storing observations, Communications of the ACM,
         Volume 28 (October), Number 10, 1985, p. 1076-1085.
 
         @param p_square_cumulative_distribution_num_cells
@@ -58,7 +58,7 @@
         typedef std::vector<float_type> array_type;
         // for boost::result_of
         typedef iterator_range<typename histogram_type::iterator> result_type;
-
+
         template<typename Args>
         weighted_p_square_cumulative_distribution_impl(Args const &args)
           : num_cells(args[p_square_cumulative_distribution_num_cells])
@@ -67,14 +67,14 @@
           , desired_positions(num_cells + 1)
           , histogram(num_cells + 1)
           , is_dirty(true)
- {
+ {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             this->is_dirty = true;
-
+
             std::size_t cnt = count(args);
             std::size_t sample_cell = 1; // k
             std::size_t b = this->num_cells;
@@ -84,22 +84,22 @@
             {
                 this->heights[cnt - 1] = args[sample];
                 this->actual_positions[cnt - 1] = args[weight];
-
+
                 // complete the initialization of heights by sorting
                 if (cnt == b + 1)
                 {
                     //std::sort(this->heights.begin(), this->heights.end());
-
- // TODO: we need to sort the initial samples (in heights) in ascending order and
- // sort their weights (in actual_positions) the same way. The following lines do
+
+ // TODO: we need to sort the initial samples (in heights) in ascending order and
+ // sort their weights (in actual_positions) the same way. The following lines do
                     // it, but there must be a better and more efficient way of doing this.
                     typename array_type::iterator it_begin, it_end, it_min;
-
+
                     it_begin = this->heights.begin();
                     it_end = this->heights.end();
-
+
                     std::size_t pos = 0;
-
+
                     while (it_begin != it_end)
                     {
                         it_min = std::min_element(it_begin, it_end);
@@ -109,14 +109,14 @@
                         ++it_begin;
                         ++pos;
                     }
-
+
                     // calculate correct initial actual positions
                     for (std::size_t i = 1; i < b; ++i)
                     {
                         this->actual_positions[i] += this->actual_positions[i - 1];
                     }
                 }
- }
+ }
             else
             {
                 // find cell k such that heights[k-1] <= args[sample] < heights[k] and adjust extreme values
@@ -139,46 +139,46 @@
                       , this->heights.end()
                       , args[sample]
                     );
-
+
                     sample_cell = std::distance(this->heights.begin(), it);
                 }
-
+
                 // increment positions of markers above sample_cell
                 for (std::size_t i = sample_cell; i < b + 1; ++i)
                 {
                     this->actual_positions[i] += args[weight];
                 }
-
+
                 // determine desired marker positions
                 for (std::size_t i = 1; i < b + 1; ++i)
                 {
                     this->desired_positions[i] = this->actual_positions[0]
                                                + numeric::average((i-1) * (sum_of_weights(args) - this->actual_positions[0]), b);
                 }
-
+
                 // adjust heights of markers 2 to num_cells if necessary
                 for (std::size_t i = 1; i < b; ++i)
                 {
                     // offset to desire position
                     float_type d = this->desired_positions[i] - this->actual_positions[i];
-
+
                     // offset to next position
                     float_type dp = this->actual_positions[i + 1] - this->actual_positions[i];
-
+
                     // offset to previous position
                     float_type dm = this->actual_positions[i - 1] - this->actual_positions[i];
-
+
                     // height ds
                     float_type hp = (this->heights[i + 1] - this->heights[i]) / dp;
                     float_type hm = (this->heights[i - 1] - this->heights[i]) / dm;
-
+
                     if ( ( d >= 1. && dp > 1. ) || ( d <= -1. && dm < -1. ) )
                     {
                         short sign_d = static_cast<short>(d / std::abs(d));
-
+
                         // try adjusting heights[i] using p-squared formula
                         float_type h = this->heights[i] + sign_d / (dp - dm) * ( (sign_d - dm) * hp + (dp - sign_d) * hm );
-
+
                         if ( this->heights[i - 1] < h && h < this->heights[i + 1] )
                         {
                             this->heights[i] = h;
@@ -207,17 +207,17 @@
             if (this->is_dirty)
             {
                 this->is_dirty = false;
-
+
                 // creates a vector of std::pair where each pair i holds
                 // the values heights[i] (x-axis of histogram) and
                 // actual_positions[i] / sum_of_weights (y-axis of histogram)
-
+
                 for (std::size_t i = 0; i < this->histogram.size(); ++i)
                 {
                     this->histogram[i] = std::make_pair(this->heights[i], numeric::average(this->actual_positions[i], sum_of_weights(args)));
                 }
             }
-
+
             return make_iterator_range(this->histogram);
         }
 

Modified: trunk/boost/accumulators/statistics/weighted_p_square_quantile.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_p_square_quantile.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_p_square_quantile.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -32,22 +32,22 @@
     /**
         @brief Single quantile estimation with the \f$P^2\f$ algorithm for weighted samples
 
- This version of the \f$P^2\f$ algorithm extends the \f$P^2\f$ algorithm to support weighted samples.
+ This version of the \f$P^2\f$ algorithm extends the \f$P^2\f$ algorithm to support weighted samples.
         The \f$P^2\f$ algorithm estimates a quantile dynamically without storing samples. Instead of
- storing the whole sample cumulative distribution, only five points (markers) are stored. The heights
- of these markers are the minimum and the maximum of the samples and the current estimates of the
- \f$(p/2)\f$-, \f$p\f$ - and \f$(1+p)/2\f$ -quantiles. Their positions are equal to the number
- of samples that are smaller or equal to the markers. Each time a new sample is added, the
+ storing the whole sample cumulative distribution, only five points (markers) are stored. The heights
+ of these markers are the minimum and the maximum of the samples and the current estimates of the
+ \f$(p/2)\f$-, \f$p\f$ - and \f$(1+p)/2\f$ -quantiles. Their positions are equal to the number
+ of samples that are smaller or equal to the markers. Each time a new sample is added, the
         positions of the markers are updated and if necessary their heights are adjusted using a piecewise-
         parabolic formula.
 
         For further details, see
 
- R. Jain and I. Chlamtac, The P^2 algorithmus for dynamic calculation of quantiles and
- histograms without storing observations, Communications of the ACM,
+ R. Jain and I. Chlamtac, The P^2 algorithmus for dynamic calculation of quantiles and
+ histograms without storing observations, Communications of the ACM,
         Volume 28 (October), Number 10, 1985, p. 1076-1085.
 
- @param quantile_probability
+ @param quantile_probability
     */
     template<typename Sample, typename Weight, typename Impl>
     struct weighted_p_square_quantile_impl
@@ -58,44 +58,44 @@
         typedef array<float_type, 5> array_type;
         // for boost::result_of
         typedef float_type result_type;
-
+
         template<typename Args>
         weighted_p_square_quantile_impl(Args const &args)
- : p(is_same<Impl, for_median>::value ? 0.5 : args[quantile_probability | 0.5])
+ : p(is_same<Impl, for_median>::value ? 0.5 : args[quantile_probability | 0.5])
           , heights()
           , actual_positions()
           , desired_positions()
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             std::size_t cnt = count(args);
-
+
             // accumulate 5 first samples
             if (cnt <= 5)
             {
                 this->heights[cnt - 1] = args[sample];
-
+
                 // In this initialization phase, actual_positions stores the weights of the
                 // inital samples that are needed at the end of the initialization phase to
                 // compute the correct initial positions of the markers.
                 this->actual_positions[cnt - 1] = args[weight];
-
+
                 // complete the initialization of heights and actual_positions by sorting
                 if (cnt == 5)
                 {
- // TODO: we need to sort the initial samples (in heights) in ascending order and
- // sort their weights (in actual_positions) the same way. The following lines do
+ // TODO: we need to sort the initial samples (in heights) in ascending order and
+ // sort their weights (in actual_positions) the same way. The following lines do
                     // it, but there must be a better and more efficient way of doing this.
                     typename array_type::iterator it_begin, it_end, it_min;
-
+
                     it_begin = this->heights.begin();
                     it_end = this->heights.end();
-
+
                     std::size_t pos = 0;
-
+
                     while (it_begin != it_end)
                     {
                         it_min = std::min_element(it_begin, it_end);
@@ -105,7 +105,7 @@
                         ++it_begin;
                         ++pos;
                     }
-
+
                     // calculate correct initial actual positions
                     for (std::size_t i = 1; i < 5; ++i)
                     {
@@ -140,13 +140,13 @@
 
                     sample_cell = std::distance(this->heights.begin(), it);
                 }
-
+
                 // increment positions of markers above sample_cell
                 for (std::size_t i = sample_cell; i < 5; ++i)
                 {
                     this->actual_positions[i] += args[weight];
                 }
-
+
                 // update desired positions for all markers
                 this->desired_positions[0] = this->actual_positions[0];
                 this->desired_positions[1] = (sum_of_weights(args) - this->actual_positions[0])
@@ -156,30 +156,30 @@
                 this->desired_positions[3] = (sum_of_weights(args) - this->actual_positions[0])
                                            * (1. + this->p)/2. + this->actual_positions[0];
                 this->desired_positions[4] = sum_of_weights(args);
-
+
                 // adjust height and actual positions of markers 1 to 3 if necessary
                 for (std::size_t i = 1; i <= 3; ++i)
                 {
                     // offset to desired positions
                     float_type d = this->desired_positions[i] - this->actual_positions[i];
-
+
                     // offset to next position
                     float_type dp = this->actual_positions[i + 1] - this->actual_positions[i];
-
+
                     // offset to previous position
                     float_type dm = this->actual_positions[i - 1] - this->actual_positions[i];
-
+
                     // height ds
                     float_type hp = (this->heights[i + 1] - this->heights[i]) / dp;
                     float_type hm = (this->heights[i - 1] - this->heights[i]) / dm;
-
+
                     if ( ( d >= 1. && dp > 1. ) || ( d <= -1. && dm < -1. ) )
                     {
                         short sign_d = static_cast<short>(d / std::abs(d));
-
+
                         // try adjusting heights[i] using p-squared formula
                         float_type h = this->heights[i] + sign_d / (dp - dm) * ( (sign_d - dm) * hp + (dp - sign_d) * hm );
-
+
                         if ( this->heights[i - 1] < h && h < this->heights[i + 1] )
                         {
                             this->heights[i] = h;

Modified: trunk/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -33,14 +33,14 @@
 {
 
 namespace impl
-{
+{
 
     ///////////////////////////////////////////////////////////////////////////////
     // weighted_peaks_over_threshold_impl
     // works with an explicit threshold value and does not depend on order statistics of weighted samples
     /**
         @brief Weighted Peaks over Threshold Method for Weighted Quantile and Weighted Tail Mean Estimation
-
+
         @sa peaks_over_threshold_impl
 
         @param quantile_probability
@@ -54,7 +54,7 @@
         typedef typename numeric::functional::average<weighted_sample, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef boost::tuple<float_type, float_type, float_type> result_type;
-
+
         template<typename Args>
         weighted_peaks_over_threshold_impl(Args const &args)
           : sign_((is_same<LeftRight, left>::value) ? -1 : 1)
@@ -66,12 +66,12 @@
           , is_dirty_(true)
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
             this->is_dirty_ = true;
-
+
             if (this->sign_ * args[sample] > this->threshold_)
             {
                 this->mu_ += args[weight] * args[sample];
@@ -86,13 +86,13 @@
             if (this->is_dirty_)
             {
                 this->is_dirty_ = false;
-
+
                 this->mu_ = this->sign_ * numeric::average(this->mu_, this->w_sum_);
                 this->sigma2_ = numeric::average(this->sigma2_, this->w_sum_);
                 this->sigma2_ -= this->mu_ * this->mu_;
-
+
                 float_type threshold_probability = numeric::average(sum_of_weights(args) - this->w_sum_, sum_of_weights(args));
-
+
                 float_type tmp = numeric::average(( this->mu_ - this->threshold_ )*( this->mu_ - this->threshold_ ), this->sigma2_);
                 float_type xi_hat = 0.5 * ( 1. - tmp );
                 float_type beta_hat = 0.5 * ( this->mu_ - this->threshold_ ) * ( 1. + tmp );
@@ -100,7 +100,7 @@
                 float_type u_bar = this->threshold_ - beta_bar * ( std::pow(1. - threshold_probability, -xi_hat) - 1.)/xi_hat;
                 this->fit_parameters_ = boost::make_tuple(u_bar, beta_bar, xi_hat);
             }
-
+
             return this->fit_parameters_;
         }
 
@@ -121,7 +121,7 @@
         @brief Peaks over Threshold Method for Quantile and Tail Mean Estimation
 
         @sa weighted_peaks_over_threshold_impl
-
+
         @param quantile_probability
         @param pot_threshold_probability
     */
@@ -133,7 +133,7 @@
         typedef typename numeric::functional::average<weighted_sample, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef boost::tuple<float_type, float_type, float_type> result_type;
-
+
         template<typename Args>
         weighted_peaks_over_threshold_prob_impl(Args const &args)
           : sign_((is_same<LeftRight, left>::value) ? -1 : 1)
@@ -144,25 +144,25 @@
           , is_dirty_(true)
         {
         }
-
+
         void operator ()(dont_care)
         {
             this->is_dirty_ = true;
         }
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             if (this->is_dirty_)
- {
+ {
                 this->is_dirty_ = false;
-
+
                 float_type threshold = sum_of_weights(args)
                              * ( ( is_same<LeftRight, left>::value ) ? this->threshold_probability_ : 1. - this->threshold_probability_ );
 
                 std::size_t n = 0;
                 Weight sum = Weight(0);
-
+
                 while (sum < threshold)
                 {
                     if (n < tail_weights(args).size())
@@ -191,17 +191,17 @@
                         }
                     }
                 }
-
+
                 float_type u = *(tail(args).begin() + n - 1) * this->sign_;
 
-
+
                 this->mu_ = this->sign_ * numeric::average(this->mu_, sum);
                 this->sigma2_ = numeric::average(this->sigma2_, sum);
                 this->sigma2_ -= this->mu_ * this->mu_;
 
                 if (is_same<LeftRight, left>::value)
                     this->threshold_probability_ = 1. - this->threshold_probability_;
-
+
                 float_type tmp = numeric::average(( this->mu_ - u )*( this->mu_ - u ), this->sigma2_);
                 float_type xi_hat = 0.5 * ( 1. - tmp );
                 float_type beta_hat = 0.5 * ( this->mu_ - u ) * ( 1. + tmp );
@@ -210,7 +210,7 @@
                 this->fit_parameters_ = boost::make_tuple(u_bar, beta_bar, xi_hat);
 
             }
-
+
             return this->fit_parameters_;
         }
 
@@ -219,7 +219,7 @@
         mutable float_type mu_; // mean of samples above threshold u
         mutable float_type sigma2_; // variance of samples above threshold u
         mutable float_type threshold_probability_;
- mutable result_type fit_parameters_; // boost::tuple that stores fit parameters
+ mutable result_type fit_parameters_; // boost::tuple that stores fit parameters
         mutable bool is_dirty_;
     };
 
@@ -238,7 +238,7 @@
         /// INTERNAL ONLY
         typedef accumulators::impl::weighted_peaks_over_threshold_impl<mpl::_1, mpl::_2, LeftRight> impl;
     };
-
+
     template<typename LeftRight>
     struct weighted_peaks_over_threshold_prob
       : depends_on<sum_of_weights, tail_weights<LeftRight> >

Modified: trunk/boost/accumulators/statistics/weighted_skewness.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_skewness.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_skewness.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -31,18 +31,18 @@
 
         The skewness of a sample distribution is defined as the ratio of the 3rd central moment and the \f$ 3/2 \f$-th power $
         of the 2nd central moment (the variance) of the samples. The skewness can also be expressed by the simple moments:
-
+
         \f[
             \hat{g}_1 =
                 \frac
                 {\widehat{m}_n^{(3)}-3\widehat{m}_n^{(2)}\hat{\mu}_n+2\hat{\mu}_n^3}
                 {\left(\widehat{m}_n^{(2)} - \hat{\mu}_n^{2}\right)^{3/2}}
         \f]
-
- where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
+
+ where \f$ \widehat{m}_n^{(i)} \f$ are the \f$ i \f$-th moment and \f$ \hat{\mu}_n \f$ the mean (first moment) of the
         \f$ n \f$ samples.
-
- The skewness estimator for weighted samples is formally identical to the estimator for unweighted samples, except that
+
+ The skewness estimator for weighted samples is formally identical to the estimator for unweighted samples, except that
         the weighted counterparts of all measures it depends on are to be taken.
     */
     template<typename Sample, typename Weight>
@@ -59,10 +59,10 @@
         result_type result(Args const &args) const
         {
             return numeric::average(
- weighted_moment<3>(args)
+ weighted_moment<3>(args)
                         - 3. * weighted_moment<2>(args) * weighted_mean(args)
                         + 2. * weighted_mean(args) * weighted_mean(args) * weighted_mean(args)
- , ( weighted_moment<2>(args) - weighted_mean(args) * weighted_mean(args) )
+ , ( weighted_moment<2>(args) - weighted_mean(args) * weighted_mean(args) )
                       * std::sqrt( weighted_moment<2>(args) - weighted_mean(args) * weighted_mean(args) )
                    );
         }

Modified: trunk/boost/accumulators/statistics/weighted_sum.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_sum.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_sum.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -30,7 +30,7 @@
       : accumulator_base
     {
         typedef typename numeric::functional::multiplies<Sample, Weight>::result_type weighted_sample;
-
+
         // for boost::result_of
         typedef weighted_sample result_type;
 
@@ -42,7 +42,7 @@
             )
         {
         }
-
+
         template<typename Args>
         void operator ()(Args const &args)
         {
@@ -74,7 +74,7 @@
         ///
         typedef accumulators::impl::weighted_sum_impl<mpl::_1, mpl::_2, tag::sample> impl;
     };
-
+
     template<typename VariateType, typename VariateTag>
     struct weighted_sum_of_variates
       : depends_on<>
@@ -83,7 +83,7 @@
         ///
         typedef accumulators::impl::weighted_sum_impl<VariateType, mpl::_2, VariateTag> impl;
     };
-
+
     struct abstract_weighted_sum_of_variates
       : depends_on<>
     {

Modified: trunk/boost/accumulators/statistics/weighted_tail_mean.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_tail_mean.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_tail_mean.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -32,44 +32,44 @@
 
 namespace impl
 {
-
+
     ///////////////////////////////////////////////////////////////////////////////
     // coherent_weighted_tail_mean_impl
     //
     // TODO
-
+
     ///////////////////////////////////////////////////////////////////////////////
     // non_coherent_weighted_tail_mean_impl
- //
+ //
     /**
         @brief Estimation of the (non-coherent) weighted tail mean based on order statistics (for both left and right tails)
 
-
-
- An estimation of the non-coherent, weighted tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$ is given by the weighted mean
+
+
+ An estimation of the non-coherent, weighted tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$ is given by the weighted mean
         of the
-
+
         \f[
             \lambda = \inf\left\{ l \left| \frac{1}{\bar{w}_n}\sum_{i=1}^{l} w_i \geq \alpha \right. \right\}
         \f]
-
+
         smallest samples (left tail) or the weighted mean of the
-
+
         \f[
             n + 1 - \rho = n + 1 - \sup\left\{ r \left| \frac{1}{\bar{w}_n}\sum_{i=r}^{n} w_i \geq (1 - \alpha) \right. \right\}
         \f]
-
- largest samples (right tail) above a quantile \f$\hat{q}_{\alpha}\f$ of level \f$\alpha\f$, \f$n\f$ being the total number of sample
+
+ largest samples (right tail) above a quantile \f$\hat{q}_{\alpha}\f$ of level \f$\alpha\f$, \f$n\f$ being the total number of sample
         and \f$\bar{w}_n\f$ the sum of all \f$n\f$ weights:
-
+
         \f[
             \widehat{NCTM}_{n,\alpha}^{\mathrm{left}}(X) = \frac{\sum_{i=1}^{\lambda} w_i X_{i:n}}{\sum_{i=1}^{\lambda} w_i},
         \f]
-
+
         \f[
             \widehat{NCTM}_{n,\alpha}^{\mathrm{right}}(X) = \frac{\sum_{i=\rho}^n w_i X_{i:n}}{\sum_{i=\rho}^n w_i}.
         \f]
-
+
         @param quantile_probability
     */
     template<typename Sample, typename Weight, typename LeftRight>
@@ -80,9 +80,9 @@
         typedef typename numeric::functional::average<Weight, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef typename numeric::functional::average<weighted_sample, std::size_t>::result_type result_type;
-
+
         non_coherent_weighted_tail_mean_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
@@ -91,7 +91,7 @@
 
             std::size_t n = 0;
             Weight sum = Weight(0);
-
+
             while (sum < threshold)
             {
                 if (n < tail_weights(args).size())
@@ -114,7 +114,7 @@
                     }
                 }
             }
-
+
             return numeric::average(
                 std::inner_product(
                     tail(args).begin()
@@ -123,7 +123,7 @@
                   , weighted_sample(0)
                 )
               , sum
- );
+ );
         }
     };
 

Modified: trunk/boost/accumulators/statistics/weighted_tail_quantile.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_tail_quantile.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_tail_quantile.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -32,29 +32,29 @@
 {
 
 namespace impl
-{
+{
     ///////////////////////////////////////////////////////////////////////////////
     // weighted_tail_quantile_impl
     // Tail quantile estimation based on order statistics of weighted samples
     /**
         @brief Tail quantile estimation based on order statistics of weighted samples (for both left and right tails)
 
- An estimator \f$\hat{q}\f$ of tail quantiles with level \f$\alpha\f$ based on order statistics
- \f$X_{1:n} \leq X_{2:n} \leq\dots\leq X_{n:n}\f$ of weighted samples are given by \f$X_{\lambda:n}\f$ (left tail)
+ An estimator \f$\hat{q}\f$ of tail quantiles with level \f$\alpha\f$ based on order statistics
+ \f$X_{1:n} \leq X_{2:n} \leq\dots\leq X_{n:n}\f$ of weighted samples are given by \f$X_{\lambda:n}\f$ (left tail)
         and \f$X_{\rho:n}\f$ (right tail), where
-
+
             \f[
                 \lambda = \inf\left\{ l \left| \frac{1}{\bar{w}_n}\sum_{i=1}^{l} w_i \geq \alpha \right. \right\}
             \f]
-
+
         and
-
+
             \f[
                 \rho = \sup\left\{ r \left| \frac{1}{\bar{w}_n}\sum_{i=r}^{n} w_i \geq (1 - \alpha) \right. \right\},
             \f]
-
+
         \f$n\f$ being the number of samples and \f$\bar{w}_n\f$ the sum of all weights.
-
+
         @param quantile_probability
     */
     template<typename Sample, typename Weight, typename LeftRight>
@@ -64,9 +64,9 @@
         typedef typename numeric::functional::average<Weight, std::size_t>::result_type float_type;
         // for boost::result_of
         typedef Sample result_type;
-
+
         weighted_tail_quantile_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
@@ -75,7 +75,7 @@
 
             std::size_t n = 0;
             Weight sum = Weight(0);
-
+
             while (sum < threshold)
             {
                 if (n < tail_weights(args).size())
@@ -98,8 +98,8 @@
                     }
                 }
             }
-
- // Note that the cached samples of the left are sorted in ascending order,
+
+ // Note that the cached samples of the left are sorted in ascending order,
             // whereas the samples of the right tail are sorted in descending order
             return *(boost::begin(tail(args)) + n - 1);
         }

Modified: trunk/boost/accumulators/statistics/weighted_tail_variate_means.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_tail_variate_means.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_tail_variate_means.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -53,49 +53,49 @@
 {
     /**
         @brief Estimation of the absolute and relative weighted tail variate means (for both left and right tails)
-
- For all \f$j\f$-th variates associated to the
-
+
+ For all \f$j\f$-th variates associated to the
+
         \f[
             \lambda = \inf\left\{ l \left| \frac{1}{\bar{w}_n}\sum_{i=1}^{l} w_i \geq \alpha \right. \right\}
         \f]
-
+
         smallest samples (left tail) or the weighted mean of the
-
+
         \f[
             n + 1 - \rho = n + 1 - \sup\left\{ r \left| \frac{1}{\bar{w}_n}\sum_{i=r}^{n} w_i \geq (1 - \alpha) \right. \right\}
         \f]
-
- largest samples (right tail), the absolute weighted tail means \f$\widehat{ATM}_{n,\alpha}(X, j)\f$
- are computed and returned as an iterator range. Alternatively, the relative weighted tail means
- \f$\widehat{RTM}_{n,\alpha}(X, j)\f$ are returned, which are the absolute weighted tail means
+
+ largest samples (right tail), the absolute weighted tail means \f$\widehat{ATM}_{n,\alpha}(X, j)\f$
+ are computed and returned as an iterator range. Alternatively, the relative weighted tail means
+ \f$\widehat{RTM}_{n,\alpha}(X, j)\f$ are returned, which are the absolute weighted tail means
         normalized with the weighted (non-coherent) sample tail mean \f$\widehat{NCTM}_{n,\alpha}(X)\f$.
-
+
         \f[
- \widehat{ATM}_{n,\alpha}^{\mathrm{right}}(X, j) =
+ \widehat{ATM}_{n,\alpha}^{\mathrm{right}}(X, j) =
                 \frac{1}{\sum_{i=\rho}^n w_i}
                 \sum_{i=\rho}^n w_i \xi_{j,i}
         \f]
-
+
         \f[
- \widehat{ATM}_{n,\alpha}^{\mathrm{left}}(X, j) =
+ \widehat{ATM}_{n,\alpha}^{\mathrm{left}}(X, j) =
                 \frac{1}{\sum_{i=1}^{\lambda}}
                 \sum_{i=1}^{\lambda} w_i \xi_{j,i}
         \f]
-
+
         \f[
- \widehat{RTM}_{n,\alpha}^{\mathrm{right}}(X, j) =
+ \widehat{RTM}_{n,\alpha}^{\mathrm{right}}(X, j) =
                 \frac{\sum_{i=\rho}^n w_i \xi_{j,i}}
             {\sum_{i=\rho}^n w_i \widehat{NCTM}_{n,\alpha}^{\mathrm{right}}(X)}
         \f]
-
+
         \f[
- \widehat{RTM}_{n,\alpha}^{\mathrm{left}}(X, j) =
+ \widehat{RTM}_{n,\alpha}^{\mathrm{left}}(X, j) =
                 \frac{\sum_{i=1}^{\lambda} w_i \xi_{j,i}}
             {\sum_{i=1}^{\lambda} w_i \widehat{NCTM}_{n,\alpha}^{\mathrm{left}}(X)}
         \f]
     */
-
+
     ///////////////////////////////////////////////////////////////////////////////
     // weighted_tail_variate_means_impl
     // by default: absolute weighted_tail_variate_means
@@ -107,18 +107,18 @@
         typedef typename numeric::functional::average<typename numeric::functional::multiplies<VariateType, Weight>::result_type, Weight>::result_type array_type;
         // for boost::result_of
         typedef iterator_range<typename array_type::iterator> result_type;
-
+
         weighted_tail_variate_means_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
             float_type threshold = sum_of_weights(args)
                              * ( ( is_same<LeftRight, left>::value ) ? args[quantile_probability] : 1. - args[quantile_probability] );
-
+
             std::size_t n = 0;
             Weight sum = Weight(0);
-
+
             while (sum < threshold)
             {
                 if (n < tail_weights(args).size())
@@ -144,9 +144,9 @@
                     }
                 }
             }
-
+
             std::size_t num_variates = tail_variate(args).begin()->size();
-
+
             this->tail_means_.clear();
             this->tail_means_.resize(num_variates, Sample(0));
 
@@ -158,27 +158,27 @@
               , numeric::functional::plus<array_type const, array_type const>()
               , numeric::functional::multiply_and_promote_to_double<VariateType const, Weight const>()
             );
-
+
             float_type factor = sum * ( (is_same<Impl, relative>::value) ? non_coherent_weighted_tail_mean(args) : 1. );
-
+
             using boost::lambda::_1;
-
+
             std::transform(
                 this->tail_means_.begin()
               , this->tail_means_.end()
               , this->tail_means_.begin()
               , _1 / factor
- );
-
+ );
+
             return make_iterator_range(this->tail_means_);
         }
 
     private:
-
+
         mutable array_type tail_means_;
-
+
     };
-
+
 } // namespace impl
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -193,7 +193,7 @@
     {
         typedef accumulators::impl::weighted_tail_variate_means_impl<mpl::_1, mpl::_2, absolute, LeftRight, VariateType> impl;
     };
- template<typename LeftRight, typename VariateType, typename VariateTag>
+ template<typename LeftRight, typename VariateType, typename VariateTag>
     struct relative_weighted_tail_variate_means
       : depends_on<non_coherent_weighted_tail_mean<LeftRight>, tail_variate<VariateType, VariateTag, LeftRight>, tail_weights<LeftRight> >
     {

Modified: trunk/boost/accumulators/statistics/weighted_variance.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_variance.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_variance.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -28,11 +28,11 @@
 {
     //! Lazy calculation of variance of weighted samples.
     /*!
- The default implementation of the variance of weighted samples is based on the second moment
+ The default implementation of the variance of weighted samples is based on the second moment
         \f$\widehat{m}_n^{(2)}\f$ (weighted_moment<2>) and the mean\f$ \hat{\mu}_n\f$ (weighted_mean):
         \f{
             \hat{\sigma}_n^2 = \widehat{m}_n^{(2)}-\hat{\mu}_n^2,
- \f]
+ \f]
         where \f$n\f$ is the number of samples.
     */
     template<typename Sample, typename Weight, typename MeanFeature>
@@ -44,7 +44,7 @@
         typedef typename numeric::functional::average<weighted_sample, Weight>::result_type result_type;
 
         weighted_variance_impl(dont_care) {}
-
+
         template<typename Args>
         result_type result(Args const &args) const
         {
@@ -58,13 +58,13 @@
     /*!
         Iterative calculation of variance of weighted samples:
         \f[
- \hat{\sigma}_n^2 =
- \frac{\bar{w}_n - w_n}{\bar{w}_n}\hat{\sigma}_{n - 1}^2
+ \hat{\sigma}_n^2 =
+ \frac{\bar{w}_n - w_n}{\bar{w}_n}\hat{\sigma}_{n - 1}^2
               + \frac{w_n}{\bar{w}_n - w_n}\left(X_n - \hat{\mu}_n\right)^2
             ,\quad n\ge2,\quad\hat{\sigma}_0^2 = 0.
         \f]
- where \f$\bar{w}_n\f$ is the sum of the \f$n\f$ weights \f$w_i\f$ and \f$\hat{\mu}_n\f$
- the estimate of the mean of the weighted smaples. Note that the sample variance is not defined for
+ where \f$\bar{w}_n\f$ is the sum of the \f$n\f$ weights \f$w_i\f$ and \f$\hat{\mu}_n\f$
+ the estimate of the mean of the weighted smaples. Note that the sample variance is not defined for
         \f$n <= 1\f$.
     */
     template<typename Sample, typename Weight, typename MeanFeature, typename Tag>
@@ -85,13 +85,13 @@
         void operator ()(Args const &args)
         {
             std::size_t cnt = count(args);
-
+
             if(cnt > 1)
             {
                 extractor<MeanFeature> const some_mean = {};
-
+
                 result_type tmp = args[parameter::keyword<Tag>::get()] - some_mean(args);
-
+
                 this->weighted_variance =
                     numeric::average(this->weighted_variance * (sum_of_weights(args) - args[weight]), sum_of_weights(args))
                   + numeric::average(tmp * tmp * args[weight], sum_of_weights(args) - args[weight] );

Modified: trunk/boost/accumulators/statistics_fwd.hpp
==============================================================================
--- trunk/boost/accumulators/statistics_fwd.hpp (original)
+++ trunk/boost/accumulators/statistics_fwd.hpp 2008-01-07 14:08:16 EST (Mon, 07 Jan 2008)
@@ -51,7 +51,7 @@
 using extract::tail_mean;
 
 namespace tag
-{
+{
     ///////////////////////////////////////////////////////////////////////////////
     // Variates tags
     struct weights;
@@ -121,7 +121,7 @@
     struct right_tail_variate;
     template<typename VariateType, typename VariateTag, typename LeftRight>
     struct left_tail_variate;
- template<typename LeftRight, typename VariateType, typename VariateTag>
+ template<typename LeftRight, typename VariateType, typename VariateTag>
     struct tail_variate_means;
     template<typename LeftRight, typename VariateType, typename VariateTag>
     struct absolute_tail_variate_means;
@@ -134,7 +134,7 @@
     struct weighted_density;
     struct weighted_kurtosis;
     struct weighted_mean;
- struct immediate_weighted_mean;
+ struct immediate_weighted_mean;
     template<typename VariateType, typename VariateTag>
     struct weighted_mean_of_variates;
     template<typename VariateType, typename VariateTag>
@@ -187,28 +187,28 @@
     ///////////////////////////////////////////////////////////////////////////////
     // 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;
 
@@ -220,7 +220,7 @@
 
     template<typename Sample>
     struct with_p_square_cumulative_distribution_median_impl;
-
+
     template<typename Sample>
     struct min_impl;
 
@@ -232,16 +232,16 @@
 
     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;
 
@@ -250,37 +250,37 @@
 
     template<typename Sample>
     struct skewness_impl;
-
+
     template<typename Sample, typename Tag = tag::sample>
     struct sum_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 variance_impl;
 
     template<typename Sample, typename MeanFeature, typename Tag>
     struct immediate_variance_impl;
-
+
     template<typename Sample, typename Weight, typename VariateType, typename VariateTag>
     struct weighted_covariance_impl;
-
+
     template<typename Sample, typename Weight>
     struct weighted_density_impl;
 
@@ -294,22 +294,22 @@
     struct with_density_weighted_median_impl;
 
     template<typename Sample, typename Weight>
- struct with_p_square_cumulative_distribution_weighted_median_impl;
+ 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;
-
+ struct weighted_peaks_over_threshold_prob_impl;
+
     template<typename Sample, typename Weight>
- struct with_p_square_cumulative_distribution_weighted_median_impl;
+ struct with_p_square_cumulative_distribution_weighted_median_impl;
 
     template<typename Sample, typename Weight>
     struct weighted_extended_p_square_impl;
@@ -328,16 +328,16 @@
 
     template<typename Sample, typename Weight, typename Tag>
     struct weighted_sum_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 weighted_variance_impl;
 


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