File: class_quant_lib_1_1_interpolation.html

package info (click to toggle)
quantlib-refman-html 1.20-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 103,140 kB
  • sloc: javascript: 13,408; makefile: 35
file content (211 lines) | stat: -rw-r--r-- 19,950 bytes parent folder | download
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
<!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: Interpolation 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&amp;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&amp;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_interpolation.html">Interpolation</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_quant_lib_1_1_interpolation-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Interpolation Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>base class for 1-D interpolations.  
 <a href="class_quant_lib_1_1_interpolation.html#details">More...</a></p>

<p><code>#include &lt;ql/math/interpolation.hpp&gt;</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 Interpolation:</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_interpolation__inherit__graph.png" border="0" usemap="#a_interpolation_inherit__map" alt="Inheritance graph"/></div>
<map name="_interpolation_inherit__map" id="a_interpolation_inherit__map">
<area shape="rect" title="base class for 1&#45;D interpolations." alt="" coords="145,452,239,479"/>
<area shape="rect" href="class_quant_lib_1_1_abcd_interpolation.html" title="Abcd interpolation between discrete points." alt="" coords="335,5,457,32"/>
<area shape="rect" href="class_quant_lib_1_1_backward_flat_interpolation.html" title="Backward&#45;flat interpolation between discrete points." alt="" coords="309,56,483,83"/>
<area shape="rect" href="class_quant_lib_1_1_convex_monotone_interpolation.html" title="Convex monotone yield&#45;curve interpolation method." alt="" coords="299,107,493,149"/>
<area shape="rect" href="class_quant_lib_1_1_cubic_interpolation.html" title="Cubic interpolation between discrete points." alt="" coords="333,173,459,200"/>
<area shape="rect" href="class_quant_lib_1_1_forward_flat_interpolation.html" title="Forward&#45;flat interpolation between discrete points." alt="" coords="315,224,477,251"/>
<area shape="rect" href="class_quant_lib_1_1_kernel_interpolation.html" title="Kernel interpolation between discrete points." alt="" coords="331,275,461,301"/>
<area shape="rect" href="class_quant_lib_1_1_lagrange_interpolation.html" title=" " alt="" coords="323,325,469,352"/>
<area shape="rect" href="class_quant_lib_1_1_linear_flat_interpolation.html" title="Linear interpolation between discrete points with flat extapolation" alt="" coords="321,376,471,403"/>
<area shape="rect" href="class_quant_lib_1_1_linear_interpolation.html" title="Linear interpolation between discrete points" alt="" coords="332,427,460,453"/>
<area shape="rect" href="class_quant_lib_1_1_log_cubic_interpolation.html" title="log&#45;cubic interpolation between discrete points" alt="" coords="322,477,470,504"/>
<area shape="rect" href="class_quant_lib_1_1_log_linear_interpolation.html" title="log&#45;linear interpolation between discrete points" alt="" coords="321,528,471,555"/>
<area shape="rect" href="class_quant_lib_1_1_log_mixed_linear_cubic_interpolation.html" title="log&#45;mixedlinearcubic interpolation between discrete points" alt="" coords="287,579,505,605"/>
<area shape="rect" href="class_quant_lib_1_1_mixed_linear_cubic_interpolation.html" title="mixed linear/cubic interpolation between discrete points" alt="" coords="297,629,495,656"/>
<area shape="rect" href="class_quant_lib_1_1_no_arb_sabr_interpolation.html" title="no arbitrage sabr smile interpolation between discrete volatility points." alt="" coords="317,680,475,707"/>
<area shape="rect" href="class_quant_lib_1_1_s_a_b_r_interpolation.html" title="SABR smile interpolation between discrete volatility points." alt="" coords="331,731,461,757"/>
<area shape="rect" href="class_quant_lib_1_1_svi_interpolation.html" title="Svi smile interpolation between discrete volatility points." alt="" coords="340,781,452,808"/>
<area shape="rect" href="class_quant_lib_1_1_vanna_volga_interpolation.html" title="Vanna Volga interpolation between discrete points" alt="" coords="315,832,477,859"/>
<area shape="rect" href="class_quant_lib_1_1_zabr_interpolation.html" title="zabr smile interpolation between discrete volatility points." alt="" coords="333,883,459,925"/>
<area shape="rect" href="class_quant_lib_1_1_extrapolator.html" title="base class for classes possibly allowing extrapolation" alt="" coords="5,452,97,479"/>
</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="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_interpolation_1_1_impl.html">Impl</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">abstract base class for interpolation implementations  <a href="class_quant_lib_1_1_interpolation_1_1_impl.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_interpolation_1_1template_impl.html">templateImpl</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">basic template implementation  <a href="class_quant_lib_1_1_interpolation_1_1template_impl.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:af498733f2fd0abef2f5f1071a1b9354a"><td class="memItemLeft" align="right" valign="top"><a id="af498733f2fd0abef2f5f1071a1b9354a"></a>
typedef <a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>argument_type</b></td></tr>
<tr class="separator:af498733f2fd0abef2f5f1071a1b9354a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd4b619e88e62e8c704bc850340fc078"><td class="memItemLeft" align="right" valign="top"><a id="abd4b619e88e62e8c704bc850340fc078"></a>
typedef <a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>result_type</b></td></tr>
<tr class="separator:abd4b619e88e62e8c704bc850340fc078"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a644718bb2fb240de962dc3c9a1fdf0dc"><td class="memItemLeft" align="right" valign="top"><a id="a644718bb2fb240de962dc3c9a1fdf0dc"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>empty</b> () const</td></tr>
<tr class="separator:a644718bb2fb240de962dc3c9a1fdf0dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6f9e73b24954e89c9f4d018f13849e0"><td class="memItemLeft" align="right" valign="top"><a id="ae6f9e73b24954e89c9f4d018f13849e0"></a>
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator()</b> (<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> x, bool allowExtrapolation=false) const</td></tr>
<tr class="separator:ae6f9e73b24954e89c9f4d018f13849e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8fd72d9758f5f356d500360ff1ddccd"><td class="memItemLeft" align="right" valign="top"><a id="ae8fd72d9758f5f356d500360ff1ddccd"></a>
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>primitive</b> (<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> x, bool allowExtrapolation=false) const</td></tr>
<tr class="separator:ae8fd72d9758f5f356d500360ff1ddccd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a388d2f0db741b4201abbf1f6b93607af"><td class="memItemLeft" align="right" valign="top"><a id="a388d2f0db741b4201abbf1f6b93607af"></a>
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>derivative</b> (<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> x, bool allowExtrapolation=false) const</td></tr>
<tr class="separator:a388d2f0db741b4201abbf1f6b93607af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23ad10ac497463bd5a56ffca7bb111d6"><td class="memItemLeft" align="right" valign="top"><a id="a23ad10ac497463bd5a56ffca7bb111d6"></a>
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>secondDerivative</b> (<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> x, bool allowExtrapolation=false) const</td></tr>
<tr class="separator:a23ad10ac497463bd5a56ffca7bb111d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5efece7d663758ca3990448aa8e69bc7"><td class="memItemLeft" align="right" valign="top"><a id="a5efece7d663758ca3990448aa8e69bc7"></a>
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>xMin</b> () const</td></tr>
<tr class="separator:a5efece7d663758ca3990448aa8e69bc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f70132c816636eee187ed4022f7c6c7"><td class="memItemLeft" align="right" valign="top"><a id="a7f70132c816636eee187ed4022f7c6c7"></a>
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&#160;</td><td class="memItemRight" valign="bottom"><b>xMax</b> () const</td></tr>
<tr class="separator:a7f70132c816636eee187ed4022f7c6c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afeb17572ccefb58fd8c237955f4101c0"><td class="memItemLeft" align="right" valign="top"><a id="afeb17572ccefb58fd8c237955f4101c0"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isInRange</b> (<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> x) const</td></tr>
<tr class="separator:afeb17572ccefb58fd8c237955f4101c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5c54df7ed3b930268c8d7752c101725"><td class="memItemLeft" align="right" valign="top"><a id="ac5c54df7ed3b930268c8d7752c101725"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>update</b> ()</td></tr>
<tr class="separator:ac5c54df7ed3b930268c8d7752c101725"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_quant_lib_1_1_extrapolator"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_quant_lib_1_1_extrapolator')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_quant_lib_1_1_extrapolator.html">Extrapolator</a></td></tr>
<tr class="memitem:ae60e793a77f44a9c022b103458fa993c inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="memItemLeft" align="right" valign="top"><a id="ae60e793a77f44a9c022b103458fa993c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_extrapolator.html#ae60e793a77f44a9c022b103458fa993c">enableExtrapolation</a> (bool b=true)</td></tr>
<tr class="memdesc:ae60e793a77f44a9c022b103458fa993c inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="mdescLeft">&#160;</td><td class="mdescRight">enable extrapolation in subsequent calls <br /></td></tr>
<tr class="separator:ae60e793a77f44a9c022b103458fa993c inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abab5047522a68771f2b1d51d1ac78383 inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="memItemLeft" align="right" valign="top"><a id="abab5047522a68771f2b1d51d1ac78383"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_extrapolator.html#abab5047522a68771f2b1d51d1ac78383">disableExtrapolation</a> (bool b=true)</td></tr>
<tr class="memdesc:abab5047522a68771f2b1d51d1ac78383 inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="mdescLeft">&#160;</td><td class="mdescRight">disable extrapolation in subsequent calls <br /></td></tr>
<tr class="separator:abab5047522a68771f2b1d51d1ac78383 inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a323f875818fddd62a1c56c25ddaee418 inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="memItemLeft" align="right" valign="top"><a id="a323f875818fddd62a1c56c25ddaee418"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_extrapolator.html#a323f875818fddd62a1c56c25ddaee418">allowsExtrapolation</a> () const</td></tr>
<tr class="memdesc:a323f875818fddd62a1c56c25ddaee418 inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="mdescLeft">&#160;</td><td class="mdescRight">tells whether extrapolation is enabled <br /></td></tr>
<tr class="separator:a323f875818fddd62a1c56c25ddaee418 inherit pub_methods_class_quant_lib_1_1_extrapolator"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:af7f8e2474e4f230aa86ecf714b9d87d4"><td class="memItemLeft" align="right" valign="top"><a id="af7f8e2474e4f230aa86ecf714b9d87d4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>checkRange</b> (<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> x, bool extrapolate) const</td></tr>
<tr class="separator:af7f8e2474e4f230aa86ecf714b9d87d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ac29a938cdc70db8abcde7a84fe62f9b4"><td class="memItemLeft" align="right" valign="top"><a id="ac29a938cdc70db8abcde7a84fe62f9b4"></a>
ext::shared_ptr&lt; <a class="el" href="class_quant_lib_1_1_interpolation_1_1_impl.html">Impl</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>impl_</b></td></tr>
<tr class="separator:ac29a938cdc70db8abcde7a84fe62f9b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>base class for 1-D interpolations. </p>
<p>Classes derived from this class will provide interpolated values from two sequences of equal length, representing discretized values of a variable and a function of the former, respectively.</p>
<dl class="caveats"><dt><b><a class="el" href="caveats.html#_caveats000081">Warning:</a></b></dt><dd>Interpolations don't copy their underlying data; instead, they store iterators through which they access them. This allow them to see changes in the underlying data without having to propagate them manually, but adds the requirement that the lifetime of the underlying data exceeds or equals the lifetime of the interpolation. It is up to the user to ensure this: usually, a class will store as data members both the data and the interpolation (see, e.g., the <a class="el" href="class_quant_lib_1_1_interpolated_curve.html" title="Helper class to build interpolated term structures.">InterpolatedCurve</a> class) and call the update() method on the latter when the data change. </dd></dl>
</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>