|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77422 - in trunk: boost/accumulators boost/accumulators/statistics libs/accumulators/doc libs/accumulators/test
From: eric_at_[hidden]
Date: 2012-03-19 17:55:43
Author: eric_niebler
Date: 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
New Revision: 77422
URL: http://svn.boost.org/trac/boost/changeset/77422
Log:
shorten filenames to meet boost guidelines
Added:
trunk/boost/accumulators/statistics/p_square_cumul_dist.hpp
- copied, changed from r77411, /trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp
trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp (contents, props changed)
trunk/boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp
- copied, changed from r77411, /trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp
trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp (contents, props changed)
trunk/libs/accumulators/test/p_square_cumul_dist.cpp
- copied, changed from r77411, /trunk/libs/accumulators/test/p_square_cumulative_distribution.cpp
trunk/libs/accumulators/test/weighted_p_square_cumul_dist.cpp
- copied, changed from r77411, /trunk/libs/accumulators/test/weighted_p_square_cum_dist.cpp
Removed:
trunk/libs/accumulators/test/p_square_cumulative_distribution.cpp
trunk/libs/accumulators/test/weighted_p_square_cum_dist.cpp
Text files modified:
trunk/boost/accumulators/statistics.hpp | 4 ++--
trunk/boost/accumulators/statistics/median.hpp | 2 +-
trunk/boost/accumulators/statistics/p_square_cumul_dist.hpp | 4 ++--
trunk/boost/accumulators/statistics/weighted_median.hpp | 2 +-
trunk/boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp | 6 +++---
trunk/libs/accumulators/doc/accumulators.qbk | 4 ++--
trunk/libs/accumulators/test/Jamfile.v2 | 4 ++--
trunk/libs/accumulators/test/p_square_cumul_dist.cpp | 4 ++--
trunk/libs/accumulators/test/weighted_p_square_cumul_dist.cpp | 4 ++--
9 files changed, 17 insertions(+), 17 deletions(-)
Modified: trunk/boost/accumulators/statistics.hpp
==============================================================================
--- trunk/boost/accumulators/statistics.hpp (original)
+++ trunk/boost/accumulators/statistics.hpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -25,7 +25,7 @@
#include <boost/accumulators/statistics/peaks_over_threshold.hpp>
#include <boost/accumulators/statistics/pot_tail_mean.hpp>
#include <boost/accumulators/statistics/pot_quantile.hpp>
-#include <boost/accumulators/statistics/p_square_cumulative_distribution.hpp>
+#include <boost/accumulators/statistics/p_square_cumul_dist.hpp>
#include <boost/accumulators/statistics/p_square_quantile.hpp>
#include <boost/accumulators/statistics/skewness.hpp>
#include <boost/accumulators/statistics/stats.hpp>
@@ -45,7 +45,7 @@
#include <boost/accumulators/statistics/weighted_median.hpp>
#include <boost/accumulators/statistics/weighted_moment.hpp>
#include <boost/accumulators/statistics/weighted_peaks_over_threshold.hpp>
-#include <boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp>
+#include <boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp>
#include <boost/accumulators/statistics/weighted_p_square_quantile.hpp>
#include <boost/accumulators/statistics/weighted_skewness.hpp>
#include <boost/accumulators/statistics/weighted_sum.hpp>
Modified: trunk/boost/accumulators/statistics/median.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/median.hpp (original)
+++ trunk/boost/accumulators/statistics/median.hpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -19,7 +19,7 @@
#include <boost/accumulators/statistics/count.hpp>
#include <boost/accumulators/statistics/p_square_quantile.hpp>
#include <boost/accumulators/statistics/density.hpp>
-#include <boost/accumulators/statistics/p_square_cumulative_distribution.hpp>
+#include <boost/accumulators/statistics/p_square_cumul_dist.hpp>
namespace boost { namespace accumulators
{
Copied: trunk/boost/accumulators/statistics/p_square_cumul_dist.hpp (from r77411, /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_cumul_dist.hpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -5,8 +5,8 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_ACCUMULATORS_STATISTICS_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_DE_01_01_2006
-#define BOOST_ACCUMULATORS_STATISTICS_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_DE_01_01_2006
+#ifndef BOOST_ACCUMULATORS_STATISTICS_P_SQUARE_CUMUL_DIST_HPP_DE_01_01_2006
+#define BOOST_ACCUMULATORS_STATISTICS_P_SQUARE_CUMUL_DIST_HPP_DE_01_01_2006
#include <vector>
#include <functional>
Added: trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/accumulators/statistics/p_square_cumulative_distribution.hpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+// p_square_cumulative_distribution.hpp
+//
+// Copyright 2012 Eric Niebler. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_ACCUMULATORS_STATISTICS_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_03_19_2012
+#define BOOST_ACCUMULATORS_STATISTICS_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_03_19_2012
+
+#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
+# pragma message ("Warning: This header is deprecated. Please use: boost/accumulators/statistics/p_square_cumul_dist.hpp")
+#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
+# warning "This header is deprecated. Please use: boost/accumulators/statistics/p_square_cumul_dist.hpp"
+#endif
+
+#include <boost/accumulators/statistics/p_square_cumul_dist.hpp>
+
+#endif
Modified: trunk/boost/accumulators/statistics/weighted_median.hpp
==============================================================================
--- trunk/boost/accumulators/statistics/weighted_median.hpp (original)
+++ trunk/boost/accumulators/statistics/weighted_median.hpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -20,7 +20,7 @@
#include <boost/accumulators/statistics/median.hpp>
#include <boost/accumulators/statistics/weighted_p_square_quantile.hpp>
#include <boost/accumulators/statistics/weighted_density.hpp>
-#include <boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp>
+#include <boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp>
namespace boost { namespace accumulators
{
Copied: trunk/boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp (from r77411, /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_cumul_dist.hpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////////
-// weighted_p_square_cumulative_distribution.hpp
+// weighted_p_square_cumul_dist.hpp
//
// Copyright 2006 Daniel Egloff, Olivier Gygi. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_ACCUMULATORS_STATISTICS_WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_DE_01_01_2006
-#define BOOST_ACCUMULATORS_STATISTICS_WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_DE_01_01_2006
+#ifndef BOOST_ACCUMULATORS_STATISTICS_WEIGHTED_P_SQUARE_CUMUL_DIST_HPP_DE_01_01_2006
+#define BOOST_ACCUMULATORS_STATISTICS_WEIGHTED_P_SQUARE_CUMUL_DIST_HPP_DE_01_01_2006
#include <vector>
#include <functional>
Added: trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////////////////////
+// weighted_p_square_cumulative_distribution.hpp
+//
+// Copyright 2012 Eric Niebler. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_ACCUMULATORS_STATISTICS_WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_03_19_2012
+#define BOOST_ACCUMULATORS_STATISTICS_WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_03_19_2012
+
+#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
+# pragma message ("Warning: This header is deprecated. Please use: boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp")
+#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
+# warning "This header is deprecated. Please use: boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp"
+#endif
+
+#include <boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp>
+
+#endif
Modified: trunk/libs/accumulators/doc/accumulators.qbk
==============================================================================
--- trunk/libs/accumulators/doc/accumulators.qbk (original)
+++ trunk/libs/accumulators/doc/accumulators.qbk 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -1730,7 +1730,7 @@
]
[*Header]
-[def _P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_ [headerref boost/accumulators/statistics/p_square_cumulative_distribution.hpp]]
+[def _P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_ [headerref boost/accumulators/statistics/p_square_cumul_dist.hpp]]
#include <_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_>
@@ -3323,7 +3323,7 @@
]
[*Header]
-[def _WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_ [headerref boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp]]
+[def _WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_ [headerref boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp]]
#include <_WEIGHTED_P_SQUARE_CUMULATIVE_DISTRIBUTION_HPP_>
Modified: trunk/libs/accumulators/test/Jamfile.v2
==============================================================================
--- trunk/libs/accumulators/test/Jamfile.v2 (original)
+++ trunk/libs/accumulators/test/Jamfile.v2 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -42,7 +42,7 @@
[ run min.cpp ]
[ run moment.cpp ]
[ run pot_quantile.cpp ]
- [ run p_square_cumulative_distribution.cpp ]
+ [ run p_square_cumul_dist.cpp ]
[ run p_square_quantile.cpp ]
[ run reference.cpp ]
[ run rolling_count.cpp ]
@@ -64,7 +64,7 @@
[ run weighted_mean.cpp ]
[ run weighted_median.cpp ]
[ run weighted_moment.cpp ]
- [ run weighted_p_square_cum_dist.cpp ]
+ [ run weighted_p_square_cumul_dist.cpp ]
[ run weighted_p_square_quantile.cpp ]
[ run weighted_skewness.cpp ]
[ run weighted_sum.cpp ]
Copied: trunk/libs/accumulators/test/p_square_cumul_dist.cpp (from r77411, /trunk/libs/accumulators/test/p_square_cumulative_distribution.cpp)
==============================================================================
--- /trunk/libs/accumulators/test/p_square_cumulative_distribution.cpp (original)
+++ trunk/libs/accumulators/test/p_square_cumul_dist.cpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -3,7 +3,7 @@
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-// Test case for p_square_cumulative_distribution.hpp
+// Test case for p_square_cumul_dist.hpp
#include <cmath>
#include <boost/random.hpp>
@@ -14,7 +14,7 @@
#include <boost/accumulators/numeric/functional/valarray.hpp>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
-#include <boost/accumulators/statistics/p_square_cumulative_distribution.hpp>
+#include <boost/accumulators/statistics/p_square_cumul_dist.hpp>
using namespace boost;
using namespace unit_test;
Deleted: trunk/libs/accumulators/test/p_square_cumulative_distribution.cpp
==============================================================================
--- trunk/libs/accumulators/test/p_square_cumulative_distribution.cpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
+++ (empty file)
@@ -1,81 +0,0 @@
-// (C) Copyright Eric Niebler, Olivier Gygi 2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// Test case for p_square_cumulative_distribution.hpp
-
-#include <cmath>
-#include <boost/random.hpp>
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-#include <boost/accumulators/numeric/functional/vector.hpp>
-#include <boost/accumulators/numeric/functional/complex.hpp>
-#include <boost/accumulators/numeric/functional/valarray.hpp>
-#include <boost/accumulators/accumulators.hpp>
-#include <boost/accumulators/statistics/stats.hpp>
-#include <boost/accumulators/statistics/p_square_cumulative_distribution.hpp>
-
-using namespace boost;
-using namespace unit_test;
-using namespace boost::accumulators;
-
-///////////////////////////////////////////////////////////////////////////////
-// erf() not known by VC++ compiler!
-// my_erf() computes error function by numerically integrating with trapezoidal rule
-//
-double my_erf(double const& x, int const& n = 1000)
-{
- double sum = 0.;
- double delta = x/n;
- for (int i = 1; i < n; ++i)
- sum += std::exp(-i*i*delta*delta) * delta;
- sum += 0.5 * delta * (1. + std::exp(-x*x));
- return sum * 2. / std::sqrt(3.141592653);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// test_stat
-//
-void test_stat()
-{
- // tolerance in %
- double epsilon = 3;
-
- typedef accumulator_set<double, stats<tag::p_square_cumulative_distribution> > accumulator_t;
-
- accumulator_t acc(p_square_cumulative_distribution_num_cells = 100);
-
- // two random number generators
- boost::lagged_fibonacci607 rng;
- boost::normal_distribution<> mean_sigma(0,1);
- boost::variate_generator<boost::lagged_fibonacci607&, boost::normal_distribution<> > normal(rng, mean_sigma);
-
- for (std::size_t i=0; i<100000; ++i)
- {
- acc(normal());
- }
-
- typedef iterator_range<std::vector<std::pair<double, double> >::iterator > histogram_type;
- histogram_type histogram = p_square_cumulative_distribution(acc);
-
- for (std::size_t i = 0; i < histogram.size(); ++i)
- {
- // problem with small results: epsilon is relative (in percent), not absolute!
- if ( histogram[i].second > 0.001 )
- BOOST_CHECK_CLOSE( 0.5 * (1.0 + my_erf( histogram[i].first / std::sqrt(2.0) )), histogram[i].second, epsilon );
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// init_unit_test_suite
-//
-test_suite* init_unit_test_suite( int argc, char* argv[] )
-{
- test_suite *test = BOOST_TEST_SUITE("p_square_cumulative_distribution test");
-
- test->add(BOOST_TEST_CASE(&test_stat));
-
- return test;
-}
-
Deleted: trunk/libs/accumulators/test/weighted_p_square_cum_dist.cpp
==============================================================================
--- trunk/libs/accumulators/test/weighted_p_square_cum_dist.cpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
+++ (empty file)
@@ -1,103 +0,0 @@
-// (C) Copyright Eric Niebler, Olivier Gygi 2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// Test case for weighted_p_square_cumulative_distribution.hpp
-
-#include <cmath>
-#include <boost/random.hpp>
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-#include <boost/accumulators/numeric/functional/vector.hpp>
-#include <boost/accumulators/numeric/functional/complex.hpp>
-#include <boost/accumulators/numeric/functional/valarray.hpp>
-#include <boost/accumulators/accumulators.hpp>
-#include <boost/accumulators/statistics/stats.hpp>
-#include <boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp>
-
-using namespace boost;
-using namespace unit_test;
-using namespace boost::accumulators;
-
-///////////////////////////////////////////////////////////////////////////////
-// erf() not known by VC++ compiler!
-// my_erf() computes error function by numerically integrating with trapezoidal rule
-//
-double my_erf(double const& x, int const& n = 1000)
-{
- double sum = 0.;
- double delta = x/n;
- for (int i = 1; i < n; ++i)
- sum += std::exp(-i*i*delta*delta) * delta;
- sum += 0.5 * delta * (1. + std::exp(-x*x));
- return sum * 2. / std::sqrt(3.141592653);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// test_stat
-//
-void test_stat()
-{
- // tolerance in %
- double epsilon = 4;
-
- typedef accumulator_set<double, stats<tag::weighted_p_square_cumulative_distribution>, double > accumulator_t;
-
- accumulator_t acc_upper(p_square_cumulative_distribution_num_cells = 100);
- accumulator_t acc_lower(p_square_cumulative_distribution_num_cells = 100);
-
- // two random number generators
- double mu_upper = 1.0;
- double mu_lower = -1.0;
- boost::lagged_fibonacci607 rng;
- boost::normal_distribution<> mean_sigma_upper(mu_upper,1);
- boost::normal_distribution<> mean_sigma_lower(mu_lower,1);
- boost::variate_generator<boost::lagged_fibonacci607&, boost::normal_distribution<> > normal_upper(rng, mean_sigma_upper);
- boost::variate_generator<boost::lagged_fibonacci607&, boost::normal_distribution<> > normal_lower(rng, mean_sigma_lower);
-
- for (std::size_t i=0; i<100000; ++i)
- {
- double sample = normal_upper();
- acc_upper(sample, weight = std::exp(-mu_upper * (sample - 0.5 * mu_upper)));
- }
-
- for (std::size_t i=0; i<100000; ++i)
- {
- double sample = normal_lower();
- acc_lower(sample, weight = std::exp(-mu_lower * (sample - 0.5 * mu_lower)));
- }
-
- typedef iterator_range<std::vector<std::pair<double, double> >::iterator > histogram_type;
- histogram_type histogram_upper = weighted_p_square_cumulative_distribution(acc_upper);
- histogram_type histogram_lower = weighted_p_square_cumulative_distribution(acc_lower);
-
- // Note that applaying importance sampling results in a region of the distribution
- // to be estimated more accurately and another region to be estimated less accurately
- // than without importance sampling, i.e., with unweighted samples
-
- for (std::size_t i = 0; i < histogram_upper.size(); ++i)
- {
- // problem with small results: epsilon is relative (in percent), not absolute!
-
- // check upper region of distribution
- if ( histogram_upper[i].second > 0.1 )
- BOOST_CHECK_CLOSE( 0.5 * (1.0 + my_erf( histogram_upper[i].first / std::sqrt(2.0) )), histogram_upper[i].second, epsilon );
- // check lower region of distribution
- if ( histogram_lower[i].second < -0.1 )
- BOOST_CHECK_CLOSE( 0.5 * (1.0 + my_erf( histogram_lower[i].first / std::sqrt(2.0) )), histogram_lower[i].second, epsilon );
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// init_unit_test_suite
-//
-test_suite* init_unit_test_suite( int argc, char* argv[] )
-{
- test_suite *test = BOOST_TEST_SUITE("weighted_p_square_cumulative_distribution test");
-
- test->add(BOOST_TEST_CASE(&test_stat));
-
- return test;
-}
-
Copied: trunk/libs/accumulators/test/weighted_p_square_cumul_dist.cpp (from r77411, /trunk/libs/accumulators/test/weighted_p_square_cum_dist.cpp)
==============================================================================
--- /trunk/libs/accumulators/test/weighted_p_square_cum_dist.cpp (original)
+++ trunk/libs/accumulators/test/weighted_p_square_cumul_dist.cpp 2012-03-19 17:55:41 EDT (Mon, 19 Mar 2012)
@@ -3,7 +3,7 @@
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-// Test case for weighted_p_square_cumulative_distribution.hpp
+// Test case for weighted_p_square_cumul_dist.hpp
#include <cmath>
#include <boost/random.hpp>
@@ -14,7 +14,7 @@
#include <boost/accumulators/numeric/functional/valarray.hpp>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
-#include <boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp>
+#include <boost/accumulators/statistics/weighted_p_square_cumul_dist.hpp>
using namespace boost;
using namespace unit_test;
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