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 | |
DistributionNormal () | |
construct an empty distribution. | |
DistributionNormal (TGenerator &generator, TParam mean=TNumTraits::zero, TParam standardDeviation=TNumTraits::one) | |
construct a normal distribution mapper | |
TValue | operator() () const |
Private Attributes | |
TGenerator * | generator_ |
TValue | mean_ |
TValue | standardDeviation_ |
TValue | gset_ |
bool | iset_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T , typename RandomGenerator > | |
T | distributeNormal (RandomGenerator &generator, T mean, T standardDeviation) |
draw a random number from generator and transform it by a normal distribution |
template arguments:
Definition at line 171 of file distribution.h.
typedef RandomGenerator lass::num::DistributionNormal< T, RandomGenerator >::TGenerator |
typedef num::NumTraits<T> lass::num::DistributionNormal< T, RandomGenerator >::TNumTraits |
typedef util::CallTraits<T>::TValue lass::num::DistributionNormal< T, RandomGenerator >::TValue |
typedef util::CallTraits<T>::TParam lass::num::DistributionNormal< T, RandomGenerator >::TParam |
lass::num::DistributionNormal< T, RG >::DistributionNormal | ( | ) | [inline] |
construct an empty distribution.
Definition at line 214 of file distribution.inl.
lass::num::DistributionNormal< T, RG >::DistributionNormal | ( | TGenerator & | generator, | |
TParam | mean = TNumTraits::zero , |
|||
TParam | standardDeviation = 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 | |
standardDeviation | standard deviation of distribution |
Definition at line 228 of file distribution.inl.
DistributionNormal< T, RG >::TValue lass::num::DistributionNormal< T, RG >::operator() | ( | ) | const [inline] |
Definition at line 241 of file distribution.inl.
References lass::num::DistributionNormal< T, RandomGenerator >::generator_, lass::num::DistributionNormal< T, RandomGenerator >::gset_, lass::num::DistributionNormal< T, RandomGenerator >::iset_, LASS_ASSERT, lass::num::log(), lass::num::DistributionNormal< T, RandomGenerator >::mean_, lass::num::NumTraits< C >::one, lass::num::sqrt(), and lass::num::DistributionNormal< T, RandomGenerator >::standardDeviation_.
T distributeNormal | ( | RandomGenerator & | generator, | |
T | mean, | |||
T | standardDeviation | |||
) | [related] |
draw a random number from generator and transform it by a normal distribution
Definition at line 273 of file distribution.inl.
TGenerator* lass::num::DistributionNormal< T, RandomGenerator >::generator_ [private] |
Definition at line 189 of file distribution.h.
Referenced by lass::num::DistributionNormal< T, RandomGenerator >::operator()().
TValue lass::num::DistributionNormal< T, RandomGenerator >::mean_ [private] |
Definition at line 190 of file distribution.h.
Referenced by lass::num::DistributionNormal< T, RandomGenerator >::operator()().
TValue lass::num::DistributionNormal< T, RandomGenerator >::standardDeviation_ [private] |
Definition at line 191 of file distribution.h.
Referenced by lass::num::DistributionNormal< T, RandomGenerator >::operator()().
TValue lass::num::DistributionNormal< T, RandomGenerator >::gset_ [mutable, private] |
Definition at line 192 of file distribution.h.
Referenced by lass::num::DistributionNormal< T, RandomGenerator >::operator()().
bool lass::num::DistributionNormal< T, RandomGenerator >::iset_ [mutable, private] |
Definition at line 193 of file distribution.h.
Referenced by lass::num::DistributionNormal< T, RandomGenerator >::operator()().
Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by 1.5.7.1 |