LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::discreteRandomDistribution Class Reference

Base random number class. More...

#include <ltiDiscreteRandDist.h>

Inheritance diagram for lti::discreteRandomDistribution:
Inheritance graph
[legend]
Collaboration diagram for lti::discreteRandomDistribution:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 parameters of the random distribution More...

Public Member Functions

 discreteRandomDistribution (bool reInit=false)
 discreteRandomDistribution (const unsigned int theValue)
virtual ~discreteRandomDistribution ()
virtual int draw () const =0
template<class T >
bool apply (T &theObject) const
virtual functorclone () const =0
virtual const char * getTypeName () const
discreteRandomDistributioncopy (const discreteRandomDistribution &other)

Detailed Description

Base random number class.


Constructor & Destructor Documentation

lti::discreteRandomDistribution::discreteRandomDistribution ( bool  reInit = false  ) 

default constructor.

Initializes the pseudo-random number generator using system time. If reInit is false, the generator is initialized only when instantiating the first discreteRandomDistribution object.

lti::discreteRandomDistribution::discreteRandomDistribution ( const unsigned int  theValue  ) 

this constructor initializes the pseudo-random number generator using the given value

virtual lti::discreteRandomDistribution::~discreteRandomDistribution (  )  [virtual]

destructor


Member Function Documentation

template<class T >
bool lti::discreteRandomDistribution::apply ( T &  theObject  )  const [inline]

draws a number from the specified distribution using the virtual function draw().

References draw().

virtual functor* lti::discreteRandomDistribution::clone (  )  const [pure virtual]

returns a pointer to a clone of the functor.

Reimplemented from lti::randomDistribution.

Implemented in lti::binomialDistribution.

discreteRandomDistribution& lti::discreteRandomDistribution::copy ( const discreteRandomDistribution other  ) 

copy member

Reimplemented from lti::randomDistribution.

Reimplemented in lti::binomialDistribution.

virtual int lti::discreteRandomDistribution::draw (  )  const [pure virtual]

draws a number from the distribution.

Returns either 1 or 0, for occurence of the event or not.

Implemented in lti::binomialDistribution.

Referenced by apply().

virtual const char* lti::discreteRandomDistribution::getTypeName ( void   )  const [inline, virtual]

returns the name of this type

Reimplemented from lti::randomDistribution.

Reimplemented in lti::binomialDistribution.


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

Generated on Sat Apr 10 15:28:14 2010 for LTI-Lib by Doxygen 1.6.1