Documentation for 8a368240e2

This commit is contained in:
github-actions
2024-08-30 17:22:07 +00:00
parent a1eb9bd385
commit 27c0a2f2f9
5155 changed files with 53816 additions and 36252 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: math/integral_approximation2.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -11,9 +11,9 @@
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
@@ -43,18 +43,23 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
initMenu('../../',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
@@ -73,7 +78,7 @@ $(function() {
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('db/d40/integral__approximation2_8cpp.html','../../'); initResizable(); });
$(function(){initNavTree('db/d40/integral__approximation2_8cpp.html','../../'); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
@@ -125,10 +130,10 @@ Include dependency graph for integral_approximation2.cpp:</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:dd/d47/namespacemath" id="r_dd/d47/namespacemath"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html">math</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html">math</a></td></tr>
<tr class="memdesc:dd/d47/namespacemath"><td class="mdescLeft">&#160;</td><td class="mdescRight">for IO operations <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d0/da4/namespacemonte__carlo" id="r_d0/da4/namespacemonte__carlo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/da4/namespacemonte__carlo.html">monte_carlo</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/da4/namespacemonte__carlo.html">monte_carlo</a></td></tr>
<tr class="memdesc:d0/da4/namespacemonte__carlo"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions for the <a href="https://en.wikipedia.org/wiki/Monte_Carlo_integration" target="_blank">Monte Carlo Integration</a> implementation. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
@@ -185,22 +190,22 @@ Functions</h2></td></tr>
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; double &gt; math::monte_carlo::generate_samples </td>
<td>(</td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>start_point</em>, </span></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>start_point</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">Function</a> &amp;</td> <td class="paramname"><span class="paramname"><em>pdf</em>, </span></td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">Function</a> &amp;</td> <td class="paramname"><span class="paramname"><em>pdf</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t &amp;</td> <td class="paramname"><span class="paramname"><em>num_samples</em>, </span></td>
<td class="paramtype">const uint32_t &amp;</td> <td class="paramname"><span class="paramname"><em>num_samples</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t &amp;</td> <td class="paramname"><span class="paramname"><em>discard</em><span class="paramdefsep"> = </span><span class="paramdefval">100000</span></span>&#160;)</td>
<td class="paramtype">const uint32_t &amp;</td> <td class="paramname"><span class="paramname"><em>discard</em></span><span class="paramdefsep"> = </span><span class="paramdefval">100000</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -272,22 +277,22 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">double math::monte_carlo::integral_monte_carlo </td>
<td>(</td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>start_point</em>, </span></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>start_point</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">Function</a> &amp;</td> <td class="paramname"><span class="paramname"><em>function</em>, </span></td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">Function</a> &amp;</td> <td class="paramname"><span class="paramname"><em>function</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">Function</a> &amp;</td> <td class="paramname"><span class="paramname"><em>pdf</em>, </span></td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">Function</a> &amp;</td> <td class="paramname"><span class="paramname"><em>pdf</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint32_t &amp;</td> <td class="paramname"><span class="paramname"><em>num_samples</em><span class="paramdefsep"> = </span><span class="paramdefval">1000000</span></span>&#160;)</td>
<td class="paramtype">const uint32_t &amp;</td> <td class="paramname"><span class="paramname"><em>num_samples</em></span><span class="paramdefsep"> = </span><span class="paramdefval">1000000</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
@@ -312,10 +317,9 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 120</span> integral += function(sample) / pdf(sample);</div>
<div class="line"><span class="lineno"> 121</span> }</div>
<div class="line"><span class="lineno"> 122</span> </div>
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">return</span> integral / <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(samples.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>());</div>
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">return</span> integral / <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(samples.size());</div>
<div class="line"><span class="lineno"> 124</span>}</div>
<div class="ttc" id="aintegral__approximation2_8cpp_html_a71249ee535f16f8ed2e9cc8f0199a2cf"><div class="ttname"><a href="#a71249ee535f16f8ed2e9cc8f0199a2cf">math::monte_carlo::generate_samples</a></div><div class="ttdeci">std::vector&lt; double &gt; generate_samples(const double &amp;start_point, const Function &amp;pdf, const uint32_t &amp;num_samples, const uint32_t &amp;discard=100000)</div><div class="ttdoc">short-hand for std::functions used in this implementation</div><div class="ttdef"><b>Definition</b> integral_approximation2.cpp:64</div></div>
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
@@ -333,7 +337,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"></span></td><td>)</td>
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -366,7 +370,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">static void test </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -479,7 +483,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../db/d40/integral__approximation2_8cpp.html">integral_approximation2.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
</ul>
</div>
</body>