26 for (
auto const& coupon : leg) {
29 if (unregisterCoupons) {
30 coupon->unregisterWithAll();
36 for (
auto const& leg :
swap.legs())
const Leg & cashflows() const
Abstract instrument class.
Size unregisterWith(const ext::shared_ptr< Observable > &)
void registerWithObservables(const ext::shared_ptr< Observer > &)
void swap(Array &v, Array &w) noexcept
void simplifyNotificationGraph(Instrument &instrument, const Leg &leg, bool unregisterCoupons)
Utility function to optimize the observability graph of an instrument.
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
utility functions to reduce number of notifications sent by observables