Opened 13 years ago
Closed 13 years ago
#3451 closed Bugs (fixed)
Poisson generator not mentioned in documentation
| Reported by: | Owned by: | No-Maintainer | |
|---|---|---|---|
| Milestone: | Boost 1.41.0 | Component: | random |
| Version: | Boost 1.40.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
The Poisson generator not mentioned in the documentation, although it appears to be there and working.
Change History (3)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
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;
}
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
The Poisson distribution is now documented.
Note:
See TracTickets
for help on using tickets.

As far as I can tell, the following lines of code should work, but don't:
As far as I can tell, poisson_distribution::operator()(Engine& eng) results in an infinite loop.
So should probably be fixed before documenting?