mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-16 19:41:16 +08:00
Documentation for 53a6c16730
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<map id="Graph" name="Graph">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="55,228,112,255"/>
|
||||
<area shape="rect" id="node2" href="$d7/d77/class_edge.html" title=" " alt="" coords="5,124,57,151"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map.html" title=" " alt="" coords="81,109,256,165"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector.html" title=" " alt="" coords="95,5,243,47"/>
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="588,163,645,189"/>
|
||||
<area shape="rect" id="node2" href="$d7/d77/class_edge.html" title=" " alt="" coords="320,5,372,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map" title=" " alt="" coords="259,56,433,112"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="5,63,153,105"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="267,199,425,241"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="18,163,141,189"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="271,265,421,306"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/tuple" title=" " alt="" coords="15,265,143,306"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/bitset" title=" " alt="" coords="275,331,417,357"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
02f728180ea5163b348e1e4c49e0431c
|
||||
584848939b87e1298249b3a5de9ab532
|
||||
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 2.50.0 (20211204.2007)
|
||||
-->
|
||||
<!-- Title: Graph Pages: 1 -->
|
||||
<svg width="196pt" height="195pt"
|
||||
viewBox="0.00 0.00 196.00 195.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 191)">
|
||||
<svg width="488pt" height="272pt"
|
||||
viewBox="0.00 0.00 488.00 272.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 268)">
|
||||
<title>Graph</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-191 192,-191 192,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-268 484,-268 484,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="37,-0.5 37,-19.5 80,-19.5 80,-0.5 37,-0.5"/>
|
||||
<text text-anchor="middle" x="58.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">Graph</text>
|
||||
<polygon fill="#bfbfbf" stroke="black" points="437,-126.5 437,-145.5 480,-145.5 480,-126.5 437,-126.5"/>
|
||||
<text text-anchor="middle" x="458.5" y="-133.5" font-family="Helvetica,sans-Serif" font-size="10.00">Graph</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -22,52 +22,143 @@
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d7/d77/class_edge.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="0,-78.5 0,-97.5 39,-97.5 39,-78.5 0,-78.5"/>
|
||||
<text text-anchor="middle" x="19.5" y="-85.5" font-family="Helvetica,sans-Serif" font-size="10.00">Edge</text>
|
||||
<polygon fill="white" stroke="black" points="236,-244.5 236,-263.5 275,-263.5 275,-244.5 236,-244.5"/>
|
||||
<text text-anchor="middle" x="255.5" y="-251.5" font-family="Helvetica,sans-Serif" font-size="10.00">Edge</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node2->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M28.67,-69.12C36.68,-53.53 47.94,-31.59 54.08,-19.62"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="25.43,-67.79 23.97,-78.28 31.65,-70.98 25.43,-67.79"/>
|
||||
<text text-anchor="middle" x="58.5" y="-41" font-family="Helvetica,sans-Serif" font-size="10.00"> edges</text>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M285.28,-252.81C320.41,-249.95 379.94,-240.44 419,-209 439.76,-192.29 450.68,-161.32 455.09,-145.64"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="284.95,-249.32 275.21,-253.5 285.43,-256.31 284.95,-249.32"/>
|
||||
<text text-anchor="middle" x="379" y="-247" font-family="Helvetica,sans-Serif" font-size="10.00"> edges</text>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="57,-67.5 57,-108.5 188,-108.5 188,-67.5 57,-67.5"/>
|
||||
<text text-anchor="start" x="65" y="-96.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::map< unsigned</text>
|
||||
<text text-anchor="start" x="65" y="-85.5" font-family="Helvetica,sans-Serif" font-size="10.00"> int, std::vector< unsigned</text>
|
||||
<text text-anchor="middle" x="122.5" y="-74.5" font-family="Helvetica,sans-Serif" font-size="10.00"> int > ></text>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="190,-184.5 190,-225.5 321,-225.5 321,-184.5 190,-184.5"/>
|
||||
<text text-anchor="start" x="198" y="-213.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::map< unsigned</text>
|
||||
<text text-anchor="start" x="198" y="-202.5" font-family="Helvetica,sans-Serif" font-size="10.00"> int, std::vector< unsigned</text>
|
||||
<text text-anchor="middle" x="255.5" y="-191.5" font-family="Helvetica,sans-Serif" font-size="10.00"> int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node1 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node3->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M99.29,-59.44C87.43,-45.35 73.82,-29.19 65.7,-19.55"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="96.9,-62.03 106.02,-67.43 102.25,-57.52 96.9,-62.03"/>
|
||||
<text text-anchor="middle" x="113.5" y="-41" font-family="Helvetica,sans-Serif" font-size="10.00"> m_adjList</text>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M331,-196.37C359.58,-191.07 391.83,-182.57 419,-169 430.66,-163.18 441.7,-153.06 448.95,-145.56"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="330.3,-192.94 321.05,-198.11 331.51,-199.83 330.3,-192.94"/>
|
||||
<text text-anchor="middle" x="379" y="-197" font-family="Helvetica,sans-Serif" font-size="10.00"> m_adjList</text>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector.html" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="67,-156.5 67,-186.5 178,-186.5 178,-156.5 67,-156.5"/>
|
||||
<text text-anchor="start" x="75" y="-174.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< unsigned</text>
|
||||
<text text-anchor="middle" x="122.5" y="-163.5" font-family="Helvetica,sans-Serif" font-size="10.00"> int ></text>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="0,-190 0,-220 111,-220 111,-190 0,-190"/>
|
||||
<text text-anchor="start" x="8" y="-208" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< unsigned</text>
|
||||
<text text-anchor="middle" x="55.5" y="-197" font-family="Helvetica,sans-Serif" font-size="10.00"> int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node3 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node4->Node3</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M122.5,-146.07C122.5,-134.06 122.5,-119.79 122.5,-108.53"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="119,-146.3 122.5,-156.3 126,-146.3 119,-146.3"/>
|
||||
<text text-anchor="middle" x="144" y="-130" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M121.36,-205C143.35,-205 167.9,-205 189.87,-205"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="121.13,-201.5 111.13,-205 121.13,-208.5 121.13,-201.5"/>
|
||||
<text text-anchor="middle" x="150.5" y="-208" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="196,-88 196,-118 315,-118 315,-88 196,-88"/>
|
||||
<text text-anchor="start" x="204" y="-106" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::vector</text>
|
||||
<text text-anchor="middle" x="255.5" y="-95" font-family="Helvetica,sans-Serif" font-size="10.00">< int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node1 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node5->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M325.33,-104.94C354.58,-107 388.83,-111.07 419,-119 425.78,-120.78 432.89,-123.62 439.13,-126.47"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="325.4,-101.44 315.2,-104.29 324.96,-108.43 325.4,-101.44"/>
|
||||
<text text-anchor="middle" x="379" y="-133" font-family="Helvetica,sans-Serif" font-size="10.00"> capacity</text>
|
||||
<text text-anchor="middle" x="379" y="-122" font-family="Helvetica,sans-Serif" font-size="10.00">residual_capacity</text>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="9.5,-126.5 9.5,-145.5 101.5,-145.5 101.5,-126.5 9.5,-126.5"/>
|
||||
<text text-anchor="middle" x="55.5" y="-133.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node1 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node6->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M112.01,-137.61C117.75,-137.75 123.49,-137.88 129,-138 222.32,-139.95 245.66,-140.33 339,-141 374.55,-141.25 383.52,-143.29 419,-141 424.78,-140.63 431.03,-139.94 436.77,-139.19"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="111.83,-134.1 101.75,-137.34 111.65,-141.1 111.83,-134.1"/>
|
||||
<text text-anchor="middle" x="255.5" y="-143" font-family="Helvetica,sans-Serif" font-size="10.00"> parent</text>
|
||||
</g>
|
||||
<!-- Node6->Node5 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node6->Node5</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M112.03,-126.74C138.13,-122.4 169.26,-117.21 195.75,-112.79"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="111.21,-123.33 101.93,-128.43 112.36,-130.24 111.21,-123.33"/>
|
||||
<text text-anchor="middle" x="150.5" y="-126" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="199,-39 199,-69 312,-69 312,-39 199,-39"/>
|
||||
<text text-anchor="start" x="207" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::tuple</text>
|
||||
<text text-anchor="middle" x="255.5" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">< int, int, int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7->Node1 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Node7->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M321.97,-59.3C353.12,-64.14 389.84,-73.38 419,-91 433.61,-99.83 445.46,-116.13 451.99,-126.5"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="322.46,-55.84 312.07,-57.88 321.47,-62.77 322.46,-55.84"/>
|
||||
<text text-anchor="middle" x="379" y="-94" font-family="Helvetica,sans-Serif" font-size="10.00"> edge_participated</text>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/tuple" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="7.5,-39 7.5,-69 103.5,-69 103.5,-39 7.5,-39"/>
|
||||
<text text-anchor="start" x="15.5" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::tuple< int, int,</text>
|
||||
<text text-anchor="middle" x="55.5" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00"> int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8->Node7 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Node8->Node7</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M113.68,-54C140.48,-54 172.3,-54 198.9,-54"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="113.67,-50.5 103.67,-54 113.67,-57.5 113.67,-50.5"/>
|
||||
<text text-anchor="middle" x="150.5" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/bitset" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="202,-0.5 202,-19.5 309,-19.5 309,-0.5 202,-0.5"/>
|
||||
<text text-anchor="middle" x="255.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::bitset< MAXN ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node1 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Node9->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M319.05,-11.5C352.01,-15.29 391.25,-24.91 419,-48 443.74,-68.59 453.06,-108.15 456.15,-126.38"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="319.34,-8.02 309.04,-10.51 318.64,-14.98 319.34,-8.02"/>
|
||||
<text text-anchor="middle" x="379" y="-51" font-family="Helvetica,sans-Serif" font-size="10.00"> visited</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 9.2 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: stack< Type > Class Template Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -99,6 +99,12 @@ $(document).ready(function(){initNavTree('d1/dc2/classstack.html','../../'); ini
|
||||
<div class="contents">
|
||||
|
||||
<p><code>#include <<a class="el" href="../../d7/de0/stack_8h_source.html">stack.h</a>></code></p>
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for stack< Type >:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d4/dcb/classstack__coll__graph.svg" width="176" height="351"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
@@ -153,7 +159,7 @@ template<class Type > </div>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../d1/dc2/classstack.html">stack</a>< Type >::<a class="el" href="../../d1/dc2/classstack.html">stack</a> </td>
|
||||
<td class="memname"><a class="el" href="../../d1/dc2/classstack.html">stack</a>< Type ><a class="el" href="../../d1/dc2/classstack.html">::stack</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
@@ -166,10 +172,10 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Default constructor </p>
|
||||
<div class="fragment"><div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a> = 0;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 41</span> {</div>
|
||||
<div class="line"><span class="lineno"> 42</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 43</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a> = 0;</div>
|
||||
<div class="line"><span class="lineno"> 44</span> }</div>
|
||||
<div class="ttc" id="aclassstack_html_a7289037c059aaad492b4d68e6bd54453"><div class="ttname"><a href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stack::stackTop</a></div><div class="ttdeci">node< Type > * stackTop</div><div class="ttdef"><b>Definition:</b> stack.h:146</div></div>
|
||||
<div class="ttc" id="aclassstack_html_ac512a3efdc84a5f5c9f53905c8e219b0"><div class="ttname"><a href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">stack::size</a></div><div class="ttdeci">int size</div><div class="ttdoc">size of stack</div><div class="ttdef"><b>Definition:</b> stack.h:147</div></div>
|
||||
</div><!-- fragment -->
|
||||
@@ -187,7 +193,7 @@ template<class Type > </div>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="../../d1/dc2/classstack.html">stack</a>< Type >::<a class="el" href="../../d1/dc2/classstack.html">stack</a> </td>
|
||||
<td class="memname"><a class="el" href="../../d1/dc2/classstack.html">stack</a>< Type ><a class="el" href="../../d1/dc2/classstack.html">::stack</a> </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="../../d1/dc2/classstack.html">stack</a>< Type > & </td>
|
||||
<td class="paramname"><em>otherStack</em></td><td>)</td>
|
||||
@@ -201,35 +207,35 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Copy constructor </p>
|
||||
<div class="fragment"><div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *newNode, *current, *last;</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="comment">/* If stack is no empty, make it empty */</span></div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">if</span> (otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</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> current = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->data = current->data;</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> last = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> current = current->next;</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="comment">/* Copy the remaining stack */</span></div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">while</span> (current != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> newNode = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> newNode->data = current->data;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> newNode->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> last->next = newNode;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> last = newNode;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> current = current->next;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a> = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>;</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</div>
|
||||
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition:</b> avltree.cpp:13</div></div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><span class="lineno"> 48</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *newNode, *current, *last;</div>
|
||||
<div class="line"><span class="lineno"> 49</span> </div>
|
||||
<div class="line"><span class="lineno"> 50</span> <span class="comment">/* If stack is no empty, make it empty */</span></div>
|
||||
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 52</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 53</span> }</div>
|
||||
<div class="line"><span class="lineno"> 54</span> <span class="keywordflow">if</span> (otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 55</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 56</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 57</span> current = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><span class="lineno"> 58</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->data = current->data;</div>
|
||||
<div class="line"><span class="lineno"> 60</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 61</span> last = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><span class="lineno"> 62</span> current = current->next;</div>
|
||||
<div class="line"><span class="lineno"> 63</span> <span class="comment">/* Copy the remaining stack */</span></div>
|
||||
<div class="line"><span class="lineno"> 64</span> <span class="keywordflow">while</span> (current != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 65</span> newNode = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><span class="lineno"> 66</span> newNode->data = current->data;</div>
|
||||
<div class="line"><span class="lineno"> 67</span> newNode->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 68</span> last->next = newNode;</div>
|
||||
<div class="line"><span class="lineno"> 69</span> last = newNode;</div>
|
||||
<div class="line"><span class="lineno"> 70</span> current = current->next;</div>
|
||||
<div class="line"><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><span class="lineno"> 72</span> }</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a> = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>;</div>
|
||||
<div class="line"><span class="lineno"> 74</span> }</div>
|
||||
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node< Type ></a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,7 +264,7 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Destructor </p>
|
||||
<div class="fragment"><div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>{}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 77</span>{}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -288,7 +294,7 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Clear stack </p>
|
||||
<div class="fragment"><div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>{ <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>; }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 112</span>{ <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>; }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -317,16 +323,16 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Show stack </p>
|
||||
<div class="fragment"><div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> {</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *current = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Top --> "</span>;</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">while</span> (current != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << current->data << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> current = current->next;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> }</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</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"><a id="l00037" name="l00037"></a><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> << <span class="stringliteral">"Size of stack: "</span> << <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</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"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 29</span> {</div>
|
||||
<div class="line"><span class="lineno"> 30</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *current = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><span class="lineno"> 31</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Top --> "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 32</span> <span class="keywordflow">while</span> (current != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 33</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << current->data << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 34</span> current = current->next;</div>
|
||||
<div class="line"><span class="lineno"> 35</span> }</div>
|
||||
<div class="line"><span class="lineno"> 36</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"> 37</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Size of stack: "</span> << <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</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"> 38</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">
|
||||
@@ -363,7 +369,7 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Determine whether the stack is empty </p>
|
||||
<div class="fragment"><div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span>{ <span class="keywordflow">return</span> (<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> == <span class="keyword">nullptr</span>); }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 80</span>{ <span class="keywordflow">return</span> (<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> == <span class="keyword">nullptr</span>); }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -393,35 +399,35 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Overload "=" the assignment operator </p>
|
||||
<div class="fragment"><div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> {</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *newNode, *current, *last;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="comment">/* If stack is no empty, make it empty */</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">if</span> (otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> current = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->data = current->data;</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> last = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> current = current->next;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="comment">/* Copy the remaining stack */</span></div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">while</span> (current != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> newNode = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> newNode->data = current->data;</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> newNode->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> last->next = newNode;</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> last = newNode;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> current = current->next;</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> }</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a> = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>;</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 115</span> {</div>
|
||||
<div class="line"><span class="lineno"> 116</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *newNode, *current, *last;</div>
|
||||
<div class="line"><span class="lineno"> 117</span> </div>
|
||||
<div class="line"><span class="lineno"> 118</span> <span class="comment">/* If stack is no empty, make it empty */</span></div>
|
||||
<div class="line"><span class="lineno"> 119</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 121</span> }</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <span class="keywordflow">if</span> (otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 123</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 124</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 125</span> current = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><span class="lineno"> 126</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><span class="lineno"> 127</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->data = current->data;</div>
|
||||
<div class="line"><span class="lineno"> 128</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 129</span> last = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><span class="lineno"> 130</span> current = current->next;</div>
|
||||
<div class="line"><span class="lineno"> 131</span> <span class="comment">/* Copy the remaining stack */</span></div>
|
||||
<div class="line"><span class="lineno"> 132</span> <span class="keywordflow">while</span> (current != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 133</span> newNode = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><span class="lineno"> 134</span> newNode->data = current->data;</div>
|
||||
<div class="line"><span class="lineno"> 135</span> newNode->next = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 136</span> last->next = newNode;</div>
|
||||
<div class="line"><span class="lineno"> 137</span> last = newNode;</div>
|
||||
<div class="line"><span class="lineno"> 138</span> current = current->next;</div>
|
||||
<div class="line"><span class="lineno"> 139</span> }</div>
|
||||
<div class="line"><span class="lineno"> 140</span> }</div>
|
||||
<div class="line"><span class="lineno"> 141</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a> = otherStack.<a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>;</div>
|
||||
<div class="line"><span class="lineno"> 142</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><span class="lineno"> 143</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -450,17 +456,17 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Remove the top element of the stack </p>
|
||||
<div class="fragment"><div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> {</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *temp;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../d1/dc2/classstack.html#a066e4505155b009913c47b2648b1067a">isEmptyStack</a>()) {</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> temp = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->next;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keyword">delete</span> temp;</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>--;</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Stack is empty !"</span> << <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="l00108" name="l00108"></a><span class="lineno"> 108</span> }</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 99</span> {</div>
|
||||
<div class="line"><span class="lineno"> 100</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *temp;</div>
|
||||
<div class="line"><span class="lineno"> 101</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../d1/dc2/classstack.html#a066e4505155b009913c47b2648b1067a">isEmptyStack</a>()) {</div>
|
||||
<div class="line"><span class="lineno"> 102</span> temp = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><span class="lineno"> 103</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->next;</div>
|
||||
<div class="line"><span class="lineno"> 104</span> <span class="keyword">delete</span> temp;</div>
|
||||
<div class="line"><span class="lineno"> 105</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>--;</div>
|
||||
<div class="line"><span class="lineno"> 106</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 107</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Stack is empty !"</span> << <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"> 108</span> }</div>
|
||||
<div class="line"><span class="lineno"> 109</span> }</div>
|
||||
<div class="ttc" id="aclassstack_html_a066e4505155b009913c47b2648b1067a"><div class="ttname"><a href="../../d1/dc2/classstack.html#a066e4505155b009913c47b2648b1067a">stack::isEmptyStack</a></div><div class="ttdeci">bool isEmptyStack()</div><div class="ttdef"><b>Definition:</b> stack.h:80</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -497,14 +503,14 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Add new item to the stack </p>
|
||||
<div class="fragment"><div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> {</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *newNode;</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> newNode = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> newNode->data = item;</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> newNode->next = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = newNode;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>++;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 83</span> {</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a> *newNode;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> newNode = <span class="keyword">new</span> <a class="code hl_class" href="../../d5/da1/structnode.html">node<Type></a>;</div>
|
||||
<div class="line"><span class="lineno"> 86</span> newNode->data = item;</div>
|
||||
<div class="line"><span class="lineno"> 87</span> newNode->next = <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>;</div>
|
||||
<div class="line"><span class="lineno"> 88</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> = newNode;</div>
|
||||
<div class="line"><span class="lineno"> 89</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#ac512a3efdc84a5f5c9f53905c8e219b0">size</a>++;</div>
|
||||
<div class="line"><span class="lineno"> 90</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -533,10 +539,10 @@ template<class Type > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Return the top element of the stack </p>
|
||||
<div class="fragment"><div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> {</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> assert(<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> != <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->data;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 93</span> {</div>
|
||||
<div class="line"><span class="lineno"> 94</span> assert(<a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a> != <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 95</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="../../d1/dc2/classstack.html#a7289037c059aaad492b4d68e6bd54453">stackTop</a>->data;</div>
|
||||
<div class="line"><span class="lineno"> 96</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -575,7 +581,7 @@ template<class Type > </div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d1/dc2/classstack.html">stack</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<map id="stack::display" name="stack::display">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,108,32"/>
|
||||
<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="156,5,228,32"/>
|
||||
<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#" title=" " alt="" coords="156,5,228,32"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
28f8427990bc1638f1a2757196350aaa
|
||||
9de69299c544ee504e8771db5b279d40
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="113,-0.5 113,-19.5 167,-19.5 167,-0.5 113,-0.5"/>
|
||||
<text text-anchor="middle" x="140" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,5 +1,5 @@
|
||||
<map id="stack::pop" name="stack::pop">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,31,88,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="172,5,244,32"/>
|
||||
<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#" title=" " alt="" coords="172,5,244,32"/>
|
||||
<area shape="rect" id="node3" href="$d1/dc2/classstack.html#a066e4505155b009913c47b2648b1067a" title=" " alt="" coords="136,56,280,83"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
bdcd8acf4e2de7d75c3e3222fcab8717
|
||||
c5e2c40430698453d7d6ae5e86b54675
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="125,-38.5 125,-57.5 179,-57.5 179,-38.5 125,-38.5"/>
|
||||
<text text-anchor="middle" x="152" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user