16 throw std::runtime_error(
"PiecewiseConstant: invalid schedule");
20 if (t <=
times.front())
22 auto it = std::lower_bound(
times.begin(),
times.end(), t);
23 std::size_t idx =
static_cast<std::size_t
>(std::distance(
times.begin(), it));
Barrier option primitives and configuration.
Definition american.hpp:11
Definition term_structures.hpp:10
std::vector< double > values
Definition term_structures.hpp:12
std::vector< double > times
Definition term_structures.hpp:11
double value(double t) const
Definition term_structures.hpp:14