InverseCumulativeRsg (3) - Linux Manuals

InverseCumulativeRsg: Inverse cumulative random sequence generator.

NAME

QuantLib::InverseCumulativeRsg - Inverse cumulative random sequence generator.

SYNOPSIS


#include <ql/math/randomnumbers/inversecumulativersg.hpp>

Public Types


typedef Sample< std::vector< Real > > sample_type

Public Member Functions


InverseCumulativeRsg (const USG &uniformSequenceGenerator)

InverseCumulativeRsg (const USG &uniformSequenceGenerator, const IC &inverseCumulative)

const sample_type & nextSequence () const
returns next sample from the Gaussian distribution
const sample_type & lastSequence () const

Size dimension () const

Detailed Description

template<class USG, class IC> class QuantLib::InverseCumulativeRsg< USG, IC >

Inverse cumulative random sequence generator.

It uses a sequence of uniform deviate in (0, 1) as the source of cumulative distribution values. Then an inverse cumulative distribution is used to calculate the distribution deviate.

The uniform deviate sequence is supplied by USG.

Class USG must implement the following interface:

            USG::sample_type USG::nextSequence() const;
            Size USG::dimension() const;

The inverse cumulative distribution is supplied by IC.

Class IC must implement the following interface:

            IC::IC();
            Real IC::operator() const;


 

Examples:

DiscreteHedging.cpp.

Author

Generated automatically by Doxygen for QuantLib from the source code.