Documentation for 6c6747174c

This commit is contained in:
github-actions
2021-10-22 11:47:53 +00:00
parent 90b1046b2f
commit a68d9e31f0
35 changed files with 77 additions and 74 deletions

View File

@@ -12,7 +12,7 @@
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/back.html#" title=" " alt="" coords="497,72,616,99"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="479,123,635,149"/>
<area shape="rect" id="node11" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="521,173,593,200"/>
<area shape="rect" id="node12" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="521,224,593,251"/>
<area shape="rect" id="node12" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="521,224,593,251"/>
<area shape="rect" id="node15" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin.html#" title=" " alt="" coords="269,325,393,352"/>
<area shape="rect" id="node16" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="275,224,388,251"/>
<area shape="rect" id="node17" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/sort.html#" title=" " alt="" coords="297,275,366,301"/>

View File

@@ -1 +1 @@
dd7e1d2eb4a0e958401a396a3f72dc22
35506b55f9d68224f3d831d50486bbee

View File

@@ -214,7 +214,7 @@
<!-- Node12 -->
<g id="node12" class="node">
<title>Node12</title>
<g id="a_node12"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node12"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="386.5,-76.5 386.5,-95.5 440.5,-95.5 440.5,-76.5 386.5,-76.5"/>
<text text-anchor="middle" x="413.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -13,7 +13,7 @@
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/back.html#" title=" " alt="" coords="596,69,715,96"/>
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="577,120,733,147"/>
<area shape="rect" id="node12" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="619,171,691,197"/>
<area shape="rect" id="node13" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="619,221,691,248"/>
<area shape="rect" id="node13" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="619,221,691,248"/>
<area shape="rect" id="node16" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/begin.html#" title=" " alt="" coords="368,323,492,349"/>
<area shape="rect" id="node17" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/end.html#" title=" " alt="" coords="373,221,487,248"/>
<area shape="rect" id="node18" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/sort.html#" title=" " alt="" coords="395,272,465,299"/>

View File

@@ -1 +1 @@
91a255ed58ff67d3fda69b096a388299
57684c2816bfd490273435a926fa3e0e

View File

@@ -275,7 +275,7 @@ var sectionId = 'dynsection-1';
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node13"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="460.5,-76.5 460.5,-95.5 514.5,-95.5 514.5,-76.5 460.5,-76.5"/>
<text text-anchor="middle" x="487.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -229,7 +229,7 @@
<!-- Node13 -->
<g id="node13" class="node">
<title>Node13</title>
<g id="a_node13"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node13"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="460.5,-76.5 460.5,-95.5 514.5,-95.5 514.5,-76.5 460.5,-76.5"/>
<text text-anchor="middle" x="487.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -150,7 +150,7 @@ Space Complexity : \(O(N)\)</p>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_function" href="../../d8/ddf/sieve__of__eratosthenes_8cpp.html#a235843bdf82d2a6cc8596ae8fd3b8df9">print</a>(N, <a class="code hl_function" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a>);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>}</div>
<div class="ttc" id="acheck__prime_8cpp_html_aa18b3517017d99bb4024853bddba5532"><div class="ttname"><a href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a></div><div class="ttdeci">bool is_prime(T num)</div><div class="ttdef"><b>Definition:</b> check_prime.cpp:22</div></div>
<div class="ttc" id="acheck__prime_8cpp_html_aa18b3517017d99bb4024853bddba5532"><div class="ttname"><a href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a></div><div class="ttdeci">bool is_prime(T num)</div><div class="ttdoc">for IO operations</div><div class="ttdef"><b>Definition:</b> check_prime.cpp:23</div></div>
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition:</b> sparse_table.cpp:47</div></div>
<div class="ttc" id="asieve__of__eratosthenes_8cpp_html_a235843bdf82d2a6cc8596ae8fd3b8df9"><div class="ttname"><a href="../../d8/ddf/sieve__of__eratosthenes_8cpp.html#a235843bdf82d2a6cc8596ae8fd3b8df9">print</a></div><div class="ttdeci">void print(uint32_t N, const std::vector&lt; bool &gt; &amp;is_prime)</div><div class="ttdef"><b>Definition:</b> sieve_of_eratosthenes.cpp:44</div></div>
<div class="ttc" id="asieve__of__eratosthenes_8cpp_html_a7eebd5e7686a8db363f937b2f30d3818"><div class="ttname"><a href="../../d8/ddf/sieve__of__eratosthenes_8cpp.html#a7eebd5e7686a8db363f937b2f30d3818">sieve</a></div><div class="ttdeci">std::vector&lt; bool &gt; sieve(uint32_t N)</div><div class="ttdef"><b>Definition:</b> sieve_of_eratosthenes.cpp:26</div></div>

View File

@@ -1,5 +1,5 @@
<map id="print" name="print">
<area shape="rect" id="node1" title=" " alt="" coords="5,31,53,57"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="101,5,173,32"/>
<area shape="rect" id="node3" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="101,56,173,83"/>
<area shape="rect" id="node3" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="101,56,173,83"/>
</map>

View File

@@ -1 +1 @@
2f8c2e90a637c569a4e48c4d25266a85
71753a305e9935c61c80adff5939fd9a

View File

@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node3"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="72,-0.5 72,-19.5 126,-19.5 126,-0.5 72,-0.5"/>
<text text-anchor="middle" x="99" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,4 +1,4 @@
<map id="sieve" name="sieve">
<area shape="rect" id="node1" title=" " alt="" coords="5,5,59,32"/>
<area shape="rect" id="node2" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="107,5,179,32"/>
<area shape="rect" id="node2" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="107,5,179,32"/>
</map>

View File

@@ -1 +1 @@
a01e272f9d9a830835656af2290340e0
8f650d7da6bb22ec080e6cbdafff830e

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node2"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="76,-0.5 76,-19.5 130,-19.5 130,-0.5 76,-0.5"/>
<text text-anchor="middle" x="103" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -2,5 +2,5 @@
<area shape="rect" id="node1" title=" " alt="" coords="5,31,56,57"/>
<area shape="rect" id="node2" href="$d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa" title=" " alt="" coords="109,5,153,32"/>
<area shape="rect" id="node3" href="$d8/ddf/sieve__of__eratosthenes_8cpp.html#a7eebd5e7686a8db363f937b2f30d3818" title=" " alt="" coords="104,56,157,83"/>
<area shape="rect" id="node4" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="205,56,277,83"/>
<area shape="rect" id="node4" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="205,56,277,83"/>
</map>

View File

@@ -1 +1 @@
22f81b079611b763df85f7dde7633cdf
297d7cc852761059172d520e88256c85

View File

@@ -51,7 +51,7 @@
<!-- Node4 -->
<g id="node4" class="node">
<title>Node4</title>
<g id="a_node4"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node4"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="150,-0.5 150,-19.5 204,-19.5 204,-0.5 150,-0.5"/>
<text text-anchor="middle" x="177" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -1,6 +1,6 @@
<map id="main" name="main">
<area shape="rect" id="node1" title=" " alt="" coords="5,59,56,86"/>
<area shape="rect" id="node2" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="323,8,395,35"/>
<area shape="rect" id="node2" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="323,8,395,35"/>
<area shape="rect" id="node3" href="$d8/ddf/sieve__of__eratosthenes_8cpp.html#a235843bdf82d2a6cc8596ae8fd3b8df9" title=" " alt="" coords="105,34,153,60"/>
<area shape="rect" id="node5" href="$d8/ddf/sieve__of__eratosthenes_8cpp.html#a7eebd5e7686a8db363f937b2f30d3818" title=" " alt="" coords="212,110,265,136"/>
<area shape="rect" id="node6" href="$d8/ddf/sieve__of__eratosthenes_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9" title=" " alt="" coords="104,135,155,162"/>

View File

@@ -1 +1 @@
1322414ac99b02b42ed9f079121b0540
38dcf03138371d66680d5ebf48bad9cb

View File

@@ -21,7 +21,7 @@
<!-- Node2 -->
<g id="node2" class="node">
<title>Node2</title>
<g id="a_node2"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node2"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="238,-114.5 238,-133.5 292,-133.5 292,-114.5 238,-114.5"/>
<text text-anchor="middle" x="265" y="-121.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -6,5 +6,5 @@
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="387,56,543,83"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="407,107,522,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="429,157,501,184"/>
<area shape="rect" id="node8" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="429,208,501,235"/>
<area shape="rect" id="node8" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="429,208,501,235"/>
</map>

View File

@@ -1 +1 @@
c7dd5f787f6905f619ecb2f1305e0a0c
dc5b2b161b4fb4ce25e1d47b6a5e80b4

View File

@@ -112,7 +112,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node8"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="317.5,-0.5 317.5,-19.5 371.5,-19.5 371.5,-0.5 317.5,-0.5"/>
<text text-anchor="middle" x="344.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -9,5 +9,5 @@
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="387,72,543,99"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="407,123,522,149"/>
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="429,173,501,200"/>
<area shape="rect" id="node10" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="429,224,501,251"/>
<area shape="rect" id="node10" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="429,224,501,251"/>
</map>

View File

@@ -1 +1 @@
fff1ea433f7e8b2767fbb6b885ebdd98
6e6b00aff1290eb8440957a48e1b1d3a

View File

@@ -157,7 +157,7 @@
<!-- Node10 -->
<g id="node10" class="node">
<title>Node10</title>
<g id="a_node10"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node10"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="317.5,-0.5 317.5,-19.5 371.5,-19.5 371.5,-0.5 317.5,-0.5"/>
<text text-anchor="middle" x="344.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@@ -6,5 +6,5 @@
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="387,56,543,83"/>
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="407,107,522,133"/>
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="429,157,501,184"/>
<area shape="rect" id="node8" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="429,208,501,235"/>
<area shape="rect" id="node8" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="429,208,501,235"/>
</map>

View File

@@ -1 +1 @@
89fa3e8dc2e843084451722be443a20b
ad49d2bd2c8d03f3a65bb6297659de3f

View File

@@ -112,7 +112,7 @@
<!-- Node8 -->
<g id="node8" class="node">
<title>Node8</title>
<g id="a_node8"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node8"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="317.5,-0.5 317.5,-19.5 371.5,-19.5 371.5,-0.5 317.5,-0.5"/>
<text text-anchor="middle" x="344.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('db/d93/check__prime_8cpp.html','../../
</div><!--header-->
<div class="contents">
<p>Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+2 jumping on all odd numbers only. If number is &lt;= 1 or if it is even except 2, break the loop and return false telling number is not prime.
<p>Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+6 jumping and check for i or i+2 to be a factor of the number; if it's a factor then we will return false otherwise true after the loop terminates at the terminating condition which is (i*i&lt;=num)
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
@@ -111,12 +111,13 @@ Include dependency graph for check_prime.cpp:</div>
Functions</h2></td></tr>
<tr class="memitem:aa18b3517017d99bb4024853bddba5532"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aa18b3517017d99bb4024853bddba5532"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a> (T num)</td></tr>
<tr class="memdesc:aa18b3517017d99bb4024853bddba5532"><td class="mdescLeft">&#160;</td><td class="mdescRight">for IO operations <a href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">More...</a><br /></td></tr>
<tr class="separator:aa18b3517017d99bb4024853bddba5532"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d93/check__prime_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+2 jumping on all odd numbers only. If number is &lt;= 1 or if it is even except 2, break the loop and return false telling number is not prime. </p>
<div class="textblock"><p >Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+6 jumping and check for i or i+2 to be a factor of the number; if it's a factor then we will return false otherwise true after the loop terminates at the terminating condition which is (i*i&lt;=num) </p>
<p >Copyright 2020 </p><dl class="section author"><dt>Author</dt><dd>omkarlanghe</dd></dl>
<p>A simple program to check if the given number if prime or not. </p>
</div><h2 class="groupheader">Function Documentation</h2>
@@ -137,32 +138,34 @@ template&lt;typename T &gt; </div>
</tr>
</table>
</div><div class="memdoc">
<p >Function to check if the given number is prime or not. </p><dl class="params"><dt>Parameters</dt><dd>
<p>for IO operations </p>
<p >for assert Function to check if the given number is prime or not. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">num</td><td>number to be checked. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>if number is prime, it returns @ true, else it returns @ false. </dd></dl>
<div class="fragment"><div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> {</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">if</span> (num &lt;= 1) {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (num == 2) {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((num &amp; 1) == 0) {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">if</span> (num &gt;= 3) {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">for</span> (T i = 3; (i * i) &lt;= (num); i = (i + 2)) {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">if</span> ((num % i) == 0) {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> }</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">return</span> (result);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>}</div>
<div class="fragment"><div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">if</span> (num &lt;= 1) {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (num == 2 || num==3) {</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((num%2) == 0 || num%3 == 0) {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> }</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">for</span> (T i = 5; (i * i) &lt;= (num); i = (i + 6)) {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">if</span> ((num % i) == 0 || (num%(i+2)==0 )) {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> }</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> (result);</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>}</div>
<div class="ttc" id="afibonacci__sum_8cpp_html_aadb40ac4c74a7efc0680b83eeee138aa"><div class="ttname"><a href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">math::fibonacci_sum::result</a></div><div class="ttdeci">uint64_t result(uint64_t n)</div><div class="ttdef"><b>Definition:</b> fibonacci_sum.cpp:76</div></div>
</div><!-- fragment -->
</div>
@@ -183,26 +186,26 @@ template&lt;typename T &gt; </div>
</table>
</div><div class="memdoc">
<p >Main function </p>
<div class="fragment"><div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="comment">// perform self-test</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> assert(<a class="code hl_function" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a>(50) == <span class="keyword">false</span>);</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> assert(<a class="code hl_function" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a>(115249) == <span class="keyword">true</span>);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordtype">int</span> num = 0;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</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;Enter the number to check if it is prime or not&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="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; num;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <a class="code hl_function" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a>(num);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">if</span> (result) {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; num &lt;&lt; <span class="stringliteral">&quot; is a prime number&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="l00056" name="l00056"></a><span class="lineno"> 56</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; num &lt;&lt; <span class="stringliteral">&quot; is not a prime number&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="l00058" name="l00058"></a><span class="lineno"> 58</span> }</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>}</div>
<div class="fragment"><div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> {</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="comment">// perform self-test</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> assert(<a class="code hl_function" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a>(50) == <span class="keyword">false</span>);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> assert(<a class="code hl_function" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a>(115249) == <span class="keyword">true</span>);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordtype">int</span> num = 0;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</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;Enter the number to check if it is prime or not&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="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> &gt;&gt; num;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <a class="code hl_function" href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a>(num);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">if</span> (result) {</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; num &lt;&lt; <span class="stringliteral">&quot; is a prime number&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="keywordflow">else</span> {</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; num &lt;&lt; <span class="stringliteral">&quot; is not a prime number&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="l00059" name="l00059"></a><span class="lineno"> 59</span> }</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>}</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="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="acheck__prime_8cpp_html_aa18b3517017d99bb4024853bddba5532"><div class="ttname"><a href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a></div><div class="ttdeci">bool is_prime(T num)</div><div class="ttdef"><b>Definition:</b> check_prime.cpp:22</div></div>
<div class="ttc" id="acheck__prime_8cpp_html_aa18b3517017d99bb4024853bddba5532"><div class="ttname"><a href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532">is_prime</a></div><div class="ttdeci">bool is_prime(T num)</div><div class="ttdoc">for IO operations</div><div class="ttdef"><b>Definition:</b> check_prime.cpp:23</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><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>

View File

@@ -1,5 +1,5 @@
<map id="main" name="main">
<area shape="rect" id="node1" title=" " alt="" coords="5,31,56,57"/>
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="104,5,176,32"/>
<area shape="rect" id="node3" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title=" " alt="" coords="104,56,176,83"/>
<area shape="rect" id="node3" href="$db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" title="for IO operations" alt="" coords="104,56,176,83"/>
</map>

View File

@@ -1 +1 @@
db1b10fd19ccab62097e4c0ee967129c
6ceb0935300be7e2bbb3ed1b2acfd585

View File

@@ -36,7 +36,7 @@
<!-- Node3 -->
<g id="node3" class="node">
<title>Node3</title>
<g id="a_node3"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title=" ">
<g id="a_node3"><a xlink:href="../../db/d93/check__prime_8cpp.html#aa18b3517017d99bb4024853bddba5532" target="_top" xlink:title="for IO operations">
<polygon fill="white" stroke="black" points="74,-0.5 74,-19.5 128,-19.5 128,-0.5 74,-0.5"/>
<text text-anchor="middle" x="101" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">is_prime</text>
</a>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -112,7 +112,7 @@ Files</h2></td></tr>
<tr class="memdesc:d8/dd5/check__factorial_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple program to check if the given number is a factorial of some number or not. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="db/d93/check__prime_8cpp.html">check_prime.cpp</a></td></tr>
<tr class="memdesc:db/d93/check__prime_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+2 jumping on all odd numbers only. If number is &lt;= 1 or if it is even except 2, break the loop and return false telling number is not prime. <br /></td></tr>
<tr class="memdesc:db/d93/check__prime_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+6 jumping and check for i or i+2 to be a factor of the number; if it's a factor then we will return false otherwise true after the loop terminates at the terminating condition which is (i*i&lt;=num) <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="d5/d67/complex__numbers_8cpp.html">complex_numbers.cpp</a></td></tr>
<tr class="memdesc:d5/d67/complex__numbers_8cpp"><td class="mdescLeft">&#160;</td><td class="mdescRight">An implementation of <a class="el" href="da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Number as Objects. <br /></td></tr>

View File

@@ -204,7 +204,7 @@ solve-a-rat-in-a-maze-c-java-pytho/" </td></tr>
<tr id="row_14_2_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d8/db1/binomial__calculate_8cpp.html" target="_self">binomial_calculate.cpp</a></td><td class="desc">Program to calculate <a href="https://en.wikipedia.org/wiki/Binomial_coefficient" target="_blank">Binomial coefficients</a> </td></tr>
<tr id="row_14_3_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d5/df6/check__amicable__pair_8cpp.html" target="_self">check_amicable_pair.cpp</a></td><td class="desc">A C++ Program to check whether a pair of number is <a href="https://en.wikipedia.org/wiki/Amicable_numbers" target="_blank">amicable pair</a> or not </td></tr>
<tr id="row_14_4_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d8/dd5/check__factorial_8cpp.html" target="_self">check_factorial.cpp</a></td><td class="desc">A simple program to check if the given number is a factorial of some number or not </td></tr>
<tr id="row_14_5_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="db/d93/check__prime_8cpp.html" target="_self">check_prime.cpp</a></td><td class="desc">Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+2 jumping on all odd numbers only. If number is &lt;= 1 or if it is even except 2, break the loop and return false telling number is not prime </td></tr>
<tr id="row_14_5_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="db/d93/check__prime_8cpp.html" target="_self">check_prime.cpp</a></td><td class="desc">Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+6 jumping and check for i or i+2 to be a factor of the number; if it's a factor then we will return false otherwise true after the loop terminates at the terminating condition which is (i*i&lt;=num) </td></tr>
<tr id="row_14_6_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d5/d67/complex__numbers_8cpp.html" target="_self">complex_numbers.cpp</a></td><td class="desc">An implementation of <a class="el" href="da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Number as Objects </td></tr>
<tr id="row_14_7_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="d7/d89/double__factorial_8cpp.html" target="_self">double_factorial.cpp</a></td><td class="desc">Compute <a href="https://en.wikipedia.org/wiki/Double_factorial" target="_blank">double factorial</a>: \(n!!\) </td></tr>
<tr id="row_14_8_" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="da/d23/eulers__totient__function_8cpp.html" target="_self">eulers_totient_function.cpp</a></td><td class="desc">C++ Program to find <a href="https://en.wikipedia.org/wiki/Euler%27s_totient_function" target="_blank">Euler's Totient</a> function </td></tr>