mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-16 11:32:44 +08:00
Documentation for 53a6c16730
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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: numerical_methods/babylonian_method.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -166,11 +166,11 @@ Functions</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_function" href="../../dc/d9c/babylonian__method_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="comment">// with 2 defined test cases</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 96</span> {</div>
|
||||
<div class="line"><span class="lineno"> 97</span> <a class="code hl_function" href="../../dc/d9c/babylonian__method_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 98</span> <span class="comment">// with 2 defined test cases</span></div>
|
||||
<div class="line"><span class="lineno"> 99</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 100</span>}</div>
|
||||
<div class="ttc" id="ababylonian__method_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../dc/d9c/babylonian__method_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition:</b> babylonian_method.cpp:62</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -214,31 +214,31 @@ Here is the call graph for this function:</div>
|
||||
<p >Test result for testcase 2</p>
|
||||
<p >Testing for test Case 1</p>
|
||||
<p >Testing for test Case 2</p>
|
||||
<div class="fragment"><div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> {</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="comment">/* descriptions of the following test */</span></div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">auto</span> testcase1 = 125348; <span class="comment">/// Testcase 1</span></div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">auto</span> testcase2 = 752080; <span class="comment">/// Testcase 2</span></div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">auto</span> real_output1 = 354.045194855; <span class="comment">/// Real Output 1</span></div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">auto</span> real_output2 = 867.225460881; <span class="comment">/// Real Output 2</span></div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">auto</span> test_result1 = <a class="code hl_function" href="../../d1/de0/namespacenumerical__methods.html#a28e67885f8606564cc8335f483f63309">numerical_methods::babylonian_method</a>(testcase1);<span class="comment"></span></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// Test result for testcase 1</span></div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"></span> <span class="keyword">auto</span> test_result2 = <a class="code hl_function" href="../../d1/de0/namespacenumerical__methods.html#a28e67885f8606564cc8335f483f63309">numerical_methods::babylonian_method</a>(testcase2);<span class="comment"></span></div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// Test result for testcase 2</span></div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"></span> </div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(test_result1, real_output1) -</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(test_result1, real_output1) <</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> 0.0001);<span class="comment"></span></div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment"> /// Testing for test Case 1</span></div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment"></span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(test_result2, real_output2) -</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(test_result2, real_output2) <</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> 0.0001);<span class="comment"></span></div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment"> /// Testing for test Case 2</span></div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"></span> </div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All tests have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 62</span> {</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="comment">/* descriptions of the following test */</span></div>
|
||||
<div class="line"><span class="lineno"> 64</span> </div>
|
||||
<div class="line"><span class="lineno"> 65</span> <span class="keyword">auto</span> testcase1 = 125348; <span class="comment">/// Testcase 1</span></div>
|
||||
<div class="line"><span class="lineno"> 66</span> <span class="keyword">auto</span> testcase2 = 752080; <span class="comment">/// Testcase 2</span></div>
|
||||
<div class="line"><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><span class="lineno"> 68</span> <span class="keyword">auto</span> real_output1 = 354.045194855; <span class="comment">/// Real Output 1</span></div>
|
||||
<div class="line"><span class="lineno"> 69</span> <span class="keyword">auto</span> real_output2 = 867.225460881; <span class="comment">/// Real Output 2</span></div>
|
||||
<div class="line"><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><span class="lineno"> 71</span> <span class="keyword">auto</span> test_result1 = <a class="code hl_function" href="../../d1/de0/namespacenumerical__methods.html#a28e67885f8606564cc8335f483f63309">numerical_methods::babylonian_method</a>(testcase1);<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 72</span><span class="comment"> /// Test result for testcase 1</span></div>
|
||||
<div class="line"><span class="lineno"> 73</span><span class="comment"></span> <span class="keyword">auto</span> test_result2 = <a class="code hl_function" href="../../d1/de0/namespacenumerical__methods.html#a28e67885f8606564cc8335f483f63309">numerical_methods::babylonian_method</a>(testcase2);<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 74</span><span class="comment"> /// Test result for testcase 2</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span><span class="comment"></span> </div>
|
||||
<div class="line"><span class="lineno"> 76</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(test_result1, real_output1) -</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(test_result1, real_output1) <</div>
|
||||
<div class="line"><span class="lineno"> 78</span> 0.0001);<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 79</span><span class="comment"> /// Testing for test Case 1</span></div>
|
||||
<div class="line"><span class="lineno"> 80</span><span class="comment"></span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(test_result2, real_output2) -</div>
|
||||
<div class="line"><span class="lineno"> 81</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(test_result2, real_output2) <</div>
|
||||
<div class="line"><span class="lineno"> 82</span> 0.0001);<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 83</span><span class="comment"> /// Testing for test Case 2</span></div>
|
||||
<div class="line"><span class="lineno"> 84</span><span class="comment"></span> </div>
|
||||
<div class="line"><span class="lineno"> 85</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All tests have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 86</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
|
||||
<div class="ttc" id="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</div></div>
|
||||
@@ -258,7 +258,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_9c6faab82c22511b50177aa2e38e2780.html">numerical_methods</a></li><li class="navelem"><a class="el" href="../../dc/d9c/babylonian__method_8cpp.html">babylonian_method.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.9.2 </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.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<map id="test" name="test">
|
||||
<area shape="rect" id="node1" title="Self-test implementations." alt="" coords="5,34,49,61"/>
|
||||
<area shape="rect" id="node2" href="$d1/de0/namespacenumerical__methods.html#a28e67885f8606564cc8335f483f63309" title="Babylonian methods is an iterative function which returns square root of radicand." alt="" coords="97,27,240,68"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="288,7,361,34"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="290,62,359,89"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max#" title=" " alt="" coords="288,7,361,34"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min#" title=" " alt="" coords="290,62,359,89"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
19003ed02c1305b41ac4fcbbe9e4d454
|
||||
b945866806ffdf821ef7fa7d8568c773
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="212,-42.2 212,-61.2 267,-61.2 267,-42.2 212,-42.2"/>
|
||||
<text text-anchor="middle" x="239.5" y="-49.2" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
|
||||
</a>
|
||||
@@ -52,7 +52,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="213.5,-1.2 213.5,-20.2 265.5,-20.2 265.5,-1.2 213.5,-1.2"/>
|
||||
<text text-anchor="middle" x="239.5" y="-8.2" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -2,6 +2,6 @@
|
||||
<area shape="rect" id="node1" title="Main function." alt="" coords="5,34,56,61"/>
|
||||
<area shape="rect" id="node2" href="$dc/d9c/babylonian__method_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self-test implementations." alt="" coords="104,34,148,61"/>
|
||||
<area shape="rect" id="node3" href="$d1/de0/namespacenumerical__methods.html#a28e67885f8606564cc8335f483f63309" title="Babylonian methods is an iterative function which returns square root of radicand." alt="" coords="196,27,339,68"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="387,7,460,34"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min.html#" title=" " alt="" coords="389,62,458,89"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max#" title=" " alt="" coords="387,7,460,34"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/min#" title=" " alt="" coords="389,62,458,89"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
f0ff92e5b2bd8d2d7782f5d3112a0a71
|
||||
703edcd8badae06d241f36585a0f0b15
|
||||
@@ -52,7 +52,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/max#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="286,-42.2 286,-61.2 341,-61.2 341,-42.2 286,-42.2"/>
|
||||
<text text-anchor="middle" x="313.5" y="-49.2" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
|
||||
</a>
|
||||
@@ -67,7 +67,7 @@
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/min#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="287.5,-1.2 287.5,-20.2 339.5,-20.2 339.5,-1.2 287.5,-1.2"/>
|
||||
<text text-anchor="middle" x="313.5" y="-8.2" font-family="Helvetica,sans-Serif" font-size="10.00">std::min</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Reference in New Issue
Block a user