26 Size numberOfProducts)
28 exercise_(exercise), numberOfProducts_(numberOfProducts),
29 isExerciseTime_(exercise->isExerciseTime()) {}
33 std::vector<Size>& numberCashFlowsThisStep,
34 std::vector<std::vector<MarketModelMultiProduct::CashFlow> >&
36 std::fill(numberCashFlowsThisStep.begin(),
37 numberCashFlowsThisStep.end(), 0);
44 numberCashFlowsThisStep[0] = 1;
45 generatedCashFlows[0][0] = cashflow;
52 std::unique_ptr<MarketModelMultiProduct>
54 return std::unique_ptr<MarketModelMultiProduct>(
new ExerciseAdapter(*
this));
cloning proxy to an underlying object
Curve state for market-model simulations
std::unique_ptr< MarketModelMultiProduct > clone() const override
returns a newly-allocated copy of itself
bool nextTimeStep(const CurveState &, std::vector< Size > &, std::vector< std::vector< CashFlow > > &) override
return value indicates whether path is finished, TRUE means done
Clone< MarketModelExerciseValue > exercise_
ExerciseAdapter(const Clone< MarketModelExerciseValue > &exercise, Size numberOfProducts=1)
std::valarray< bool > isExerciseTime_
Multiple-step market-model product.
std::size_t Size
size of a container
const ParametricExercise & exercise_