Class for thread specific random numbers. More...
#include <CoinHelperFunctions.hpp>
Public Member Functions | |
Constructors, destructor | |
CoinThreadRandom () | |
Default constructor. | |
CoinThreadRandom (const unsigned short seed[3]) | |
Constructor wih seed. | |
CoinThreadRandom (int seed) | |
Constructor wih seed. | |
~CoinThreadRandom () | |
Destructor. | |
CoinThreadRandom (const CoinThreadRandom &rhs) | |
Default constructor. | |
CoinThreadRandom & | operator= (const CoinThreadRandom &rhs) |
Default constructor. | |
Sets/gets | |
void | setSeed (const unsigned short seed[3]) |
Set seed. | |
void | setSeed (int seed) |
Set seed. | |
double | randomDouble () const |
return a random number | |
Protected Attributes | |
Data members | |
unsigned short | seed_ [3] |
Current seed. |
Class for thread specific random numbers.
Definition at line 975 of file CoinHelperFunctions.hpp.
CoinThreadRandom::CoinThreadRandom | ( | ) | [inline] |
Default constructor.
Definition at line 981 of file CoinHelperFunctions.hpp.
CoinThreadRandom::CoinThreadRandom | ( | const unsigned short | seed[3] | ) | [inline] |
Constructor wih seed.
Definition at line 984 of file CoinHelperFunctions.hpp.
CoinThreadRandom::CoinThreadRandom | ( | int | seed | ) | [inline] |
Constructor wih seed.
Definition at line 987 of file CoinHelperFunctions.hpp.
CoinThreadRandom::~CoinThreadRandom | ( | ) | [inline] |
Destructor.
Definition at line 995 of file CoinHelperFunctions.hpp.
CoinThreadRandom::CoinThreadRandom | ( | const CoinThreadRandom & | rhs | ) | [inline] |
Default constructor.
Definition at line 997 of file CoinHelperFunctions.hpp.
CoinThreadRandom& CoinThreadRandom::operator= | ( | const CoinThreadRandom & | rhs | ) | [inline] |
Default constructor.
Definition at line 1000 of file CoinHelperFunctions.hpp.
void CoinThreadRandom::setSeed | ( | const unsigned short | seed[3] | ) | [inline] |
Set seed.
Definition at line 1014 of file CoinHelperFunctions.hpp.
void CoinThreadRandom::setSeed | ( | int | seed | ) | [inline] |
Set seed.
Definition at line 1017 of file CoinHelperFunctions.hpp.
double CoinThreadRandom::randomDouble | ( | ) | const [inline] |
return a random number
Definition at line 1025 of file CoinHelperFunctions.hpp.
unsigned short CoinThreadRandom::seed_[3] [mutable, protected] |
Current seed.
Definition at line 1044 of file CoinHelperFunctions.hpp.