mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-11 11:07:27 +08:00
Documentation for 4a34bec125
This commit is contained in:
@@ -196,12 +196,12 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
<p>Main function </p>
|
||||
<div class="fragment"><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  {</div>
|
||||
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keywordtype">float</span> y, x1, x2, x3, sum, s, a, f1, f2, gd;</div>
|
||||
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keywordtype">float</span> y, x1, x2, x3, <a class="code" href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">sum</a>, s, a, f1, f2, gd;</div>
|
||||
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keywordtype">int</span> i, n;</div>
|
||||
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div>
|
||||
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="keywordflow">for</span> (i = 0; i < 10; i++) {</div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  sum = <a class="code" href="../../df/dc8/successive__approximation_8cpp.html#a79c1d08919ff7780a5d7723172602389">eq</a>(y);</div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"value of equation at "</span> << i << <span class="stringliteral">" "</span> << sum << <span class="stringliteral">"\n"</span>;</div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <a class="code" href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">sum</a> = <a class="code" href="../../df/dc8/successive__approximation_8cpp.html#a79c1d08919ff7780a5d7723172602389">eq</a>(y);</div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"value of equation at "</span> << i << <span class="stringliteral">" "</span> << <a class="code" href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">sum</a> << <span class="stringliteral">"\n"</span>;</div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  y++;</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  }</div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"enter the x1->"</span>;</div>
|
||||
@@ -219,7 +219,7 @@ 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="../../df/dc8/successive__approximation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="152" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../df/dc8/successive__approximation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="266" height="139"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -232,6 +232,7 @@ Here is the call graph for this function:</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="asuccessive__approximation_8cpp_html_a79c1d08919ff7780a5d7723172602389"><div class="ttname"><a href="../../df/dc8/successive__approximation_8cpp.html#a79c1d08919ff7780a5d7723172602389">eq</a></div><div class="ttdeci">static float eq(float y)</div><div class="ttdef"><b>Definition:</b> successive_approximation.cpp:12</div></div>
|
||||
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
|
||||
<div class="ttc" id="anamespacemachine__learning_html_a5305cc18d11943d3dc0d66e70d7e9c44"><div class="ttname"><a href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44">machine_learning::sum</a></div><div class="ttdeci">T sum(const std::vector< std::valarray< T >> &A)</div><div class="ttdef"><b>Definition:</b> vector_ops.hpp:228</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,31,56,57"/>
|
||||
<area shape="rect" id="node2" href="$df/dc8/successive__approximation_8cpp.html#a79c1d08919ff7780a5d7723172602389" title=" " alt="" coords="106,5,145,32"/>
|
||||
<area shape="rect" id="node3" href="$df/dc8/successive__approximation_8cpp.html#ae89c36add7c55298c5195d0a83de1456" title=" " alt="" coords="104,56,147,83"/>
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,56,56,83"/>
|
||||
<area shape="rect" id="node2" href="$df/dc8/successive__approximation_8cpp.html#a79c1d08919ff7780a5d7723172602389" title=" " alt="" coords="163,5,201,32"/>
|
||||
<area shape="rect" id="node3" href="$df/dc8/successive__approximation_8cpp.html#ae89c36add7c55298c5195d0a83de1456" title=" " alt="" coords="161,56,203,83"/>
|
||||
<area shape="rect" id="node4" href="$d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" title=" " alt="" coords="104,107,260,133"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
102ab08fa39138d36326dbf570699389
|
||||
d9d71d2feeb03b6cc7cc557faa04bf1c
|
||||
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="114pt" height="66pt"
|
||||
viewBox="0.00 0.00 114.00 66.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 62)">
|
||||
<svg width="199pt" height="104pt"
|
||||
viewBox="0.00 0.00 199.00 104.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 100)">
|
||||
<title>main</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-62 110,-62 110,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-100 195,-100 195,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-19.5 0,-38.5 38,-38.5 38,-19.5 0,-19.5"/>
|
||||
<text text-anchor="middle" x="19" y="-26.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-38.5 0,-57.5 38,-57.5 38,-38.5 0,-38.5"/>
|
||||
<text text-anchor="middle" x="19" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -22,31 +22,46 @@
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../df/dc8/successive__approximation_8cpp.html#a79c1d08919ff7780a5d7723172602389" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="75.5,-38.5 75.5,-57.5 104.5,-57.5 104.5,-38.5 75.5,-38.5"/>
|
||||
<text text-anchor="middle" x="90" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">eq</text>
|
||||
<polygon fill="white" stroke="black" points="118,-76.5 118,-95.5 147,-95.5 147,-76.5 118,-76.5"/>
|
||||
<text text-anchor="middle" x="132.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">eq</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.13,-33.99C46.51,-36.3 56.57,-39.07 65.52,-41.53"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="64.78,-44.96 75.35,-44.24 66.64,-38.21 64.78,-44.96"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.46,-54.6C48.88,-58.29 62.15,-62.96 74,-67 85.19,-70.82 97.65,-74.95 108.11,-78.38"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="107.17,-81.76 117.77,-81.54 109.35,-75.11 107.17,-81.76"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../df/dc8/successive__approximation_8cpp.html#ae89c36add7c55298c5195d0a83de1456" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-0.5 74,-19.5 106,-19.5 106,-0.5 74,-0.5"/>
|
||||
<text text-anchor="middle" x="90" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">eqd</text>
|
||||
<polygon fill="white" stroke="black" points="116.5,-38.5 116.5,-57.5 148.5,-57.5 148.5,-38.5 116.5,-38.5"/>
|
||||
<text text-anchor="middle" x="132.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">eqd</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.13,-24.01C45.96,-21.85 55.26,-19.29 63.76,-16.95"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="64.85,-20.28 73.56,-14.25 62.99,-13.53 64.85,-20.28"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.41,-48C56.87,-48 85.43,-48 106.05,-48"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="106.29,-51.5 116.29,-48 106.29,-44.5 106.29,-51.5"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:href="../../d8/d77/namespacemachine__learning.html#a5305cc18d11943d3dc0d66e70d7e9c44" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-0.5 74,-19.5 191,-19.5 191,-0.5 74,-0.5"/>
|
||||
<text text-anchor="middle" x="132.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">machine_learning::sum</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.46,-41.4C48.88,-37.71 62.15,-33.04 74,-29 80.01,-26.95 86.38,-24.81 92.61,-22.74"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="93.82,-26.02 102.21,-19.56 91.62,-19.38 93.82,-26.02"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user