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

#include <ql/methods/finitedifferences/operators/fdmsquarerootfwdop.hpp>

+ Inheritance diagram for FdmSquareRootFwdOp:
+ Collaboration diagram for FdmSquareRootFwdOp:

Public Types

enum  TransformationType { Plain , Power , Log }
 
- Public Types inherited from FdmLinearOp
typedef Array array_type
 

Public Member Functions

 FdmSquareRootFwdOp (const ext::shared_ptr< FdmMesher > &mesher, Real kappa, Real theta, Real sigma, Size direction, TransformationType type=Plain)
 
Size size () const override
 
void setTime (Time t1, Time t2) override
 Time \(t1 <= t2\) is required. More...
 
Array apply (const Array &r) const override
 
Array apply_mixed (const Array &r) const override
 
Array apply_direction (Size direction, const Array &r) const override
 
Array solve_splitting (Size direction, const Array &r, Real s) const override
 
Array preconditioner (const Array &r, Real s) const override
 
std::vector< SparseMatrixtoMatrixDecomp () const override
 
Real lowerBoundaryFactor (TransformationType type=Plain) const
 
Real upperBoundaryFactor (TransformationType type=Plain) const
 
Real v (Size i) const
 
- Public Member Functions inherited from FdmLinearOpComposite
virtual Size size () const =0
 
virtual void setTime (Time t1, Time t2)=0
 Time \(t1 <= t2\) is required. More...
 
virtual Array apply_mixed (const Array &r) const =0
 
virtual Array apply_direction (Size direction, const Array &r) const =0
 
virtual Array solve_splitting (Size direction, const Array &r, Real s) const =0
 
virtual Array preconditioner (const Array &r, Real s) const =0
 
virtual std::vector< SparseMatrixtoMatrixDecomp () const
 
SparseMatrix toMatrix () const override
 
- Public Member Functions inherited from FdmLinearOp
virtual ~FdmLinearOp ()=default
 
virtual array_type apply (const array_type &r) const =0
 
virtual SparseMatrix toMatrix () const =0
 

Private Member Functions

void setLowerBC (const ext::shared_ptr< FdmMesher > &mesher)
 
void setUpperBC (const ext::shared_ptr< FdmMesher > &mesher)
 
void getCoeff (Real &alpha, Real &beta, Real &gamma, Size n) const
 
void getCoeffPlain (Real &alpha, Real &beta, Real &gamma, Size n) const
 
void getCoeffPower (Real &alpha, Real &beta, Real &gamma, Size n) const
 
void getCoeffLog (Real &alpha, Real &beta, Real &gamma, Size n) const
 
Real f0Plain () const
 
Real f1Plain () const
 
Real f0Power () const
 
Real f1Power () const
 
Real f0Log () const
 
Real f1Log () const
 
Real h (Size i) const
 
Real zetam (Size i) const
 
Real zeta (Size i) const
 
Real zetap (Size i) const
 
Real mu (Size i) const
 

Private Attributes

const Size direction_
 
const Real kappa_
 
const Real theta_
 
const Real sigma_
 
const TransformationType transform_
 
ext::shared_ptr< ModTripleBandLinearOpmapX_
 
Array v_
 

Detailed Description

Definition at line 36 of file fdmsquarerootfwdop.hpp.

Member Enumeration Documentation

◆ TransformationType

Enumerator
Plain 
Power 
Log 

Definition at line 38 of file fdmsquarerootfwdop.hpp.

Constructor & Destructor Documentation

◆ FdmSquareRootFwdOp()

FdmSquareRootFwdOp ( const ext::shared_ptr< FdmMesher > &  mesher,
Real  kappa,
Real  theta,
Real  sigma,
Size  direction,
TransformationType  type = Plain 
)

Definition at line 35 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ size()

Size size ( ) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 244 of file fdmsquarerootfwdop.cpp.

◆ setTime()

void setTime ( Time  t1,
Time  t2 
)
overridevirtual

Time \(t1 <= t2\) is required.

Implements FdmLinearOpComposite.

Definition at line 247 of file fdmsquarerootfwdop.cpp.

◆ apply()

Array apply ( const Array r) const
overridevirtual

Implements FdmLinearOp.

Definition at line 290 of file fdmsquarerootfwdop.cpp.

◆ apply_mixed()

Array apply_mixed ( const Array r) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 294 of file fdmsquarerootfwdop.cpp.

◆ apply_direction()

Array apply_direction ( Size  direction,
const Array r 
) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 298 of file fdmsquarerootfwdop.cpp.

◆ solve_splitting()

Array solve_splitting ( Size  direction,
const Array r,
Real  s 
) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 308 of file fdmsquarerootfwdop.cpp.

+ Here is the caller graph for this function:

◆ preconditioner()

Array preconditioner ( const Array r,
Real  s 
) const
overridevirtual

Implements FdmLinearOpComposite.

Definition at line 318 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:

◆ toMatrixDecomp()

std::vector< SparseMatrix > toMatrixDecomp ( ) const
overridevirtual

Reimplemented from FdmLinearOpComposite.

Definition at line 323 of file fdmsquarerootfwdop.cpp.

◆ lowerBoundaryFactor()

Real lowerBoundaryFactor ( TransformationType  type = Plain) const

Definition at line 118 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upperBoundaryFactor()

Real upperBoundaryFactor ( TransformationType  type = Plain) const

Definition at line 132 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ v()

Real v ( Size  i) const

Definition at line 208 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLowerBC()

void setLowerBC ( const ext::shared_ptr< FdmMesher > &  mesher)
private

Definition at line 78 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUpperBC()

void setUpperBC ( const ext::shared_ptr< FdmMesher > &  mesher)
private

Definition at line 98 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCoeff()

void getCoeff ( Real alpha,
Real beta,
Real gamma,
Size  n 
) const
private

Definition at line 250 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCoeffPlain()

void getCoeffPlain ( Real alpha,
Real beta,
Real gamma,
Size  n 
) const
private

Definition at line 263 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCoeffPower()

void getCoeffPower ( Real alpha,
Real beta,
Real gamma,
Size  n 
) const
private

Definition at line 281 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCoeffLog()

void getCoeffLog ( Real alpha,
Real beta,
Real gamma,
Size  n 
) const
private

Definition at line 272 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ f0Plain()

Real f0Plain ( ) const
private

Definition at line 146 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ f1Plain()

Real f1Plain ( ) const
private

Definition at line 156 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ f0Power()

Real f0Power ( ) const
private

Definition at line 166 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ f1Power()

Real f1Power ( ) const
private

Definition at line 176 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ f0Log()

Real f0Log ( ) const
private

Definition at line 186 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ f1Log()

Real f1Log ( ) const
private

Definition at line 197 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ h()

Real h ( Size  i) const
private

Definition at line 228 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ zetam()

Real zetam ( Size  i) const
private

Definition at line 234 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ zeta()

Real zeta ( Size  i) const
private

Definition at line 237 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ zetap()

Real zetap ( Size  i) const
private

Definition at line 240 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mu()

Real mu ( Size  i) const
private

Definition at line 231 of file fdmsquarerootfwdop.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ direction_

const Size direction_
private

Definition at line 87 of file fdmsquarerootfwdop.hpp.

◆ kappa_

const Real kappa_
private

Definition at line 88 of file fdmsquarerootfwdop.hpp.

◆ theta_

const Real theta_
private

Definition at line 88 of file fdmsquarerootfwdop.hpp.

◆ sigma_

const Real sigma_
private

Definition at line 88 of file fdmsquarerootfwdop.hpp.

◆ transform_

const TransformationType transform_
private

Definition at line 89 of file fdmsquarerootfwdop.hpp.

◆ mapX_

ext::shared_ptr<ModTripleBandLinearOp> mapX_
private

Definition at line 90 of file fdmsquarerootfwdop.hpp.

◆ v_

Array v_
private

Definition at line 91 of file fdmsquarerootfwdop.hpp.