Gecode::FlatZinc::FznRnd Class Reference
A thread-safe random number generator. More...
#include <flatzinc.hh>
Public Member Functions | |
FznRnd (unsigned int s=1) | |
Constructor. | |
unsigned int | operator() (unsigned int n) |
Returns a random integer from the interval [0..n). | |
Protected Attributes | |
Gecode::Support::RandomGenerator | random |
The actual random number generator. | |
Gecode::Support::Mutex | mutex |
A mutex for the random number generator. |
Detailed Description
A thread-safe random number generator.
Definition at line 358 of file flatzinc.hh.
Constructor & Destructor Documentation
Gecode::FlatZinc::FznRnd::FznRnd | ( | unsigned int | s = 1 |
) |
Constructor.
Definition at line 320 of file flatzinc.cpp.
Member Function Documentation
unsigned int Gecode::FlatZinc::FznRnd::operator() | ( | unsigned int | n | ) |
Returns a random integer from the interval [0..n).
Definition at line 323 of file flatzinc.cpp.
Member Data Documentation
The actual random number generator.
Definition at line 361 of file flatzinc.hh.
A mutex for the random number generator.
Definition at line 363 of file flatzinc.hh.
The documentation for this class was generated from the following files:
- gecode/flatzinc.hh (Revision: 14463)
- gecode/flatzinc/flatzinc.cpp (Revision: 14463)