mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-11 11:07:27 +08:00
Documentation for 8476290081
This commit is contained in:
@@ -115,10 +115,10 @@ Include dependency graph for fast_power.cpp:</div>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a8399b847626e5bba983cab7c7918b445"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a8399b847626e5bba983cab7c7918b445"><td class="memTemplItemLeft" align="right" valign="top">double </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a> (T <a class="el" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, T b)</td></tr>
|
||||
<tr class="memitem:a8399b847626e5bba983cab7c7918b445"><td class="memTemplItemLeft" align="right" valign="top">double </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a> (T a, T b)</td></tr>
|
||||
<tr class="separator:a8399b847626e5bba983cab7c7918b445"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0d4e3f0099a6975b74a314a35bd0f94d"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
|
||||
<tr class="memitem:a0d4e3f0099a6975b74a314a35bd0f94d"><td class="memTemplItemLeft" align="right" valign="top">double </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a> (T <a class="el" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, T b)</td></tr>
|
||||
<tr class="memitem:a0d4e3f0099a6975b74a314a35bd0f94d"><td class="memTemplItemLeft" align="right" valign="top">double </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a> (T a, T b)</td></tr>
|
||||
<tr class="separator:a0d4e3f0099a6975b74a314a35bd0f94d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d0b/fast__power_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -162,13 +162,13 @@ template<typename T > </div>
|
||||
<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  {</div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="comment">// negative power. a^b = 1 / (a^-b)</span></div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordflow">if</span> (b < 0)</div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">return</span> 1.0 / <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, -b);</div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">return</span> 1.0 / <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a>(a, -b);</div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  </div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordtype">double</span> result = 1;</div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">while</span> (b) {</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">if</span> (b & 1)</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  result = result * <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>;</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> = <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> * <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>;</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  result = result * a;</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  a = a * a;</div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  b = b >> 1;</div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  }</div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">return</span> result;</div>
|
||||
@@ -207,11 +207,11 @@ template<typename T > </div>
|
||||
<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  {</div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="comment">// negative power. a^b = 1 / (a^-b)</span></div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordflow">if</span> (b < 0)</div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">return</span> 1.0 / <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, -b);</div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">return</span> 1.0 / <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(a, -b);</div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordflow">if</span> (b == 0)</div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  T bottom = <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b >> 1);</div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  T bottom = <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(a, b >> 1);</div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="comment">// Since it is integer division b/2 = (b-1)/2 where b is odd.</span></div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="comment">// Therefore, case2 is easily solved by integer division.</span></div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  </div>
|
||||
@@ -219,7 +219,7 @@ template<typename T > </div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keywordflow">if</span> ((b & 1) == 0) <span class="comment">// case1</span></div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  result = bottom * bottom;</div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordflow">else</span> <span class="comment">// case2</span></div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  result = bottom * bottom * <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>;</div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  result = bottom * bottom * a;</div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
@@ -246,30 +246,30 @@ template<typename T > </div>
|
||||
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  </div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Testing..."</span> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 20; i++) {</div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordtype">int</span> <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> = <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 20 - 10;</div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordtype">int</span> a = <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 20 - 10;</div>
|
||||
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordtype">int</span> b = <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % 20 - 10;</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> << <span class="stringliteral">"Calculating "</span> << <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> << <span class="stringliteral">"^"</span> << b << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  assert(<a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b) == <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">std::pow</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b));</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  assert(<a class="code" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b) == <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">std::pow</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b));</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a> << <span class="stringliteral">"Calculating "</span> << a << <span class="stringliteral">"^"</span> << b << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  assert(<a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(a, b) == <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">std::pow</a>(a, b));</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  assert(<a class="code" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a>(a, b) == <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/pow.html">std::pow</a>(a, b));</div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"------ "</span> << <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> << <span class="stringliteral">"^"</span> << b << <span class="stringliteral">" = "</span></div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  << <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b) << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"------ "</span> << a << <span class="stringliteral">"^"</span> << b << <span class="stringliteral">" = "</span></div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  << <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(a, b) << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  }</div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  </div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  int64_t <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b;</div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> >> b;</div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  int64_t a, b;</div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> a >> b;</div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  </div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> << <span class="stringliteral">"^"</span> << b << <span class="stringliteral">" = "</span> << <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b)</div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << a << <span class="stringliteral">"^"</span> << b << <span class="stringliteral">" = "</span> << <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a>(a, b)</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a> << <span class="stringliteral">"^"</span> << b << <span class="stringliteral">" = "</span> << <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a>(<a class="code" href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a>, b) << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << a << <span class="stringliteral">"^"</span> << b << <span class="stringliteral">" = "</span> << <a class="code" href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d">fast_power_linear</a>(a, b) << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> }</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="../../d2/d0b/fast__power_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="246" height="256"><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="../../d2/d0b/fast__power_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="256" height="408"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -280,7 +280,6 @@ Here is the call graph for this function:</div>
|
||||
<div class="ttc" id="asrand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a></div><div class="ttdeci">T srand(T... args)</div></div>
|
||||
<div class="ttc" id="afast__power_8cpp_html_a8399b847626e5bba983cab7c7918b445"><div class="ttname"><a href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445">fast_power_recursive</a></div><div class="ttdeci">double fast_power_recursive(T a, T b)</div><div class="ttdef"><b>Definition:</b> fast_power.cpp:26</div></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="amatrix__exponentiation_8cpp_html_a9ecd98ce0064e2f7f97bb6a92f58ee72"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#a9ecd98ce0064e2f7f97bb6a92f58ee72">a</a></div><div class="ttdeci">vector< ll > a</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:53</div></div>
|
||||
<div class="ttc" id="arand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a></div><div class="ttdeci">T rand(T... args)</div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="async_with_stdio_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio.html">std::ios_base::sync_with_stdio</a></div><div class="ttdeci">T sync_with_stdio(T... args)</div></div>
|
||||
@@ -292,7 +291,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="../../d2/d0b/fast__power_8cpp.html">fast_power.cpp</a></li>
|
||||
<li class="footer">Generated on Wed Jun 24 2020 22:45:07 for Algorithms_in_C++ by
|
||||
<li class="footer">Generated on Wed Jun 24 2020 22:52:56 for Algorithms_in_C++ by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,107,56,133"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="136,5,208,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="135,56,209,83"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/srand.html#" title=" " alt="" coords="132,107,212,133"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/ios_base/sync_with_stdio.html#" title=" " alt="" coords="104,158,240,199"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/time.html#" title=" " alt="" coords="135,224,209,251"/>
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,183,56,209"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="141,5,213,32"/>
|
||||
<area shape="rect" id="node3" href="$d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d" title=" " alt="" coords="115,56,239,83"/>
|
||||
<area shape="rect" id="node4" href="$d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445" title=" " alt="" coords="104,107,251,133"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/pow.html#" title=" " alt="" coords="141,157,213,184"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="141,208,214,235"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/srand.html#" title=" " alt="" coords="137,259,217,285"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/ios_base/sync_with_stdio.html#" title=" " alt="" coords="109,310,245,351"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/runners/2.263.0/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/time.html#" title=" " alt="" coords="141,376,214,403"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8a1526b892acf3677d45092bf0fcc1d3
|
||||
aff4f5019c0f78daff7f50e94033c126
|
||||
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 2.44.0 (20200408.0750)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="184pt" height="192pt"
|
||||
viewBox="0.00 0.00 184.00 192.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 188)">
|
||||
<svg width="192pt" height="306pt"
|
||||
viewBox="0.00 0.00 192.00 306.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 302)">
|
||||
<title>main</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-188 180,-188 180,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-302 188,-302 188,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,-88.5 0,-107.5 38,-107.5 38,-88.5 0,-88.5"/>
|
||||
<text text-anchor="middle" x="19" y="-95.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-145.5 0,-164.5 38,-164.5 38,-145.5 0,-145.5"/>
|
||||
<text text-anchor="middle" x="19" y="-152.5" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -22,77 +22,122 @@
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="98,-164.5 98,-183.5 152,-183.5 152,-164.5 98,-164.5"/>
|
||||
<text text-anchor="middle" x="125" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
<polygon fill="white" stroke="black" points="102,-278.5 102,-297.5 156,-297.5 156,-278.5 102,-278.5"/>
|
||||
<text text-anchor="middle" x="129" y="-285.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M27,-107.75C36.41,-120.24 54.26,-141.85 74,-155 78.38,-157.92 83.27,-160.48 88.23,-162.69"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="87.16,-166.03 97.74,-166.53 89.78,-159.54 87.16,-166.03"/>
|
||||
<path fill="none" stroke="midnightblue" d="M21.95,-164.77C26.8,-186.59 41.46,-239.68 74,-269 79.21,-273.69 85.65,-277.24 92.24,-279.92"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="91.3,-283.3 101.89,-283.26 93.58,-276.68 91.3,-283.3"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="97.5,-126.5 97.5,-145.5 152.5,-145.5 152.5,-126.5 97.5,-126.5"/>
|
||||
<text text-anchor="middle" x="125" y="-133.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
|
||||
<g id="a_node3"><a xlink:href="../../d2/d0b/fast__power_8cpp.html#a0d4e3f0099a6975b74a314a35bd0f94d" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="82.5,-240.5 82.5,-259.5 175.5,-259.5 175.5,-240.5 82.5,-240.5"/>
|
||||
<text text-anchor="middle" x="129" y="-247.5" font-family="Helvetica,sans-Serif" font-size="10.00">fast_power_linear</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.12,-104.62C51.93,-109.67 71.4,-116.78 88.31,-122.96"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="87.31,-126.32 97.91,-126.47 89.72,-119.75 87.31,-126.32"/>
|
||||
<path fill="none" stroke="midnightblue" d="M24.39,-164.62C32.15,-180.63 49.83,-212.79 74,-231 76.46,-232.85 79.12,-234.54 81.89,-236.06"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="80.48,-239.27 91.01,-240.43 83.5,-232.96 80.48,-239.27"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="95,-88.5 95,-107.5 155,-107.5 155,-88.5 95,-88.5"/>
|
||||
<text text-anchor="middle" x="125" y="-95.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::srand</text>
|
||||
<g id="a_node4"><a xlink:href="../../d2/d0b/fast__power_8cpp.html#a8399b847626e5bba983cab7c7918b445" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-202.5 74,-221.5 184,-221.5 184,-202.5 74,-202.5"/>
|
||||
<text text-anchor="middle" x="129" y="-209.5" font-family="Helvetica,sans-Serif" font-size="10.00">fast_power_recursive</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.12,-98C50.91,-98 68.55,-98 84.52,-98"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="84.7,-101.5 94.7,-98 84.7,-94.5 84.7,-101.5"/>
|
||||
<path fill="none" stroke="midnightblue" d="M31.83,-164.77C42.38,-173.12 58.51,-185.02 74,-193 78.03,-195.08 82.35,-197.02 86.71,-198.81"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="85.67,-202.16 96.26,-202.47 88.18,-195.62 85.67,-202.16"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-39 74,-69 176,-69 176,-39 74,-39"/>
|
||||
<text text-anchor="start" x="82" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::ios_base::sync</text>
|
||||
<text text-anchor="middle" x="125" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">_with_stdio</text>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/pow.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="102,-164.5 102,-183.5 156,-183.5 156,-164.5 102,-164.5"/>
|
||||
<text text-anchor="middle" x="129" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::pow</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.12,-90.34C49.48,-85.53 64.66,-79.1 79.1,-73"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="80.59,-76.17 88.44,-69.05 77.86,-69.72 80.59,-76.17"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.32,-158.22C52.98,-160.8 73.98,-164.5 91.98,-167.66"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="91.43,-171.12 101.88,-169.41 92.64,-164.23 91.43,-171.12"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="97.5,-0.5 97.5,-19.5 152.5,-19.5 152.5,-0.5 97.5,-0.5"/>
|
||||
<text text-anchor="middle" x="125" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::time</text>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="101.5,-126.5 101.5,-145.5 156.5,-145.5 156.5,-126.5 101.5,-126.5"/>
|
||||
<text text-anchor="middle" x="129" y="-133.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M25.41,-88.35C33.98,-73.84 51.99,-46.39 74,-30 78.25,-26.84 83.07,-24.09 88,-21.74"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="89.66,-24.83 97.48,-17.68 86.91,-18.39 89.66,-24.83"/>
|
||||
<path fill="none" stroke="midnightblue" d="M38.32,-151.78C52.88,-149.22 73.69,-145.55 91.61,-142.4"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="92.23,-145.85 101.48,-140.67 91.02,-138.95 92.23,-145.85"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="99,-88.5 99,-107.5 159,-107.5 159,-88.5 99,-88.5"/>
|
||||
<text text-anchor="middle" x="129" y="-95.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::srand</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node1->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M31.83,-145.23C42.38,-136.88 58.51,-124.98 74,-117 78.86,-114.5 84.12,-112.19 89.39,-110.12"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="90.64,-113.39 98.8,-106.63 88.21,-106.82 90.64,-113.39"/>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="78,-39 78,-69 180,-69 180,-39 78,-39"/>
|
||||
<text text-anchor="start" x="86" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::ios_base::sync</text>
|
||||
<text text-anchor="middle" x="129" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">_with_stdio</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<path fill="none" stroke="midnightblue" d="M24.71,-145.38C32.83,-129.64 50.84,-98.24 74,-79 75.98,-77.35 78.09,-75.79 80.28,-74.31"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="82.3,-77.18 89.05,-69.01 78.68,-71.19 82.3,-77.18"/>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="101.5,-0.5 101.5,-19.5 156.5,-19.5 156.5,-0.5 101.5,-0.5"/>
|
||||
<text text-anchor="middle" x="129" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::time</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node9 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node1->Node9</title>
|
||||
<path fill="none" stroke="midnightblue" d="M21.51,-145.39C25.63,-122.27 39.18,-63.02 74,-30 79.07,-25.19 85.39,-21.52 91.91,-18.72"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="93.29,-21.94 101.47,-15.21 90.88,-15.37 93.29,-21.94"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 7.0 KiB |
Reference in New Issue
Block a user