Library of Assembled Shared Sources
lass::num::DistributionExponential< T, RandomGenerator > Class Template Reference

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
 

Related Symbols

(Note that these are not member symbols.)

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:

  • T result type
  • RandomGenerator type of random number generator, see Random.

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

Definition at line 137 of file distribution.h.

Constructor & Destructor Documentation

◆ DistributionExponential() [1/2]

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

construct an empty distribution.

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

Definition at line 166 of file distribution.inl.

Referenced by distributeExponential().

◆ DistributionExponential() [2/2]

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

construct a normal distribution mapper

Parameters
generatorrandom number generator to be used as input. Lifespan of generator must be at least that of the distribution.
meanmean of distribution
stddevstandard deviation of

Definition at line 180 of file distribution.inl.


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