Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

Random Class Reference

#include <Random.h>

List of all members.

Public Member Functions

 Random (LongNatural Dimensionality, RandomGenerator *rndGen)
 Default constructor: set dimension.

 Random (RandomGenerator *rndGen)
LongNatural GetDimensionality () const
 Return dimension.

Randomclone () const
 Clone function.

void GetUniforms (valarray< Real > &variates)
 Get uniforms Real.

void GetUniform (Real &variate)
void Skip (LongNatural numberOfPaths)
void SetSeed (LongNatural Seed)
void Reset ()
void GetGaussians (valarray< Real > &variates)
 Get gaussian random numbers.

void GetGaussian (Real &variate)
void ResetDimensionality (LongNatural NewDimensionality)

Private Attributes

RandomGeneratorInnerGenerator
LongNatural Dimensionality
LongNatural InitialSeed
Real Reciprocal


Constructor & Destructor Documentation

Random::Random LongNatural  Dimensionality,
RandomGenerator rndGen
 

Default constructor: set dimension.

Definition at line 3 of file Random.cpp.

References InnerGenerator, and LongNatural.

Referenced by clone().

Random::Random RandomGenerator rndGen  ) 
 

Author:
Yann if dimension 1 - ne need to specifty dimensionality

Definition at line 10 of file Random.cpp.

References Dimensionality, and InnerGenerator.


Member Function Documentation

Random * Random::clone  )  const
 

Clone function.

Definition at line 15 of file Random.cpp.

References Random().

LongNatural Random::GetDimensionality  )  const [inline]
 

Return dimension.

Definition at line 50 of file Random.h.

References Dimensionality, and LongNatural.

Referenced by GetUniforms(), and Skip().

void Random::GetGaussian Real variate  )  [inline]
 

Author:
Yann - Get gaussian random number in a Real to avoid array

Definition at line 66 of file Random.h.

References GetUniform(), InverseCumulativeNormal(), and Real.

Referenced by MCEngine::RunEngineRainbow2AssetsBasketMax(), MCEngine::RunEngineRainbow2SpreadOptionMax(), MCEngine::RunEngineRainbowBestOf2AssetsCash(), MCEngine::RunEngineRainbowMax2AssetsCall(), MCEngine::RunEngineRainbowMax2AssetsPut(), MCEngine::RunEngineRainbowMin2AssetsCall(), MCEngine::RunEngineRainbowMin2AssetsPut(), and MCEngine::RunEngineRainbowWorstOf2AssetsCash().

void Random::GetGaussians valarray< Real > &  variates  )  [inline]
 

Get gaussian random numbers.

Definition at line 55 of file Random.h.

References Dimensionality, GetUniforms(), InverseCumulativeNormal(), LongNatural, and Real.

Referenced by MCEngine::RunEngineAsianCall(), MCEngine::RunEngineAsianPut(), MCEngine::RunEngineBarrierCall(), MCEngine::RunEngineBarrierPut(), MCEngine::RunEngineCall(), MCEngine::RunEngineCappedCliquet(), MCEngine::RunEngineFlooredCliquet(), MCEngine::RunEnginePut(), MCEngine::RunEngineRevLookbackCall(), and MCEngine::RunEngineRevLookbackPut().

void Random::GetUniform Real variate  ) 
 

Author:
Yann - Get uniform in a Real to avoid arrays

Definition at line 26 of file Random.cpp.

References RandomGenerator::getUniform(), InnerGenerator, and Real.

Referenced by GetGaussian().

void Random::GetUniforms valarray< Real > &  variates  )  [inline]
 

Get uniforms Real.

Definition at line 20 of file Random.cpp.

References GetDimensionality(), RandomGenerator::getUniform(), InnerGenerator, and LongNatural.

Referenced by GetGaussians(), and Skip().

void Random::Reset  ) 
 

Definition at line 44 of file Random.cpp.

References InitialSeed, InnerGenerator, and RandomGenerator::SetSeed().

void Random::ResetDimensionality LongNatural  NewDimensionality  ) 
 

Definition at line 50 of file Random.cpp.

References Dimensionality, InitialSeed, InnerGenerator, LongNatural, and RandomGenerator::SetSeed().

void Random::SetSeed LongNatural  Seed  ) 
 

Definition at line 38 of file Random.cpp.

References InitialSeed, InnerGenerator, LongNatural, and RandomGenerator::SetSeed().

Referenced by RainbowOption::instanciateMCVariables(), and mainmc().

void Random::Skip LongNatural  numberOfPaths  ) 
 

Definition at line 31 of file Random.cpp.

References GetDimensionality(), GetUniforms(), and LongNatural.


Member Data Documentation

LongNatural Random::Dimensionality [private]
 

Definition at line 45 of file Random.h.

Referenced by GetDimensionality(), GetGaussians(), Random(), and ResetDimensionality().

LongNatural Random::InitialSeed [private]
 

Definition at line 46 of file Random.h.

Referenced by Reset(), ResetDimensionality(), and SetSeed().

RandomGenerator* Random::InnerGenerator [private]
 

Definition at line 44 of file Random.h.

Referenced by GetUniform(), GetUniforms(), Random(), Reset(), ResetDimensionality(), and SetSeed().

Real Random::Reciprocal [private]
 

Definition at line 47 of file Random.h.


The documentation for this class was generated from the following files:
Note: Generated nightly - reload for latest version
Generated on Thu Dec 22 23:12:40 2005 for terreneuve by doxygen 1.3.6