NEST  2.6.0,not_revisioned_source_dir@0
Classes | Typedefs
Uniform Random Number Generators.

All generators are derived from base class RandomGen. More...

Classes

class  librandom::GslRandomGen
 class GslRandomGen C++ wrapper for GSL/GSL-style generators. More...
 
class  librandom::RandomGen
 Abstract base class for all random generator objects. More...
 
class  librandom::GenericRNGFactory
 Factory class for random generators. More...
 
class  librandom::BuiltinRNGFactory< Generator >
 Concrete template for factories for built-in (non GSL) random generators. More...
 

Typedefs

typedef lockPTRDatum
< librandom::RandomGen,&RandomNumbers::RngType
librandom::RngDatum
 Encapsulates random number generators in SLI. More...
 
typedef lockPTRDatum
< librandom::GenericRNGFactory,&RandomNumbers::RngFactoryType
librandom::RngFactoryDatum
 Encapsulates random number generator factories in SLI. More...
 
typedef lockPTRDatum
< librandom::RandomDev,&RandomNumbers::RdvType
librandom::RdvDatum
 Encapsulates random deviate generators in SLI. More...
 
typedef lockPTRDatum
< librandom::GenericRandomDevFactory,&RandomNumbers::RdvFactoryType
librandom::RdvFactoryDatum
 Encapsulates random deviate generator factories in SLI. More...
 

Detailed Description

All generators are derived from base class RandomGen.

All generators return only uniformly distributed random numbers in well-defined intervals. The following functions are implemented

* Function                    Comment
* -------------------------------------------------------  
* double drand()              [0, 1)                            
*        ()                   [0, 1)                            
* double drandpos()           (0, 1)                            
* ulong  ulrand(N)            [0, N-1]                          
*                                                          
* void   seed(N)              seed the RNG, N: ulong            
*                                                          
* size   get_buffsize()       get RNG buffer size         
* void   set_buffsize(size_t) set RNG buffer size         
* -------------------------------------------------------  
* 
Note
The drand() method is the core method for RNG production It buffers random numbers in a buffer; all other methods drawn random numbers from this buffer by calls to drand. The buffer size can be set by set_buffsize(). Changing the buffer size or seeding the RNG leads to a complete refill of the buffer.
For access to random numbers from the SLI interface, see the SLI documentation.
For a list of available RNGs, see rngdict info in SLI.

NEST comes at present with two built-in random number generators:

If the GNU Scientific Library (v 1.2 or later) is installed, all uniform random number generators from the GSL are made available, too. These have names prefixed with gsl_. For more information on the RNGs linked in from the GSL, see http://www.gnu.org/software/gsl.

The following generators produce idential sequences:

Note
  • Random generator constructors should always require a seed.
  • A default seed value is available globally through librandom::RandomGen::DefaultSeed.
  • If you need to create a random generator in a place without access to rngdict, you can use librandom::RandomGen::create_knuthlfg_rng(librandom::RandomGen::DefaultSeed)
  • This is not generally recommended practice. Both nodes and any module routines shall use the RNGs provided by Network.

Typedef Documentation

Encapsulates random deviate generators in SLI.

Encapsulates random deviate generator factories in SLI.

Encapsulates random number generators in SLI.

Encapsulates random number generator factories in SLI.