RandomDefaultModel Class Referenceabstract

Base class for random default models. More...

`#include <ql/experimental/credit/randomdefaultmodel.hpp>`

Inheritance diagram for RandomDefaultModel:
[legend]

## Public Member Functions

| RandomDefaultModel (const ext::shared_ptr< Pool > &pool, const std::vector< DefaultProbKey > &defaultKeys)
void | update ()
virtual void | nextSequence (Real tmax=QL_MAX_REAL)=0
virtual void | reset ()=0
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (const Observer &)
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &)
void | registerWithObservables (const ext::shared_ptr< Observer > &)
Size | unregisterWith (const ext::shared_ptr< Observable > &)
void | unregisterWithAll ()
virtual void | deepUpdate ()
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()

## Protected Attributes

ext::shared_ptr< Pool > | pool_
std::vector< DefaultProbKey > | defaultKeys_

## Additional Inherited Members

Public Types inherited from Observer
typedef boost::unordered_set< ext::shared_ptr< Observable > > | set_type
typedef set_type::iterator | iterator

## Detailed Description

Base class for random default models.

Provides sequences of random default times for each name in the pool.

## Member Function Documentation

## update()

void update | ( |  | ) |

virtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

## nextSequence()

virtual void nextSequence | ( | Real | tmax = `QL_MAX_REAL` | ) |

pure virtual

Generate a sequence of random default times, one for each name in the pool, and store the result in the Pool using method setTime(name). tmax denotes the maximum relevant time- default times > tmax are not computed but set to tmax + 1 instead to save coputation time.

Implemented in GaussianRandomDefaultModel.