InverseCumulativeRsg< USG, IC > Class Template Reference

Inverse cumulative random sequence generator. More...

`#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 inverse cumulative 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.