Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58887 - trunk/libs/accumulators/doc
From: eric_at_[hidden]
Date: 2010-01-11 05:42:46


Author: eric_niebler
Date: 2010-01-11 05:42:45 EST (Mon, 11 Jan 2010)
New Revision: 58887
URL: http://svn.boost.org/trac/boost/changeset/58887

Log:
add qualification to extractor calls for gcc users
Text files modified:
   trunk/libs/accumulators/doc/accumulators.qbk | 54 ++++++++++++++++++++--------------------
   1 files changed, 27 insertions(+), 27 deletions(-)

Modified: trunk/libs/accumulators/doc/accumulators.qbk
==============================================================================
--- trunk/libs/accumulators/doc/accumulators.qbk (original)
+++ trunk/libs/accumulators/doc/accumulators.qbk 2010-01-11 05:42:45 EST (Mon, 11 Jan 2010)
@@ -101,7 +101,7 @@
 
         // Display the results ...
         std::cout << "Mean: " << mean(acc) << std::endl;
- std::cout << "Moment: " << moment<2>(acc) << std::endl;
+ std::cout << "Moment: " << accumulators::moment<2>(acc) << std::endl;
 
         return 0;
     }
@@ -779,9 +779,9 @@
     // ... add some data ...
     
     // Display the 2nd moment ...
- std::cout << "2nd moment is " << moment<2>(acc) << std::endl;
+ std::cout << "2nd moment is " << accumulators::moment<2>(acc) << std::endl;
 
-In the expression `moment<2>(acc)`, what is `moment`? It cannot be an object --
+In the expression `accumulators::moment<2>(acc)`, what is `moment`? It cannot be an object --
 the syntax of C++ will not allow it. Clearly, if we want to provide this syntax,
 we must make `moment` a function template. Here's what the definition of the
 `moment` extractor looks like:
@@ -1381,9 +1381,9 @@
     acc(3);
     
     BOOST_CHECK_EQUAL( mean(acc), 5 );
- BOOST_CHECK_EQUAL( moment<2>(acc), 159./5. );
- BOOST_CHECK_EQUAL( moment<3>(acc), 1171./5. );
- BOOST_CHECK_EQUAL( moment<4>(acc), 1863 );
+ BOOST_CHECK_EQUAL( accumulators::moment<2>(acc), 159./5. );
+ BOOST_CHECK_EQUAL( accumulators::moment<3>(acc), 1171./5. );
+ BOOST_CHECK_EQUAL( accumulators::moment<4>(acc), 1863 );
     BOOST_CHECK_CLOSE( kurtosis(acc), -1.39965397924, 1e-6 );
 
 [*See also]
@@ -1485,21 +1485,21 @@
     BOOST_CHECK_EQUAL(1u, count(acc));
     BOOST_CHECK_EQUAL(2, sum(acc));
     BOOST_CHECK_CLOSE(2., mean_of_weights(acc), 1e-5);
- BOOST_CHECK_CLOSE(3., (mean_of_variates<int, tag::covariate1>(acc)), 1e-5);
+ BOOST_CHECK_CLOSE(3., (accumulators::mean_of_variates<int, tag::covariate1>(acc)), 1e-5);
 
     acc(0, weight = 4, covariate1 = 4);
     BOOST_CHECK_CLOSE(0.33333333333333333, mean(acc), 1e-5);
     BOOST_CHECK_EQUAL(2u, count(acc));
     BOOST_CHECK_EQUAL(2, sum(acc));
     BOOST_CHECK_CLOSE(3., mean_of_weights(acc), 1e-5);
- BOOST_CHECK_CLOSE(3.5, (mean_of_variates<int, tag::covariate1>(acc)), 1e-5);
+ BOOST_CHECK_CLOSE(3.5, (accumulators::mean_of_variates<int, tag::covariate1>(acc)), 1e-5);
 
     acc(2, weight = 9, covariate1 = 8);
     BOOST_CHECK_CLOSE(1.33333333333333333, mean(acc), 1e-5);
     BOOST_CHECK_EQUAL(3u, count(acc));
     BOOST_CHECK_EQUAL(20, sum(acc));
     BOOST_CHECK_CLOSE(5., mean_of_weights(acc), 1e-5);
- BOOST_CHECK_CLOSE(5., (mean_of_variates<int, tag::covariate1>(acc)), 1e-5);
+ BOOST_CHECK_CLOSE(5., (accumulators::mean_of_variates<int, tag::covariate1>(acc)), 1e-5);
 
     accumulator_set<
         int
@@ -1515,19 +1515,19 @@
     BOOST_CHECK_CLOSE(1., mean(acc2), 1e-5);
     BOOST_CHECK_EQUAL(1u, count(acc2));
     BOOST_CHECK_CLOSE(2., mean_of_weights(acc2), 1e-5);
- BOOST_CHECK_CLOSE(3., (mean_of_variates<int, tag::covariate1>(acc2)), 1e-5);
+ BOOST_CHECK_CLOSE(3., (accumulators::mean_of_variates<int, tag::covariate1>(acc2)), 1e-5);
         
     acc2(0, weight = 4, covariate1 = 4);
     BOOST_CHECK_CLOSE(0.33333333333333333, mean(acc2), 1e-5);
     BOOST_CHECK_EQUAL(2u, count(acc2));
     BOOST_CHECK_CLOSE(3., mean_of_weights(acc2), 1e-5);
- BOOST_CHECK_CLOSE(3.5, (mean_of_variates<int, tag::covariate1>(acc2)), 1e-5);
+ BOOST_CHECK_CLOSE(3.5, (accumulators::mean_of_variates<int, tag::covariate1>(acc2)), 1e-5);
     
     acc2(2, weight = 9, covariate1 = 8);
     BOOST_CHECK_CLOSE(1.33333333333333333, mean(acc2), 1e-5);
     BOOST_CHECK_EQUAL(3u, count(acc2));
     BOOST_CHECK_CLOSE(5., mean_of_weights(acc2), 1e-5);
- BOOST_CHECK_CLOSE(5., (mean_of_variates<int, tag::covariate1>(acc2)), 1e-5);
+ BOOST_CHECK_CLOSE(5., (accumulators::mean_of_variates<int, tag::covariate1>(acc2)), 1e-5);
 
 [*See also]
 
@@ -1682,7 +1682,7 @@
     acc1(5); // + 25
              // = 45 / 3 = 15
 
- BOOST_CHECK_CLOSE(15., moment<2>(acc1), 1e-5);
+ BOOST_CHECK_CLOSE(15., accumulators::moment<2>(acc1), 1e-5);
 
     accumulator_set<int, stats<tag::moment<5> > > acc2;
 
@@ -1692,7 +1692,7 @@
     acc2(5); // + 3125
              // = 4424 / 4 = 1106
 
- BOOST_CHECK_CLOSE(1106., moment<5>(acc2), 1e-5);
+ BOOST_CHECK_CLOSE(1106., accumulators::moment<5>(acc2), 1e-5);
 
 [*See also]
 
@@ -2203,8 +2203,8 @@
     acc2(3);
     
     BOOST_CHECK_EQUAL( mean(acc2), 5 );
- BOOST_CHECK_EQUAL( moment<2>(acc2), 159./5. );
- BOOST_CHECK_EQUAL( moment<3>(acc2), 1171./5. );
+ BOOST_CHECK_EQUAL( accumulators::moment<2>(acc2), 159./5. );
+ BOOST_CHECK_EQUAL( accumulators::moment<3>(acc2), 1171./5. );
     BOOST_CHECK_CLOSE( skewness(acc2), 0.406040288214, 1e-6 );
 
 [*See also]
@@ -2791,7 +2791,7 @@
 
     BOOST_CHECK_EQUAL(5u, count(acc1));
     BOOST_CHECK_CLOSE(3., mean(acc1), 1e-5);
- BOOST_CHECK_CLOSE(11., moment<2>(acc1), 1e-5);
+ BOOST_CHECK_CLOSE(11., accumulators::moment<2>(acc1), 1e-5);
     BOOST_CHECK_CLOSE(2., variance(acc1), 1e-5);
 
     // immediate variance
@@ -3048,9 +3048,9 @@
     acc2(3, weight = 2);
     
     BOOST_CHECK_EQUAL( weighted_mean(acc2), 42./11. );
- BOOST_CHECK_EQUAL( weighted_moment<2>(acc2), 212./11. );
- BOOST_CHECK_EQUAL( weighted_moment<3>(acc2), 1350./11. );
- BOOST_CHECK_EQUAL( weighted_moment<4>(acc2), 9956./11. );
+ BOOST_CHECK_EQUAL( accumulators::weighted_moment<2>(acc2), 212./11. );
+ BOOST_CHECK_EQUAL( accumulators::weighted_moment<3>(acc2), 1350./11. );
+ BOOST_CHECK_EQUAL( accumulators::weighted_moment<4>(acc2), 9956./11. );
     BOOST_CHECK_CLOSE( weighted_kurtosis(acc2), 0.58137026432, 1e-6 );
 
 [*See also]
@@ -3115,7 +3115,7 @@
                                                   //= 84 / 14 = 6
 
     BOOST_CHECK_EQUAL(6., weighted_mean(acc));
- BOOST_CHECK_EQUAL(52./7., (weighted_mean_of_variates<int, tag::covariate1>(acc)));
+ BOOST_CHECK_EQUAL(52./7., (accumulators::weighted_mean_of_variates<int, tag::covariate1>(acc)));
 
     accumulator_set<
         int
@@ -3140,7 +3140,7 @@
                                                   //= 84 / 14 = 6
 
     BOOST_CHECK_EQUAL(6., weighted_mean(acc2));
- BOOST_CHECK_EQUAL(52./7., (weighted_mean_of_variates<int, tag::covariate1>(acc2)));
+ BOOST_CHECK_EQUAL(52./7., (accumulators::weighted_mean_of_variates<int, tag::covariate1>(acc2)));
 
 [*See also]
 
@@ -3265,8 +3265,8 @@
     acc7(2.7, weight = 1.4);
     acc7(1.8, weight = 0.9);
     
- BOOST_CHECK_CLOSE(5.403, weighted_moment<2>(acc2), 1e-5);
- BOOST_CHECK_CLOSE(548.54182, weighted_moment<7>(acc7), 1e-5);
+ BOOST_CHECK_CLOSE(5.403, accumulators::weighted_moment<2>(acc2), 1e-5);
+ BOOST_CHECK_CLOSE(548.54182, accumulators::weighted_moment<7>(acc7), 1e-5);
 
 [*See also]
 
@@ -3556,8 +3556,8 @@
     acc2(3, weight = 2);
     
     BOOST_CHECK_EQUAL( weighted_mean(acc2), 42./11. );
- BOOST_CHECK_EQUAL( weighted_moment<2>(acc2), 212./11. );
- BOOST_CHECK_EQUAL( weighted_moment<3>(acc2), 1350./11. );
+ BOOST_CHECK_EQUAL( accumulators::weighted_moment<2>(acc2), 212./11. );
+ BOOST_CHECK_EQUAL( accumulators::weighted_moment<3>(acc2), 1350./11. );
     BOOST_CHECK_CLOSE( weighted_skewness(acc2), 1.30708406282, 1e-6 );
 
 [*See also]
@@ -3953,7 +3953,7 @@
 
     BOOST_CHECK_EQUAL(5u, count(acc1));
     BOOST_CHECK_CLOSE(2.9090909, weighted_mean(acc1), 1e-5);
- BOOST_CHECK_CLOSE(10.1818182, weighted_moment<2>(acc1), 1e-5);
+ BOOST_CHECK_CLOSE(10.1818182, accumulators::weighted_moment<2>(acc1), 1e-5);
     BOOST_CHECK_CLOSE(1.7190083, weighted_variance(acc1), 1e-5);
 
     // immediate weighted_variance


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