Generated on Tue Dec 16 12:50:10 2008 for BIU-2.2.0 by doxygen 1.5.1

biu::RandomNumberFactory Class Reference

#include <RandomNumberFactory.hh>


Detailed Description

A wrapper class for a central but variable random number generator access.

Author:
Martin Mann

Definition at line 15 of file RandomNumberFactory.hh.

Public Member Functions

 RandomNumberFactory ()
virtual ~RandomNumberFactory ()

Static Public Member Functions

static unsigned int getMaxRN ()
static unsigned int getRN (unsigned int max)
static unsigned int getRN ()
static RandomNumberGeneratorgetRNG (void)
static void setRNG (RandomNumberGenerator *rng)
static void setRNG (RandomNumberGenerator &rng)

Static Public Attributes

static unsigned int(* pt_getRN )(unsigned int)

Static Private Attributes

static RandomNumberGeneratorrng


Constructor & Destructor Documentation

biu::RandomNumberFactory::RandomNumberFactory (  ) 

Definition at line 16 of file RandomNumberFactory.cc.

biu::RandomNumberFactory::~RandomNumberFactory (  )  [virtual]

Definition at line 20 of file RandomNumberFactory.cc.


Member Function Documentation

unsigned int biu::RandomNumberFactory::getMaxRN (  )  [static]

Returns the largest value the rand function will return.

Returns:
rng->getMaxRN()

Definition at line 58 of file RandomNumberFactory.cc.

unsigned int biu::RandomNumberFactory::getRN ( unsigned int  max  )  [static]

Returns the next random number in the series. It's value will be in [0, max).

Returns:
(rng->getRN()max)

Definition at line 52 of file RandomNumberFactory.cc.

unsigned int biu::RandomNumberFactory::getRN (  )  [static]

Returns the next random number in the series. It's value will be in [0, getMaxRN()].

Returns:
rng->getRN()

Definition at line 47 of file RandomNumberFactory.cc.

RandomNumberGenerator & biu::RandomNumberFactory::getRNG ( void   )  [static]

Access to the random number generator.

Returns:
the current RNG

Definition at line 25 of file RandomNumberFactory.cc.

void biu::RandomNumberFactory::setRNG ( RandomNumberGenerator rng  )  [static]

Setting a new random number generator.

Parameters:
rng the RNG to copy

Definition at line 38 of file RandomNumberFactory.cc.

void biu::RandomNumberFactory::setRNG ( RandomNumberGenerator rng  )  [static]

Setting a new random number generator.

Parameters:
rng the RNG to copy

Definition at line 30 of file RandomNumberFactory.cc.


Field Documentation

unsigned int(* biu::RandomNumberFactory::pt_getRN)(unsigned int) [static]

pointer object to random generator function for RNF usage with STL algorithms like stl::random_shuffle

Definition at line 13 of file RandomNumberFactory.cc.

The current random number generator in use. (default = RNG_ISO).

Definition at line 19 of file RandomNumberFactory.hh.


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