Re: [Boost-bugs] [Boost C++ Libraries] #3451: Poisson generator not mentioned in documentation

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3451: Poisson generator not mentioned in documentation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-05 19:33:02


#3451: Poisson generator not mentioned in documentation
----------------------------------+-----------------------------------------
 Reporter: mazzucco@… | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: random
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: |
----------------------------------+-----------------------------------------

Comment(by steven_watanabe):

 The poisson distribution takes a random number engine that produces values
 in the range [0, 1). You need to use variate_generator.

 {{{
 #include <boost/random.hpp>
 #include <iostream>

 int main() {
     boost::mt19937 rng(3u);
     boost::variate_generator<boost::mt19937&,
 boost::poisson_distribution<> >
         po_dist(rng, boost::poisson_distribution<>(0.7));
     std::cout << "Po var: " << po_dist() << std::endl;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3451#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC