library of assembled shared sources

http://lass.cocamware.com

lass::num::DistributionExponential< T, RandomGenerator > Class Template Reference
[Distribution]

an exponential distribution mapper. More...

#include <distribution.h>


Public Types

typedef RandomGenerator TGenerator
 generator type
typedef num::NumTraits< T > TNumTraits
 numeric traits of value type
typedef util::CallTraits< T >
::TValue 
TValue
 value type
typedef util::CallTraits< T >
::TParam 
TParam
 parameter value type

Public Member Functions

 DistributionExponential ()
 construct an empty distribution.
 DistributionExponential (TGenerator &generator, TParam rateOfChange=TNumTraits::one)
 construct a normal distribution mapper
TValue operator() () const

Private Attributes

TGeneratorgenerator_
TValue rateOfChange_

Related Functions

(Note that these are not member functions.)

template<typename T , typename RandomGenerator >
distributeExponential (RandomGenerator &generator, T rateOfChange)
 draw a random number from generator and transform it by a exponential distribution


Detailed Description

template<typename T, class RandomGenerator>
class lass::num::DistributionExponential< T, RandomGenerator >

an exponential distribution mapper.

template arguments:

reference: Numerical Recipes in C: The Art of Scientific Computing, section 7.2

Definition at line 134 of file distribution.h.


Member Typedef Documentation

template<typename T , class RandomGenerator >
typedef RandomGenerator lass::num::DistributionExponential< T, RandomGenerator >::TGenerator

generator type

Definition at line 138 of file distribution.h.

template<typename T , class RandomGenerator >
typedef num::NumTraits<T> lass::num::DistributionExponential< T, RandomGenerator >::TNumTraits

numeric traits of value type

Definition at line 140 of file distribution.h.

template<typename T , class RandomGenerator >
typedef util::CallTraits<T>::TValue lass::num::DistributionExponential< T, RandomGenerator >::TValue

value type

Definition at line 141 of file distribution.h.

template<typename T , class RandomGenerator >
typedef util::CallTraits<T>::TParam lass::num::DistributionExponential< T, RandomGenerator >::TParam

parameter value type

Definition at line 142 of file distribution.h.


Constructor & Destructor Documentation

template<typename T , class RG >
lass::num::DistributionExponential< T, RG >::DistributionExponential (  )  [inline]

construct an empty distribution.

Warning:
drawing numbers from an empty distribution results in undefined behaviour, probably causing an access violation.

Definition at line 157 of file distribution.inl.

template<typename T , class RG >
lass::num::DistributionExponential< T, RG >::DistributionExponential ( TGenerator generator,
TParam  rateOfChange = TNumTraits::one 
) [inline]

construct a normal distribution mapper

Parameters:
generator random number generator to be used as input. Lifespan of generator must be at least that of the distribution.
mean mean of distribution
stddev standard deviation of

Definition at line 171 of file distribution.inl.


Member Function Documentation

template<typename T , class RG >
DistributionExponential< T, RG >::TValue lass::num::DistributionExponential< T, RG >::operator() (  )  const [inline]


Friends And Related Function Documentation

template<typename T , typename RandomGenerator >
T distributeExponential ( RandomGenerator &  generator,
rateOfChange 
) [related]

draw a random number from generator and transform it by a exponential distribution

Definition at line 199 of file distribution.inl.


Field Documentation

template<typename T , class RandomGenerator >
TGenerator* lass::num::DistributionExponential< T, RandomGenerator >::generator_ [private]

template<typename T , class RandomGenerator >
TValue lass::num::DistributionExponential< T, RandomGenerator >::rateOfChange_ [private]


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

Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo