|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Gaussian random number generator. More...
#include <centrallimitgaussianrng.hpp>
Collaboration diagram for CLGaussianRng< RNG >:Public Types | |
| typedef Sample< Real > | sample_type |
| typedef RNG | urng_type |
Public Member Functions | |
| CLGaussianRng (const RNG &uniformGenerator) | |
| sample_type | next () const |
| returns a sample from a Gaussian distribution More... | |
Private Attributes | |
| RNG | uniformGenerator_ |
Gaussian random number generator.
It uses the well-known fact that the sum of 12 uniform deviate in (-.5,.5) is approximately a Gaussian deviate with average 0 and standard deviation 1. The uniform deviate is supplied by RNG.
Class RNG must implement the following interface:
Definition at line 44 of file centrallimitgaussianrng.hpp.
| typedef Sample<Real> sample_type |
Definition at line 46 of file centrallimitgaussianrng.hpp.
| typedef RNG urng_type |
Definition at line 47 of file centrallimitgaussianrng.hpp.
|
explicit |
Definition at line 56 of file centrallimitgaussianrng.hpp.
| CLGaussianRng< RNG >::sample_type next |
returns a sample from a Gaussian distribution
Definition at line 61 of file centrallimitgaussianrng.hpp.
|
private |
Definition at line 52 of file centrallimitgaussianrng.hpp.