mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-10 14:07:06 +08:00
Documentation for 67e26cfbae
This commit is contained in:
240
de/dab/ncr__modulo__p_8cpp.html
Normal file
240
de/dab/ncr__modulo__p_8cpp.html
Normal file
@@ -0,0 +1,240 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.20"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: math/ncr_modulo_p.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Algorithms_in_C++
|
||||
 <span id="projectnumber">1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.20 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('de/dab/ncr__modulo__p_8cpp.html','../../'); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">ncr_modulo_p.cpp File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This program aims at calculating <a href="https://cp-algorithms.com/combinatorics/binomial-coefficients.html">nCr modulo p</a>.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <vector></code><br />
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for ncr_modulo_p.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d4/d25/ncr__modulo__p_8cpp__incl.svg" width="256" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">math::ncr_modulo_p::NCRModuloP</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class which contains all methods required for calculating nCr mod p. <a href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr class="memitem:dd/d47/namespacemath"><td class="memItemLeft" align="right" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d47/namespacemath.html">math</a></td></tr>
|
||||
<tr class="memdesc:dd/d47/namespacemath"><td class="mdescLeft"> </td><td class="mdescRight">for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html" title="STL class.">std::vector</a> <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:d4/db9/namespacencr__modulo__p"><td class="memItemLeft" align="right" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/db9/namespacencr__modulo__p.html">ncr_modulo_p</a></td></tr>
|
||||
<tr class="memdesc:d4/db9/namespacencr__modulo__p"><td class="mdescLeft"> </td><td class="mdescRight">Functions for <a href="https://cp-algorithms.com/combinatorics/binomial-coefficients.html">nCr modulo p</a> implementation. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:af0a3e6827f41c151e47451f5ff98b1f1"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dab/ncr__modulo__p_8cpp.html#af0a3e6827f41c151e47451f5ff98b1f1">tests</a> (<a class="el" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">math::ncr_modulo_p::NCRModuloP</a> ncrObj)</td></tr>
|
||||
<tr class="memdesc:af0a3e6827f41c151e47451f5ff98b1f1"><td class="mdescLeft"> </td><td class="mdescRight">Test implementations. <a href="../../de/dab/ncr__modulo__p_8cpp.html#af0a3e6827f41c151e47451f5ff98b1f1">More...</a><br /></td></tr>
|
||||
<tr class="separator:af0a3e6827f41c151e47451f5ff98b1f1"><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="../../de/dab/ncr__modulo__p_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft"> </td><td class="mdescRight">Main function. <a href="../../de/dab/ncr__modulo__p_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>This program aims at calculating <a href="https://cp-algorithms.com/combinatorics/binomial-coefficients.html">nCr modulo p</a>. </p>
|
||||
<p>nCr is defined as n! / (r! * (n-r)!) where n! represents factorial of n. In many cases, the value of nCr is too large to fit in a 64 bit integer. Hence, in competitive programming, there are many problems or subproblems to compute nCr modulo p where p is a given number. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/KaustubhDamania">Kaustubh Damania</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  {</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">// populate the fac array</span></div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keyword">const</span> uint64_t size = 1e6 + 1;</div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keyword">const</span> uint64_t p = 1e9 + 7;</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="code" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">math::ncr_modulo_p::NCRModuloP</a> ncrObj =</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">math::ncr_modulo_p::NCRModuloP</a>(size, p);</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="comment">// test 6Ci for i=0 to 7</span></div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i <= 7; i++) {</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << 6 << <span class="stringliteral">"C"</span> << i << <span class="stringliteral">" = "</span> << ncrObj.<a class="code" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08">ncr</a>(6, i, p) << <span class="stringliteral">"\n"</span>;</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  }</div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="../../de/dab/ncr__modulo__p_8cpp.html#af0a3e6827f41c151e47451f5ff98b1f1">tests</a>(ncrObj); <span class="comment">// execute the tests</span></div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Assertions passed\n"</span>;</div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="af0a3e6827f41c151e47451f5ff98b1f1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af0a3e6827f41c151e47451f5ff98b1f1">◆ </a></span>tests()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static void tests </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">math::ncr_modulo_p::NCRModuloP</a> </td>
|
||||
<td class="paramname"><em>ncrObj</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test implementations. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">ncrObj</td><td>object which contains the precomputed factorial values and ncr function </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  {</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="comment">// (52323 C 26161) % (1e9 + 7) = 224944353</span></div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  assert(ncrObj.<a class="code" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08">ncr</a>(52323, 26161, 1000000007) == 224944353);</div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="comment">// 6 C 2 = 30, 30%5 = 0</span></div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  assert(ncrObj.<a class="code" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08">ncr</a>(6, 2, 5) == 0);</div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="comment">// 7C3 = 35, 35 % 29 = 8</span></div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  assert(ncrObj.<a class="code" href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08">ncr</a>(7, 3, 29) == 6);</div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../de/dab/ncr__modulo__p_8cpp_af0a3e6827f41c151e47451f5ff98b1f1_cgraph.svg" width="100%" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="ancr__modulo__p_8cpp_html_af0a3e6827f41c151e47451f5ff98b1f1"><div class="ttname"><a href="../../de/dab/ncr__modulo__p_8cpp.html#af0a3e6827f41c151e47451f5ff98b1f1">tests</a></div><div class="ttdeci">static void tests(math::ncr_modulo_p::NCRModuloP ncrObj)</div><div class="ttdoc">Test implementations.</div><div class="ttdef"><b>Definition:</b> ncr_modulo_p.cpp:124</div></div>
|
||||
<div class="ttc" id="aclassmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p_html"><div class="ttname"><a href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">math::ncr_modulo_p::NCRModuloP</a></div><div class="ttdoc">Class which contains all methods required for calculating nCr mod p.</div><div class="ttdef"><b>Definition:</b> ncr_modulo_p.cpp:31</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="aclassmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p_html_a6b95277f5f527beacc8d0f3bc91fcd08"><div class="ttname"><a href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08">math::ncr_modulo_p::NCRModuloP::ncr</a></div><div class="ttdeci">int64_t ncr(const uint64_t &n, const uint64_t &r, const uint64_t &p)</div><div class="ttdef"><b>Definition:</b> ncr_modulo_p.cpp:92</div></div>
|
||||
<!-- start footer part -->
|
||||
<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="../../de/dab/ncr__modulo__p_8cpp.html">ncr_modulo_p.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
6
de/dab/ncr__modulo__p_8cpp.js
Normal file
6
de/dab/ncr__modulo__p_8cpp.js
Normal file
@@ -0,0 +1,6 @@
|
||||
var ncr__modulo__p_8cpp =
|
||||
[
|
||||
[ "NCRModuloP", "d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html", "d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p" ],
|
||||
[ "main", "de/dab/ncr__modulo__p_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
|
||||
[ "tests", "de/dab/ncr__modulo__p_8cpp.html#af0a3e6827f41c151e47451f5ff98b1f1", null ]
|
||||
];
|
||||
@@ -0,0 +1,7 @@
|
||||
<map id="tests" name="tests">
|
||||
<area shape="rect" id="node1" title="Test implementations." alt="" coords="5,13,56,39"/>
|
||||
<area shape="rect" id="node2" href="$d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08" title=" " alt="" coords="104,5,244,47"/>
|
||||
<area shape="rect" id="node3" href="$d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a0431ec5c876e1154d8e1e5f89e1ab34a" title=" " alt="" coords="292,5,479,47"/>
|
||||
<area shape="rect" id="node4" href="$d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#afde201f4687740454302c444f507a926" title=" " alt="" coords="527,5,721,47"/>
|
||||
<area shape="rect" id="node5" href="$d4/da0/gcd__iterative__euclidean_8cpp.html#ae48807fa2b7000afae599e67f327545e" title=" " alt="" coords="769,13,812,39"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
a538ae273576cdda42d3b4905d6266ef
|
||||
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: tests Pages: 1 -->
|
||||
<!--zoomable 39 -->
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
|
||||
<style type="text/css"><![CDATA[
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="text/javascript"><![CDATA[
|
||||
var edges = document.getElementsByTagName('g');
|
||||
if (edges && edges.length) {
|
||||
for (var i=0;i<edges.length;i++) {
|
||||
if (edges[i].id.substr(0,4)=='edge') {
|
||||
edges[i].setAttribute('class','edge');
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></script>
|
||||
<defs>
|
||||
<circle id="rim" cx="0" cy="0" r="7"/>
|
||||
<circle id="rim2" cx="0" cy="0" r="3.5"/>
|
||||
<g id="zoomPlus">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/>
|
||||
</use>
|
||||
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="zoomMin">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/>
|
||||
</use>
|
||||
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="dirArrow">
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="resetDef">
|
||||
<use xlink:href="#rim2" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/>
|
||||
</use>
|
||||
</g>
|
||||
</defs>
|
||||
|
||||
<script type="text/javascript">
|
||||
var viewWidth = 613;
|
||||
var viewHeight = 39;
|
||||
var sectionId = 'dynsection-1';
|
||||
</script>
|
||||
<script xlink:href="../../svgpan.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>tests</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 609,-35 609,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Test implementations.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-6 0,-25 38,-25 38,-6 0,-6"/>
|
||||
<text text-anchor="middle" x="19" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-0.5 74,-30.5 179,-30.5 179,-0.5 74,-0.5"/>
|
||||
<text text-anchor="start" x="82" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">math::ncr_modulo_p</text>
|
||||
<text text-anchor="middle" x="126.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::NCRModuloP::ncr</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.38,-15.5C45.66,-15.5 54.49,-15.5 63.7,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="63.79,-19 73.79,-15.5 63.79,-12 63.79,-19"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a0431ec5c876e1154d8e1e5f89e1ab34a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="215,-0.5 215,-30.5 355,-30.5 355,-0.5 215,-0.5"/>
|
||||
<text text-anchor="start" x="223" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">math::ncr_modulo_p</text>
|
||||
<text text-anchor="middle" x="285" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::NCRModuloP::modInverse</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M179.18,-15.5C187.37,-15.5 196,-15.5 204.65,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="204.79,-19 214.79,-15.5 204.79,-12 204.79,-19"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#afde201f4687740454302c444f507a926" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="391,-0.5 391,-30.5 537,-30.5 537,-0.5 391,-0.5"/>
|
||||
<text text-anchor="start" x="399" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">math::ncr_modulo_p</text>
|
||||
<text text-anchor="middle" x="464" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::NCRModuloP::gcdExtended</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M355.19,-15.5C363.63,-15.5 372.3,-15.5 380.9,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="380.94,-19 390.94,-15.5 380.94,-12 380.94,-19"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:href="../../d4/da0/gcd__iterative__euclidean_8cpp.html#ae48807fa2b7000afae599e67f327545e" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="573,-6 573,-25 605,-25 605,-6 573,-6"/>
|
||||
<text text-anchor="middle" x="589" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">gcd</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M537.26,-15.5C546.26,-15.5 554.93,-15.5 562.49,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="562.67,-19 572.67,-15.5 562.67,-12 562.67,-19"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<g id="navigator" transform="translate(0 0)" fill="#404254">
|
||||
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
|
||||
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
|
||||
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
|
||||
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
|
||||
<g id="arrowUp" xlink:href="#dirArrow" transform="translate(30 24)" onmousedown="handlePan(0,-1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowUp.mouseover" end="arrowUp.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowRight" xlink:href="#dirArrow" transform="rotate(90) translate(36 -43)" onmousedown="handlePan(1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowRight.mouseover" end="arrowRight.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowDown" xlink:href="#dirArrow" transform="rotate(180) translate(-30 -48)" onmousedown="handlePan(0,1)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowDown.mouseover" end="arrowDown.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowLeft" xlink:href="#dirArrow" transform="rotate(270) translate(-36 17)" onmousedown="handlePan(-1,0)">
|
||||
<use xlink:href="#rim" fill="#404040">
|
||||
<set attributeName="fill" to="#808080" begin="arrowLeft.mouseover" end="arrowLeft.mouseout"/>
|
||||
</use>
|
||||
<path fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
</g>
|
||||
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
|
||||
<g id="arrow_out" transform="scale(0.3 0.3)">
|
||||
<a xlink:href="ncr__modulo__p_8cpp_af0a3e6827f41c151e47451f5ff98b1f1_cgraph_org.svg" target="_base">
|
||||
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
|
||||
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
|
||||
<path id="arrow"
|
||||
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
|
||||
style="fill:#404040;"/>
|
||||
</a>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.2 KiB |
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: tests Pages: 1 -->
|
||||
<svg width="613pt" height="39pt"
|
||||
viewBox="0.00 0.00 613.00 39.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 35)">
|
||||
<title>tests</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 609,-35 609,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title="Test implementations.">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-6 0,-25 38,-25 38,-6 0,-6"/>
|
||||
<text text-anchor="middle" x="19" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a6b95277f5f527beacc8d0f3bc91fcd08" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-0.5 74,-30.5 179,-30.5 179,-0.5 74,-0.5"/>
|
||||
<text text-anchor="start" x="82" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">math::ncr_modulo_p</text>
|
||||
<text text-anchor="middle" x="126.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::NCRModuloP::ncr</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M38.38,-15.5C45.66,-15.5 54.49,-15.5 63.7,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="63.79,-19 73.79,-15.5 63.79,-12 63.79,-19"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#a0431ec5c876e1154d8e1e5f89e1ab34a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="215,-0.5 215,-30.5 355,-30.5 355,-0.5 215,-0.5"/>
|
||||
<text text-anchor="start" x="223" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">math::ncr_modulo_p</text>
|
||||
<text text-anchor="middle" x="285" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::NCRModuloP::modInverse</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M179.18,-15.5C187.37,-15.5 196,-15.5 204.65,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="204.79,-19 214.79,-15.5 204.79,-12 204.79,-19"/>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:href="../../d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html#afde201f4687740454302c444f507a926" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="391,-0.5 391,-30.5 537,-30.5 537,-0.5 391,-0.5"/>
|
||||
<text text-anchor="start" x="399" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">math::ncr_modulo_p</text>
|
||||
<text text-anchor="middle" x="464" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">::NCRModuloP::gcdExtended</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<path fill="none" stroke="midnightblue" d="M355.19,-15.5C363.63,-15.5 372.3,-15.5 380.9,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="380.94,-19 390.94,-15.5 380.94,-12 380.94,-19"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a xlink:href="../../d4/da0/gcd__iterative__euclidean_8cpp.html#ae48807fa2b7000afae599e67f327545e" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="573,-6 573,-25 605,-25 605,-6 573,-6"/>
|
||||
<text text-anchor="middle" x="589" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">gcd</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M537.26,-15.5C546.26,-15.5 554.93,-15.5 562.49,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="562.67,-19 572.67,-15.5 562.67,-12 562.67,-19"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user