Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56686 - sandbox/statistics/joint_dist/boost/joint_dist/distribution
From: erwann.rogard_at_[hidden]
Date: 2009-10-09 20:46:00


Author: e_r
Date: 2009-10-09 20:46:00 EDT (Fri, 09 Oct 2009)
New Revision: 56686
URL: http://svn.boost.org/trac/boost/changeset/56686

Log:
m
Text files modified:
   sandbox/statistics/joint_dist/boost/joint_dist/distribution/iid.hpp | 18 +++++++++++-------
   1 files changed, 11 insertions(+), 7 deletions(-)

Modified: sandbox/statistics/joint_dist/boost/joint_dist/distribution/iid.hpp
==============================================================================
--- sandbox/statistics/joint_dist/boost/joint_dist/distribution/iid.hpp (original)
+++ sandbox/statistics/joint_dist/boost/joint_dist/distribution/iid.hpp 2009-10-09 20:46:00 EDT (Fri, 09 Oct 2009)
@@ -19,7 +19,7 @@
 #include <boost/lambda/bind.hpp>
 #include <boost/format.hpp>
 #include <boost/scalar_dist/fun_wrap/log_unnormalized_pdf.hpp>
-#include <boost/scalar_dist/algorithm/accumulate.hpp>
+#include <boost/scalar_dist/iterator/distribution_function.hpp>
 #include <boost/joint_dist/distribution/detail/dim.hpp>
 #include <boost/joint_dist/meta/is_joint_dist.hpp>
 
@@ -107,12 +107,16 @@
         typedef typename iid_::value_type val_;
         val_ init = static_cast<val_>(0);
         val_ log_pdf
- = math::accumulate<std::plus,math::fun_wrap::log_unnormalized_pdf_>(
- dist.element(),
- boost::begin(x),
- boost::end(x),
- init
- );
+ = std::accumulate(
+ math::make_distribution_function_iterator<
+ math::fun_wrap::log_unnormalized_pdf_
+ >(dist.element(),boost::begin(x)),
+ math::make_distribution_function_iterator<
+ math::fun_wrap::log_unnormalized_pdf_
+ >(dist.element(),boost::end(x)),
+ init
+ );
+
         return log_pdf;
     };
 


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