QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Inverse cumulative random sequence generator. More...
#include <inversecumulativersg.hpp>
Public Types | |
typedef Sample< std::vector< Real > > | sample_type |
Public Member Functions | |
InverseCumulativeRsg (USG uniformSequenceGenerator) | |
InverseCumulativeRsg (USG uniformSequenceGenerator, const IC &inverseCumulative) | |
const sample_type & | nextSequence () const |
returns next sample from the inverse cumulative distribution More... | |
const sample_type & | lastSequence () const |
Size | dimension () const |
Private Attributes | |
USG | uniformSequenceGenerator_ |
Size | dimension_ |
sample_type | x_ |
IC | ICD_ |
Inverse cumulative random sequence generator.
It uses a sequence of 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 sequence is supplied by USG.
Class USG must implement the following interface:
The inverse cumulative distribution is supplied by IC.
Class IC must implement the following interface:
Definition at line 57 of file inversecumulativersg.hpp.
typedef Sample<std::vector<Real> > sample_type |
Definition at line 59 of file inversecumulativersg.hpp.
|
explicit |
Definition at line 74 of file inversecumulativersg.hpp.
InverseCumulativeRsg | ( | USG | uniformSequenceGenerator, |
const IC & | inverseCumulative | ||
) |
Definition at line 79 of file inversecumulativersg.hpp.
const InverseCumulativeRsg< USG, IC >::sample_type & nextSequence |
returns next sample from the inverse cumulative distribution
Definition at line 85 of file inversecumulativersg.hpp.
const sample_type & lastSequence | ( | ) | const |
Definition at line 64 of file inversecumulativersg.hpp.
Size dimension | ( | ) | const |
Definition at line 65 of file inversecumulativersg.hpp.
|
private |
Definition at line 67 of file inversecumulativersg.hpp.
|
private |
Definition at line 68 of file inversecumulativersg.hpp.
|
mutableprivate |
Definition at line 69 of file inversecumulativersg.hpp.
|
private |
Definition at line 70 of file inversecumulativersg.hpp.