28 std::valarray<bool> isExerciseTime)
29 : rateTimes_(rateTimes), isExerciseTime_(
std::move(isExerciseTime)) {
33 "Rate times must contain at least two values");
36 evolutionTimes.pop_back();
39 isExerciseTime_ = std::valarray<bool>(
true,rateTimes.empty() ? 0 : rateTimes.size()-1);
43 (rateTimes.empty() ? 0 : rateTimes.size() - 1),
46 <<
"have same size as rateTimes minus 1 ("
47 << (rateTimes.empty() ? 0 : rateTimes.size() - 1)
87 std::unique_ptr<MarketModelExerciseValue>
Curve state for market-model simulations
Market-model evolution description.
MarketModelMultiProduct::CashFlow value(const CurveState &) const override
MarketModelMultiProduct::CashFlow cf_
Size numberOfExercises() const override
void nextStep(const CurveState &) override
std::valarray< bool > isExerciseTime() const override
std::vector< Time > rateTimes_
std::unique_ptr< MarketModelExerciseValue > clone() const override
std::vector< Time > possibleCashFlowTimes() const override
const EvolutionDescription & evolution() const override
EvolutionDescription evolution_
std::valarray< bool > isExerciseTime_
NothingExerciseValue(const std::vector< Time > &rateTimes, std::valarray< bool > isExerciseTime=std::valarray< bool >())
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero