#include <DistributionSampler.hh>
|
| | DistributionSampler (T &distribution) |
| | Creates a new instance that allows samples to be drawn randomly from <distribution> More...
|
| |
| double | sample () |
| | Returns a random value drawn from the distribution A general method to generate random numbers from an arbitrary distribution that has a cdf without jumps is to use the inverse function to the cdf: G(y)=F^{-1}(y). If u(1), ..., u(n) are random numbers from the uniform on (0,1) distribution then G(u(1)), ..., G(u(n)) is a random sample from the distribution with cdf F(x). More...
|
| |
| const T & | distribution () const |
| | Returns the distribution from which this sampler generates values. More...
|
| |
Creates a new instance that allows samples to be drawn randomly from <distribution>
Returns a random value drawn from the distribution A general method to generate random numbers from an arbitrary distribution that has a cdf without jumps is to use the inverse function to the cdf: G(y)=F^{-1}(y). If u(1), ..., u(n) are random numbers from the uniform on (0,1) distribution then G(u(1)), ..., G(u(n)) is a random sample from the distribution with cdf F(x).
References numeric::random::DistributionSampler< T >::distribution(), and numeric::random::uniform().
The documentation for this class was generated from the following file: