35 const ext::shared_ptr<FdmMesher>& mesher,
36 ext::shared_ptr<OrnsteinUhlenbeckProcess> process,
37 ext::shared_ptr<YieldTermStructure> rTS,
40 m_(direction, mesher), mapX_(direction, mesher) {
45 for (
const auto& iter : *
mesher_->layout()) {
46 const Size i = iter.index();
47 drift[i] =
process_->drift(0.0, x[i]);
53 *
Array(mesher->layout()->size(), 1.0)),
Array());
57 return mesher_->layout()->dim().size();;
71 return Array(
r.size(), 0.0);
79 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
FdmOrnsteinUhlenbeckOp(const ext::shared_ptr< FdmMesher > &mesher, ext::shared_ptr< OrnsteinUhlenbeckProcess > p, ext::shared_ptr< YieldTermStructure > rTS, Size direction=0)
std::vector< SparseMatrix > toMatrixDecomp() const override
void setTime(Time t1, Time t2) override
Time is required.
Array apply_mixed(const Array &r) const override
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< OrnsteinUhlenbeckProcess > 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
const ext::shared_ptr< YieldTermStructure > rTS_
memory layout of a fdm linear operator
Ornstein Uhlenbeck process.
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
Ornstein-Uhlenbeck process.
ext::shared_ptr< YieldTermStructure > r
second derivative operator
Interest-rate term structure.