27 const ext::shared_ptr<FdmMesher> &mesher,
const Real beta,
const Real nu,
29 : volatilityValues_(mesher->locations(1)),
30 forwardValues_(mesher->locations(0)),
32 .mult(0.5 * volatilityValues_ * volatilityValues_ *
33 Pow(forwardValues_, 2.0 *
beta))),
43 const ext::shared_ptr<FdmMesher> &mesher,
const Real beta,
const Real nu,
45 : volatilityValues_(mesher->locations(1)),
46 forwardValues_(mesher->locations(0)),
48 0.5 *
nu *
nu *
Pow(volatilityValues_, 2.0 * gamma))),
60 : volatilityValues_(mesher->locations(1)),
61 forwardValues_(mesher->locations(0)),
63 .mult(
nu *
rho *
Pow(
Abs(volatilityValues_), gamma + 1.0) *
84 else if (direction == 1)
99 }
else if (direction == 1) {
102 QL_FAIL(
"direction too large");
1-D array used in linear algebra.
FdmZabrVolatilityPart dyMap_
Size size() const override
Array apply_direction(Size direction, const Array &r) const override
Array preconditioner(const Array &r, Real s) const override
std::vector< SparseMatrix > toMatrixDecomp() const override
void setTime(Time t1, Time t2) override
Time is required.
FdmZabrOp(const ext::shared_ptr< FdmMesher > &mesher, Real beta, Real nu, Real rho, Real gamma=1.0)
Array apply_mixed(const Array &r) const override
Array solve_splitting(Size direction, const Array &r, Real s) const override
NinePointLinearOp dxyMap_
Array apply(const Array &r) const override
FdmZabrUnderlyingPart dxMap_
void setTime(Time t1, Time t2)
const TripleBandLinearOp & getMap() const
FdmZabrUnderlyingPart(const ext::shared_ptr< FdmMesher > &mesher, Real beta, Real nu, Real rho, Real gamma)
void setTime(Time t1, Time t2)
FdmZabrVolatilityPart(const ext::shared_ptr< FdmMesher > &mesher, Real beta, Real nu, Real rho, Real gamma)
const TripleBandLinearOp & getMap() const
SparseMatrix toMatrix() const override
Array apply(const Array &r) const override
SparseMatrix toMatrix() const override
Array solve_splitting(const Array &r, Real a, Real b=1.0) const
Array apply(const Array &r) const override
#define QL_FAIL(message)
throw an error (possibly with file and line information)
Zabr linear pricing operator.
const ext::shared_ptr< FdmMesher > mesher_
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
Array Pow(const Array &v, Real alpha)
Array Abs(const Array &v)
ext::shared_ptr< YieldTermStructure > r
second derivative operator
second order mixed derivative linear operator