Generated on Sat Feb 7 2015 02:01:42 for Gecode by doxygen 1.8.9.1
Gecode::FlatZinc::FznRnd Class Reference

A thread-safe random number generator. More...

#include <flatzinc.hh>

Public Member Functions

 FznRnd (unsigned int s=1)
 Constructor. More...
 
unsigned int operator() (unsigned int n)
 Returns a random integer from the interval [0..n) More...
 

Protected Attributes

Gecode::Support::RandomGenerator random
 The actual random number generator. More...
 
Gecode::Support::Mutex mutex
 A mutex for the random number generator. More...
 

Detailed Description

A thread-safe random number generator.

Definition at line 354 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

Gecode::Support::RandomGenerator Gecode::FlatZinc::FznRnd::random
protected

The actual random number generator.

Definition at line 357 of file flatzinc.hh.

Gecode::Support::Mutex Gecode::FlatZinc::FznRnd::mutex
protected

A mutex for the random number generator.

Definition at line 359 of file flatzinc.hh.


The documentation for this class was generated from the following files: