File: class_quant_lib_1_1_problem.html

package info (click to toggle)
quantlib-refman-html 0.9.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 60,592 kB
  • ctags: 7,595
  • sloc: makefile: 30
file content (194 lines) | stat: -rw-r--r-- 17,582 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="robots" content="none">
<title>QuantLib: Problem Class Reference</title>
<link rel="stylesheet" href="quantlib.css" type="text/css">
<link rel="stylesheet" href="print.css" type="text/css" media="print">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>

<div id="container">
<div id="header">
<img class="titleimage"
 src="QL-title.jpg" width="212" height="47" border="0"
 alt="QuantLib">
<br>
<h3 class="subtitle">A free/open-source library for quantitative finance</h3>
</div>
<div id="menu">

<h3 class="navbartitle">Version 0.9.0</h3>

<hr>

<h3 class="navbartitle">Getting started</h3>
<ul class="navbarlist">
<li class="navlink"><a href="index.html">Introduction</a></li>
<li class="navlink"><a href="overview.html">Project overview</a></li>
<li class="navlink"><a href="where.html">Where to get QuantLib</a></li>
<li class="navlink"><a href="install.html">Installation</a></li>
<li class="navlink"><a href="config.html">Configuration</a></li>
<li class="navlink"><a href="usage.html">Usage</a></li>
<li class="navlink"><a href="history.html">Version history</a></li>
<li class="navlink"><a href="resources.html">Additional resources</a></li>
<li class="navlink"><a href="group.html">The QuantLib group</a></li>
<li class="navlink"><a href="license.html">Copyright and license</a></li>
</ul>

<hr>

<h3 class="navbartitle">Reference manual</h3>
<ul class="navbarlist">
<li class="navlink"><a href="modules.html">Modules</a></li>
<li class="navlink"><a href="hierarchy.html">Class Hierarchy</a></li>
<li class="navlink"><a href="annotated.html">Compound List</a></li>
<li class="navlink"><a href="files.html">File List</a></li>
<li class="navlink"><a href="functions.html">Compound Members</a></li>
<li class="navlink"><a href="globals.html">File Members</a></li>
<li class="navlink"><a href="bug.html">Known Bugs</a></li>
<li class="navlink"><a href="caveats.html">Caveats</a></li>
<li class="navlink"><a href="test.html">Test Suite</a></li>
<li class="navlink"><a href="examples.html">Examples</a></li>
</ul>
</div>

<div id="content">
<!--Doxygen-generated content-->

<!-- Generated by Doxygen 1.5.4 -->
<div class="nav">
<a class="el" href="namespace_quant_lib.html">QuantLib</a>::<a class="el" href="class_quant_lib_1_1_problem.html">Problem</a></div>
<h1>Problem Class Reference</h1><!-- doxytag: class="QuantLib::Problem" --><code>#include &lt;ql/math/optimization/problem.hpp&gt;</code>
<p>

<p>
<a href="class_quant_lib_1_1_problem-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Constrained optimization problem. <table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ca51162378bd037e929d7b5fc093a95"></a><!-- doxytag: member="QuantLib::Problem::Problem" ref="4ca51162378bd037e929d7b5fc093a95" args="(CostFunction &amp;costFunction, Constraint &amp;constraint, const Array &amp;initialValue=Array())" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#4ca51162378bd037e929d7b5fc093a95">Problem</a> (<a class="el" href="class_quant_lib_1_1_cost_function.html">CostFunction</a> &amp;costFunction, <a class="el" href="class_quant_lib_1_1_constraint.html">Constraint</a> &amp;constraint, const <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;initialValue=<a class="el" href="class_quant_lib_1_1_array.html">Array</a>())</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">default constructor <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#d20897c5c8bd47f5d4005989bead0e55">reset</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b5a7fc79ae2c7a09f08d7ab169a52dc7"></a><!-- doxytag: member="QuantLib::Problem::value" ref="b5a7fc79ae2c7a09f08d7ab169a52dc7" args="(const Array &amp;x)" -->
<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#b5a7fc79ae2c7a09f08d7ab169a52dc7">value</a> (const <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">call cost function computation and increment evaluation counter <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc8c323a0850669748ab4342f3294ae9"></a><!-- doxytag: member="QuantLib::Problem::values" ref="bc8c323a0850669748ab4342f3294ae9" args="(const Array &amp;x)" -->
<a class="el" href="class_quant_lib_1_1_disposable.html">Disposable</a>&lt; <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#bc8c323a0850669748ab4342f3294ae9">values</a> (const <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">call cost values computation and increment evaluation counter <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de662b750c56006317b08b8aa6b38ac8"></a><!-- doxytag: member="QuantLib::Problem::gradient" ref="de662b750c56006317b08b8aa6b38ac8" args="(Array &amp;grad_f, const Array &amp;x)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#de662b750c56006317b08b8aa6b38ac8">gradient</a> (<a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;grad_f, const <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">call cost function gradient computation and increment <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1f5aed11663d0d3aac5a2b1ff111763"></a><!-- doxytag: member="QuantLib::Problem::valueAndGradient" ref="e1f5aed11663d0d3aac5a2b1ff111763" args="(Array &amp;grad_f, const Array &amp;x)" -->
<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#e1f5aed11663d0d3aac5a2b1ff111763">valueAndGradient</a> (<a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;grad_f, const <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">call cost function computation and it gradient <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="587d1ba7605c5e283b0e48a138b36b47"></a><!-- doxytag: member="QuantLib::Problem::constraint" ref="587d1ba7605c5e283b0e48a138b36b47" args="() const " -->
<a class="el" href="class_quant_lib_1_1_constraint.html">Constraint</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#587d1ba7605c5e283b0e48a138b36b47">constraint</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="class_quant_lib_1_1_constraint.html" title="Base constraint class.">Constraint</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e7eb58c3620c8d99559a7a5739772e7a"></a><!-- doxytag: member="QuantLib::Problem::costFunction" ref="e7eb58c3620c8d99559a7a5739772e7a" args="() const " -->
<a class="el" href="class_quant_lib_1_1_cost_function.html">CostFunction</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#e7eb58c3620c8d99559a7a5739772e7a">costFunction</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cost function. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd2cc5dffd3ac08701ec18a03a41d151"></a><!-- doxytag: member="QuantLib::Problem::setCurrentValue" ref="dd2cc5dffd3ac08701ec18a03a41d151" args="(const Array &amp;currentValue)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>setCurrentValue</b> (const <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;currentValue)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="664394f06abfdf2668dffa35c5d2fc08"></a><!-- doxytag: member="QuantLib::Problem::currentValue" ref="664394f06abfdf2668dffa35c5d2fc08" args="() const " -->
const <a class="el" href="class_quant_lib_1_1_array.html">Array</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#664394f06abfdf2668dffa35c5d2fc08">currentValue</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">current value of the local minimum <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c5276af7ef5302961018ebc9734223f0"></a><!-- doxytag: member="QuantLib::Problem::setFunctionValue" ref="c5276af7ef5302961018ebc9734223f0" args="(Real functionValue)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>setFunctionValue</b> (<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> functionValue)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="507050a322afee6459b66f62c82a6672"></a><!-- doxytag: member="QuantLib::Problem::functionValue" ref="507050a322afee6459b66f62c82a6672" args="() const " -->
<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#507050a322afee6459b66f62c82a6672">functionValue</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">value of cost function <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="816d4b1c93a6838c0d409abc326a2236"></a><!-- doxytag: member="QuantLib::Problem::setGradientNormValue" ref="816d4b1c93a6838c0d409abc326a2236" args="(Real squaredNorm)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>setGradientNormValue</b> (<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> squaredNorm)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3eb1f139d3924e741c5bb18c1525c5af"></a><!-- doxytag: member="QuantLib::Problem::gradientNormValue" ref="3eb1f139d3924e741c5bb18c1525c5af" args="() const " -->
<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#3eb1f139d3924e741c5bb18c1525c5af">gradientNormValue</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">value of cost function gradient norm <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9ce4fbf7f4d0fa879601ef3dada784cc"></a><!-- doxytag: member="QuantLib::Problem::functionEvaluation" ref="9ce4fbf7f4d0fa879601ef3dada784cc" args="() const " -->
<a class="el" href="group__types.html#gb9c87440c314438e51a899a03d2442d0">Integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#9ce4fbf7f4d0fa879601ef3dada784cc">functionEvaluation</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of evaluation of cost function <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="899e30587abf2892515ee1ca642decb6"></a><!-- doxytag: member="QuantLib::Problem::gradientEvaluation" ref="899e30587abf2892515ee1ca642decb6" args="() const " -->
<a class="el" href="group__types.html#gb9c87440c314438e51a899a03d2442d0">Integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#899e30587abf2892515ee1ca642decb6">gradientEvaluation</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of evaluation of cost function gradient <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1172b404ecd012087022709b0a80a1d1"></a><!-- doxytag: member="QuantLib::Problem::costFunction_" ref="1172b404ecd012087022709b0a80a1d1" args="" -->
<a class="el" href="class_quant_lib_1_1_cost_function.html">CostFunction</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#1172b404ecd012087022709b0a80a1d1">costFunction_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unconstrained cost function. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="99de11981890ee039f574235d33748f8"></a><!-- doxytag: member="QuantLib::Problem::constraint_" ref="99de11981890ee039f574235d33748f8" args="" -->
<a class="el" href="class_quant_lib_1_1_constraint.html">Constraint</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#99de11981890ee039f574235d33748f8">constraint_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="class_quant_lib_1_1_constraint.html" title="Base constraint class.">Constraint</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="606d547447ff1c2954836887bd74e438"></a><!-- doxytag: member="QuantLib::Problem::currentValue_" ref="606d547447ff1c2954836887bd74e438" args="" -->
<a class="el" href="class_quant_lib_1_1_array.html">Array</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#606d547447ff1c2954836887bd74e438">currentValue_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">current value of the local minimum <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f306e7f46dac616d414c32fb9ec99b49"></a><!-- doxytag: member="QuantLib::Problem::functionValue_" ref="f306e7f46dac616d414c32fb9ec99b49" args="" -->
<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#f306e7f46dac616d414c32fb9ec99b49">functionValue_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">function and gradient norm values at the curentValue_ (i.e. the last step) <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="495dc2d1ad3260b8fe18772d25ba9cc3"></a><!-- doxytag: member="QuantLib::Problem::squaredNorm_" ref="495dc2d1ad3260b8fe18772d25ba9cc3" args="" -->
<a class="el" href="group__types.html#g4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>squaredNorm_</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="733c93ead43e5991f400c80708e828f7"></a><!-- doxytag: member="QuantLib::Problem::functionEvaluation_" ref="733c93ead43e5991f400c80708e828f7" args="" -->
<a class="el" href="group__types.html#gb9c87440c314438e51a899a03d2442d0">Integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_problem.html#733c93ead43e5991f400c80708e828f7">functionEvaluation_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">number of evaluation of cost function and its gradient <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce467be01625780015069dbded6e3d8a"></a><!-- doxytag: member="QuantLib::Problem::gradientEvaluation_" ref="ce467be01625780015069dbded6e3d8a" args="" -->
<a class="el" href="group__types.html#gb9c87440c314438e51a899a03d2442d0">Integer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>gradientEvaluation_</b></td></tr>

</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="d20897c5c8bd47f5d4005989bead0e55"></a><!-- doxytag: member="QuantLib::Problem::reset" ref="d20897c5c8bd47f5d4005989bead0e55" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void reset           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b><a class="el" href="caveats.html#_caveats000056">Warning:</a></b></dt><dd>it does not reset the current minumum to any initial value </dd></dl>

</div>
</div><p>

</div>

<div class="footer">
<div class="endmatter">
Documentation generated by
<a href="http://www.doxygen.org">Doxygen</a> 1.5.4
</div>
</div>

</div>

</body>
</html>