1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QuantLib: LazyObject Class Reference</title>
<link href='https://fonts.googleapis.com/css?family=Merriweather+Sans:800' rel='stylesheet' type='text/css'>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="quantlibextra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="http://quantlib.org">
<img alt="QuantLib" src="QL-title.jpg"></a>
<div id="projectbrief">A free/open-source library for quantitative finance</div>
<div id="projectnumber">Reference manual - version 1.20</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_quant_lib.html">QuantLib</a></li><li class="navelem"><a class="el" href="class_quant_lib_1_1_lazy_object.html">LazyObject</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="class_quant_lib_1_1_lazy_object-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">LazyObject Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__patterns.html">Design patterns</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Framework for calculation on demand and result caching.
<a href="class_quant_lib_1_1_lazy_object.html#details">More...</a></p>
<p><code>#include <ql/patterns/lazyobject.hpp></code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for LazyObject:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="class_quant_lib_1_1_lazy_object__inherit__graph.png" border="0" usemap="#a_lazy_object_inherit__map" alt="Inheritance graph"/></div>
<map name="_lazy_object_inherit__map" id="a_lazy_object_inherit__map">
<area shape="rect" title="Framework for calculation on demand and result caching." alt="" coords="141,639,229,665"/>
<area shape="rect" href="class_quant_lib_1_1_abcd_atm_vol_curve.html" title="Abcd-interpolated at-the-money (no-smile) volatility curve." alt="" coords="319,15,450,41"/>
<area shape="rect" href="class_quant_lib_1_1_andreasen_huge_volatility_interpl.html" title="Calibration of a local volatility surface to a sparse grid of options." alt="" coords="284,65,485,92"/>
<area shape="rect" href="class_quant_lib_1_1_basket.html" title=" " alt="" coords="353,116,416,143"/>
<area shape="rect" href="class_quant_lib_1_1_black_calibration_helper.html" title="liquid Black76 market instrument used during calibration" alt="" coords="307,167,462,193"/>
<area shape="rect" href="class_quant_lib_1_1_cap_floor_term_vol_curve.html" title="Cap/floor at-the-money term-volatility vector." alt="" coords="305,217,464,244"/>
<area shape="rect" href="class_quant_lib_1_1_cap_floor_term_vol_surface.html" title="Cap/floor smile volatility surface." alt="" coords="301,268,469,295"/>
<area shape="rect" href="class_quant_lib_1_1_cms_market.html" title="set of CMS quotes" alt="" coords="339,319,430,345"/>
<area shape="rect" href="class_quant_lib_1_1_eurodollar_futures_implied_std_dev_quote.html" title="quote for the Eurodollar-future implied standard deviation" alt="" coords="301,370,468,411"/>
<area shape="rect" href="class_quant_lib_1_1_fitted_bond_discount_curve.html" title="Discount curve fitted to a set of fixed-coupon bonds." alt="" coords="299,436,471,463"/>
<area shape="rect" href="class_quant_lib_1_1_flat_forward.html" title="Flat interest-rate curve." alt="" coords="339,487,430,513"/>
<area shape="rect" href="class_quant_lib_1_1_forward_swap_quote.html" title="Quote for a forward starting swap." alt="" coords="316,537,453,564"/>
<area shape="rect" href="class_quant_lib_1_1_gaussian1d_model.html" title=" " alt="" coords="321,588,448,615"/>
<area shape="rect" href="class_quant_lib_1_1_heston_s_l_v_m_c_model.html" title=" " alt="" coords="313,639,457,665"/>
<area shape="rect" href="class_quant_lib_1_1_implied_std_dev_quote.html" title="quote for the implied standard deviation of an underlying" alt="" coords="313,689,456,716"/>
<area shape="rect" href="class_quant_lib_1_1_instrument.html" title="Abstract instrument class." alt="" coords="343,740,427,767"/>
<area shape="rect" href="class_quant_lib_1_1_multi_curve_sensitivities.html" title="Multi curve sensitivities." alt="" coords="307,791,463,817"/>
<area shape="rect" href="class_quant_lib_1_1_one_factor_copula.html" title="Abstract base class for one-factor copula models." alt="" coords="323,841,447,868"/>
<area shape="rect" href="class_quant_lib_1_1_piecewise_default_curve.html" title="Piecewise default-probability term structure." alt="" coords="305,892,464,948"/>
<area shape="rect" href="class_quant_lib_1_1_piecewise_yield_curve.html" title="Piecewise yield term structure." alt="" coords="311,972,458,1028"/>
<area shape="rect" href="class_quant_lib_1_1_piecewise_yo_y_inflation_curve.html" title="Piecewise year-on-year inflation term structure." alt="" coords="291,1052,478,1108"/>
<area shape="rect" href="class_quant_lib_1_1_piecewise_yo_y_optionlet_volatility_curve.html" title="Piecewise year-on-year inflation volatility term structure." alt="" coords="281,1132,489,1188"/>
<area shape="rect" href="class_quant_lib_1_1_piecewise_zero_inflation_curve.html" title="Piecewise zero-inflation term structure." alt="" coords="290,1212,479,1268"/>
<area shape="rect" href="class_quant_lib_1_1_random_l_m.html" title=" " alt="" coords="277,1293,492,1334"/>
<area shape="rect" href="class_quant_lib_1_1_stripped_optionlet_adapter.html" title=" " alt="" coords="301,1359,468,1385"/>
<area shape="rect" href="class_quant_lib_1_1_stripped_optionlet_base.html" title=" " alt="" coords="309,1507,461,1533"/>
<area shape="rect" href="class_quant_lib_1_1_observable.html" title="Object that notifies its changes to a set of observers." alt="" coords="5,613,93,640"/>
<area shape="rect" href="class_quant_lib_1_1_observer.html" title="Object that gets notified when a given observable changes." alt="" coords="12,664,87,691"/>
<area shape="rect" href="class_quant_lib_1_1_cap_helper.html" title="calibration helper for ATM cap" alt="" coords="589,5,673,32"/>
<area shape="rect" href="class_quant_lib_1_1_heston_model_helper.html" title="calibration helper for Heston model" alt="" coords="563,56,700,83"/>
<area shape="rect" href="class_quant_lib_1_1_swaption_helper.html" title="calibration helper for ATM swaption" alt="" coords="574,107,689,133"/>
<area shape="rect" href="class_quant_lib_1_1_gsr.html" title="One factor gsr model, formulation is in forward measure." alt="" coords="610,157,653,184"/>
<area shape="rect" href="class_quant_lib_1_1_markov_functional.html" title=" " alt="" coords="569,208,694,235"/>
<area shape="rect" href="class_quant_lib_1_1_bond.html" title="Base bond class." alt="" coords="605,259,657,285"/>
<area shape="rect" href="class_quant_lib_1_1_cap_floor.html" title="Base class for cap-like instruments." alt="" coords="594,309,669,336"/>
<area shape="rect" href="class_quant_lib_1_1_c_d_o.html" title="collateralized debt obligation" alt="" coords="605,360,657,387"/>
<area shape="rect" href="class_quant_lib_1_1_commodity.html" title="Commodity base class." alt="" coords="587,411,676,437"/>
<area shape="rect" href="class_quant_lib_1_1_composite_instrument.html" title="Composite instrument" alt="" coords="558,461,705,488"/>
<area shape="rect" href="class_quant_lib_1_1_c_p_i_cap_floor.html" title="CPI cap or floor." alt="" coords="582,512,681,539"/>
<area shape="rect" href="class_quant_lib_1_1_credit_default_swap.html" title="Credit default swap." alt="" coords="565,563,697,589"/>
<area shape="rect" href="class_quant_lib_1_1_forward.html" title="Abstract base forward class." alt="" coords="597,613,666,640"/>
<area shape="rect" href="class_quant_lib_1_1_nth_to_default.html" title="N-th to default swap." alt="" coords="582,664,681,691"/>
<area shape="rect" href="class_quant_lib_1_1_option.html" title="base option class" alt="" coords="601,715,661,741"/>
<area shape="rect" href="class_quant_lib_1_1_path_multi_asset_option.html" title="Base class for path-dependent options on multiple assets." alt="" coords="557,765,706,792"/>
<area shape="rect" href="class_quant_lib_1_1_risky_asset_swap.html" title="Risky asset-swap instrument." alt="" coords="570,816,693,843"/>
<area shape="rect" href="class_quant_lib_1_1_risky_asset_swap_option.html" title="Option on risky asset swap" alt="" coords="551,867,712,893"/>
<area shape="rect" href="class_quant_lib_1_1_risky_bond.html" title=" " alt="" coords="588,917,675,944"/>
<area shape="rect" href="class_quant_lib_1_1_stock.html" title="Simple stock class." alt="" coords="603,968,659,995"/>
<area shape="rect" href="class_quant_lib_1_1_swap.html" title="Interest rate swap." alt="" coords="604,1019,659,1045"/>
<area shape="rect" href="class_quant_lib_1_1_synthetic_c_d_o.html" title="Synthetic Collateralized Debt Obligation." alt="" coords="578,1069,685,1096"/>
<area shape="rect" href="class_quant_lib_1_1_variance_option.html" title="Variance option." alt="" coords="576,1120,687,1147"/>
<area shape="rect" href="class_quant_lib_1_1_variance_swap.html" title="Variance swap." alt="" coords="579,1171,684,1197"/>
<area shape="rect" href="class_quant_lib_1_1_yo_y_inflation_cap_floor.html" title="Base class for yoy inflation cap-like instruments." alt="" coords="559,1221,704,1248"/>
<area shape="rect" href="class_quant_lib_1_1_one_factor_gaussian_copula.html" title="One-factor Gaussian Copula." alt="" coords="542,1272,721,1299"/>
<area shape="rect" href="class_quant_lib_1_1_one_factor_gaussian_student_copula.html" title="One-factor Gaussian-Student t-Copula." alt="" coords="540,1323,723,1365"/>
<area shape="rect" href="class_quant_lib_1_1_one_factor_student_copula.html" title="One-factor Double Student t-Copula." alt="" coords="547,1389,716,1416"/>
<area shape="rect" href="class_quant_lib_1_1_one_factor_student_gaussian_copula.html" title="One-factor Student t - Gaussian Copula." alt="" coords="540,1441,723,1482"/>
<area shape="rect" href="class_quant_lib_1_1_optionlet_stripper.html" title=" " alt="" coords="572,1507,691,1533"/>
<area shape="rect" href="class_quant_lib_1_1_stripped_optionlet.html" title=" " alt="" coords="570,1557,693,1584"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Observer interface</div></td></tr>
<tr class="memitem:ac5c54df7ed3b930268c8d7752c101725"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_lazy_object.html#ac5c54df7ed3b930268c8d7752c101725">update</a> ()</td></tr>
<tr class="separator:ac5c54df7ed3b930268c8d7752c101725"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_class_quant_lib_1_1_observable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_quant_lib_1_1_observable')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="class_quant_lib_1_1_observable.html">Observable</a></td></tr>
<tr class="memitem:a840dd96e33a304cbf681d357de7f48d0 inherit pub_methods_class_quant_lib_1_1_observable"><td class="memItemLeft" align="right" valign="top"><a id="a840dd96e33a304cbf681d357de7f48d0"></a>
 </td><td class="memItemRight" valign="bottom"><b>Observable</b> (const <a class="el" href="class_quant_lib_1_1_observable.html">Observable</a> &)</td></tr>
<tr class="separator:a840dd96e33a304cbf681d357de7f48d0 inherit pub_methods_class_quant_lib_1_1_observable"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a522aacdd0f2408fe5e46527a6db999b4 inherit pub_methods_class_quant_lib_1_1_observable"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_quant_lib_1_1_observable.html">Observable</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_observable.html#a522aacdd0f2408fe5e46527a6db999b4">operator=</a> (const <a class="el" href="class_quant_lib_1_1_observable.html">Observable</a> &)</td></tr>
<tr class="separator:a522aacdd0f2408fe5e46527a6db999b4 inherit pub_methods_class_quant_lib_1_1_observable"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a397546715bfc5aedd1d16dd202a19d4c inherit pub_methods_class_quant_lib_1_1_observable"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_observable.html#a397546715bfc5aedd1d16dd202a19d4c">notifyObservers</a> ()</td></tr>
<tr class="separator:a397546715bfc5aedd1d16dd202a19d4c inherit pub_methods_class_quant_lib_1_1_observable"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_class_quant_lib_1_1_observer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_quant_lib_1_1_observer')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="class_quant_lib_1_1_observer.html">Observer</a></td></tr>
<tr class="memitem:af6a9d3ca0b7f388f3b7ccb1eccf11f63 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top"><a id="af6a9d3ca0b7f388f3b7ccb1eccf11f63"></a>
 </td><td class="memItemRight" valign="bottom"><b>Observer</b> (const <a class="el" href="class_quant_lib_1_1_observer.html">Observer</a> &)</td></tr>
<tr class="separator:af6a9d3ca0b7f388f3b7ccb1eccf11f63 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6810b3645967da11d5f5d4804d37bacc inherit pub_methods_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top"><a id="a6810b3645967da11d5f5d4804d37bacc"></a>
<a class="el" href="class_quant_lib_1_1_observer.html">Observer</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="class_quant_lib_1_1_observer.html">Observer</a> &)</td></tr>
<tr class="separator:a6810b3645967da11d5f5d4804d37bacc inherit pub_methods_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa6ade205ed506bf712da2704f80a73a0 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top"><a id="aa6ade205ed506bf712da2704f80a73a0"></a>
std::pair< iterator, bool > </td><td class="memItemRight" valign="bottom"><b>registerWith</b> (const ext::shared_ptr< <a class="el" href="class_quant_lib_1_1_observable.html">Observable</a> > &)</td></tr>
<tr class="separator:aa6ade205ed506bf712da2704f80a73a0 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a51d57eb97a3a57312a47bda29235f182 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_observer.html#a51d57eb97a3a57312a47bda29235f182">registerWithObservables</a> (const ext::shared_ptr< <a class="el" href="class_quant_lib_1_1_observer.html">Observer</a> > &)</td></tr>
<tr class="separator:a51d57eb97a3a57312a47bda29235f182 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ce7359ad0f73a54dba555be24855804 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top"><a id="a4ce7359ad0f73a54dba555be24855804"></a>
<a class="el" href="group__types.html#gaf38bdb4c54463b1f456655efa95b5c77">Size</a> </td><td class="memItemRight" valign="bottom"><b>unregisterWith</b> (const ext::shared_ptr< <a class="el" href="class_quant_lib_1_1_observable.html">Observable</a> > &)</td></tr>
<tr class="separator:a4ce7359ad0f73a54dba555be24855804 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0c19cb502f3b720b99b176ea6cc7e319 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top"><a id="a0c19cb502f3b720b99b176ea6cc7e319"></a>
void </td><td class="memItemRight" valign="bottom"><b>unregisterWithAll</b> ()</td></tr>
<tr class="separator:a0c19cb502f3b720b99b176ea6cc7e319 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3d53f9669c128dadc74a5d044a7c8e68 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_observer.html#a3d53f9669c128dadc74a5d044a7c8e68">deepUpdate</a> ()</td></tr>
<tr class="separator:a3d53f9669c128dadc74a5d044a7c8e68 inherit pub_methods_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Calculations</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp003ef63180e665dd5b156927d9dcf524"></a>These methods do not modify the structure of the object and are therefore declared as <code>const</code>. Data members which will be calculated on demand need to be declared as mutable. </p>
</td></tr>
<tr class="memitem:abcf8c3b096b3eea8688019abe7180471"><td class="memItemLeft" align="right" valign="top"><a id="abcf8c3b096b3eea8688019abe7180471"></a>
bool </td><td class="memItemRight" valign="bottom"><b>calculated_</b></td></tr>
<tr class="separator:abcf8c3b096b3eea8688019abe7180471"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a72e3e9b2ee0ed5ab8aa688b9422d8138"><td class="memItemLeft" align="right" valign="top"><a id="a72e3e9b2ee0ed5ab8aa688b9422d8138"></a>
bool </td><td class="memItemRight" valign="bottom"><b>frozen_</b></td></tr>
<tr class="separator:a72e3e9b2ee0ed5ab8aa688b9422d8138"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a52b368dcda2c9e791f5a8fc63de3c510"><td class="memItemLeft" align="right" valign="top"><a id="a52b368dcda2c9e791f5a8fc63de3c510"></a>
bool </td><td class="memItemRight" valign="bottom"><b>alwaysForward_</b></td></tr>
<tr class="separator:a52b368dcda2c9e791f5a8fc63de3c510"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a467a786be42a2165aa15a26709674547"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_lazy_object.html#a467a786be42a2165aa15a26709674547">recalculate</a> ()</td></tr>
<tr class="separator:a467a786be42a2165aa15a26709674547"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abd8698b462ce90fe56b15ce7a0192d3e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_lazy_object.html#abd8698b462ce90fe56b15ce7a0192d3e">freeze</a> ()</td></tr>
<tr class="separator:abd8698b462ce90fe56b15ce7a0192d3e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a26c02da24a82bc72024a8e8d48af0fca"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_lazy_object.html#a26c02da24a82bc72024a8e8d48af0fca">unfreeze</a> ()</td></tr>
<tr class="separator:a26c02da24a82bc72024a8e8d48af0fca"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2ee394ca135f85485023ce3dc037149c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_lazy_object.html#a2ee394ca135f85485023ce3dc037149c">alwaysForwardNotifications</a> ()</td></tr>
<tr class="separator:a2ee394ca135f85485023ce3dc037149c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a082ff96da379d5e17436372ccb3c0972"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_lazy_object.html#a082ff96da379d5e17436372ccb3c0972">calculate</a> () const</td></tr>
<tr class="separator:a082ff96da379d5e17436372ccb3c0972"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a572dbe926524786c64db01e31dba7ab8"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_lazy_object.html#a572dbe926524786c64db01e31dba7ab8">performCalculations</a> () const =0</td></tr>
<tr class="separator:a572dbe926524786c64db01e31dba7ab8"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_class_quant_lib_1_1_observer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_class_quant_lib_1_1_observer')"><img src="closed.png" alt="-"/> Public Types inherited from <a class="el" href="class_quant_lib_1_1_observer.html">Observer</a></td></tr>
<tr class="memitem:a78de5f2b6bce96d718e3c18b9f52d67c inherit pub_types_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top"><a id="a78de5f2b6bce96d718e3c18b9f52d67c"></a>
typedef boost::unordered_set< ext::shared_ptr< <a class="el" href="class_quant_lib_1_1_observable.html">Observable</a> > > </td><td class="memItemRight" valign="bottom"><b>set_type</b></td></tr>
<tr class="separator:a78de5f2b6bce96d718e3c18b9f52d67c inherit pub_types_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae98429250f6997df7b87f4b37454609e inherit pub_types_class_quant_lib_1_1_observer"><td class="memItemLeft" align="right" valign="top"><a id="ae98429250f6997df7b87f4b37454609e"></a>
typedef set_type::iterator </td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
<tr class="separator:ae98429250f6997df7b87f4b37454609e inherit pub_types_class_quant_lib_1_1_observer"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Framework for calculation on demand and result caching. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ac5c54df7ed3b930268c8d7752c101725"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5c54df7ed3b930268c8d7752c101725">◆ </a></span>update()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void update </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes. </p>
<p>Implements <a class="el" href="class_quant_lib_1_1_observer.html#a99b02345a8a15d3c5ea2844a2253f510">Observer</a>.</p>
<p>Reimplemented in <a class="el" href="class_quant_lib_1_1_piecewise_yield_curve.html#ac5c54df7ed3b930268c8d7752c101725">PiecewiseYieldCurve< Traits, Interpolator, Bootstrap ></a>, <a class="el" href="class_quant_lib_1_1_flat_forward.html#ac5c54df7ed3b930268c8d7752c101725">FlatForward</a>, <a class="el" href="class_quant_lib_1_1_fitted_bond_discount_curve.html#ac5c54df7ed3b930268c8d7752c101725">FittedBondDiscountCurve</a>, <a class="el" href="class_quant_lib_1_1_cms_market.html#ac5c54df7ed3b930268c8d7752c101725">CmsMarket</a>, <a class="el" href="class_quant_lib_1_1_stripped_optionlet_adapter.html#ac5c54df7ed3b930268c8d7752c101725">StrippedOptionletAdapter</a>, <a class="el" href="class_quant_lib_1_1_cap_floor_term_vol_surface.html#ac5c54df7ed3b930268c8d7752c101725">CapFloorTermVolSurface</a>, <a class="el" href="class_quant_lib_1_1_cap_floor_term_vol_curve.html#ac5c54df7ed3b930268c8d7752c101725">CapFloorTermVolCurve</a>, <a class="el" href="class_quant_lib_1_1_piecewise_zero_inflation_curve.html#ac5c54df7ed3b930268c8d7752c101725">PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits ></a>, <a class="el" href="class_quant_lib_1_1_piecewise_yo_y_inflation_curve.html#ac5c54df7ed3b930268c8d7752c101725">PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits ></a>, <a class="el" href="class_quant_lib_1_1_piecewise_default_curve.html#ac5c54df7ed3b930268c8d7752c101725">PiecewiseDefaultCurve< Traits, Interpolator, Bootstrap ></a>, and <a class="el" href="class_quant_lib_1_1_forward_swap_quote.html#ac5c54df7ed3b930268c8d7752c101725">ForwardSwapQuote</a>.</p>
</div>
</div>
<a id="a467a786be42a2165aa15a26709674547"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a467a786be42a2165aa15a26709674547">◆ </a></span>recalculate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void recalculate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This method force the recalculation of any results which would otherwise be cached. It is not declared as <code>const</code> since it needs to call the non-<code>const</code> <em><b>notifyObservers</b></em> method.</p>
<dl class="section note"><dt>Note</dt><dd>Explicit invocation of this method is <b>not</b> necessary if the object registered itself as observer with the structures on which such results depend. It is strongly advised to follow this policy when possible. </dd></dl>
</div>
</div>
<a id="abd8698b462ce90fe56b15ce7a0192d3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd8698b462ce90fe56b15ce7a0192d3e">◆ </a></span>freeze()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void freeze </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This method constrains the object to return the presently cached results on successive invocations, even if arguments upon which they depend should change. </p>
</div>
</div>
<a id="a26c02da24a82bc72024a8e8d48af0fca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26c02da24a82bc72024a8e8d48af0fca">◆ </a></span>unfreeze()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void unfreeze </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This method reverts the effect of the <em><b>freeze</b></em> method, thus re-enabling recalculations. </p>
</div>
</div>
<a id="a2ee394ca135f85485023ce3dc037149c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ee394ca135f85485023ce3dc037149c">◆ </a></span>alwaysForwardNotifications()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void alwaysForwardNotifications </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This method causes the object to forward all notifications, even when not calculated. The default behavior is to forward the first notification received, and discard the others until recalculated; the rationale is that observers were already notified, and don't need further notification until they recalculate, at which point this object would be recalculated too. After recalculation, this object would again forward the first notification received.</p>
<dl class="caveats"><dt><b><a class="el" href="caveats.html#_caveats000117">Warning:</a></b></dt><dd>Forwarding all notifications will cause a performance hit, and should be used only when discarding notifications cause an incorrect behavior. </dd></dl>
</div>
</div>
<a id="a082ff96da379d5e17436372ccb3c0972"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a082ff96da379d5e17436372ccb3c0972">◆ </a></span>calculate()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void calculate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method performs all needed calculations by calling the <em><b>performCalculations</b></em> method.</p>
<dl class="caveats"><dt><b><a class="el" href="caveats.html#_caveats000118">Warning:</a></b></dt><dd>Objects cache the results of the previous calculation. Such results will be returned upon later invocations of <em><b>calculate</b></em>. When the results depend on arguments which could change between invocations, the lazy object must register itself as observer of such objects for the calculations to be performed again when they change.</dd></dl>
<dl class="caveats"><dt><b><a class="el" href="caveats.html#_caveats000119">Warning:</a></b></dt><dd>Should this method be redefined in derived classes, <a class="el" href="class_quant_lib_1_1_lazy_object.html#a082ff96da379d5e17436372ccb3c0972">LazyObject::calculate()</a> should be called in the overriding method. </dd></dl>
<p>Reimplemented in <a class="el" href="class_quant_lib_1_1_instrument.html#a082ff96da379d5e17436372ccb3c0972">Instrument</a>.</p>
</div>
</div>
<a id="a572dbe926524786c64db01e31dba7ab8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a572dbe926524786c64db01e31dba7ab8">◆ </a></span>performCalculations()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void performCalculations </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method must implement any calculations which must be (re)done in order to calculate the desired results. </p>
<p>Implemented in <a class="el" href="class_quant_lib_1_1_swaption_volatility_matrix.html#a33f04fb3ac37abe7c9c6032cff611745">SwaptionVolatilityMatrix</a>, <a class="el" href="class_quant_lib_1_1_swaption_volatility_cube.html#a33f04fb3ac37abe7c9c6032cff611745">SwaptionVolatilityCube</a>, <a class="el" href="class_quant_lib_1_1_stripped_optionlet_adapter.html#a33f04fb3ac37abe7c9c6032cff611745">StrippedOptionletAdapter</a>, <a class="el" href="class_quant_lib_1_1_optionlet_stripper2.html#a33f04fb3ac37abe7c9c6032cff611745">OptionletStripper2</a>, <a class="el" href="class_quant_lib_1_1_optionlet_stripper1.html#a33f04fb3ac37abe7c9c6032cff611745">OptionletStripper1</a>, <a class="el" href="class_quant_lib_1_1_andreasen_huge_volatility_interpl.html#a33f04fb3ac37abe7c9c6032cff611745">AndreasenHugeVolatilityInterpl</a>, <a class="el" href="class_quant_lib_1_1_cap_floor_term_vol_surface.html#a33f04fb3ac37abe7c9c6032cff611745">CapFloorTermVolSurface</a>, <a class="el" href="class_quant_lib_1_1_cap_floor_term_vol_curve.html#a33f04fb3ac37abe7c9c6032cff611745">CapFloorTermVolCurve</a>, <a class="el" href="class_quant_lib_1_1_implied_std_dev_quote.html#a33f04fb3ac37abe7c9c6032cff611745">ImpliedStdDevQuote</a>, <a class="el" href="class_quant_lib_1_1_forward_swap_quote.html#a33f04fb3ac37abe7c9c6032cff611745">ForwardSwapQuote</a>, <a class="el" href="class_quant_lib_1_1_eurodollar_futures_implied_std_dev_quote.html#a33f04fb3ac37abe7c9c6032cff611745">EurodollarFuturesImpliedStdDevQuote</a>, <a class="el" href="class_quant_lib_1_1_markov_functional.html#a33f04fb3ac37abe7c9c6032cff611745">MarkovFunctional</a>, <a class="el" href="class_quant_lib_1_1_gsr.html#a33f04fb3ac37abe7c9c6032cff611745">Gsr</a>, <a class="el" href="class_quant_lib_1_1_gaussian1d_model.html#a33f04fb3ac37abe7c9c6032cff611745">Gaussian1dModel</a>, <a class="el" href="class_quant_lib_1_1_heston_model_helper.html#a33f04fb3ac37abe7c9c6032cff611745">HestonModelHelper</a>, <a class="el" href="class_quant_lib_1_1_black_calibration_helper.html#a33f04fb3ac37abe7c9c6032cff611745">BlackCalibrationHelper</a>, <a class="el" href="class_quant_lib_1_1_stock.html#a33f04fb3ac37abe7c9c6032cff611745">Stock</a>, <a class="el" href="class_quant_lib_1_1_forward_rate_agreement.html#a33f04fb3ac37abe7c9c6032cff611745">ForwardRateAgreement</a>, <a class="el" href="class_quant_lib_1_1_forward.html#a33f04fb3ac37abe7c9c6032cff611745">Forward</a>, <a class="el" href="class_quant_lib_1_1_fixed_rate_bond_forward.html#a33f04fb3ac37abe7c9c6032cff611745">FixedRateBondForward</a>, <a class="el" href="class_quant_lib_1_1_composite_instrument.html#a33f04fb3ac37abe7c9c6032cff611745">CompositeInstrument</a>, <a class="el" href="class_quant_lib_1_1_instrument.html#a33f04fb3ac37abe7c9c6032cff611745">Instrument</a>, <a class="el" href="class_quant_lib_1_1_abcd_atm_vol_curve.html#a33f04fb3ac37abe7c9c6032cff611745">AbcdAtmVolCurve</a>, <a class="el" href="class_quant_lib_1_1_heston_s_l_v_m_c_model.html#a33f04fb3ac37abe7c9c6032cff611745">HestonSLVMCModel</a>, <a class="el" href="class_quant_lib_1_1_risky_bond.html#a33f04fb3ac37abe7c9c6032cff611745">RiskyBond</a>, <a class="el" href="class_quant_lib_1_1_random_l_m.html#a33f04fb3ac37abe7c9c6032cff611745">RandomLM< derivedRandomLM, copulaPolicy, USNG ></a>, <a class="el" href="class_quant_lib_1_1_convertible_bond.html#a33f04fb3ac37abe7c9c6032cff611745">ConvertibleBond</a>, <a class="el" href="class_quant_lib_1_1_energy_vanilla_swap.html#a33f04fb3ac37abe7c9c6032cff611745">EnergyVanillaSwap</a>, <a class="el" href="class_quant_lib_1_1_energy_future.html#a33f04fb3ac37abe7c9c6032cff611745">EnergyFuture</a>, and <a class="el" href="class_quant_lib_1_1_energy_basis_swap.html#a33f04fb3ac37abe7c9c6032cff611745">EnergyBasisSwap</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="http://www.doxygen.org/index.html">Doxygen</a>
1.8.20
</small></address>
</body>
</html>
|