36 const ext::shared_ptr<FdmMesher>& mesher,
37 ext::shared_ptr<ExtendedOrnsteinUhlenbeckProcess> process,
38 ext::shared_ptr<YieldTermStructure> rTS,
42 direction_(direction),
x_(mesher->locations(direction)), dxMap_(direction, mesher),
44 .mult(0.5 *
squared(process_->volatility()) *
45 Array(mesher->layout()->size(), 1.))),
46 mapX_(direction, mesher) {}
49 return mesher_->layout()->dim().size();;
56 for (
const auto& iter : *
mesher_->layout()) {
57 const Size i = iter.index();
58 drift[i] =
process_->drift(0.5*(t1+t2),
x_[i]);
68 return Array(
r.size(), 0.0);
77 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.
FdmExtendedOrnsteinUhlenbeckOp(const ext::shared_ptr< FdmMesher > &mesher, ext::shared_ptr< ExtendedOrnsteinUhlenbeckProcess > p, ext::shared_ptr< YieldTermStructure > rTS, FdmBoundaryConditionSet bcSet, Size direction=0)
Array apply_mixed(const Array &r) const override
const FirstDerivativeOp dxMap_
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< ExtendedOrnsteinUhlenbeckProcess > process_
SparseMatrix toMatrix() const override
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
extended Ornstein-Uhlenbeck process
const ext::shared_ptr< YieldTermStructure > rTS_
Ornstein Uhlenbeck process plus jumps (Kluge Model)
memory layout of a fdm linear operator
const ext::shared_ptr< FdmMesher > mesher_
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
linear interpolation between discrete points
functionals and combinators not included in the STL
OperatorTraits< FdmLinearOp >::bc_set FdmBoundaryConditionSet
ext::shared_ptr< YieldTermStructure > r
second derivative operator
Interest-rate term structure.