QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
math
randomnumbers
sobolbrownianbridgersg.hpp
Go to the documentation of this file.
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
Copyright (C) 2012 Klaus Spanderen
5
6
This file is part of QuantLib, a free-software/open-source library
7
for financial quantitative analysts and developers - http://quantlib.org/
8
9
QuantLib is free software: you can redistribute it and/or modify it
10
under the terms of the QuantLib license. You should have received a
11
copy of the license along with this program; if not, please email
12
<quantlib-dev@lists.sf.net>. The license is also available online at
13
<http://quantlib.org/license.shtml>.
14
15
This program is distributed in the hope that it will be useful, but WITHOUT
16
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
FOR A PARTICULAR PURPOSE. See the license for more details.
18
*/
19
20
/*! \file sobolbrownianbridgersg.hpp
21
\brief interface class to map the functionality of SobolBrownianGenerator
22
to the "conventional" sequence generator interface
23
*/
24
25
#ifndef quantlib_sobol_brownian_bridge_rsg_hpp
26
#define quantlib_sobol_brownian_bridge_rsg_hpp
27
28
#include <
ql/models/marketmodels/browniangenerators/sobolbrowniangenerator.hpp
>
29
30
namespace
QuantLib
{
31
32
class
SobolBrownianBridgeRsg
{
33
public
:
34
typedef
Sample<std::vector<Real>
>
sample_type
;
35
36
SobolBrownianBridgeRsg
(
Size
factors,
Size
steps,
37
SobolBrownianGenerator::Ordering
ordering
38
=
SobolBrownianGenerator::Diagonal
,
39
unsigned
long
seed = 0,
40
SobolRsg::DirectionIntegers
directionIntegers
41
=
SobolRsg::JoeKuoD7
);
42
43
const
sample_type
&
nextSequence
()
const
;
44
const
sample_type
&
lastSequence
()
const
;
45
Size
dimension
()
const
;
46
47
private
:
48
mutable
sample_type
seq_
;
49
mutable
SobolBrownianGenerator
gen_
;
50
};
51
52
class
Burley2020SobolBrownianBridgeRsg
{
53
public
:
54
typedef
Sample<std::vector<Real>
>
sample_type
;
55
56
Burley2020SobolBrownianBridgeRsg
(
57
Size
factors,
58
Size
steps,
59
SobolBrownianGenerator::Ordering
ordering =
SobolBrownianGenerator::Diagonal
,
60
unsigned
long
seed = 42,
61
SobolRsg::DirectionIntegers
directionIntegers =
SobolRsg::JoeKuoD7
,
62
unsigned
long
scrambleSeed = 43);
63
64
const
sample_type
&
nextSequence
()
const
;
65
const
sample_type
&
lastSequence
()
const
;
66
Size
dimension
()
const
;
67
68
private
:
69
mutable
sample_type
seq_
;
70
mutable
Burley2020SobolBrownianGenerator
gen_
;
71
};
72
}
73
74
#endif
QuantLib::Burley2020SobolBrownianBridgeRsg
Definition:
sobolbrownianbridgersg.hpp:52
QuantLib::Burley2020SobolBrownianBridgeRsg::dimension
Size dimension() const
Definition:
sobolbrownianbridgersg.cpp:85
QuantLib::Burley2020SobolBrownianBridgeRsg::seq_
sample_type seq_
Definition:
sobolbrownianbridgersg.hpp:69
QuantLib::Burley2020SobolBrownianBridgeRsg::lastSequence
const sample_type & lastSequence() const
Definition:
sobolbrownianbridgersg.cpp:81
QuantLib::Burley2020SobolBrownianBridgeRsg::gen_
Burley2020SobolBrownianGenerator gen_
Definition:
sobolbrownianbridgersg.hpp:70
QuantLib::Burley2020SobolBrownianBridgeRsg::nextSequence
const sample_type & nextSequence() const
Definition:
sobolbrownianbridgersg.cpp:75
QuantLib::Burley2020SobolBrownianBridgeRsg::sample_type
Sample< std::vector< Real > > sample_type
Definition:
sobolbrownianbridgersg.hpp:54
QuantLib::Burley2020SobolBrownianGenerator
Definition:
sobolbrowniangenerator.hpp:106
QuantLib::SobolBrownianBridgeRsg
Definition:
sobolbrownianbridgersg.hpp:32
QuantLib::SobolBrownianBridgeRsg::nextSequence
const sample_type & nextSequence() const
Definition:
sobolbrownianbridgersg.cpp:49
QuantLib::SobolBrownianBridgeRsg::dimension
Size dimension() const
Definition:
sobolbrownianbridgersg.cpp:60
QuantLib::SobolBrownianBridgeRsg::seq_
sample_type seq_
Definition:
sobolbrownianbridgersg.hpp:48
QuantLib::SobolBrownianBridgeRsg::gen_
SobolBrownianGenerator gen_
Definition:
sobolbrownianbridgersg.hpp:49
QuantLib::SobolBrownianBridgeRsg::sample_type
Sample< std::vector< Real > > sample_type
Definition:
sobolbrownianbridgersg.hpp:34
QuantLib::SobolBrownianBridgeRsg::lastSequence
const sample_type & lastSequence() const
Definition:
sobolbrownianbridgersg.cpp:56
QuantLib::SobolBrownianGeneratorBase::Ordering
Ordering
Definition:
sobolbrowniangenerator.hpp:40
QuantLib::SobolBrownianGeneratorBase::Diagonal
@ Diagonal
Definition:
sobolbrowniangenerator.hpp:45
QuantLib::SobolBrownianGenerator
Definition:
sobolbrowniangenerator.hpp:79
QuantLib::SobolRsg::DirectionIntegers
DirectionIntegers
Definition:
sobolrsg.hpp:113
QuantLib::SobolRsg::JoeKuoD7
@ JoeKuoD7
Definition:
sobolrsg.hpp:115
QuantLib::Size
std::size_t Size
size of a container
Definition:
types.hpp:58
QuantLib
Definition:
any.hpp:35
sobolbrowniangenerator.hpp
QuantLib::Sample
weighted sample
Definition:
sample.hpp:35
Generated by
Doxygen
1.9.5