mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-17 03:51:27 +08:00
Documentation for 1bfd46e92c
This commit is contained in:
@@ -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.9.7"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Ordinary Differential Equations</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.7 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -226,7 +226,7 @@ Functions</h2></td></tr>
|
||||
<div class="ttc" id="aclock_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">std::clock</a></div><div class="ttdeci">T clock(T... args)</div></div>
|
||||
<div class="ttc" id="aclock_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/clock_t.html">std::clock_t</a></div></div>
|
||||
<div class="ttc" id="aclose_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ofstream/close.html">std::ofstream::close</a></div><div class="ttdeci">T close(T... args)</div></div>
|
||||
<div class="ttc" id="agroup__ode_html_ga195d23bbdfcb80e83c9cda45c9ad5723"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723">forward_euler_step</a></div><div class="ttdeci">void forward_euler_step(const double dx, const double x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Compute next step approximation using the forward-Euler method.</div><div class="ttdef"><b>Definition</b> ode_forward_euler.cpp:86</div></div>
|
||||
<div class="ttc" id="agroup__ode_html_ga195d23bbdfcb80e83c9cda45c9ad5723"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723">forward_euler_step</a></div><div class="ttdeci">void forward_euler_step(const double dx, const double x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Compute next step approximation using the forward-Euler method.</div><div class="ttdef"><b>Definition:</b> ode_forward_euler.cpp:86</div></div>
|
||||
<div class="ttc" id="ais_open_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ofstream/is_open.html">std::ofstream::is_open</a></div><div class="ttdeci">T is_open(T... args)</div></div>
|
||||
<div class="ttc" id="aopen_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ofstream/open.html">std::ofstream::open</a></div><div class="ttdeci">T open(T... args)</div></div>
|
||||
<div class="ttc" id="aperror_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/c/perror.html">std::perror</a></div><div class="ttdeci">T perror(T... args)</div></div>
|
||||
@@ -235,7 +235,8 @@ Functions</h2></td></tr>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_gae0509f8843e2bc42de2abbd00a14b7b9_cgraph.svg" width="426" height="283"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_gae0509f8843e2bc42de2abbd00a14b7b9_cgraph.svg" width="426" height="283"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -295,11 +296,12 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 88</span> <a class="code hl_function" href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a>(x, y, dy);</div>
|
||||
<div class="line"><span class="lineno"> 89</span> *y += *dy * dx;</div>
|
||||
<div class="line"><span class="lineno"> 90</span>}</div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_abaeae8f62a018d197f0187a1c80a90fe"><div class="ttname"><a href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a></div><div class="ttdeci">void problem(const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Problem statement for a system with first-order differential equations. Updates the system differenti...</div><div class="ttdef"><b>Definition</b> ode_forward_euler.cpp:54</div></div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_abaeae8f62a018d197f0187a1c80a90fe"><div class="ttname"><a href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a></div><div class="ttdeci">void problem(const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Problem statement for a system with first-order differential equations. Updates the system differenti...</div><div class="ttdef"><b>Definition:</b> ode_forward_euler.cpp:54</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga195d23bbdfcb80e83c9cda45c9ad5723_cgraph.svg" width="258" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga195d23bbdfcb80e83c9cda45c9ad5723_cgraph.svg" width="258" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -397,11 +399,12 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 142</span> </div>
|
||||
<div class="line"><span class="lineno"> 143</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(t2 - t1) / CLOCKS_PER_SEC;</div>
|
||||
<div class="line"><span class="lineno"> 144</span>}</div>
|
||||
<div class="ttc" id="agroup__ode_html_ga8c319db420c3d97a83e9dcca803b6812"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga8c319db420c3d97a83e9dcca803b6812">midpoint_euler_step</a></div><div class="ttdeci">void midpoint_euler_step(const double dx, const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Compute next step approximation using the midpoint-Euler method.</div><div class="ttdef"><b>Definition</b> ode_midpoint_euler.cpp:85</div></div>
|
||||
<div class="ttc" id="agroup__ode_html_ga8c319db420c3d97a83e9dcca803b6812"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga8c319db420c3d97a83e9dcca803b6812">midpoint_euler_step</a></div><div class="ttdeci">void midpoint_euler_step(const double dx, const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Compute next step approximation using the midpoint-Euler method.</div><div class="ttdef"><b>Definition:</b> ode_midpoint_euler.cpp:85</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga36ff0710861ca39d957046c0b09b2985_cgraph.svg" width="431" height="283"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga36ff0710861ca39d957046c0b09b2985_cgraph.svg" width="431" height="283"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -468,11 +471,12 @@ y_n + \frac{1}{2}dx\,f\left(x_n,y_n\right)\right)\]
|
||||
<div class="line"><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><span class="lineno"> 94</span> y[0] += dy[0] * dx;</div>
|
||||
<div class="line"><span class="lineno"> 95</span>}</div>
|
||||
<div class="ttc" id="aode__midpoint__euler_8cpp_html_abaeae8f62a018d197f0187a1c80a90fe"><div class="ttname"><a href="../../d6/dd3/ode__midpoint__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a></div><div class="ttdeci">void problem(const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Problem statement for a system with first-order differential equations. Updates the system differenti...</div><div class="ttdef"><b>Definition</b> ode_midpoint_euler.cpp:53</div></div>
|
||||
<div class="ttc" id="aode__midpoint__euler_8cpp_html_abaeae8f62a018d197f0187a1c80a90fe"><div class="ttname"><a href="../../d6/dd3/ode__midpoint__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a></div><div class="ttdeci">void problem(const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Problem statement for a system with first-order differential equations. Updates the system differenti...</div><div class="ttdef"><b>Definition:</b> ode_midpoint_euler.cpp:53</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga8c319db420c3d97a83e9dcca803b6812_cgraph.svg" width="264" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga8c319db420c3d97a83e9dcca803b6812_cgraph.svg" width="264" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -570,11 +574,12 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 139</span> </div>
|
||||
<div class="line"><span class="lineno"> 140</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(t2 - t1) / CLOCKS_PER_SEC;</div>
|
||||
<div class="line"><span class="lineno"> 141</span>}</div>
|
||||
<div class="ttc" id="agroup__ode_html_ga827bf009831ddc477c5fa8891d5cb35f"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga827bf009831ddc477c5fa8891d5cb35f">semi_implicit_euler_step</a></div><div class="ttdeci">void semi_implicit_euler_step(const double dx, const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Compute next step approximation using the semi-implicit-Euler method.</div><div class="ttdef"><b>Definition</b> ode_semi_implicit_euler.cpp:82</div></div>
|
||||
<div class="ttc" id="agroup__ode_html_ga827bf009831ddc477c5fa8891d5cb35f"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga827bf009831ddc477c5fa8891d5cb35f">semi_implicit_euler_step</a></div><div class="ttdeci">void semi_implicit_euler_step(const double dx, const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Compute next step approximation using the semi-implicit-Euler method.</div><div class="ttdef"><b>Definition:</b> ode_semi_implicit_euler.cpp:82</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga3874d294ab00fe9ce8731c5b7991a089_cgraph.svg" width="471" height="283"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga3874d294ab00fe9ce8731c5b7991a089_cgraph.svg" width="471" height="283"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -638,11 +643,12 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 89</span> dy[0][0] = 0.f; <span class="comment">// ignore y0</span></div>
|
||||
<div class="line"><span class="lineno"> 90</span> y[0] += dy[0] * dx; <span class="comment">// update remaining using new dy</span></div>
|
||||
<div class="line"><span class="lineno"> 91</span>}</div>
|
||||
<div class="ttc" id="aode__semi__implicit__euler_8cpp_html_abaeae8f62a018d197f0187a1c80a90fe"><div class="ttname"><a href="../../d3/d06/ode__semi__implicit__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a></div><div class="ttdeci">void problem(const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Problem statement for a system with first-order differential equations. Updates the system differenti...</div><div class="ttdef"><b>Definition</b> ode_semi_implicit_euler.cpp:53</div></div>
|
||||
<div class="ttc" id="aode__semi__implicit__euler_8cpp_html_abaeae8f62a018d197f0187a1c80a90fe"><div class="ttname"><a href="../../d3/d06/ode__semi__implicit__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a></div><div class="ttdeci">void problem(const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Problem statement for a system with first-order differential equations. Updates the system differenti...</div><div class="ttdef"><b>Definition:</b> ode_semi_implicit_euler.cpp:53</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga827bf009831ddc477c5fa8891d5cb35f_cgraph.svg" width="291" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/d60/group__ode_ga827bf009831ddc477c5fa8891d5cb35f_cgraph.svg" width="291" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -652,7 +658,7 @@ Here is the call graph for this function:</div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<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.9.7 </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.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user