42 component.product->reset();
43 component.done =
false;
59 const std::vector<Time>& rateTimes1 = d1.
rateTimes();
60 const std::vector<Time>& rateTimes2 =
d.rateTimes();
61 QL_REQUIRE(rateTimes1.size() == rateTimes2.size() &&
62 std::equal(rateTimes1.begin(), rateTimes1.end(),
64 "incompatible rate times");
91 std::vector<Time> allCashflowTimes;
98 const std::vector<Time>& cashflowTimes =
99 i->product->possibleCashFlowTimes();
100 allCashflowTimes.insert(allCashflowTimes.end(),
101 cashflowTimes.begin(),
102 cashflowTimes.end());
104 i->numberOfCashflows =
105 std::vector<Size>(i->product->numberOfProducts());
107 std::vector<std::vector<CashFlow> >(
108 i->product->numberOfProducts(),
109 std::vector<CashFlow>(i->product
110 ->maxNumberOfCashFlowsPerProductPerStep()));
115 std::sort(allCashflowTimes.begin(), allCashflowTimes.end());
116 auto end = std::unique(allCashflowTimes.begin(), allCashflowTimes.end());
120 allCashflowTimes.begin(), end);
123 const std::vector<Time>& productTimes =
124 i->product->possibleCashFlowTimes();
125 i->timeIndices = std::vector<Size>(productTimes.size());
126 for (
Size j=0; j<productTimes.size(); ++j) {
cloning proxy to an underlying object
Market-model evolution description.
const std::vector< Time > & rateTimes() const
std::vector< Size > suggestedNumeraires() const override
std::vector< std::valarray< bool > > isInSubset_
std::vector< std::vector< Time > > allEvolutionTimes_
std::vector< Time > cashflowTimes_
std::vector< Time > rateTimes_
std::vector< Time > possibleCashFlowTimes() const override
const EvolutionDescription & evolution() const override
std::vector< SubProduct >::iterator iterator
Real multiplier(Size i) const
EvolutionDescription evolution_
const MarketModelMultiProduct & item(Size i) const
void add(const Clone< MarketModelMultiProduct > &, Real multiplier=1.0)
void subtract(const Clone< MarketModelMultiProduct > &, Real multiplier=1.0)
std::vector< SubProduct > components_
void reset() override
during simulation put product at start of path
std::vector< Time > evolutionTimes_
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
std::vector< Size > terminalMeasure(const EvolutionDescription &evolution)
Terminal measure: the last bond is used as numeraire.
void mergeTimes(const std::vector< std::vector< Time > > ×, std::vector< Time > &mergedTimes, std::vector< std::valarray< bool > > &isPresent)