Generated on Thu Jul 25 2019 00:00:00 for Gecode by doxygen 1.8.15
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 384 of file flatzinc.hh.

Constructor & Destructor Documentation

◆ FznRnd()

Gecode::FlatZinc::FznRnd::FznRnd ( unsigned int  s = 1)

Constructor.

Definition at line 321 of file flatzinc.cpp.

Member Function Documentation

◆ operator()()

unsigned int Gecode::FlatZinc::FznRnd::operator() ( unsigned int  n)

Returns a random integer from the interval [0..n)

Definition at line 324 of file flatzinc.cpp.

Member Data Documentation

◆ random

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

The actual random number generator.

Definition at line 387 of file flatzinc.hh.

◆ mutex

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

A mutex for the random number generator.

Definition at line 389 of file flatzinc.hh.


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