31 const ext::shared_ptr<Quote>& spot,
32 ext::shared_ptr<YieldTermStructure> rTS,
33 ext::shared_ptr<YieldTermStructure> qTS,
34 const ext::shared_ptr<LocalVolTermStructure>& localVol,
36 :
mesher_(mesher),
rTS_(
std::move(rTS)), qTS_(
std::move(qTS)), localVol_(localVol),
37 x_((localVol) != nullptr ?
Array(
Exp(mesher->locations(direction))) :
Array()),
39 mapT_(direction, mesher),
direction_(direction) {}
46 for (
const auto& iter : *
mesher_->layout()) {
47 const Size i = iter.index();
66 return Array(
r.size(), 0.0);
71 return Array(
r.size(), 0.0);
1-D array used in linear algebra.
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
const TripleBandLinearOp dxxMap_
void setTime(Time t1, Time t2) override
Time is required.
Array apply_mixed(const Array &r) const override
const ext::shared_ptr< YieldTermStructure > qTS_
const FirstDerivativeOp dxMap_
FdmLocalVolFwdOp(const ext::shared_ptr< FdmMesher > &mesher, const ext::shared_ptr< Quote > &spot, ext::shared_ptr< YieldTermStructure > rTS, ext::shared_ptr< YieldTermStructure > qTS, const ext::shared_ptr< LocalVolTermStructure > &localVol, Size direction=0)
const ext::shared_ptr< FdmMesher > mesher_
Array solve_splitting(Size direction, const Array &r, Real s) const override
const ext::shared_ptr< YieldTermStructure > rTS_
Array apply(const Array &r) const override
const ext::shared_ptr< LocalVolTermStructure > localVol_
SparseMatrix toMatrix() const override
TripleBandLinearOp multR(const Array &u) const
Array solve_splitting(const Array &r, Real a, Real b=1.0) const
void axpyb(const Array &a, const TripleBandLinearOp &x, const TripleBandLinearOp &y, const Array &b)
Array apply(const Array &r) const override
const ext::shared_ptr< YieldTermStructure > rTS_
memory layout of a fdm linear operator
local volatility linear operator for the Fokker-Planck forward equation
const ext::shared_ptr< FdmMesher > mesher_
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
functionals and combinators not included in the STL
Array Exp(const Array &v)
ext::shared_ptr< YieldTermStructure > q
ext::shared_ptr< YieldTermStructure > r
ext::shared_ptr< BlackVolTermStructure > v
second derivative operator