A random generator that samples random numbers within the interval that is passed to the constructor.
More...
|
| | UniformRandomGenerator (T vmin=T(0), T vmax=T(1)) |
| |
| void | setLimits (T vmin, T vmax) |
| | Resets the limits of the uniform distribution to the specified limits. More...
|
| |
| result_type | operator() () |
| | Draws a sample from the random distribution. More...
|
| |
| void | seed () |
| | Seeds the random generator using the current system time. More...
|
| |
| void | seed (uint32 value) |
| | Seeds the random generator with the given seed. More...
|
| |
| detail::UniformRandomDistributionChooser< T >::type * | operator-> () |
| | Provides direct access to the underlying random distribution. More...
|
| |
| const detail::UniformRandomDistributionChooser< T >::type * | operator-> () const |
| | Provides direct access to the underlying random distribution. More...
|
| |
| detail::UniformRandomDistributionChooser< T >::type & | distribution () |
| | Provides direct access to the underlying random distribution. More...
|
| |
| const detail::UniformRandomDistributionChooser< T >::type & | distribution () const |
| | Provides direct access to the underlying random distribution. More...
|
| |
| boost::mt19937 & | engine () |
| | Provides direct access to the underlying random generator engine. More...
|
| |
| const boost::mt19937 & | engine () const |
| | Provides direct access to the underlying random generator engine. More...
|
| |
template<typename T>
class mira::UniformRandomGenerator< T >
A random generator that samples random numbers within the interval that is passed to the constructor.
For integer types, the sampled values are within the interval [vmin,vmax]. For floating point types, the sampled values are within the interval [vmin,vmax).
Example:
UniformRandomGenerator<float> rnd(1.0f,2.0f);
float sample = rnd();