Documentation for 53a6c16730

This commit is contained in:
github-actions
2022-01-16 16:05:19 +00:00
parent 778f1be9e5
commit 2cab28c905
3620 changed files with 52045 additions and 41188 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.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: math/n_choose_r.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">&#160;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&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -167,10 +167,10 @@ 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="l00080" name="l00080"></a><span class="lineno"> 80</span> {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_function" href="../../d1/dbb/n__choose__r_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// executing tests</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 80</span> {</div>
<div class="line"><span class="lineno"> 81</span> <a class="code hl_function" href="../../d1/dbb/n__choose__r_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// executing tests</span></div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 83</span>}</div>
<div class="ttc" id="an__choose__r_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d1/dbb/n__choose__r_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Test implementations.</div><div class="ttdef"><b>Definition:</b> n_choose_r.cpp:52</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -206,27 +206,27 @@ Here is the call graph for this function:</div>
<p>Test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// First test on 5 choose 2</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> uint8_t t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(5, 2);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;10 is the answer but function says otherwise.\n&quot;</span>, t == 10));</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;First test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// Second test on 5 choose 3</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(5, 3);</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> assert(</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> ((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;10 is the answer but the function says otherwise.\n&quot;</span>, t == 10));</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Second test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// Third test on 3 choose 2</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(3, 2);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> assert(</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> ((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;3 is the answer but the function says otherwise.\n&quot;</span>, t == 3));</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Third test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// Fourth test on 10 choose 4</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(10, 4);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;210 is the answer but the function says otherwise.\n&quot;</span>,</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> t == 210));</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Fourth test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 52</span> {</div>
<div class="line"><span class="lineno"> 53</span> <span class="comment">// First test on 5 choose 2</span></div>
<div class="line"><span class="lineno"> 54</span> uint8_t t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(5, 2);</div>
<div class="line"><span class="lineno"> 55</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;10 is the answer but function says otherwise.\n&quot;</span>, t == 10));</div>
<div class="line"><span class="lineno"> 56</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;First test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 57</span> <span class="comment">// Second test on 5 choose 3</span></div>
<div class="line"><span class="lineno"> 58</span> t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(5, 3);</div>
<div class="line"><span class="lineno"> 59</span> assert(</div>
<div class="line"><span class="lineno"> 60</span> ((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;10 is the answer but the function says otherwise.\n&quot;</span>, t == 10));</div>
<div class="line"><span class="lineno"> 61</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Second test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 62</span> <span class="comment">// Third test on 3 choose 2</span></div>
<div class="line"><span class="lineno"> 63</span> t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(3, 2);</div>
<div class="line"><span class="lineno"> 64</span> assert(</div>
<div class="line"><span class="lineno"> 65</span> ((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;3 is the answer but the function says otherwise.\n&quot;</span>, t == 3));</div>
<div class="line"><span class="lineno"> 66</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Third test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 67</span> <span class="comment">// Fourth test on 10 choose 4</span></div>
<div class="line"><span class="lineno"> 68</span> t = <a class="code hl_function" href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a>(10, 4);</div>
<div class="line"><span class="lineno"> 69</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;210 is the answer but the function says otherwise.\n&quot;</span>,</div>
<div class="line"><span class="lineno"> 70</span> t == 210));</div>
<div class="line"><span class="lineno"> 71</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;Fourth test passes.&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 72</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="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="anamespacemath_html_a6e2dff75c5de70455b90c799d6ad6967"><div class="ttname"><a href="../../dd/d47/namespacemath.html#a6e2dff75c5de70455b90c799d6ad6967">math::n_choose_r</a></div><div class="ttdeci">T n_choose_r(T n, T r)</div><div class="ttdoc">This is the function implementation of .</div><div class="ttdef"><b>Definition:</b> n_choose_r.cpp:35</div></div>
@@ -245,7 +245,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="../../d1/dbb/n__choose__r_8cpp.html">n_choose_r.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>