Boost C++ Libraries: Ticket #3451: Poisson generator not mentioned in documentation https://svn.boost.org/trac10/ticket/3451 <p> The Poisson generator not mentioned in the documentation, although it appears to be there and working. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3451 Trac 1.4.3 ts337@… Wed, 18 Nov 2009 17:21:42 GMT <link>https://svn.boost.org/trac10/ticket/3451#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3451#comment:1</guid> <description> <p> As far as I can tell, the following lines of code should work, but don't: </p> <blockquote> <p> boost::mt19937 rng(3u); boost::poisson_distribution&lt;&gt; po_dist(0.7); cout &lt;&lt;"Po var: " &lt;&lt; po_dist(rng)&lt;&lt;endl; </p> </blockquote> <p> As far as I can tell, poisson_distribution::operator()(Engine&amp; eng) results in an infinite loop. </p> <p> So should probably be fixed before documenting? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Fri, 05 Mar 2010 19:33:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3451#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3451#comment:2</guid> <description> <p> The poisson distribution takes a random number engine that produces values in the range [0, 1). You need to use variate_generator. </p> <pre class="wiki">#include &lt;boost/random.hpp&gt; #include &lt;iostream&gt; int main() { boost::mt19937 rng(3u); boost::variate_generator&lt;boost::mt19937&amp;, boost::poisson_distribution&lt;&gt; &gt; po_dist(rng, boost::poisson_distribution&lt;&gt;(0.7)); std::cout &lt;&lt; "Po var: " &lt;&lt; po_dist() &lt;&lt; std::endl; } </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Fri, 26 Mar 2010 23:10:12 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3451#comment:3 https://svn.boost.org/trac10/ticket/3451#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> The Poisson distribution is now documented. </p> Ticket