mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-10 14:07:06 +08:00
Documentation for 6e77f98494
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<map id="data_structures::linked_list::list" name="data_structures::linked_list::list">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,139,160,180"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr.html" title=" " alt="" coords="114,5,267,61"/>
|
||||
<area shape="rect" id="node3" href="$de/d9d/classdata__structures_1_1linked__list_1_1link.html" title=" " alt="" coords="184,139,339,180"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
094ceb470fb68fee6019a398206ccea4
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::list Pages: 1 -->
|
||||
<svg width="258pt" height="139pt"
|
||||
viewBox="0.00 0.00 258.00 139.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 135)">
|
||||
<title>data_structures::linked_list::list</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-135 254,-135 254,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="0,-0.5 0,-30.5 116,-30.5 116,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="81.5,-89.5 81.5,-130.5 196.5,-130.5 196.5,-89.5 81.5,-89.5"/>
|
||||
<text text-anchor="start" x="89.5" y="-118.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::shared_ptr< data</text>
|
||||
<text text-anchor="start" x="89.5" y="-107.5" font-family="Helvetica,sans-Serif" font-size="10.00">_structures::linked_list</text>
|
||||
<text text-anchor="middle" x="139" y="-96.5" font-family="Helvetica,sans-Serif" font-size="10.00">::link ></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="M114.95,-81.54C100.31,-64.82 82.21,-44.15 70.4,-30.66"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="112.6,-84.17 121.82,-89.38 117.87,-79.55 112.6,-84.17"/>
|
||||
<text text-anchor="middle" x="113" y="-63" font-family="Helvetica,sans-Serif" font-size="10.00"> first</text>
|
||||
<text text-anchor="middle" x="113" y="-52" font-family="Helvetica,sans-Serif" font-size="10.00">last</text>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a xlink:href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="134,-0.5 134,-30.5 250,-30.5 250,-0.5 134,-0.5"/>
|
||||
<text text-anchor="start" x="142" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="192" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::link</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M131.2,-79.21C130.12,-69.05 130.82,-57.99 136,-49 140.43,-41.3 147.46,-35.26 155.06,-30.59"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="127.79,-80.05 132.85,-89.36 134.7,-78.93 127.79,-80.05"/>
|
||||
<text text-anchor="middle" x="151" y="-57.5" font-family="Helvetica,sans-Serif" font-size="10.00"> psucc</text>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M184.1,-40.48C180.43,-50.26 175.63,-61.48 170,-71 166.27,-77.3 161.55,-83.66 156.92,-89.32"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="187.44,-41.53 187.5,-30.94 180.85,-39.18 187.44,-41.53"/>
|
||||
<text text-anchor="middle" x="187.5" y="-57.5" font-family="Helvetica,sans-Serif" font-size="10.00"> ptr</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
433
d1/def/classdata__structures_1_1linked__list_1_1list.html
Normal file
433
d1/def/classdata__structures_1_1linked__list_1_1list.html
Normal file
@@ -0,0 +1,433 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.20"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures::linked_list::list Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Algorithms_in_C++
|
||||
 <span id="projectnumber">1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.20 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('d1/def/classdata__structures_1_1linked__list_1_1list.html','../../'); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="#pri-attribs">Private Attributes</a> |
|
||||
<a href="../../d9/d58/classdata__structures_1_1linked__list_1_1list-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">data_structures::linked_list::list Class Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for data_structures::linked_list::list:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/d15/classdata__structures_1_1linked__list_1_1list__coll__graph.svg" width="344" height="186"><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 name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a50e209b55b83622254177050945e7826"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826">list</a> ()</td></tr>
|
||||
<tr class="separator:a50e209b55b83622254177050945e7826"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae8424a4fce3d483f7c85d6f6a5c79a1a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a> ()</td></tr>
|
||||
<tr class="separator:ae8424a4fce3d483f7c85d6f6a5c79a1a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad585670a392c7e842c992d088093dff5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ad585670a392c7e842c992d088093dff5">push_back</a> (int new_elem)</td></tr>
|
||||
<tr class="separator:ad585670a392c7e842c992d088093dff5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9c73f393e984f93f33852334d1a04be0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a9c73f393e984f93f33852334d1a04be0">push_front</a> (int new_elem)</td></tr>
|
||||
<tr class="separator:a9c73f393e984f93f33852334d1a04be0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1fb1792ab867dc26639eef368a56989e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a1fb1792ab867dc26639eef368a56989e">erase</a> (int old_elem)</td></tr>
|
||||
<tr class="separator:a1fb1792ab867dc26639eef368a56989e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abf7c97616b873ffeebdd0eac2d19d13e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#abf7c97616b873ffeebdd0eac2d19d13e">display</a> ()</td></tr>
|
||||
<tr class="separator:abf7c97616b873ffeebdd0eac2d19d13e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a098be172c737f236763afdb8cada4835"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html">link</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#a098be172c737f236763afdb8cada4835">search</a> (int find_elem)</td></tr>
|
||||
<tr class="separator:a098be172c737f236763afdb8cada4835"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af0981944884c6dc19361ff67451261c9"><td class="memItemLeft" align="right" valign="top"><a id="af0981944884c6dc19361ff67451261c9"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>reverse</b> ()</td></tr>
|
||||
<tr class="separator:af0981944884c6dc19361ff67451261c9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
|
||||
Private Attributes</h2></td></tr>
|
||||
<tr class="memitem:aa3801cea564a3b3bb7b03abfffdcf1e1"><td class="memItemLeft" align="right" valign="top"><a id="aa3801cea564a3b3bb7b03abfffdcf1e1"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html">link</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a></td></tr>
|
||||
<tr class="memdesc:aa3801cea564a3b3bb7b03abfffdcf1e1"><td class="mdescLeft"> </td><td class="mdescRight">link before the actual first element <br /></td></tr>
|
||||
<tr class="separator:aa3801cea564a3b3bb7b03abfffdcf1e1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae8a5aa5c6dbbc5b882030b52619dd1a3"><td class="memItemLeft" align="right" valign="top"><a id="ae8a5aa5c6dbbc5b882030b52619dd1a3"></a>
|
||||
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html">link</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a></td></tr>
|
||||
<tr class="memdesc:ae8a5aa5c6dbbc5b882030b52619dd1a3"><td class="mdescLeft"> </td><td class="mdescRight">last link on the list <br /></td></tr>
|
||||
<tr class="separator:ae8a5aa5c6dbbc5b882030b52619dd1a3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>A list class containing a sequence of links </p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a50e209b55b83622254177050945e7826"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a50e209b55b83622254177050945e7826">◆ </a></span>list()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">data_structures::linked_list::list::list </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>List constructor. Initializes the first and last link. </p>
|
||||
<div class="fragment"><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {</div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">// Initialize the first link</span></div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a> = std::make_shared<link>();</div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// Initialize the last link with the first link</span></div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="abf7c97616b873ffeebdd0eac2d19d13e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abf7c97616b873ffeebdd0eac2d19d13e">◆ </a></span>display()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void list::display </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>function displays all the elements in the list </p><dl class="section return"><dt>Returns</dt><dd>'void' </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  {</div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"List is Empty!"</span>;</div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  }</div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> t = <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>;</div>
|
||||
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">while</span> (t->succ() != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << t->succ()->val() << <span class="stringliteral">"\t"</span>;</div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  t = t->succ();</div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  }</div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> }</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="../../d1/def/classdata__structures_1_1linked__list_1_1list_abf7c97616b873ffeebdd0eac2d19d13e_cgraph.svg" width="368" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1fb1792ab867dc26639eef368a56989e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1fb1792ab867dc26639eef368a56989e">◆ </a></span>erase()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void list::erase </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>old_elem</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>function erases old element from the list </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">old_elem</td><td>to be erased from the list </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  {</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"List is Empty!"</span>;</div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  }</div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> t = <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>;</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> to_be_removed = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">while</span> (t != <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> && t->succ()->val() != old_elem) {</div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  t = t->succ();</div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">if</span> (t == <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>) {</div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Element not found\n"</span>;</div>
|
||||
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  }</div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  to_be_removed = t->succ();</div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  t->succ() = t->succ()->succ();</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  to_be_removed.<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr/reset.html">reset</a>();</div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">if</span> (t->succ() == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  }</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> }</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="../../d1/def/classdata__structures_1_1linked__list_1_1list_a1fb1792ab867dc26639eef368a56989e_cgraph.svg" width="368" height="104"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae8424a4fce3d483f7c85d6f6a5c79a1a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae8424a4fce3d483f7c85d6f6a5c79a1a">◆ </a></span>isEmpty()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool list::isEmpty </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>function checks if list is empty </p><dl class="section return"><dt>Returns</dt><dd>true if list is empty </dd>
|
||||
<dd>
|
||||
false if list is not empty </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  {</div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  }</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ad585670a392c7e842c992d088093dff5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad585670a392c7e842c992d088093dff5">◆ </a></span>push_back()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void list::push_back </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>new_elem</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>function adds new element to the end of the list </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">new_elem</td><td>to be added to the end of the list </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  {</div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ() = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>->succ() = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>->succ();</div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/def/classdata__structures_1_1linked__list_1_1list_ad585670a392c7e842c992d088093dff5_cgraph.svg" width="368" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a9c73f393e984f93f33852334d1a04be0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9c73f393e984f93f33852334d1a04be0">◆ </a></span>push_front()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void list::push_front </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>new_elem</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>function adds new element to the beginning of the list </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">new_elem</td><td>to be added to front of the list </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  {</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ() = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> = <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> t = std::make_shared<link>(new_elem);</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  t->succ() = <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ();</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>->succ() = t;</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  }</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> }</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="../../d1/def/classdata__structures_1_1linked__list_1_1list_a9c73f393e984f93f33852334d1a04be0_cgraph.svg" width="368" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a098be172c737f236763afdb8cada4835"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a098be172c737f236763afdb8cada4835">◆ </a></span>search()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="../../de/d9d/classdata__structures_1_1linked__list_1_1link.html">link</a> > list::search </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>find_elem</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>function searchs for</p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">find_elem</td><td>in the list </td></tr>
|
||||
<tr><td class="paramname">find_elem</td><td>to be searched for in the list </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  {</div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">if</span> (<a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">isEmpty</a>()) {</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"List is Empty!"</span>;</div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  }</div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<link></a> t = <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">first</a>;</div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">while</span> (t != <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a> && t->succ()->val() != find_elem) {</div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  t = t->succ();</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</div>
|
||||
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordflow">if</span> (t == <a class="code" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">last</a>) {</div>
|
||||
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Element not found\n"</span>;</div>
|
||||
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  }</div>
|
||||
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Element was found\n"</span>;</div>
|
||||
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">return</span> t->succ();</div>
|
||||
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span> }</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="../../d1/def/classdata__structures_1_1linked__list_1_1list_a098be172c737f236763afdb8cada4835_cgraph.svg" width="368" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>data_structures/<a class="el" href="../../da/dc3/linked__list_8cpp.html">linked_list.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_ae8a5aa5c6dbbc5b882030b52619dd1a3"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3">data_structures::linked_list::list::last</a></div><div class="ttdeci">std::shared_ptr< link > last</div><div class="ttdoc">last link on the list</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:84</div></div>
|
||||
<div class="ttc" id="areset_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr/reset.html">std::shared_ptr::reset</a></div><div class="ttdeci">T reset(T... args)</div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_aa3801cea564a3b3bb7b03abfffdcf1e1"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1">data_structures::linked_list::list::first</a></div><div class="ttdeci">std::shared_ptr< link > first</div><div class="ttdoc">link before the actual first element</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:83</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1linked__list_1_1list_html_ae8424a4fce3d483f7c85d6f6a5c79a1a"><div class="ttname"><a href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a">data_structures::linked_list::list::isEmpty</a></div><div class="ttdeci">bool isEmpty()</div><div class="ttdef"><b>Definition:</b> linked_list.cpp:111</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></li><li class="navelem"><b>linked_list</b></li><li class="navelem"><a class="el" href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html">list</a></li>
|
||||
<li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
13
d1/def/classdata__structures_1_1linked__list_1_1list.js
Normal file
13
d1/def/classdata__structures_1_1linked__list_1_1list.js
Normal file
@@ -0,0 +1,13 @@
|
||||
var classdata__structures_1_1linked__list_1_1list =
|
||||
[
|
||||
[ "list", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a50e209b55b83622254177050945e7826", null ],
|
||||
[ "display", "d1/def/classdata__structures_1_1linked__list_1_1list.html#abf7c97616b873ffeebdd0eac2d19d13e", null ],
|
||||
[ "erase", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a1fb1792ab867dc26639eef368a56989e", null ],
|
||||
[ "isEmpty", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a", null ],
|
||||
[ "push_back", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ad585670a392c7e842c992d088093dff5", null ],
|
||||
[ "push_front", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a9c73f393e984f93f33852334d1a04be0", null ],
|
||||
[ "reverse", "d1/def/classdata__structures_1_1linked__list_1_1list.html#af0981944884c6dc19361ff67451261c9", null ],
|
||||
[ "search", "d1/def/classdata__structures_1_1linked__list_1_1list.html#a098be172c737f236763afdb8cada4835", null ],
|
||||
[ "first", "d1/def/classdata__structures_1_1linked__list_1_1list.html#aa3801cea564a3b3bb7b03abfffdcf1e1", null ],
|
||||
[ "last", "d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8a5aa5c6dbbc5b882030b52619dd1a3", null ]
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::search" name="data_structures::linked_list::list::search">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,160,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="208,5,363,47"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
c85fd56560fb17a64256a19f46635dba
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::list::search Pages: 1 -->
|
||||
<svg width="276pt" height="39pt"
|
||||
viewBox="0.00 0.00 276.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 35)">
|
||||
<title>data_structures::linked_list::list::search</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 272,-35 272,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="0,-0.5 0,-30.5 116,-30.5 116,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="152,-0.5 152,-30.5 268,-30.5 268,-0.5 152,-0.5"/>
|
||||
<text text-anchor="start" x="160" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="210" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M116.14,-15.5C124.38,-15.5 132.92,-15.5 141.34,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="141.53,-19 151.53,-15.5 141.53,-12 141.53,-19"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,5 @@
|
||||
<map id="data_structures::linked_list::list::erase" name="data_structures::linked_list::list::erase">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,35,160,76"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="208,5,363,47"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr/reset.html#" title=" " alt="" coords="212,71,359,98"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
d5b211845dc8397edd46e92c065d0528
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::list::erase Pages: 1 -->
|
||||
<svg width="276pt" height="78pt"
|
||||
viewBox="0.00 0.00 276.00 77.50" 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 73.5)">
|
||||
<title>data_structures::linked_list::list::erase</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-73.5 272,-73.5 272,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="0,-17 0,-47 116,-47 116,-17 0,-17"/>
|
||||
<text text-anchor="start" x="8" y="-35" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58" y="-24" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::erase</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="152,-39 152,-69 268,-69 268,-39 152,-39"/>
|
||||
<text text-anchor="start" x="160" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="210" y="-46" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M116.14,-40.38C124.47,-41.6 133.11,-42.87 141.62,-44.12"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="141.12,-47.58 151.53,-45.57 142.14,-40.66 141.12,-47.58"/>
|
||||
</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/memory/shared_ptr/reset.html#" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="155,-0.5 155,-19.5 265,-19.5 265,-0.5 155,-0.5"/>
|
||||
<text text-anchor="middle" x="210" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::shared_ptr::reset</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<path fill="none" stroke="midnightblue" d="M116.14,-23.62C125.6,-22.23 135.47,-20.79 145.08,-19.37"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="145.6,-22.84 154.99,-17.92 144.59,-15.91 145.6,-22.84"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::push_front" name="data_structures::linked_list::list::push_front">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,160,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="208,5,363,47"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
a2e6d5a23721969c3b07fe0962d6dd1f
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::list::push_front Pages: 1 -->
|
||||
<svg width="276pt" height="39pt"
|
||||
viewBox="0.00 0.00 276.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 35)">
|
||||
<title>data_structures::linked_list::list::push_front</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 272,-35 272,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="0,-0.5 0,-30.5 116,-30.5 116,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::push_front</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="152,-0.5 152,-30.5 268,-30.5 268,-0.5 152,-0.5"/>
|
||||
<text text-anchor="start" x="160" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="210" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M116.14,-15.5C124.38,-15.5 132.92,-15.5 141.34,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="141.53,-19 151.53,-15.5 141.53,-12 141.53,-19"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::display" name="data_structures::linked_list::list::display">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,160,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="208,5,363,47"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
4f1fb5e679ae25a1b63844194c139096
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::list::display Pages: 1 -->
|
||||
<svg width="276pt" height="39pt"
|
||||
viewBox="0.00 0.00 276.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 35)">
|
||||
<title>data_structures::linked_list::list::display</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 272,-35 272,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="0,-0.5 0,-30.5 116,-30.5 116,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::display</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="152,-0.5 152,-30.5 268,-30.5 268,-0.5 152,-0.5"/>
|
||||
<text text-anchor="start" x="160" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="210" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M116.14,-15.5C124.38,-15.5 132.92,-15.5 141.34,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="141.53,-19 151.53,-15.5 141.53,-12 141.53,-19"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<map id="data_structures::linked_list::list::push_back" name="data_structures::linked_list::list::push_back">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,160,47"/>
|
||||
<area shape="rect" id="node2" href="$d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" title=" " alt="" coords="208,5,363,47"/>
|
||||
</map>
|
||||
@@ -0,0 +1 @@
|
||||
f5abf2240e8d04e5e4061dc2e211b0c0
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
|
||||
-->
|
||||
<!-- Title: data_structures::linked_list::list::push_back Pages: 1 -->
|
||||
<svg width="276pt" height="39pt"
|
||||
viewBox="0.00 0.00 276.00 39.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 35)">
|
||||
<title>data_structures::linked_list::list::push_back</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-35 272,-35 272,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="0,-0.5 0,-30.5 116,-30.5 116,-0.5 0,-0.5"/>
|
||||
<text text-anchor="start" x="8" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="58" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../d1/def/classdata__structures_1_1linked__list_1_1list.html#ae8424a4fce3d483f7c85d6f6a5c79a1a" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="152,-0.5 152,-30.5 268,-30.5 268,-0.5 152,-0.5"/>
|
||||
<text text-anchor="start" x="160" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::linked</text>
|
||||
<text text-anchor="middle" x="210" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">_list::list::isEmpty</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<path fill="none" stroke="midnightblue" d="M116.14,-15.5C124.38,-15.5 132.92,-15.5 141.34,-15.5"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="141.53,-19 151.53,-15.5 141.53,-12 141.53,-19"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -206,7 +206,7 @@ int </td><td class="memItemRight" valign="bottom"><a class="el" href="../..
|
||||
<dl class="section warning"><dt>Warning</dt><dd>dynamic memory allocated to <code>n</code> never gets freed. </dd></dl>
|
||||
<dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000013">Todo:</a></b></dt><dd>fix memory leak </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  { <span class="comment">// Construct hash table</span></div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list.html">link</a> p, n;</div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="code" href="../../d8/d10/structlist.html">link</a> p, n;</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordtype">int</span> index;</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  n = (<a class="code" href="../../d1/df3/hash__search_8cpp.html#ad6fcd983304f85afa199d97a9b0ca9f6">link</a>)<a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/c/malloc.html">malloc</a>(<span class="keyword">sizeof</span>(<a class="code" href="../../d5/da1/structnode.html">node</a>));</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  n->key = key;</div>
|
||||
@@ -284,7 +284,7 @@ Here is the call graph for this function:</div>
|
||||
<dd>
|
||||
-1 </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  { <span class="comment">// Hash lookup function</span></div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list.html">link</a> pointer;</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <a class="code" href="../../d8/d10/structlist.html">link</a> pointer;</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordtype">int</span> index;</div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  *counter = 0;</div>
|
||||
@@ -295,11 +295,11 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  </div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">while</span> (pointer != NULL) {</div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  counter[0]++;</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"data["</span> << pointer->key << <span class="stringliteral">"]:"</span>;</div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">if</span> (pointer->key == key)</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"data["</span> << pointer-><a class="code" href="../../d8/d10/structlist.html#aaab2e33bc1ca6f44e72239bfb58f100c">key</a> << <span class="stringliteral">"]:"</span>;</div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">if</span> (pointer-><a class="code" href="../../d8/d10/structlist.html#aaab2e33bc1ca6f44e72239bfb58f100c">key</a> == key)</div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordflow">return</span> 1;</div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">else</span></div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  pointer = pointer->next;</div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  pointer = pointer-><a class="code" href="../../d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">next</a>;</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">return</span> 0;</div>
|
||||
@@ -330,7 +330,7 @@ Here is the call graph for this function:</div>
|
||||
</div><div class="memdoc">
|
||||
<p>main function </p>
|
||||
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  {</div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/list.html">link</a> p;</div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="../../d8/d10/structlist.html">link</a> p;</div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordtype">int</span> key, index, i, counter; <span class="comment">// Key is the value to be found</span></div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  index = 0;</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div>
|
||||
@@ -347,9 +347,9 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  </div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">while</span> (p != NULL) {</div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"please int key:"</span>;</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">if</span> (p->key > 0)</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"["</span> << p->key << <span class="stringliteral">"]"</span>;</div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  p = p->next;</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">if</span> (p-><a class="code" href="../../d8/d10/structlist.html#aaab2e33bc1ca6f44e72239bfb58f100c">key</a> > 0)</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"["</span> << p-><a class="code" href="../../d8/d10/structlist.html#aaab2e33bc1ca6f44e72239bfb58f100c">key</a> << <span class="stringliteral">"]"</span>;</div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  p = p-><a class="code" href="../../d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">next</a>;</div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  }</div>
|
||||
@@ -382,18 +382,20 @@ Here is the call graph for this function:</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="ahash__search_8cpp_html_a36ea13c16028f18ef2d5ff47f3fda7a2"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a36ea13c16028f18ef2d5ff47f3fda7a2">hash_search</a></div><div class="ttdeci">int hash_search(int key, int *counter)</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:76</div></div>
|
||||
<div class="ttc" id="alist_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list.html">std::list</a></div><div class="ttdoc">STL class.</div></div>
|
||||
<div class="ttc" id="ahash__search_8cpp_html_a77c722016053a1d484aa177ce205b367"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a77c722016053a1d484aa177ce205b367">HASHMAX</a></div><div class="ttdeci">#define HASHMAX</div><div class="ttdoc">Determines the length of the hash table.</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:22</div></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="ttc" id="ahash__search_8cpp_html_a392fb874e547e582e9c66a08a1f23326"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a392fb874e547e582e9c66a08a1f23326">MAX</a></div><div class="ttdeci">#define MAX</div><div class="ttdoc">Determines how much data.</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:21</div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="ahash__search_8cpp_html_a566eaf0ffafd50bc61e644561fd27001"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a566eaf0ffafd50bc61e644561fd27001">h</a></div><div class="ttdeci">int h(int key)</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:45</div></div>
|
||||
<div class="ttc" id="ahash__search_8cpp_html_ad6fcd983304f85afa199d97a9b0ca9f6"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#ad6fcd983304f85afa199d97a9b0ca9f6">link</a></div><div class="ttdeci">struct list * link</div><div class="ttdoc">pointer to nodes</div></div>
|
||||
<div class="ttc" id="astructlist_html_aaab2e33bc1ca6f44e72239bfb58f100c"><div class="ttname"><a href="../../d8/d10/structlist.html#aaab2e33bc1ca6f44e72239bfb58f100c">list::key</a></div><div class="ttdeci">int key</div><div class="ttdoc">key value for node</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:30</div></div>
|
||||
<div class="ttc" id="ahash__search_8cpp_html_af413b1740073db54796642b0ab814d6d"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#af413b1740073db54796642b0ab814d6d">hashtab</a></div><div class="ttdeci">node hashtab[HASHMAX]</div><div class="ttdoc">array of nodes</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:35</div></div>
|
||||
<div class="ttc" id="ahash__search_8cpp_html_a6e1a77282bc65ad359d753d25df23243"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#a6e1a77282bc65ad359d753d25df23243">data</a></div><div class="ttdeci">int data[MAX]</div><div class="ttdoc">test data</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:24</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 class="ttc" id="ahash__search_8cpp_html_ad0831425f1389166a9518f422d0c6ec5"><div class="ttname"><a href="../../d1/df3/hash__search_8cpp.html#ad0831425f1389166a9518f422d0c6ec5">create_list</a></div><div class="ttdeci">void create_list(int key)</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:55</div></div>
|
||||
<div class="ttc" id="amalloc_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/c/malloc.html">std::malloc</a></div><div class="ttdeci">T malloc(T... args)</div></div>
|
||||
<div class="ttc" id="astructlist_html_a1900fe79e875e2838625b2eb60837f8f"><div class="ttname"><a href="../../d8/d10/structlist.html#a1900fe79e875e2838625b2eb60837f8f">list::next</a></div><div class="ttdeci">struct list * next</div><div class="ttdoc">pointer to next link in the chain</div><div class="ttdef"><b>Definition:</b> hash_search.cpp:31</div></div>
|
||||
<div class="ttc" id="astructlist_html"><div class="ttname"><a href="../../d8/d10/structlist.html">list</a></div><div class="ttdef"><b>Definition:</b> list_array.cpp:8</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user