Boost Users :
From: Anakreon (anakreonmejdi_at_[hidden])
Date: 2005-09-13 07:57:44
I am considering to use boost.random library but have a problem with efficiency.
I have a class which provides two public methods:
double exponential(double mean)
double getUniform(double min, double max)
The implementation I have using boost.random is inefficient and I need some
advice in order to improve it.
In both the above methods I create a variate_generator object with a
and the appropriate distribution. The problem is that the methods are called
often which leads to
creation and destruction of the variate_generator and the distribution object.
I can not store those objects as member variables because the parameters mean in
and (min, max) in getUniform varies
Thanks in advanced
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net