BoxMullerGaussianRng Class Template Reference

#include <boxmullergaussianrng.hpp>

List of all members.


Detailed Description

template<class RNG>
class QuantLib::RandomNumbers::BoxMullerGaussianRng< RNG >

Gaussian random number generator.

It uses the well-known Box-Muller transformation to return a normal distributed Gaussian deviate with average 0.0 and standard deviation of 1.0, from a uniform deviate in (0,1) supplied by RNG.

Class RNG must implement the following interface:

                RNG::sample_type RNG::next() const;


Public Types

typedef MonteCarlo::Sample<
double > 
sample_type

Public Member Functions

 BoxMullerGaussianRng (const RNG &uniformGenerator)
 BoxMullerGaussianRng (long seed=0)
sample_type next () const
 returns next sample from the Gaussian distribution


Constructor & Destructor Documentation

BoxMullerGaussianRng long  seed = 0  )  [explicit]
 

Deprecated:
initialize with a random number generator instead.


The documentation for this class was generated from the following file:

QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen