QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <fdmsquarerootfwdop.hpp>
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< SparseMatrix > | toMatrixDecomp () 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< SparseMatrix > | toMatrixDecomp () 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< ModTripleBandLinearOp > | mapX_ |
Array | v_ |
Definition at line 36 of file fdmsquarerootfwdop.hpp.
enum TransformationType |
Enumerator | |
---|---|
Plain | |
Power | |
Log |
Definition at line 38 of file fdmsquarerootfwdop.hpp.
FdmSquareRootFwdOp | ( | const ext::shared_ptr< FdmMesher > & | mesher, |
Real | kappa, | ||
Real | theta, | ||
Real | sigma, | ||
Size | direction, | ||
TransformationType | type = Plain |
||
) |
|
overridevirtual |
Implements FdmLinearOpComposite.
Definition at line 244 of file fdmsquarerootfwdop.cpp.
Time \(t1 <= t2\) is required.
Implements FdmLinearOpComposite.
Definition at line 247 of file fdmsquarerootfwdop.cpp.
Implements FdmLinearOp.
Definition at line 290 of file fdmsquarerootfwdop.cpp.
Implements FdmLinearOpComposite.
Definition at line 294 of file fdmsquarerootfwdop.cpp.
Implements FdmLinearOpComposite.
Definition at line 298 of file fdmsquarerootfwdop.cpp.
Implements FdmLinearOpComposite.
Definition at line 308 of file fdmsquarerootfwdop.cpp.
Implements FdmLinearOpComposite.
Definition at line 318 of file fdmsquarerootfwdop.cpp.
|
overridevirtual |
Reimplemented from FdmLinearOpComposite.
Definition at line 323 of file fdmsquarerootfwdop.cpp.
Real lowerBoundaryFactor | ( | TransformationType | type = Plain | ) | const |
Definition at line 118 of file fdmsquarerootfwdop.cpp.
Real upperBoundaryFactor | ( | TransformationType | type = Plain | ) | const |
Definition at line 132 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 78 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 98 of file fdmsquarerootfwdop.cpp.
Definition at line 250 of file fdmsquarerootfwdop.cpp.
Definition at line 263 of file fdmsquarerootfwdop.cpp.
Definition at line 281 of file fdmsquarerootfwdop.cpp.
Definition at line 272 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 146 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 156 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 166 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 176 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 186 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 197 of file fdmsquarerootfwdop.cpp.
Definition at line 234 of file fdmsquarerootfwdop.cpp.
Definition at line 237 of file fdmsquarerootfwdop.cpp.
Definition at line 240 of file fdmsquarerootfwdop.cpp.
|
private |
Definition at line 87 of file fdmsquarerootfwdop.hpp.
|
private |
Definition at line 88 of file fdmsquarerootfwdop.hpp.
|
private |
Definition at line 88 of file fdmsquarerootfwdop.hpp.
|
private |
Definition at line 88 of file fdmsquarerootfwdop.hpp.
|
private |
Definition at line 89 of file fdmsquarerootfwdop.hpp.
|
private |
Definition at line 90 of file fdmsquarerootfwdop.hpp.
|
private |
Definition at line 91 of file fdmsquarerootfwdop.hpp.