28 const std::vector<Date>& exerciseDates,
29 const Date& referenceDate,
31 ext::shared_ptr<FdmMesher> mesher,
32 ext::shared_ptr<FdmInnerValueCalculator> calculator)
36 for (
auto exerciseDate : exerciseDates) {
50 "inconsistent array dimensions");
53 Array locations(dims);
55 for (
const auto& iter : *
mesher_->layout()) {
56 for (
Size i=0; i < dims; ++i)
57 locations[i] =
mesher_->location(iter, i);
60 if (innerValue > a[iter.index()]) {
61 a[iter.index()] = innerValue;
1-D array used in linear algebra.
Size size() const
dimension of the array
Time yearFraction(const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
FdmBermudanStepCondition(const std::vector< Date > &exerciseDates, const Date &referenceDate, const DayCounter &dayCounter, ext::shared_ptr< FdmMesher > mesher, ext::shared_ptr< FdmInnerValueCalculator > calculator)
const ext::shared_ptr< FdmMesher > mesher_
std::vector< Time > exerciseTimes_
const ext::shared_ptr< FdmInnerValueCalculator > calculator_
void applyTo(Array &a, Time t) const override
const std::vector< Time > & exerciseTimes() const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
const ext::shared_ptr< CEVCalculator > calculator_
bermudan step condition for multi dimensional problems
layer of abstraction to calculate the inner value
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