Pseudo random generator. Fast generator for series of pseudo random numbers where the security is not an issue and the quality of the distribution has not to be guaranteed.
More...
#include <pseudoRandom.hpp>
|
| PseudoRandom () |
| Constructor with seed derived from current date (granularity day) More...
|
|
| PseudoRandom (int seed_) |
| Constructor with seed passed as argument. More...
|
|
int | get (int start_, int end_) |
| Get the next "random" number between two numbers. More...
|
|
int | select (unsigned int psize, int firstValue,...) |
| Get the next "random" value of a specified set. More...
|
|
Pseudo random generator. Fast generator for series of pseudo random numbers where the security is not an issue and the quality of the distribution has not to be guaranteed.
strus::PseudoRandom::PseudoRandom |
( |
| ) |
|
Constructor with seed derived from current date (granularity day)
strus::PseudoRandom::PseudoRandom |
( |
int |
seed_ | ) |
|
|
explicit |
Constructor with seed passed as argument.
int strus::PseudoRandom::get |
( |
int |
start_, |
|
|
int |
end_ |
|
) |
| |
Get the next "random" number between two numbers.
- Parameters
-
[in] | start_ | minumum result |
[in] | end_ | upper border of range (first number not included) |
- Returns
- "randomly" selected integer in [start_,end_[
int strus::PseudoRandom::select |
( |
unsigned int |
psize, |
|
|
int |
firstValue, |
|
|
|
... |
|
) |
| |
Get the next "random" value of a specified set.
- Parameters
-
[in] | psize | size of candidate set |
[in] | firstValue | first result candidate (for ensuring that there is at least one) |
[in] | ... | list of other candidates to select one from (int's) |
- Returns
- "randomly" selected candidate
The documentation for this class was generated from the following file: