QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
FaureRsg Class Reference

Faure low-discrepancy sequence generator. More...

#include <faurersg.hpp>

+ Collaboration diagram for FaureRsg:

Public Types

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

Public Member Functions

 FaureRsg (Size dimensionality)
 
const std::vector< long int > & nextIntSequence () const
 
const std::vector< long int > & lastIntSequence () const
 
const sample_typenextSequence () const
 
const sample_typelastSequence () const
 
Size dimension () const
 

Private Member Functions

void generateNextIntSequence () const
 

Private Attributes

Size dimensionality_
 
sample_type sequence_
 
std::vector< long int > integerSequence_
 
std::vector< long int > bary_
 
std::vector< std::vector< long int > > gray_
 
Size base_
 
Size mbit_
 
std::vector< std::vector< long int > > powBase_
 
std::vector< long int > addOne_
 
std::vector< std::vector< std::vector< long int > > > pascal3D
 
double normalizationFactor_
 

Detailed Description

Faure low-discrepancy sequence generator.

It is based on existing Fortran and C algorithms to calculate pascal matrix and gray transforms.

  1. E. Thiemard Economic generation of low-discrepancy sequences with a b-ary gray code.
  2. Algorithms 659, 647. http://www.netlib.org/toms/647, http://www.netlib.org/toms/659

    Tests:
    the correctness of the returned values is tested by reproducing known good values.

Definition at line 46 of file faurersg.hpp.

Member Typedef Documentation

◆ sample_type

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

Definition at line 48 of file faurersg.hpp.

Constructor & Destructor Documentation

◆ FaureRsg()

FaureRsg ( Size  dimensionality)

Definition at line 26 of file faurersg.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ nextIntSequence()

const std::vector< long int > & nextIntSequence ( ) const

Definition at line 50 of file faurersg.hpp.

+ Here is the call graph for this function:

◆ lastIntSequence()

const std::vector< long int > & lastIntSequence ( ) const

Definition at line 54 of file faurersg.hpp.

◆ nextSequence()

const sample_type & nextSequence ( ) const

Definition at line 57 of file faurersg.hpp.

+ Here is the call graph for this function:

◆ lastSequence()

const sample_type & lastSequence ( ) const

Definition at line 63 of file faurersg.hpp.

◆ dimension()

Size dimension ( ) const

Definition at line 64 of file faurersg.hpp.

◆ generateNextIntSequence()

void generateNextIntSequence ( ) const
private

Definition at line 109 of file faurersg.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ dimensionality_

Size dimensionality_
private

Definition at line 67 of file faurersg.hpp.

◆ sequence_

sample_type sequence_
mutableprivate

Definition at line 69 of file faurersg.hpp.

◆ integerSequence_

std::vector<long int> integerSequence_
mutableprivate

Definition at line 70 of file faurersg.hpp.

◆ bary_

std::vector<long int> bary_
mutableprivate

Definition at line 71 of file faurersg.hpp.

◆ gray_

std::vector<std::vector<long int> > gray_
mutableprivate

Definition at line 72 of file faurersg.hpp.

◆ base_

Size base_
private

Definition at line 73 of file faurersg.hpp.

◆ mbit_

Size mbit_
private

Definition at line 73 of file faurersg.hpp.

◆ powBase_

std::vector<std::vector<long int> > powBase_
private

Definition at line 74 of file faurersg.hpp.

◆ addOne_

std::vector<long int> addOne_
private

Definition at line 75 of file faurersg.hpp.

◆ pascal3D

std::vector<std::vector<std::vector<long int> > > pascal3D
private

Definition at line 76 of file faurersg.hpp.

◆ normalizationFactor_

double normalizationFactor_
private

Definition at line 77 of file faurersg.hpp.