library of assembled shared sources |
http://lass.cocamware.com |
#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 | |
TGenerator * | generator_ |
TValue | rateOfChange_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T , typename RandomGenerator > | |
T | distributeExponential (RandomGenerator &generator, T rateOfChange) |
draw a random number from generator and transform it by a exponential distribution |
template arguments:
Definition at line 134 of file distribution.h.
typedef RandomGenerator lass::num::DistributionExponential< T, RandomGenerator >::TGenerator |
typedef num::NumTraits<T> lass::num::DistributionExponential< T, RandomGenerator >::TNumTraits |
typedef util::CallTraits<T>::TValue lass::num::DistributionExponential< T, RandomGenerator >::TValue |
typedef util::CallTraits<T>::TParam lass::num::DistributionExponential< T, RandomGenerator >::TParam |
lass::num::DistributionExponential< T, RG >::DistributionExponential | ( | ) | [inline] |
construct an empty distribution.
Definition at line 157 of file distribution.inl.
lass::num::DistributionExponential< T, RG >::DistributionExponential | ( | TGenerator & | generator, | |
TParam | rateOfChange = TNumTraits::one | |||
) | [inline] |
construct a normal distribution mapper
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.
DistributionExponential< T, RG >::TValue lass::num::DistributionExponential< T, RG >::operator() | ( | ) | const [inline] |
Definition at line 181 of file distribution.inl.
References lass::num::DistributionExponential< T, RandomGenerator >::generator_, LASS_ASSERT, lass::num::log(), lass::num::DistributionExponential< T, RandomGenerator >::rateOfChange_, and lass::num::NumTraits< C >::zero.
T distributeExponential | ( | RandomGenerator & | generator, | |
T | rateOfChange | |||
) | [related] |
draw a random number from generator and transform it by a exponential distribution
Definition at line 199 of file distribution.inl.
TGenerator* lass::num::DistributionExponential< T, RandomGenerator >::generator_ [private] |
Definition at line 152 of file distribution.h.
Referenced by lass::num::DistributionExponential< T, RandomGenerator >::operator()().
TValue lass::num::DistributionExponential< T, RandomGenerator >::rateOfChange_ [private] |
Definition at line 153 of file distribution.h.
Referenced by lass::num::DistributionExponential< T, RandomGenerator >::operator()().
Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by 1.5.7.1 |