QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
Exercise Class Reference

Base exercise class. More...

#include <ql/exercise.hpp>

+ Inheritance diagram for Exercise:
+ Collaboration diagram for Exercise:

Public Types

enum  Type { American , Bermudan , European }
 

Public Member Functions

 Exercise (Type type)
 
virtual ~Exercise ()=default
 
Type type () const
 
Date date (Size index) const
 
Date dateAt (Size index) const
 
const std::vector< Date > & dates () const
 Returns all exercise dates. More...
 
Date lastDate () const
 

Protected Attributes

std::vector< Datedates_
 
Type type_
 

Detailed Description

Base exercise class.

Definition at line 35 of file exercise.hpp.

Member Enumeration Documentation

◆ Type

enum Type
Enumerator
American 
Bermudan 
European 

Definition at line 37 of file exercise.hpp.

Constructor & Destructor Documentation

◆ Exercise()

Exercise ( Type  type)
explicit

Definition at line 41 of file exercise.hpp.

◆ ~Exercise()

virtual ~Exercise ( )
virtualdefault

Member Function Documentation

◆ type()

Type type ( ) const

Definition at line 44 of file exercise.hpp.

◆ date()

Date date ( Size  index) const

Definition at line 45 of file exercise.hpp.

+ Here is the caller graph for this function:

◆ dateAt()

Date dateAt ( Size  index) const

Definition at line 46 of file exercise.hpp.

◆ dates()

const std::vector< Date > & dates ( ) const

Returns all exercise dates.

Definition at line 48 of file exercise.hpp.

+ Here is the caller graph for this function:

◆ lastDate()

Date lastDate ( ) const

Definition at line 28 of file exercise.cpp.

Member Data Documentation

◆ dates_

std::vector<Date> dates_
protected

Definition at line 51 of file exercise.hpp.

◆ type_

Type type_
protected

Definition at line 52 of file exercise.hpp.