QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MultiPathGenerator< GSG > Class Template Reference

Generates a multipath from a random number generator. More...

#include <ql/methods/montecarlo/multipathgenerator.hpp>

+ Collaboration diagram for MultiPathGenerator< GSG >:

Public Types

typedef Sample< MultiPathsample_type
 

Public Member Functions

 MultiPathGenerator (const ext::shared_ptr< StochasticProcess > &, const TimeGrid &, GSG generator, bool brownianBridge=false)
 
const sample_typenext () const
 
const sample_typeantithetic () const
 

Private Member Functions

const sample_typenext (bool antithetic) const
 

Private Attributes

bool brownianBridge_
 
ext::shared_ptr< StochasticProcessprocess_
 
GSG generator_
 
sample_type next_
 

Detailed Description

template<class GSG>
class QuantLib::MultiPathGenerator< GSG >

Generates a multipath from a random number generator.

RSG is a sample generator which returns a random sequence. It must have the minimal interface:

RSG {
};
const sample_type & next() const
weighted sample
Definition: sample.hpp:35
Tests:
the generated paths are checked against cached results

Definition at line 51 of file multipathgenerator.hpp.

Member Typedef Documentation

◆ sample_type

Definition at line 53 of file multipathgenerator.hpp.

Constructor & Destructor Documentation

◆ MultiPathGenerator()

MultiPathGenerator ( const ext::shared_ptr< StochasticProcess > &  process,
const TimeGrid times,
GSG  generator,
bool  brownianBridge = false 
)

Definition at line 72 of file multipathgenerator.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ next() [1/2]

const MultiPathGenerator< GSG >::sample_type & next

Definition at line 92 of file multipathgenerator.hpp.

◆ antithetic()

const MultiPathGenerator< GSG >::sample_type & antithetic

Definition at line 98 of file multipathgenerator.hpp.

◆ next() [2/2]

const MultiPathGenerator< GSG >::sample_type & next ( bool  antithetic) const
private

Definition at line 104 of file multipathgenerator.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ brownianBridge_

bool brownianBridge_
private

Definition at line 62 of file multipathgenerator.hpp.

◆ process_

ext::shared_ptr<StochasticProcess> process_
private

Definition at line 63 of file multipathgenerator.hpp.

◆ generator_

GSG generator_
private

Definition at line 64 of file multipathgenerator.hpp.

◆ next_

sample_type next_
mutableprivate

Definition at line 65 of file multipathgenerator.hpp.