QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ParametricExerciseAdapter Class Reference

#include <parametricexerciseadapter.hpp>

+ Inheritance diagram for ParametricExerciseAdapter:
+ Collaboration diagram for ParametricExerciseAdapter:

Public Member Functions

 ParametricExerciseAdapter (const MarketModelParametricExercise &exercise, std::vector< std::vector< Real > > parameters)
 
std::vector< TimeexerciseTimes () const override
 
std::vector< TimerelevantTimes () const override
 
void reset () override
 
void nextStep (const CurveState &currentState) override
 
bool exercise (const CurveState &currentState) const override
 
std::unique_ptr< ExerciseStrategy< CurveState > > clone () const override
 
- Public Member Functions inherited from ExerciseStrategy< CurveState >
virtual ~ExerciseStrategy ()=default
 
virtual std::vector< TimeexerciseTimes () const=0
 
virtual std::vector< TimerelevantTimes () const=0
 
virtual void reset ()=0
 
virtual bool exercise (const CurveState &currentState) const=0
 
virtual void nextStep (const CurveState &currentState)=0
 
virtual std::unique_ptr< ExerciseStrategy< CurveState > > clone () const=0
 

Private Attributes

Clone< MarketModelParametricExerciseexercise_
 
std::vector< std::vector< Real > > parameters_
 
std::vector< TimeexerciseTimes_
 
Size currentStep_ = 0
 
Size currentExercise_ = 0
 
std::valarray< boolisExerciseTime_
 
std::vector< SizenumberOfVariables_
 
std::vector< Realvariables_
 

Detailed Description

Definition at line 33 of file parametricexerciseadapter.hpp.

Constructor & Destructor Documentation

◆ ParametricExerciseAdapter()

ParametricExerciseAdapter ( const MarketModelParametricExercise exercise,
std::vector< std::vector< Real > >  parameters 
)

Definition at line 27 of file parametricexerciseadapter.cpp.

Member Function Documentation

◆ exerciseTimes()

std::vector< Time > exerciseTimes ( ) const
overridevirtual

Implements ExerciseStrategy< CurveState >.

Definition at line 39 of file parametricexerciseadapter.cpp.

◆ relevantTimes()

std::vector< Time > relevantTimes ( ) const
overridevirtual

Implements ExerciseStrategy< CurveState >.

Definition at line 43 of file parametricexerciseadapter.cpp.

◆ reset()

void reset ( )
overridevirtual

Implements ExerciseStrategy< CurveState >.

Definition at line 47 of file parametricexerciseadapter.cpp.

◆ nextStep()

void nextStep ( const CurveState currentState)
overridevirtual

Implements ExerciseStrategy< CurveState >.

Definition at line 52 of file parametricexerciseadapter.cpp.

◆ exercise()

bool exercise ( const CurveState currentState) const
overridevirtual

Implements ExerciseStrategy< CurveState >.

Definition at line 59 of file parametricexerciseadapter.cpp.

◆ clone()

std::unique_ptr< ExerciseStrategy< CurveState > > clone ( ) const
overridevirtual

Implements ExerciseStrategy< CurveState >.

Definition at line 67 of file parametricexerciseadapter.cpp.

Member Data Documentation

◆ exercise_

Definition at line 44 of file parametricexerciseadapter.hpp.

◆ parameters_

std::vector<std::vector<Real> > parameters_
private

Definition at line 45 of file parametricexerciseadapter.hpp.

◆ exerciseTimes_

std::vector<Time> exerciseTimes_
private

Definition at line 46 of file parametricexerciseadapter.hpp.

◆ currentStep_

Size currentStep_ = 0
private

Definition at line 47 of file parametricexerciseadapter.hpp.

◆ currentExercise_

Size currentExercise_ = 0
private

Definition at line 47 of file parametricexerciseadapter.hpp.

◆ isExerciseTime_

std::valarray<bool> isExerciseTime_
private

Definition at line 48 of file parametricexerciseadapter.hpp.

◆ numberOfVariables_

std::vector<Size> numberOfVariables_
private

Definition at line 49 of file parametricexerciseadapter.hpp.

◆ variables_

std::vector<Real> variables_
mutableprivate

Definition at line 50 of file parametricexerciseadapter.hpp.