QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Inverse cumulative random number generator. More...
#include <inversecumulativerng.hpp>
Public Types | |
typedef Sample< Real > | sample_type |
typedef RNG | urng_type |
Public Member Functions | |
InverseCumulativeRng (const RNG &uniformGenerator) | |
sample_type | next () const |
returns a sample from a Gaussian distribution More... | |
Private Attributes | |
RNG | uniformGenerator_ |
IC | ICND_ |
Inverse cumulative random number generator.
It uses a uniform deviate in (0, 1) as the source of cumulative distribution values. Then an inverse cumulative distribution is used to calculate the distribution deviate.
The uniform deviate is supplied by RNG.
Class RNG must implement the following interface:
The inverse cumulative distribution is supplied by IC.
Class IC must implement the following interface:
Definition at line 54 of file inversecumulativerng.hpp.
typedef Sample<Real> sample_type |
Definition at line 56 of file inversecumulativerng.hpp.
typedef RNG urng_type |
Definition at line 57 of file inversecumulativerng.hpp.
|
explicit |
Definition at line 67 of file inversecumulativerng.hpp.
InverseCumulativeRng< RNG, IC >::sample_type next |
returns a sample from a Gaussian distribution
Definition at line 72 of file inversecumulativerng.hpp.
|
private |
Definition at line 62 of file inversecumulativerng.hpp.
|
private |
Definition at line 63 of file inversecumulativerng.hpp.