27 const Real relInitStepSize,
28 ext::shared_ptr<FdmLinearOpComposite> map,
30 : dt_(
Null<
Real>()), eps_(eps), relInitStepSize_(relInitStepSize), map_(
std::move(map)),
35 map_->setTime(
t,
t + 0.0001);
40 return std::vector<Real>(dxdt.
begin(), dxdt.
end());
46 const std::vector<Real>
v =
48 [&](
Time _t,
const std::vector<Real>& _u){
return apply(_t, _u); },
49 std::vector<Real>(a.begin(), a.end()),
50 t, std::max(0.0,
t-
dt_));
Runge-Kutta ODE integration.
1-D array used in linear algebra.
const_iterator end() const
const_iterator begin() const
void applyAfterSolving(array_type &a) const
void applyBeforeApplying(operator_type &op) const
const BoundaryConditionSchemeHelper bcSet_
const ext::shared_ptr< FdmLinearOpComposite > map_
MethodOfLinesScheme(Real eps, Real relInitStepSize, ext::shared_ptr< FdmLinearOpComposite > map, const bc_set &bcSet=bc_set())
traits::array_type array_type
void step(array_type &a, Time t)
const Real relInitStepSize_
std::vector< Real > apply(Time, const std::vector< Real > &) const
template class providing a null value for a given type.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Real Time
continuous quantity with 1-year units
ext::shared_ptr< BlackVolTermStructure > v