|
5.0.0
Freundlich's C++ toolkit
|
Combines a generator and a distribution.
Combines a generator and a distribution, using the generator to draw elements from the distribution.
| Generator | Must be a random number generator |
| Distribution | Must be a random number distribution |
Public Types | |
| using | generator = Generator |
| The generator type. | |
| using | distribution = Distribution |
| The distribution type. | |
| using | result_type = typename distribution::result_type |
| The result returned by drawing random numbers. | |
| using | generator_reference = fcppt::reference<generator> |
| using | param_type = typename Distribution::param_type |
Public Member Functions | |
| variate (generator_reference generator, Distribution const &distribution) | |
| Constructs a variate object. | |
| variate (generator_reference generator, param_type const ¶m) | |
| Constructs a variate object. | |
| result_type | operator() () |
| Draws a random number. | |
| using fcppt::random::variate< Generator, Distribution >::distribution = Distribution |
The distribution type.
| using fcppt::random::variate< Generator, Distribution >::generator = Generator |
The generator type.
| using fcppt::random::variate< Generator, Distribution >::generator_reference = fcppt::reference<generator> |
| using fcppt::random::variate< Generator, Distribution >::param_type = typename Distribution::param_type |
| using fcppt::random::variate< Generator, Distribution >::result_type = typename distribution::result_type |
The result returned by drawing random numbers.
| fcppt::random::variate< Generator, Distribution >::variate | ( | generator_reference | generator, |
| Distribution const & | distribution ) |
Constructs a variate object.
Constructs a variate object from generator and distribution.
| generator | The generator to use |
| distribution | The distribution to use |
| fcppt::random::variate< Generator, Distribution >::variate | ( | generator_reference | generator, |
| param_type const & | param ) |
Constructs a variate object.
Constructs a variate object from generator and param, where param is the param_type of Distribution.
| generator | The generator to use |
| param | The parameters for the distribution |
| result_type fcppt::random::variate< Generator, Distribution >::operator() | ( | ) |
Draws a random number.
Draws a random number from the distribution passing it the generator to use.