General.
More...
#include <yat/random/random.h>
◆ result_type
type returned by operator()
- Since
- New in yat 0.10
◆ DiscreteGeneral() [1/4]
theplu::yat::random::DiscreteGeneral::DiscreteGeneral |
( |
void |
| ) |
|
Default constructor leaves the object uninitialized and behaviour of operator() is undefined.
- Since
- New in yat 0.19
◆ DiscreteGeneral() [2/4]
Constructor.
- Parameters
-
hist | is a Histogram defining the probability distribution |
◆ DiscreteGeneral() [3/4]
theplu::yat::random::DiscreteGeneral::DiscreteGeneral |
( |
const DiscreteGeneral & |
| ) |
|
Copy constructor.
- Since
- Explicitely implemented in yat 0.5
◆ DiscreteGeneral() [4/4]
theplu::yat::random::DiscreteGeneral::DiscreteGeneral |
( |
DiscreteGeneral && |
| ) |
|
Move constructor.
- Since
- New in yat 0.19
◆ operator()()
unsigned long theplu::yat::random::DiscreteGeneral::operator() |
( |
void |
| ) |
const |
|
virtual |
The generated number is an integer and proportional to the frequency in the corresponding histogram bin. In other words, the probability that 0 is returned is proportinal to the size of the first bin.
- Returns
- A random number.
Implements theplu::yat::random::Discrete.
◆ operator=() [1/2]
Assignment operator.
- Since
- Explicitely implemented in yat 0.5
◆ operator=() [2/2]
Move assignment operator.
- Since
- New in yat 0.19
◆ seed()
void theplu::yat::random::Discrete::seed |
( |
unsigned long |
s | ) |
const |
|
inherited |
Set the seed to s.
Set the seed to s in the underlying rng. If s is zero, a default value from the rng's original implementation is used (cf. GSL documentation).
- Deprecated:
- Provided for backward compatibility with the 0.7 API. Use RNG::instance()->seed(s) instead.
◆ seed_from_devurandom()
unsigned long theplu::yat::random::Discrete::seed_from_devurandom |
( |
void |
| ) |
|
|
inherited |
◆ swap()
- Since
- Specialisation new in yat 0.19
The documentation for this class was generated from the following file: