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

Forward Euler scheme for finite difference methods More...

#include <ql/methods/finitedifferences/expliciteuler.hpp>

+ Inheritance diagram for ExplicitEuler< Operator >:
+ Collaboration diagram for ExplicitEuler< Operator >:

Public Types

typedef OperatorTraits< Operator > traits
 
typedef traits::operator_type operator_type
 
typedef traits::array_type array_type
 
typedef traits::bc_type bc_type
 
typedef traits::bc_set bc_set
 
typedef traits::condition_type condition_type
 
- Public Types inherited from MixedScheme< Operator >
typedef OperatorTraits< Operator > traits
 
typedef traits::operator_type operator_type
 
typedef traits::array_type array_type
 
typedef traits::bc_set bc_set
 
typedef traits::condition_type condition_type
 

Public Member Functions

 ExplicitEuler (const operator_type &L, const std::vector< ext::shared_ptr< bc_type > > &bcs)
 
- Public Member Functions inherited from MixedScheme< Operator >
 MixedScheme (const operator_type &L, Real theta, bc_set bcs)
 
void step (array_type &a, Time t)
 
void setStep (Time dt)
 

Additional Inherited Members

- Protected Attributes inherited from MixedScheme< Operator >
operator_type L_
 
operator_type I_
 
operator_type explicitPart_
 
operator_type implicitPart_
 
Time dt_
 
Real theta_
 
bc_set bcs_
 

Detailed Description

template<class Operator>
class QuantLib::ExplicitEuler< Operator >

Forward Euler scheme for finite difference methods

See sect. Finite-differences framework for details on the method.

In this implementation, the passed operator must be derived from either TimeConstantOperator or TimeDependentOperator. Also, it must implement at least the following interface:

typedef ... array_type;
// copy constructor/assignment
// (these will be provided by the compiler if none is defined)
Operator(const Operator&);
Operator& operator=(const Operator&);
// inspectors
Size size();
// modifiers
void setTime(Time t);
// operator interface
array_type applyTo(const array_type&);
static Operator identity(Size size);
// operator algebra
Operator operator*(Real, const Operator&);
Operator operator-(const Operator&, const Operator&);
traits::array_type array_type
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Quantity operator-(const Quantity &m1, const Quantity &m2)
Definition: quantity.hpp:171
Quantity operator*(const Quantity &m, Real x)
Definition: quantity.hpp:177

Definition at line 66 of file expliciteuler.hpp.

Member Typedef Documentation

◆ traits

typedef OperatorTraits<Operator> traits

Definition at line 69 of file expliciteuler.hpp.

◆ operator_type

Definition at line 70 of file expliciteuler.hpp.

◆ array_type

Definition at line 71 of file expliciteuler.hpp.

◆ bc_type

Definition at line 72 of file expliciteuler.hpp.

◆ bc_set

Definition at line 73 of file expliciteuler.hpp.

◆ condition_type

Definition at line 74 of file expliciteuler.hpp.

Constructor & Destructor Documentation

◆ ExplicitEuler()

ExplicitEuler ( const operator_type L,
const std::vector< ext::shared_ptr< bc_type > > &  bcs 
)

Definition at line 76 of file expliciteuler.hpp.