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

Isotropic random walk. More...

#include <ql/experimental/math/isotropicrandomwalk.hpp>

+ Inheritance diagram for IsotropicRandomWalk< Distribution, Engine >:
+ Collaboration diagram for IsotropicRandomWalk< Distribution, Engine >:

Public Member Functions

 IsotropicRandomWalk (Engine eng, Distribution dist, Size dim, Array weights=Array(), unsigned long seed=0)
 
template<class InputIterator >
void nextReal (InputIterator first)
 
void setDimension (Size dim)
 
void setDimension (Size dim, const Array &weights)
 
void setDimension (Size dim, const Array &lowerBound, const Array &upperBound)
 

Protected Attributes

Engine engine_
 
Distribution distribution_
 
MersenneTwisterUniformRng rng_
 
Array weights_
 
Size dim_
 

Detailed Description

template<class Distribution, class Engine>
class QuantLib::IsotropicRandomWalk< Distribution, Engine >

Isotropic random walk.

A variate is used to draw from a random element of a probability distribution. The draw corresponds to the radius of a d-dimensional sphere. The position on the surface of the d-dimensional sphere is randomly chosen with all points on the surface having the same probability, i.e. all directions are isotropic and the step is randomly drawn from the given variate.

Definition at line 44 of file isotropicrandomwalk.hpp.

Constructor & Destructor Documentation

◆ IsotropicRandomWalk()

IsotropicRandomWalk ( Engine  eng,
Distribution  dist,
Size  dim,
Array  weights = Array(),
unsigned long  seed = 0 
)

Definition at line 46 of file isotropicrandomwalk.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ nextReal()

void nextReal ( InputIterator  first)

Definition at line 58 of file isotropicrandomwalk.hpp.

+ Here is the call graph for this function:

◆ setDimension() [1/3]

void setDimension ( Size  dim)

Definition at line 79 of file isotropicrandomwalk.hpp.

+ Here is the caller graph for this function:

◆ setDimension() [2/3]

void setDimension ( Size  dim,
const Array weights 
)

Definition at line 83 of file isotropicrandomwalk.hpp.

+ Here is the call graph for this function:

◆ setDimension() [3/3]

void setDimension ( Size  dim,
const Array lowerBound,
const Array upperBound 
)

The isotropic random walk will not adjust its draw to be within the lower and upper bounds, but if the limits are provided, they are used to rescale the sphere so as to make it to an ellipsoid, with different radius in different dimensions.

Definition at line 93 of file isotropicrandomwalk.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ engine_

Engine engine_
protected

Definition at line 112 of file isotropicrandomwalk.hpp.

◆ distribution_

Distribution distribution_
protected

Definition at line 113 of file isotropicrandomwalk.hpp.

◆ rng_

MersenneTwisterUniformRng rng_
protected

Definition at line 114 of file isotropicrandomwalk.hpp.

◆ weights_

Array weights_
protected

Definition at line 115 of file isotropicrandomwalk.hpp.

◆ dim_

Size dim_
protected

Definition at line 116 of file isotropicrandomwalk.hpp.