mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-23 21:32:09 +08:00
Documentation for c26eea874d
This commit is contained in:
@@ -4,7 +4,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.12.0"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: bit_manipulation/power_of_2.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
@@ -60,7 +60,7 @@ window.MathJax = {
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -124,11 +124,12 @@ $(function(){initNavTree('dc/d6d/power__of__2_8cpp_source.html','../../'); initR
|
||||
<div class="headertitle"><div class="title">power_of_2.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../dc/d6d/power__of__2_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<a href="../../dc/d6d/power__of__2_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <cstdint></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span></div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d7/d81/namespacebit__manipulation.html">bit_manipulation</a> {</div>
|
||||
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="../../d7/d81/namespacebit__manipulation.html#a5032470c9974bbd6ec254bf296530a5f"> 32</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../d7/d81/namespacebit__manipulation.html#a5032470c9974bbd6ec254bf296530a5f">isPowerOfTwo</a>(std ::int64_t n) { <span class="comment">// int64_t is preferred over int so that</span></div>
|
||||
@@ -144,7 +145,7 @@ $(function(){initNavTree('dc/d6d/power__of__2_8cpp_source.html','../../'); initR
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>} <span class="comment">// namespace bit_manipulation</span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span></div>
|
||||
<div class="foldopen" id="foldopen00049" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="../../dc/d6d/power__of__2_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 49</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d6d/power__of__2_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// n = 4 return true</span></div>
|
||||
@@ -166,6 +167,7 @@ $(function(){initNavTree('dc/d6d/power__of__2_8cpp_source.html','../../'); initR
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> std::cout << <span class="stringliteral">"All test cases successfully passed!"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span></div>
|
||||
<div class="foldopen" id="foldopen00072" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="../../dc/d6d/power__of__2_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 72</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../dc/d6d/power__of__2_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_function" href="../../dc/d6d/power__of__2_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
@@ -182,7 +184,7 @@ $(function(){initNavTree('dc/d6d/power__of__2_8cpp_source.html','../../'); initR
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_f3c4fbc4e901afa0a54d0623c5574aa7.html">bit_manipulation</a></li><li class="navelem"><a class="el" href="../../dc/d6d/power__of__2_8cpp.html">power_of_2.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.12.0 </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.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user