Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

salt::RandomEngine Class Reference

A wrapper to a boost random number generator. More...

#include <random.h>

List of all members.

Public Types

typedef boost::mt19937::result_type result_type

Static Public Member Functions

static RandomEngineinstance ()
static RandomEngineinstance (result_type value)
template<class Generator>
static RandomEngineinstance (Generator &gen)

Private Member Functions

 RandomEngine ()


Detailed Description

A wrapper to a boost random number generator.

This class was created so that the underlying generator can be exchanged easily. Making this class a singleton prevents initializing the generator more than once (which can be expensive).

The only thing users should do with this class is to set the seed of the generator. To actually create random numbers, use one of the Random Number Generator Classes that map the numbers to a specific distribution and provide an operator()() to access random numbers.

Definition at line 45 of file random.h.


Member Typedef Documentation

typedef boost::mt19937::result_type salt::RandomEngine::result_type
 

Definition at line 48 of file random.h.


Constructor & Destructor Documentation

salt::RandomEngine::RandomEngine  )  [inline, private]
 

Definition at line 70 of file random.h.


Member Function Documentation

template<class Generator>
static RandomEngine& salt::RandomEngine::instance Generator &  gen  )  [inline, static]
 

Definition at line 67 of file random.h.

static RandomEngine& salt::RandomEngine::instance result_type  value  )  [inline, static]
 

Definition at line 59 of file random.h.

static RandomEngine& salt::RandomEngine::instance  )  [inline, static]
 

Definition at line 50 of file random.h.

Referenced by zeitgeist::RandomServer::Seed().


The documentation for this class was generated from the following file:
Generated on Thu Apr 6 15:49:21 2006 for rcssserver3d by  doxygen 1.4.4