|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Randomized (random shift) low-discrepancy sequence. More...
#include <randomizedlds.hpp>
Collaboration diagram for RandomizedLDS< LDS, PRS >:Public Types | |
| typedef Sample< std::vector< Real > > | sample_type |
Public Member Functions | |
| RandomizedLDS (const LDS &ldsg, PRS prsg) | |
| RandomizedLDS (const LDS &ldsg) | |
| RandomizedLDS (Size dimensionality, BigNatural ldsSeed=0, BigNatural prsSeed=0) | |
| const sample_type & | nextSequence () const |
| returns next sample using a given randomizing vector More... | |
| const sample_type & | lastSequence () const |
| void | nextRandomizer () |
| Size | dimension () const |
Private Attributes | |
| LDS | ldsg_ |
| LDS | pristineldsg_ |
| PRS | prsg_ |
| Size | dimension_ |
| sample_type | x |
| sample_type | randomizer_ |
Randomized (random shift) low-discrepancy sequence.
Random-shifts a uniform low-discrepancy sequence of dimension \( N \) by adding (modulo 1 for each coordinate) a pseudo-random uniform deviate in \( (0, 1)^N. \) It is used for implementing Randomized Quasi Monte Carlo.
The uniform low discrepancy sequence is supplied by LDS; the uniform pseudo-random sequence is supplied by PRS.
Both class LDS and PRS must implement the following interface:
Definition at line 59 of file randomizedlds.hpp.
| typedef Sample<std::vector<Real> > sample_type |
Definition at line 61 of file randomizedlds.hpp.
| RandomizedLDS | ( | const LDS & | ldsg, |
| PRS | prsg | ||
| ) |
Definition at line 87 of file randomizedlds.hpp.
| RandomizedLDS | ( | const LDS & | ldsg | ) |
Definition at line 100 of file randomizedlds.hpp.
| RandomizedLDS | ( | Size | dimensionality, |
| BigNatural | ldsSeed = 0, |
||
| BigNatural | prsSeed = 0 |
||
| ) |
Definition at line 110 of file randomizedlds.hpp.
| const RandomizedLDS< LDS, PRS >::sample_type & nextSequence |
returns next sample using a given randomizing vector
Definition at line 122 of file randomizedlds.hpp.
| const sample_type & lastSequence | ( | ) | const |
Definition at line 69 of file randomizedlds.hpp.
| void nextRandomizer | ( | ) |
update the randomizing vector and re-initialize the low discrepancy generator
Definition at line 74 of file randomizedlds.hpp.
| Size dimension | ( | ) | const |
Definition at line 78 of file randomizedlds.hpp.
|
mutableprivate |
Definition at line 80 of file randomizedlds.hpp.
|
private |
Definition at line 80 of file randomizedlds.hpp.
|
private |
Definition at line 81 of file randomizedlds.hpp.
|
private |
Definition at line 82 of file randomizedlds.hpp.
|
mutableprivate |
Definition at line 83 of file randomizedlds.hpp.
|
private |
Definition at line 83 of file randomizedlds.hpp.