| Overview | Group | Tree | Graph | Index | Concepts | 

This handle class produces streams of pseudo-random numbers. You can use objects of this class to create a search with a random element. You can create any number of instances of this class; these instances insure reproducible results in multithreaded applications, where the use of a single source for random numbers creates problems.
See Also:
IloRandomize documented in the ILOG Solver Reference Manual
| Constructor Summary | |
|---|---|
public  | IloRandom() | 
public  | IloRandom(const IloEnv, IloInt) | 
public  | IloRandom(IloRandomI *) | 
public  | IloRandom(const IloRandom &) | 
| Method Summary | |
|---|---|
public void | end() | 
public IloEnv | getEnv() | 
public IloNum | getFloat() | 
public IloRandomI * | getImpl() | 
public IloInt | getInt(IloInt) | 
public const char * | getName() | 
public IloAny | getObject() | 
public void | reSeed(IloInt) | 
public void | setName(const char *) | 
public void | setObject(IloAny) | 
| Constructor Detail | 
|---|
This constructor creates a random number generator; it is initially an empty handle. You must assign this handle before you use its member functions.
This constructor creates an object that generates random numbers. You can seed the
 generator by supplying a value for the integer argument seed. 
This constructor creates a handle object (an instance of the class
 IloRandom) from a pointer to an implementation object (an instance of the
 class IloRandomI).
This constructor creates a handle object from a reference to a random number
 generator. After execution, both the newly constructed handle and rand
 point to the same implementation object.
| Method Detail | 
|---|
This member function releases all memory used by the random number generator. After a call to this member function, you should not use the generator again.
This member function returns the environment associated with the implementation class of the invoking generator.
This member function returns a floating-point number drawn uniformly from the
 interval [0..1).
This member function returns the implementation object of the invoking handle.
This member function returns an integer drawn uniformly from the interval
 [0..n).
This member function returns a character string indicating the name of the invoking object (if there is one).
This member function returns the object associated with the invoking object (if there is one). Normally, an associated object contains user data pertinent to the invoking object.
This member function re-seeds the random number generator with seed.
 
This member function assigns name 
 to the invoking object.
This member function associates obj with the 
 invoking object.  The member function getObject accesses 
 this associated object afterwards. Normally, obj contains 
 user data pertinent to the invoking object.