QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Types | Public Member Functions | List of all members
HaltonRsg Class Reference

Halton low-discrepancy sequence generator. More...

#include <ql/math/randomnumbers/haltonrsg.hpp>

Public Types

typedef Sample< std::vector< Real > > sample_type
 

Public Member Functions

 HaltonRsg (Size dimensionality, unsigned long seed=0, bool randomStart=true, bool randomShift=false)
 
const sample_typenextSequence () const
 
const sample_typelastSequence () const
 
Size dimension () const
 

Detailed Description

Halton low-discrepancy sequence generator.

Halton algorithm for low-discrepancy sequence. For more details see chapter 8, paragraph 2 of "Monte Carlo Methods in Finance", by Peter Jäckel

Tests:
  • the correctness of the returned values is tested by reproducing known good values.
  • the correctness of the returned values is tested by checking their discrepancy against known good values.