QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Base class for random default models. More...
#include <randomdefaultmodel.hpp>
Public Member Functions | |
RandomDefaultModel (const ext::shared_ptr< Pool > &pool, const std::vector< DefaultProbKey > &defaultKeys) | |
~RandomDefaultModel () override=default | |
void | update () override |
virtual void | nextSequence (Real tmax=QL_MAX_REAL)=0 |
virtual void | reset ()=0 |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~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 | update ()=0 |
virtual void | deepUpdate () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Protected Attributes | |
ext::shared_ptr< Pool > | pool_ |
std::vector< DefaultProbKey > | defaultKeys_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Base class for random default models.
Provides sequences of random default times for each name in the pool.
Definition at line 37 of file randomdefaultmodel.hpp.
RandomDefaultModel | ( | const ext::shared_ptr< Pool > & | pool, |
const std::vector< DefaultProbKey > & | defaultKeys | ||
) |
Definition at line 39 of file randomdefaultmodel.hpp.
|
overridedefault |
|
overridevirtual |
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.
Definition at line 46 of file randomdefaultmodel.hpp.
|
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.
|
pure virtual |
Implemented in GaussianRandomDefaultModel.
|
protected |
Definition at line 56 of file randomdefaultmodel.hpp.
|
protected |
Definition at line 57 of file randomdefaultmodel.hpp.