$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60146 - in sandbox/statistics/adaptive_rejection_sampling: boost/ars libs/ars/doc libs/ars/example
From: erwann.rogard_at_[hidden]
Date: 2010-03-03 23:07:15
Author: e_r
Date: 2010-03-03 23:07:14 EST (Wed, 03 Mar 2010)
New Revision: 60146
URL: http://svn.boost.org/trac/boost/changeset/60146
Log:
m
Added:
   sandbox/statistics/adaptive_rejection_sampling/libs/ars/doc/compilers_tested.txt   (contents, props changed)
Text files modified: 
   sandbox/statistics/adaptive_rejection_sampling/boost/ars/error.hpp                        |    10 +++++-----                              
   sandbox/statistics/adaptive_rejection_sampling/boost/ars/proposal_sampler.hpp             |    12 ++++++------                            
   sandbox/statistics/adaptive_rejection_sampling/libs/ars/doc/readme.txt                    |    15 ++++-----------                         
   sandbox/statistics/adaptive_rejection_sampling/libs/ars/example/standard_distribution.cpp |     8 ++++----                                
   4 files changed, 19 insertions(+), 26 deletions(-)
Modified: sandbox/statistics/adaptive_rejection_sampling/boost/ars/error.hpp
==============================================================================
--- sandbox/statistics/adaptive_rejection_sampling/boost/ars/error.hpp	(original)
+++ sandbox/statistics/adaptive_rejection_sampling/boost/ars/error.hpp	2010-03-03 23:07:14 EST (Wed, 03 Mar 2010)
@@ -42,7 +42,7 @@
             ):super_t(this->str(a,b,c,d)){}
 
             private:
-            str_t str(
+            static str_t str(
                 const str_t& a,
                 const str_t& b,
                 const str_t& c
@@ -52,18 +52,18 @@
                 return f.str();
             }
             template<typename T>
-            str_t str(
+            static str_t str(
                 const str_t& a,
                 const str_t& b,
                 const T& c
             ){
                 std::ostringstream os;
                 os << c;
-                return this->str(a, b, os.str());
+                return str(a, b, os.str());
             }
 
             template<typename T,typename U>
-            str_t str(
+            static str_t str(
                 const str_t& a,
                 const str_t& b,
                 const T& c,
@@ -71,7 +71,7 @@
             ){
                 std::ostringstream os;
                 os << c << d;
-                return this->str(a, b, os.str());
+                return str(a, b, os.str());
             }
 
         };
Modified: sandbox/statistics/adaptive_rejection_sampling/boost/ars/proposal_sampler.hpp
==============================================================================
--- sandbox/statistics/adaptive_rejection_sampling/boost/ars/proposal_sampler.hpp	(original)
+++ sandbox/statistics/adaptive_rejection_sampling/boost/ars/proposal_sampler.hpp	2010-03-03 23:07:14 EST (Wed, 03 Mar 2010)
@@ -653,7 +653,7 @@
         T lower;
         // lower is -inf outside (x[1],x[n])
         if(
-            ( (iter!=begin(datas_)) || (draw>(iter->x())))
+            ( (iter!=boost::begin(datas_)) || (draw>(iter->x())))
             && ( (iter!=boost::prior(boost::end(datas_))) || (draw<(iter->x())))
         ){
             if(draw<=(iter->x())){
@@ -702,7 +702,7 @@
     //bool is_begin = false;
     T area;
     tang_t a;
-    if(iter != begin(datas_)) {
+    if(iter != boost::begin(datas_)) {
         a = *boost::prior(iter);
         cum_sum_ = boost::prior(iter)->cum_sum_;
     }else{
@@ -722,7 +722,7 @@
         }
         if(area<const_::zero_){
             boost::format f("area[%1%] = %2% <0");
-            f%std::distance(begin(datas_),iter)%area;
+            f%std::distance(boost::begin(datas_),iter)%area;
             throw exception(method,f.str(),*this);
         }
         cum_sum_ += area;
@@ -737,7 +737,7 @@
         T area = area_segment_safeguarded(a,*iter,offset());
         if(area<const_::zero_){
             boost::format f("area[%1%] = %2% < 0");
-            f%std::distance(begin(datas_),iter)%area;
+            f%std::distance(boost::begin(datas_),iter)%area;
             throw exception(method,f.str(),*this);
         }
         cum_sum_ += area;
@@ -812,13 +812,13 @@
         }
     }else{
         if(!math::isinf(x_max())){
-            if(!p.x()<x_max()){
+            if(!(p.x()<x_max())){
                 throw exception(method,"p>max",*this);
             }
         }
     }
 
-    if(iter!=begin(datas_)){
+    if(iter!=boost::begin(datas_)){
         if(!std::less<point_t>()(*boost::prior(iter),p)){
             throw exception(method,"p<prior",*this);
         }
Added: sandbox/statistics/adaptive_rejection_sampling/libs/ars/doc/compilers_tested.txt
==============================================================================
--- (empty file)
+++ sandbox/statistics/adaptive_rejection_sampling/libs/ars/doc/compilers_tested.txt	2010-03-03 23:07:14 EST (Wed, 03 Mar 2010)
@@ -0,0 +1,10 @@
+The following files:
+        /libs/assign/example/search_reflection.cpp
+        /libs/assign/example/standard_distribution.cpp
+
+compiled and executed fine for :
+
+Platform                Compiler                                Boost version   Date Tested
+Mac OS X 10.6           gcc 4.2                                 boost_1_41_0    March 3rd, 2010  
+Win7-32 V6.1.7100       Dev-C++ 5.0 beta 9.2 - Mingw/GCC 3.4.2  boost_1_41_0    March 3rd, 2010
+Win7-32 V6.1.7100       Visual Studio 2010                      boost_1_41_0    March 3rd, 2010
Modified: sandbox/statistics/adaptive_rejection_sampling/libs/ars/doc/readme.txt
==============================================================================
--- sandbox/statistics/adaptive_rejection_sampling/libs/ars/doc/readme.txt	(original)
+++ sandbox/statistics/adaptive_rejection_sampling/libs/ars/doc/readme.txt	2010-03-03 23:07:14 EST (Wed, 03 Mar 2010)
@@ -19,15 +19,6 @@
 A tool for testing is provided for standard distributions, which makes use of 
 their known cdf to produce kolmogorov-smirnov statistics.
 
-[ Compiler ]
-
-Tested Jan 20, 2010
-Mac OS X 10.6        gcc 4.0                                    boost_1_41_0
-Note: gcc4.2 currently does not mix well with boost::format
-
-Tested Jan 8 2010
-Win7-32 V6.1.7100    Dev-C++ 5.0 beta 9.2 with Mingw/GCC 3.4.2 	boost_1_41_0
-
 [ Dependencies ]
 
 boost_1_41_0
@@ -36,11 +27,13 @@
 /sandbox/statistics/distribution_toolkit
 /sandbox/statistics/random
 
+The last four dependencies are for /libs
+
 [ History ]
 March 3rd, 2010
     - Fixed an apparent slow convergence in the output from 
     standard_distribution.cpp which was in fact due to a formatting defect.
-    - Added MSVC workarounds in proposal_sampler.hpp 
+    - Added MSVC workarounds in proposal_sampler.hpp pertaining to is_sorted
 
 Jan 20  2010 : small changes to test functions to adapt to the new 
         non_parametric::kolmogorov_smirnov functionality.
@@ -56,7 +49,7 @@
 July    2009 : Previous package superseded by adaptive_rejection_sampling
 March   2009 : Conditionally_specified_distribution/adaptive_rejection_sampling 
 
-[Articles]
+[ Articles ]
 
 @article{citeulike:3015268,
         abstract = {We propose a method for rejection sampling from any
Modified: sandbox/statistics/adaptive_rejection_sampling/libs/ars/example/standard_distribution.cpp
==============================================================================
--- sandbox/statistics/adaptive_rejection_sampling/libs/ars/example/standard_distribution.cpp	(original)
+++ sandbox/statistics/adaptive_rejection_sampling/libs/ars/example/standard_distribution.cpp	2010-03-03 23:07:14 EST (Wed, 03 Mar 2010)
@@ -25,10 +25,10 @@
 
     typedef double value_;
 
-    const unsigned n1 = 5e0;    // # loops
-    const unsigned n2 = 1e1;   	// # subsamples on first loop  
-    const unsigned n3 = 1e0;   	// size of subsample 
-    const unsigned n4 = 1e1;   	// At each loop, n2 *= n4
+    const unsigned n1 = 5;    // # loops
+    const unsigned n2 = 10;   	// # subsamples on first loop  
+    const unsigned n3 = 1;   	// size of subsample 
+    const unsigned n4 = 10;   	// At each loop, n2 *= n4
     const unsigned max_n_reject = 10;
 
         ars::test::standard_distribution::header(out);