Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56899 - sandbox/statistics/importance_sampling/boost/importance_sampling
From: erwann.rogard_at_[hidden]
Date: 2009-10-16 01:06:42


Author: e_r
Date: 2009-10-16 01:06:41 EDT (Fri, 16 Oct 2009)
New Revision: 56899
URL: http://svn.boost.org/trac/boost/changeset/56899

Log:
m
Text files modified:
   sandbox/statistics/importance_sampling/boost/importance_sampling/generate.hpp | 23 +++++++++++++----------
   sandbox/statistics/importance_sampling/boost/importance_sampling/grid.hpp | 8 +++++---
   sandbox/statistics/importance_sampling/boost/importance_sampling/include.hpp | 2 +-
   sandbox/statistics/importance_sampling/boost/importance_sampling/sampler.hpp | 10 ++++++----
   sandbox/statistics/importance_sampling/boost/importance_sampling/sampler_deprecated.hpp | 10 ++++++----
   5 files changed, 31 insertions(+), 22 deletions(-)

Modified: sandbox/statistics/importance_sampling/boost/importance_sampling/generate.hpp
==============================================================================
--- sandbox/statistics/importance_sampling/boost/importance_sampling/generate.hpp (original)
+++ sandbox/statistics/importance_sampling/boost/importance_sampling/generate.hpp 2009-10-16 01:06:41 EDT (Fri, 16 Oct 2009)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// is::generate.hpp //
+// statistics::importance_sampling::generate.hpp //
 // //
 // Copyright 2009 Erwann Rogard. Distributed under the Boost //
 // Software License, Version 1.0. (See accompanying file //
@@ -18,33 +18,35 @@
 #include <boost/random/ref_distribution.hpp>
 
 namespace boost{
-namespace is{
+namespace statistics{
+namespace importance_sampling{
 
     template<typename U,typename ItW,typename ItP,typename ItT>
     ItT generate(
- U& urng,
+ ItT b_t, // target values (output)
+ std::size_t n, // sample size
         ItW b_w, // unnormalized weights
         ItW e_w, // unnormalized weights
         ItP b_p, // proposal values
- ItT b_t, // target values (output)
- std::size_t n // sample size
+ U& urng
     );
 
     // Implementation
 
     template<typename U,typename ItW,typename ItP,typename ItT>
     ItT generate(
- U& urng,
+ ItT b_t,
+ std::size_t n,
         ItW b_w,
         ItW e_w,
         ItP b_p,
- ItT b_t,
- std::size_t n
+ U& urng
     ){
         typedef boost::iterator_range<ItW> range_w_;
         typedef boost::iterator_range<ItP> range_p_;
         typedef typename boost::iterator_value<ItW>::type w_;
- typedef boost::is::sampler<range_p_,w_> iss_;
+ typedef boost::statistics::importance_sampling::sampler<range_p_,w_>
+ iss_;
         typedef boost::random::ref_distribution<iss_&> ref_iss_;
         typedef boost::variate_generator<U&,ref_iss_> gen_iss_;
         
@@ -71,7 +73,8 @@
         );
     }
     
-}// is
+}// importance_sampling
+}// statistics
 }// boost
 
 #endif
\ No newline at end of file

Modified: sandbox/statistics/importance_sampling/boost/importance_sampling/grid.hpp
==============================================================================
--- sandbox/statistics/importance_sampling/boost/importance_sampling/grid.hpp (original)
+++ sandbox/statistics/importance_sampling/boost/importance_sampling/grid.hpp 2009-10-16 01:06:41 EDT (Fri, 16 Oct 2009)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// is::grid.hpp //
+// statistics::importance_sampling::grid.hpp //
 // //
 // Copyright 2009 Erwann Rogard. Distributed under the Boost //
 // Software License, Version 1.0. (See accompanying file //
@@ -11,7 +11,8 @@
 #include <boost/limits.hpp>
 
 namespace boost{
-namespace is{
+namespace statistics{
+namespace importance_sampling{
 
 // Equally spaced univariate grid.
 template<typename T>
@@ -45,7 +46,8 @@
     return result;
 }
 
-}// is
+}// importance_sampling
+}// statistics
 }// boost
 
 #endif
\ No newline at end of file

Modified: sandbox/statistics/importance_sampling/boost/importance_sampling/include.hpp
==============================================================================
--- sandbox/statistics/importance_sampling/boost/importance_sampling/include.hpp (original)
+++ sandbox/statistics/importance_sampling/boost/importance_sampling/include.hpp 2009-10-16 01:06:41 EDT (Fri, 16 Oct 2009)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// is::include.hpp //
+// statistics::importance_sampling::include.hpp //
 // //
 // Copyright 2009 Erwann Rogard. Distributed under the Boost //
 // Software License, Version 1.0. (See accompanying file //

Modified: sandbox/statistics/importance_sampling/boost/importance_sampling/sampler.hpp
==============================================================================
--- sandbox/statistics/importance_sampling/boost/importance_sampling/sampler.hpp (original)
+++ sandbox/statistics/importance_sampling/boost/importance_sampling/sampler.hpp 2009-10-16 01:06:41 EDT (Fri, 16 Oct 2009)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// is::sampler.hpp //
+// statistics::importance_sampling::sampler.hpp //
 // //
 // Copyright 2009 Erwann Rogard. Distributed under the Boost //
 // Software License, Version 1.0. (See accompanying file //
@@ -20,7 +20,8 @@
 #include <boost/random/discrete_distribution_sw_2009.hpp>
 
 namespace boost{
-namespace is{
+namespace statistics{
+namespace importance_sampling{
 
 // Samples by SIR given a set of proposal values and their unnormalized weights
 //
@@ -120,7 +121,8 @@
 const typename sampler<R1,W>::discr_dist_t&
 sampler<R1,W>::discrete_distribution()const{ return discr_dist_; }
 
-}//random
-}//boost
+}// importance_sampling
+}// statistics
+}// boost
 
 #endif
\ No newline at end of file

Modified: sandbox/statistics/importance_sampling/boost/importance_sampling/sampler_deprecated.hpp
==============================================================================
--- sandbox/statistics/importance_sampling/boost/importance_sampling/sampler_deprecated.hpp (original)
+++ sandbox/statistics/importance_sampling/boost/importance_sampling/sampler_deprecated.hpp 2009-10-16 01:06:41 EDT (Fri, 16 Oct 2009)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// is::sampler_deprecated.hpp //
+// statistics::importance_sampling::sampler_deprecated.hpp //
 // //
 // Copyright 2009 Erwann Rogard. Distributed under the Boost //
 // Software License, Version 1.0. (See accompanying file //
@@ -20,7 +20,8 @@
 #include <boost/random/discrete_distribution_sw_2009.hpp>
 
 namespace boost{
-namespace is{
+namespace statistics{
+namespace importance_sampling{
 
 // Deprecated because uses categorical_distribution rather than discrete
 //
@@ -122,7 +123,8 @@
 const typename sampler_deprecated<R1,Ur>::mult_dist_t&
 sampler_deprecated<R1,Ur>::categorical_distribution()const{ return mult_dist_; }
 
-}//random
-}//boost
+}// importance_sampling
+}// statistics
+}// boost
 
 #endif
\ No newline at end of file


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