mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-12 11:37:18 +08:00
Documentation for 8b1eab204b
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- HTML header for doxygen 1.12.0-->
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
@@ -5,10 +6,15 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: others/spiral_print.cpp File Reference</title>
|
||||
<title>TheAlgorithms/C++: others/spiral_print.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
<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>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
@@ -18,14 +24,24 @@
|
||||
<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 type="text/javascript">
|
||||
window.MathJax = {
|
||||
options: {
|
||||
ignoreHtmlClass: 'tex2jax_ignore',
|
||||
processHtmlClass: 'tex2jax_process'
|
||||
},
|
||||
loader: {
|
||||
load: ['[tex]/ams']
|
||||
},
|
||||
tex: {
|
||||
macros: {},
|
||||
packages: ['base','configmacros','ams']
|
||||
}
|
||||
};
|
||||
</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>
|
||||
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -118,7 +135,9 @@ Include dependency graph for spiral_print.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d7/d4c/spiral__print_8cpp__incl.svg" width="160" height="111"><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">
|
||||
</div>
|
||||
<p><a href="../../db/d07/spiral__print_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:acfff36db81326fb990a643ab198ee8a5" id="r_acfff36db81326fb990a643ab198ee8a5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#acfff36db81326fb990a643ab198ee8a5">genArray</a> (int **a, int r, int c)</td></tr>
|
||||
@@ -130,6 +149,8 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Print the elements of a matrix traversing it spirally. </p>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="../../db/d07/spiral__print_8cpp_source.html">spiral_print.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="acfff36db81326fb990a643ab198ee8a5" name="acfff36db81326fb990a643ab198ee8a5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#acfff36db81326fb990a643ab198ee8a5">◆ </a></span>genArray()</h2>
|
||||
@@ -162,25 +183,20 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../db/d07/spiral__print_8cpp_source.html#l00012">12</a> of file <a class="el" href="../../db/d07/spiral__print_8cpp_source.html">spiral_print.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 12</span> {</div>
|
||||
<div class="line"><span class="lineno"> 13</span> <span class="keywordtype">int</span> value = 1;</div>
|
||||
<div class="line"><span class="lineno"> 14</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < r; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 15</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < c; j++) {</div>
|
||||
<div class="line"><span class="lineno"> 16</span> a[i][j] = value;</div>
|
||||
<div class="line"><span class="lineno"> 17</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << a[i][j] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 17</span> std::cout << a[i][j] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 18</span> value++;</div>
|
||||
<div class="line"><span class="lineno"> 19</span> }</div>
|
||||
<div class="line"><span class="lineno"> 20</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <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"> 20</span> std::cout << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 21</span> }</div>
|
||||
<div class="line"><span class="lineno"> 22</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><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/d07/spiral__print_8cpp_acfff36db81326fb990a643ab198ee8a5_cgraph.svg" width="204" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
@@ -198,9 +214,11 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>main function </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../db/d07/spiral__print_8cpp_source.html#l00069">69</a> of file <a class="el" href="../../db/d07/spiral__print_8cpp_source.html">spiral_print.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 69</span> {</div>
|
||||
<div class="line"><span class="lineno"> 70</span> <span class="keywordtype">int</span> r, c;</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_istream.html">std::cin</a> >> r >> c;</div>
|
||||
<div class="line"><span class="lineno"> 71</span> std::cin >> r >> c;</div>
|
||||
<div class="line"><span class="lineno"> 72</span> <span class="keywordtype">int</span> **a = <span class="keyword">new</span> <span class="keywordtype">int</span> *[r];</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < r; i++) a[i] = <span class="keyword">new</span> <span class="keywordtype">int</span>[c];</div>
|
||||
<div class="line"><span class="lineno"> 74</span> </div>
|
||||
@@ -211,15 +229,9 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 79</span> <span class="keyword">delete</span>[] a;</div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 81</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="aspiral__print_8cpp_html_a850d3f55e1a8d227176cdcc67352c197"><div class="ttname"><a href="#a850d3f55e1a8d227176cdcc67352c197">spiralPrint</a></div><div class="ttdeci">void spiralPrint(int **a, int r, int c)</div><div class="ttdef"><b>Definition</b> spiral_print.cpp:29</div></div>
|
||||
<div class="ttc" id="aspiral__print_8cpp_html_acfff36db81326fb990a643ab198ee8a5"><div class="ttname"><a href="#acfff36db81326fb990a643ab198ee8a5">genArray</a></div><div class="ttdeci">void genArray(int **a, int r, int c)</div><div class="ttdef"><b>Definition</b> spiral_print.cpp:12</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/d07/spiral__print_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="307" height="86"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
<div class="ttc" id="aspiral__print_8cpp_html_a850d3f55e1a8d227176cdcc67352c197"><div class="ttname"><a href="#a850d3f55e1a8d227176cdcc67352c197">spiralPrint</a></div><div class="ttdeci">void spiralPrint(int **a, int r, int c)</div><div class="ttdef"><b>Definition</b> <a href="../../db/d07/spiral__print_8cpp_source.html#l00029">spiral_print.cpp:29</a></div></div>
|
||||
<div class="ttc" id="aspiral__print_8cpp_html_acfff36db81326fb990a643ab198ee8a5"><div class="ttname"><a href="#acfff36db81326fb990a643ab198ee8a5">genArray</a></div><div class="ttdeci">void genArray(int **a, int r, int c)</div><div class="ttdef"><b>Definition</b> <a href="../../db/d07/spiral__print_8cpp_source.html#l00012">spiral_print.cpp:12</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a850d3f55e1a8d227176cdcc67352c197" name="a850d3f55e1a8d227176cdcc67352c197"></a>
|
||||
@@ -257,40 +269,38 @@ Here is the call graph for this function:</div>
|
||||
<p>Print the end col</p>
|
||||
<p>Print the end row</p>
|
||||
<p>Print the start Col</p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../db/d07/spiral__print_8cpp_source.html#l00029">29</a> of file <a class="el" href="../../db/d07/spiral__print_8cpp_source.html">spiral_print.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 29</span> {</div>
|
||||
<div class="line"><span class="lineno"> 30</span> <span class="keywordtype">int</span> startRow = 0, endRow = r - 1;</div>
|
||||
<div class="line"><span class="lineno"> 31</span> <span class="keywordtype">int</span> startCol = 0, endCol = c - 1;</div>
|
||||
<div class="line"><span class="lineno"> 32</span> <span class="keywordtype">int</span> cnt = 0;</div>
|
||||
<div class="line"><span class="lineno"> 33</span> </div>
|
||||
<div class="line"><span class="lineno"> 34</span> <span class="keywordflow">while</span> (startRow <= endRow && startCol <= endCol) {<span class="comment"></span></div>
|
||||
<div class="line"><span class="lineno"> 35</span><span class="comment"> /// Print start row</span></div>
|
||||
<div class="line"><span class="lineno"> 36</span><span class="comment"></span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = startCol; i <= endCol; i++, cnt++) {</div>
|
||||
<div class="line"><span class="lineno"> 37</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << a[startRow][i] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 34</span> <span class="keywordflow">while</span> (startRow <= endRow && startCol <= endCol) {</div>
|
||||
<div class="line"><span class="lineno"> 36</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = startCol; i <= endCol; i++, cnt++) {</div>
|
||||
<div class="line"><span class="lineno"> 37</span> std::cout << a[startRow][i] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 38</span> }</div>
|
||||
<div class="line"><span class="lineno"> 39</span> startRow++;</div>
|
||||
<div class="line"><span class="lineno"> 40</span><span class="comment"></span> </div>
|
||||
<div class="line"><span class="lineno"> 41</span><span class="comment"> /// Print the end col</span></div>
|
||||
<div class="line"><span class="lineno"> 42</span><span class="comment"></span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = startRow; i <= endRow; i++, cnt++) {</div>
|
||||
<div class="line"><span class="lineno"> 43</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << a[i][endCol] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 40</span> </div>
|
||||
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = startRow; i <= endRow; i++, cnt++) {</div>
|
||||
<div class="line"><span class="lineno"> 43</span> std::cout << a[i][endCol] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 44</span> }</div>
|
||||
<div class="line"><span class="lineno"> 45</span> endCol--;</div>
|
||||
<div class="line"><span class="lineno"> 46</span><span class="comment"></span> </div>
|
||||
<div class="line"><span class="lineno"> 47</span><span class="comment"> /// Print the end row</span></div>
|
||||
<div class="line"><span class="lineno"> 48</span><span class="comment"></span> <span class="keywordflow">if</span> (cnt == r * c) {</div>
|
||||
<div class="line"><span class="lineno"> 46</span> </div>
|
||||
<div class="line"><span class="lineno"> 48</span> <span class="keywordflow">if</span> (cnt == r * c) {</div>
|
||||
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><span class="lineno"> 50</span> }</div>
|
||||
<div class="line"><span class="lineno"> 51</span> </div>
|
||||
<div class="line"><span class="lineno"> 52</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = endCol; i >= startCol; i--, cnt++) {</div>
|
||||
<div class="line"><span class="lineno"> 53</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << a[endRow][i] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 53</span> std::cout << a[endRow][i] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 54</span> }</div>
|
||||
<div class="line"><span class="lineno"> 55</span> endRow--;</div>
|
||||
<div class="line"><span class="lineno"> 56</span><span class="comment"></span> </div>
|
||||
<div class="line"><span class="lineno"> 57</span><span class="comment"> /// Print the start Col</span></div>
|
||||
<div class="line"><span class="lineno"> 58</span><span class="comment"></span> <span class="keywordflow">if</span> (cnt == r * c) {</div>
|
||||
<div class="line"><span class="lineno"> 56</span> </div>
|
||||
<div class="line"><span class="lineno"> 58</span> <span class="keywordflow">if</span> (cnt == r * c) {</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><span class="lineno"> 60</span> }</div>
|
||||
<div class="line"><span class="lineno"> 61</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = endRow; i >= startRow; i--, cnt++) {</div>
|
||||
<div class="line"><span class="lineno"> 62</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << a[i][startCol] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 62</span> std::cout << a[i][startCol] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 63</span> }</div>
|
||||
<div class="line"><span class="lineno"> 64</span> startCol++;</div>
|
||||
<div class="line"><span class="lineno"> 65</span> }</div>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<map id="genArray" name="genArray">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,5,79,31"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="127,5,198,31"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="79,16,111,16,111,21,79,21"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
0745b8351029a14007dd28cec18e0ea4
|
||||
@@ -1,65 +0,0 @@
|
||||
<?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 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: genArray Pages: 1 -->
|
||||
<svg width="153pt" height="27pt"
|
||||
viewBox="0.00 0.00 152.50 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
|
||||
<title>genArray</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="55,-19.25 0,-19.25 0,0 55,0 55,-19.25"/>
|
||||
<text text-anchor="middle" x="27.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">genArray</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="144.5,-19.25 91,-19.25 91,0 144.5,0 144.5,-19.25"/>
|
||||
<text text-anchor="middle" x="117.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M55.46,-9.62C62.95,-9.62 71.22,-9.62 79.21,-9.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.05,-13.13 89.05,-9.63 79.05,-6.13 79.05,-13.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -1,39 +0,0 @@
|
||||
<?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 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: genArray Pages: 1 -->
|
||||
<svg width="153pt" height="27pt"
|
||||
viewBox="0.00 0.00 152.50 27.25" 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 23.25)">
|
||||
<title>genArray</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="55,-19.25 0,-19.25 0,0 55,0 55,-19.25"/>
|
||||
<text text-anchor="middle" x="27.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">genArray</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="144.5,-19.25 91,-19.25 91,0 144.5,0 144.5,-19.25"/>
|
||||
<text text-anchor="middle" x="117.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M55.46,-9.62C62.95,-9.62 71.22,-9.62 79.21,-9.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="79.05,-13.13 89.05,-9.63 79.05,-6.13 79.05,-13.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,9 +0,0 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,31,55,56"/>
|
||||
<area shape="rect" id="Node000002" href="$db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5" title=" " alt="" coords="106,5,179,31"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,35,90,27,91,32,56,41"/>
|
||||
<area shape="rect" id="Node000004" href="$db/d07/spiral__print_8cpp.html#a850d3f55e1a8d227176cdcc67352c197" title=" " alt="" coords="103,55,182,80"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="56,46,88,53,87,58,55,51"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="230,5,301,31"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="179,16,214,16,214,21,179,21"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
33dbc1238b07ac885e0fd308009680f2
|
||||
@@ -1,101 +0,0 @@
|
||||
<?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 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="230pt" height="64pt"
|
||||
viewBox="0.00 0.00 230.00 64.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 60.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-37.25 0,-37.25 0,-18 37,-18 37,-37.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="130.25,-56.25 75.25,-56.25 75.25,-37 130.25,-37 130.25,-56.25"/>
|
||||
<text text-anchor="middle" x="102.75" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">genArray</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.35,-31.75C45.14,-33.55 54.6,-35.73 63.83,-37.87"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="62.86,-41.23 73.39,-40.07 64.44,-34.41 62.86,-41.23"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:href="../../db/d07/spiral__print_8cpp.html#a850d3f55e1a8d227176cdcc67352c197" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="132.5,-19.25 73,-19.25 73,0 132.5,0 132.5,-19.25"/>
|
||||
<text text-anchor="middle" x="102.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">spiralPrint</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.35,-23.72C44.51,-22.15 53.07,-20.28 61.59,-18.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="62.12,-21.88 71.14,-16.32 60.62,-15.04 62.12,-21.88"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="222,-56.25 168.5,-56.25 168.5,-37 222,-37 222,-56.25"/>
|
||||
<text text-anchor="middle" x="195.25" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M130.41,-46.62C138.68,-46.62 147.95,-46.62 156.8,-46.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="156.58,-50.13 166.58,-46.63 156.58,-43.13 156.58,-50.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.0 KiB |
@@ -1,75 +0,0 @@
|
||||
<?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 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="230pt" height="64pt"
|
||||
viewBox="0.00 0.00 230.00 64.25" 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 60.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-37.25 0,-37.25 0,-18 37,-18 37,-37.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="130.25,-56.25 75.25,-56.25 75.25,-37 130.25,-37 130.25,-56.25"/>
|
||||
<text text-anchor="middle" x="102.75" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">genArray</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.35,-31.75C45.14,-33.55 54.6,-35.73 63.83,-37.87"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="62.86,-41.23 73.39,-40.07 64.44,-34.41 62.86,-41.23"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:href="../../db/d07/spiral__print_8cpp.html#a850d3f55e1a8d227176cdcc67352c197" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="132.5,-19.25 73,-19.25 73,0 132.5,0 132.5,-19.25"/>
|
||||
<text text-anchor="middle" x="102.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">spiralPrint</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.35,-23.72C44.51,-22.15 53.07,-20.28 61.59,-18.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="62.12,-21.88 71.14,-16.32 60.62,-15.04 62.12,-21.88"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="222,-56.25 168.5,-56.25 168.5,-37 222,-37 222,-56.25"/>
|
||||
<text text-anchor="middle" x="195.25" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M130.41,-46.62C138.68,-46.62 147.95,-46.62 156.8,-46.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="156.58,-50.13 166.58,-46.63 156.58,-43.13 156.58,-50.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
209
db/d07/spiral__print_8cpp_source.html
Normal file
209
db/d07/spiral__print_8cpp_source.html
Normal file
@@ -0,0 +1,209 @@
|
||||
<!-- HTML header for doxygen 1.12.0-->
|
||||
<!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" lang="en-US">
|
||||
<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="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: others/spiral_print.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
<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>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.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/javascript">
|
||||
window.MathJax = {
|
||||
options: {
|
||||
ignoreHtmlClass: 'tex2jax_ignore',
|
||||
processHtmlClass: 'tex2jax_process'
|
||||
},
|
||||
loader: {
|
||||
load: ['[tex]/ams']
|
||||
},
|
||||
tex: {
|
||||
macros: {},
|
||||
packages: ['base','configmacros','ams']
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
|
||||
<td id="projectalign">
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('db/d07/spiral__print_8cpp_source.html','../../'); initResizable(true); });
|
||||
/* @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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">spiral_print.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../db/d07/spiral__print_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="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
|
||||
<div class="foldopen" id="foldopen00012" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="../../db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5"> 12</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5">genArray</a>(<span class="keywordtype">int</span> **a, <span class="keywordtype">int</span> r, <span class="keywordtype">int</span> c) {</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="keywordtype">int</span> value = 1;</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < r; i++) {</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < c; j++) {</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> a[i][j] = value;</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> std::cout << a[i][j] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> value++;</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> }</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> std::cout << std::endl;</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> }</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="foldopen" id="foldopen00029" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="../../db/d07/spiral__print_8cpp.html#a850d3f55e1a8d227176cdcc67352c197"> 29</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d07/spiral__print_8cpp.html#a850d3f55e1a8d227176cdcc67352c197">spiralPrint</a>(<span class="keywordtype">int</span> **a, <span class="keywordtype">int</span> r, <span class="keywordtype">int</span> c) {</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">int</span> startRow = 0, endRow = r - 1;</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordtype">int</span> startCol = 0, endCol = c - 1;</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordtype">int</span> cnt = 0;</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">while</span> (startRow <= endRow && startCol <= endCol) {</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = startCol; i <= endCol; i++, cnt++) {</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> std::cout << a[startRow][i] << <span class="stringliteral">" "</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> startRow++;</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = startRow; i <= endRow; i++, cnt++) {</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> std::cout << a[i][endCol] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> }</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> endCol--;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">if</span> (cnt == r * c) {</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">break</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> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = endCol; i >= startCol; i--, cnt++) {</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> std::cout << a[endRow][i] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> }</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> endRow--;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">if</span> (cnt == r * c) {</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">break</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">for</span> (<span class="keywordtype">int</span> i = endRow; i >= startRow; i--, cnt++) {</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> std::cout << a[i][startCol] << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> }</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> startCol++;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||
<div class="foldopen" id="foldopen00069" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="../../db/d07/spiral__print_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 69</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../db/d07/spiral__print_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordtype">int</span> r, c;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> std::cin >> r >> c;</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">int</span> **a = <span class="keyword">new</span> <span class="keywordtype">int</span> *[r];</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < r; i++) a[i] = <span class="keyword">new</span> <span class="keywordtype">int</span>[c];</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_function" href="../../db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5">genArray</a>(a, r, c);</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_function" href="../../db/d07/spiral__print_8cpp.html#a850d3f55e1a8d227176cdcc67352c197">spiralPrint</a>(a, r, c);</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < r; i++) <span class="keyword">delete</span>[] a[i];</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keyword">delete</span>[] a;</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="aspiral__print_8cpp_html_a850d3f55e1a8d227176cdcc67352c197"><div class="ttname"><a href="../../db/d07/spiral__print_8cpp.html#a850d3f55e1a8d227176cdcc67352c197">spiralPrint</a></div><div class="ttdeci">void spiralPrint(int **a, int r, int c)</div><div class="ttdef"><b>Definition</b> <a href="#l00029">spiral_print.cpp:29</a></div></div>
|
||||
<div class="ttc" id="aspiral__print_8cpp_html_acfff36db81326fb990a643ab198ee8a5"><div class="ttname"><a href="../../db/d07/spiral__print_8cpp.html#acfff36db81326fb990a643ab198ee8a5">genArray</a></div><div class="ttdeci">void genArray(int **a, int r, int c)</div><div class="ttdef"><b>Definition</b> <a href="#l00012">spiral_print.cpp:12</a></div></div>
|
||||
<div class="ttc" id="aspiral__print_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../db/d07/spiral__print_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="#l00069">spiral_print.cpp:69</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../db/d07/spiral__print_8cpp.html">spiral_print.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>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user