Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
@@ -5,10 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: Trie Class Reference</title>
<title>TheAlgorithms/C++: Trie Class Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
@@ -18,14 +24,24 @@
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -131,37 +148,37 @@ Public Member Functions</h2></td></tr>
<tr class="memitem:a6af57e9f25d0d0a2d59eea5a4a802908" id="r_a6af57e9f25d0d0a2d59eea5a4a802908"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6af57e9f25d0d0a2d59eea5a4a802908">Trie</a> ()</td></tr>
<tr class="memdesc:a6af57e9f25d0d0a2d59eea5a4a802908"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor to initialise the root of the trie. <br /></td></tr>
<tr class="separator:a6af57e9f25d0d0a2d59eea5a4a802908"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd8b79959009b554e98ea7128b2886f2" id="r_afd8b79959009b554e98ea7128b2886f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afd8b79959009b554e98ea7128b2886f2">insert</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;word)</td></tr>
<tr class="memitem:afd8b79959009b554e98ea7128b2886f2" id="r_afd8b79959009b554e98ea7128b2886f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afd8b79959009b554e98ea7128b2886f2">insert</a> (const std::string &amp;word)</td></tr>
<tr class="separator:afd8b79959009b554e98ea7128b2886f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a411e77126930a0942dd7b65e96b15206" id="r_a411e77126930a0942dd7b65e96b15206"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a411e77126930a0942dd7b65e96b15206">search</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;word)</td></tr>
<tr class="memitem:a411e77126930a0942dd7b65e96b15206" id="r_a411e77126930a0942dd7b65e96b15206"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a411e77126930a0942dd7b65e96b15206">search</a> (const std::string &amp;word)</td></tr>
<tr class="separator:a411e77126930a0942dd7b65e96b15206"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a734a08b52b8ad73bdd1f36ae8348056e" id="r_a734a08b52b8ad73bdd1f36ae8348056e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a734a08b52b8ad73bdd1f36ae8348056e">removeWord</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;word)</td></tr>
<tr class="memitem:a734a08b52b8ad73bdd1f36ae8348056e" id="r_a734a08b52b8ad73bdd1f36ae8348056e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a734a08b52b8ad73bdd1f36ae8348056e">removeWord</a> (const std::string &amp;word)</td></tr>
<tr class="separator:a734a08b52b8ad73bdd1f36ae8348056e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a26941759ecf94d67a27d4a610bc0f63d" id="r_a26941759ecf94d67a27d4a610bc0f63d"><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>&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a26941759ecf94d67a27d4a610bc0f63d">removeWordHelper</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;word, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt; curr, size_t index)</td></tr>
<tr class="memitem:a26941759ecf94d67a27d4a610bc0f63d" id="r_a26941759ecf94d67a27d4a610bc0f63d"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a26941759ecf94d67a27d4a610bc0f63d">removeWordHelper</a> (const std::string &amp;word, std::shared_ptr&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt; curr, size_t index)</td></tr>
<tr class="separator:a26941759ecf94d67a27d4a610bc0f63d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-methods" name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a6d10eb1669453395d1900ebd401954fb" id="r_a6d10eb1669453395d1900ebd401954fb"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6d10eb1669453395d1900ebd401954fb">hasChildren</a> (<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt; <a class="el" href="../../d5/da1/structnode.html">node</a>)</td></tr>
<tr class="memitem:a6d10eb1669453395d1900ebd401954fb" id="r_a6d10eb1669453395d1900ebd401954fb"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6d10eb1669453395d1900ebd401954fb">hasChildren</a> (std::shared_ptr&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt; <a class="el" href="../../d5/da1/structnode.html">node</a>)</td></tr>
<tr class="separator:a6d10eb1669453395d1900ebd401954fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a58b359fad33ca0064bd75a0d41a7b66d" id="r_a58b359fad33ca0064bd75a0d41a7b66d"><td class="memItemLeft" align="right" valign="top"><a id="a58b359fad33ca0064bd75a0d41a7b66d" name="a58b359fad33ca0064bd75a0d41a7b66d"></a>
<a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>m_root</b></td></tr>
<tr class="memitem:a58b359fad33ca0064bd75a0d41a7b66d" id="r_a58b359fad33ca0064bd75a0d41a7b66d"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a58b359fad33ca0064bd75a0d41a7b66d">m_root</a></td></tr>
<tr class="separator:a58b359fad33ca0064bd75a0d41a7b66d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-attribs" name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr class="memitem:a7c3ba4caf24378826a789848629177bd" id="r_a7c3ba4caf24378826a789848629177bd"><td class="memItemLeft" align="right" valign="top"><a id="a7c3ba4caf24378826a789848629177bd" name="a7c3ba4caf24378826a789848629177bd"></a>
static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>ALPHABETS</b> = 26</td></tr>
<tr class="memitem:a7c3ba4caf24378826a789848629177bd" id="r_a7c3ba4caf24378826a789848629177bd"><td class="memItemLeft" align="right" valign="top">static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7c3ba4caf24378826a789848629177bd">ALPHABETS</a> = 26</td></tr>
<tr class="separator:a7c3ba4caf24378826a789848629177bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A basic implementation of trie class to store only lower-case strings. You can extend the implementation to all the ASCII characters by changing the value of @ ALPHABETS to 128. </p>
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00016">16</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a6af57e9f25d0d0a2d59eea5a4a802908" name="a6af57e9f25d0d0a2d59eea5a4a802908"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6af57e9f25d0d0a2d59eea5a4a802908">&#9670;&#160;</a></span>Trie()</h2>
@@ -187,8 +204,9 @@ static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>AL
</div><div class="memdoc">
<p>constructor to initialise the root of the trie. </p>
<div class="fragment"><div class="line"><span class="lineno"> 103</span>: m_root(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html">std::make_shared&lt;TrieNode&gt;</a>()) {}</div>
<div class="ttc" id="amake_shared_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html">std::make_shared</a></div><div class="ttdeci">T make_shared(T... args)</div></div>
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00103">103</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 103</span>: m_root(std::make_shared&lt;TrieNode&gt;()) {}</div>
</div><!-- fragment -->
</div>
</div>
@@ -205,7 +223,7 @@ static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>AL
<tr>
<td class="memname">static bool Trie::hasChildren </td>
<td>(</td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;</td> <td class="paramname"><span class="paramname"><em>node</em></span></td><td>)</td>
<td class="paramtype">std::shared_ptr&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;</td> <td class="paramname"><span class="paramname"><em>node</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -224,6 +242,8 @@ static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>AL
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if a child is found </dd>
<dd>
<code>false</code> if a child is not found </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00041">41</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 41</span> {</div>
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; ALPHABETS; i++) {</div>
<div class="line"><span class="lineno"> 43</span> <span class="keywordflow">if</span> (<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>-&gt;character[i]) {</div>
@@ -232,7 +252,7 @@ static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>AL
<div class="line"><span class="lineno"> 46</span> }</div>
<div class="line"><span class="lineno"> 47</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 48</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> binary_search_tree.cpp:11</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> <a href="../../d3/d26/binary__search__tree_8cpp_source.html#l00011">binary_search_tree.cpp:11</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -248,7 +268,7 @@ static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>AL
<tr>
<td class="memname">void Trie::insert </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span></td><td>)</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -264,6 +284,8 @@ static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>AL
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00109">109</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 109</span> {</div>
<div class="line"><span class="lineno"> 110</span> <span class="keyword">auto</span> curr = m_root;</div>
<div class="line"><span class="lineno"> 111</span> <span class="keywordflow">for</span> (<span class="keywordtype">char</span> ch : word) {</div>
@@ -272,19 +294,14 @@ static constexpr size_t&#160;</td><td class="memItemRight" valign="bottom"><b>AL
<div class="line"><span class="lineno"> 114</span> <span class="comment">// if a node for current word is not already present in trie, create</span></div>
<div class="line"><span class="lineno"> 115</span> <span class="comment">// a new node for it.</span></div>
<div class="line"><span class="lineno"> 116</span> <span class="keywordflow">if</span> (!curr-&gt;character[index]) {</div>
<div class="line"><span class="lineno"> 117</span> curr-&gt;character[index] = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html">std::make_shared&lt;TrieNode&gt;</a>();</div>
<div class="line"><span class="lineno"> 117</span> curr-&gt;character[index] = std::make_shared&lt;TrieNode&gt;();</div>
<div class="line"><span class="lineno"> 118</span> }</div>
<div class="line"><span class="lineno"> 119</span> </div>
<div class="line"><span class="lineno"> 120</span> curr = curr-&gt;character[index];</div>
<div class="line"><span class="lineno"> 121</span> }</div>
<div class="line"><span class="lineno"> 122</span> curr-&gt;isEndOfWord = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 123</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="../../dd/d2f/class_trie_afd8b79959009b554e98ea7128b2886f2_cgraph.svg" width="268" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><!-- fragment -->
</div>
</div>
<a id="a734a08b52b8ad73bdd1f36ae8348056e" name="a734a08b52b8ad73bdd1f36ae8348056e"></a>
@@ -299,7 +316,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">void Trie::removeWord </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span></td><td>)</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -309,10 +326,12 @@ Here is the call graph for this function:</div>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00148">148</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 148</span> {</div>
<div class="line"><span class="lineno"> 149</span> m_root = <a class="code hl_function" href="#a26941759ecf94d67a27d4a610bc0f63d">removeWordHelper</a>(word, m_root, 0);</div>
<div class="line"><span class="lineno"> 150</span> }</div>
<div class="ttc" id="aclass_trie_html_a26941759ecf94d67a27d4a610bc0f63d"><div class="ttname"><a href="#a26941759ecf94d67a27d4a610bc0f63d">Trie::removeWordHelper</a></div><div class="ttdeci">std::shared_ptr&lt; TrieNode &gt; removeWordHelper(const std::string &amp;word, std::shared_ptr&lt; TrieNode &gt; curr, size_t index)</div><div class="ttdef"><b>Definition</b> trie_modern.cpp:64</div></div>
<div class="ttc" id="aclass_trie_html_a26941759ecf94d67a27d4a610bc0f63d"><div class="ttname"><a href="#a26941759ecf94d67a27d4a610bc0f63d">Trie::removeWordHelper</a></div><div class="ttdeci">std::shared_ptr&lt; TrieNode &gt; removeWordHelper(const std::string &amp;word, std::shared_ptr&lt; TrieNode &gt; curr, size_t index)</div><div class="ttdef"><b>Definition</b> <a href="../../dc/d93/trie__modern_8cpp_source.html#l00064">trie_modern.cpp:64</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -326,14 +345,14 @@ Here is the call graph for this function:</div>
<td class="mlabels-left">
<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>&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt; Trie::removeWordHelper </td>
<td class="memname">std::shared_ptr&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt; Trie::removeWordHelper </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span>, </td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;</td> <td class="paramname"><span class="paramname"><em>curr</em></span>, </td>
<td class="paramtype">std::shared_ptr&lt; <a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a> &gt;</td> <td class="paramname"><span class="paramname"><em>curr</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@@ -362,8 +381,10 @@ Here is the call graph for this function:</div>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00064">64</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 66</span> {</div>
<div class="line"><span class="lineno"> 67</span> <span class="keywordflow">if</span> (word.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() == index) {</div>
<div class="line"><span class="lineno"> 67</span> <span class="keywordflow">if</span> (word.size() == index) {</div>
<div class="line"><span class="lineno"> 68</span> <span class="keywordflow">if</span> (curr-&gt;isEndOfWord) {</div>
<div class="line"><span class="lineno"> 69</span> curr-&gt;isEndOfWord = <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 70</span> }</div>
@@ -378,7 +399,7 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 79</span> <span class="comment">// Throw a runtime error in case the user enters a word which is not</span></div>
<div class="line"><span class="lineno"> 80</span> <span class="comment">// present in the trie.</span></div>
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">if</span> (!curr-&gt;character[idx]) {</div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">throw</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/error/runtime_error.html">std::runtime_error</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/move.html">std::move</a>(<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>(<span class="stringliteral">&quot;Word not found.&quot;</span>)));</div>
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">throw</span> std::runtime_error(std::move(std::string(<span class="stringliteral">&quot;Word not found.&quot;</span>)));</div>
<div class="line"><span class="lineno"> 83</span> }</div>
<div class="line"><span class="lineno"> 84</span> </div>
<div class="line"><span class="lineno"> 85</span> curr-&gt;character[idx] =</div>
@@ -396,17 +417,8 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 97</span> }</div>
<div class="line"><span class="lineno"> 98</span> <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><span class="lineno"> 99</span> }</div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="aclass_trie_html_a6d10eb1669453395d1900ebd401954fb"><div class="ttname"><a href="#a6d10eb1669453395d1900ebd401954fb">Trie::hasChildren</a></div><div class="ttdeci">static bool hasChildren(std::shared_ptr&lt; TrieNode &gt; node)</div><div class="ttdef"><b>Definition</b> trie_modern.cpp:41</div></div>
<div class="ttc" id="amove_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/move.html">std::move</a></div><div class="ttdeci">T move(T... args)</div></div>
<div class="ttc" id="aruntime_error_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/runtime_error.html">std::runtime_error</a></div></div>
<div class="ttc" id="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">std::string::size</a></div><div class="ttdeci">T size(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dd/d2f/class_trie_a26941759ecf94d67a27d4a610bc0f63d_cgraph.svg" width="342" height="135"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="aclass_trie_html_a6d10eb1669453395d1900ebd401954fb"><div class="ttname"><a href="#a6d10eb1669453395d1900ebd401954fb">Trie::hasChildren</a></div><div class="ttdeci">static bool hasChildren(std::shared_ptr&lt; TrieNode &gt; node)</div><div class="ttdef"><b>Definition</b> <a href="../../dc/d93/trie__modern_8cpp_source.html#l00041">trie_modern.cpp:41</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a411e77126930a0942dd7b65e96b15206" name="a411e77126930a0942dd7b65e96b15206"></a>
@@ -421,7 +433,7 @@ Here is the call graph for this function:</div>
<tr>
<td class="memname">bool Trie::search </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span></td><td>)</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>word</em></span></td><td>)</td>
<td></td>
</tr>
</table>
@@ -440,6 +452,8 @@ Here is the call graph for this function:</div>
<dl class="section return"><dt>Returns</dt><dd>True if the word is found in trie and isEndOfWord is set to true. </dd>
<dd>
False if word is not found in trie or isEndOfWord is set to false. </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00132">132</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 132</span> {</div>
<div class="line"><span class="lineno"> 133</span> <span class="keyword">auto</span> curr = m_root;</div>
<div class="line"><span class="lineno"> 134</span> <span class="keywordflow">for</span> (<span class="keywordtype">char</span> ch : word) {</div>
@@ -455,10 +469,59 @@ False if word is not found in trie or isEndOfWord is set to false. </dd></dl>
<div class="line"><span class="lineno"> 144</span> <span class="keywordflow">return</span> curr-&gt;isEndOfWord;</div>
<div class="line"><span class="lineno"> 145</span> }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a7c3ba4caf24378826a789848629177bd" name="a7c3ba4caf24378826a789848629177bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c3ba4caf24378826a789848629177bd">&#9670;&#160;</a></span>ALPHABETS</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t Trie::ALPHABETS = 26</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00018">18</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
</div>
</div>
<a id="a58b359fad33ca0064bd75a0d41a7b66d" name="a58b359fad33ca0064bd75a0d41a7b66d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58b359fad33ca0064bd75a0d41a7b66d">&#9670;&#160;</a></span>m_root</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::shared_ptr&lt;<a class="el" href="../../de/d48/struct_trie_1_1_trie_node.html">TrieNode</a>&gt; Trie::m_root</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html#l00154">154</a> of file <a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>data_structures/<a class="el" href="../../dc/d93/trie__modern_8cpp.html">trie_modern.cpp</a></li>
<li>data_structures/<a class="el" href="../../dc/d93/trie__modern_8cpp_source.html">trie_modern.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->

View File

@@ -1,10 +0,0 @@
<map id="Trie::removeWordHelper" name="Trie::removeWordHelper">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,55,168,80"/>
<area shape="poly" id="edge3_Node000001_Node000001" title=" " alt="" coords="55,56,48,46,52,36,65,30,87,28,109,31,121,37,119,42,108,36,86,33,67,35,56,40,54,45,59,53"/>
<area shape="rect" id="Node000002" href="$dd/d2f/class_trie.html#a6d10eb1669453395d1900ebd401954fb" title=" " alt="" coords="216,5,336,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="138,51,208,33,210,38,140,57"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/move.html#" title=" " alt="" coords="236,55,316,80"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="168,65,221,65,221,70,168,70"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="220,104,332,130"/>
<area shape="poly" id="edge4_Node000001_Node000004" title=" " alt="" coords="140,78,210,97,208,102,138,84"/>
</map>

View File

@@ -1 +0,0 @@
2dfcdc6bedd3fb2f2384526b63c7fd78

View File

@@ -1,110 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: Trie::removeWordHelper Pages: 1 -->
<svg width="256pt" height="101pt"
viewBox="0.00 0.00 256.00 101.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 97.25)">
<title>Trie::removeWordHelper</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="121.75,-56.25 0,-56.25 0,-37 121.75,-37 121.75,-56.25"/>
<text text-anchor="middle" x="60.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">Trie::removeWordHelper</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge3_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge3_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.64,-56.54C28.5,-65.15 35.91,-74.25 60.88,-74.25 74.53,-74.25 82.93,-71.53 86.08,-67.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="89.46,-66.76 83.5,-58 82.7,-68.57 89.46,-66.76"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../dd/d2f/class_trie.html#a6d10eb1669453395d1900ebd401954fb" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="248,-93.25 157.75,-93.25 157.75,-74 248,-74 248,-93.25"/>
<text text-anchor="middle" x="202.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">Trie::hasChildren</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M100.13,-56.74C116.34,-61.02 135.42,-66.06 152.66,-70.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.64,-73.97 162.2,-73.14 153.43,-67.2 151.64,-73.97"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/move.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="232.62,-56.25 173.12,-56.25 173.12,-37 232.62,-37 232.62,-56.25"/>
<text text-anchor="middle" x="202.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::move</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M122.06,-46.62C135.43,-46.62 149.28,-46.62 161.62,-46.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="161.41,-50.13 171.41,-46.63 161.41,-43.13 161.41,-50.13"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="244.62,-19.25 161.12,-19.25 161.12,0 244.62,0 244.62,-19.25"/>
<text text-anchor="middle" x="202.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge4_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge4_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M100.13,-36.51C116.34,-32.23 135.42,-27.19 152.66,-22.63"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.43,-26.05 162.2,-20.11 151.64,-19.28 153.43,-26.05"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: Trie::removeWordHelper Pages: 1 -->
<svg width="256pt" height="101pt"
viewBox="0.00 0.00 256.00 101.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 97.25)">
<title>Trie::removeWordHelper</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="121.75,-56.25 0,-56.25 0,-37 121.75,-37 121.75,-56.25"/>
<text text-anchor="middle" x="60.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">Trie::removeWordHelper</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge3_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge3_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M38.64,-56.54C28.5,-65.15 35.91,-74.25 60.88,-74.25 74.53,-74.25 82.93,-71.53 86.08,-67.65"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="89.46,-66.76 83.5,-58 82.7,-68.57 89.46,-66.76"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../dd/d2f/class_trie.html#a6d10eb1669453395d1900ebd401954fb" target="_top" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="248,-93.25 157.75,-93.25 157.75,-74 248,-74 248,-93.25"/>
<text text-anchor="middle" x="202.88" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">Trie::hasChildren</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M100.13,-56.74C116.34,-61.02 135.42,-66.06 152.66,-70.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.64,-73.97 162.2,-73.14 153.43,-67.2 151.64,-73.97"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/move.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="232.62,-56.25 173.12,-56.25 173.12,-37 232.62,-37 232.62,-56.25"/>
<text text-anchor="middle" x="202.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::move</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M122.06,-46.62C135.43,-46.62 149.28,-46.62 161.62,-46.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="161.41,-50.13 171.41,-46.63 161.41,-43.13 161.41,-50.13"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="244.62,-19.25 161.12,-19.25 161.12,0 244.62,0 244.62,-19.25"/>
<text text-anchor="middle" x="202.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge4_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge4_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M100.13,-36.51C116.34,-32.23 135.42,-27.19 152.66,-22.63"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="153.43,-26.05 162.2,-20.11 151.64,-19.28 153.43,-26.05"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -1,5 +0,0 @@
<map id="Trie::insert" name="Trie::insert">
<area shape="rect" id="Node000001" title=" " alt="" coords="5,5,89,31"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/memory/shared_ptr/make_shared.html#" title=" " alt="" coords="137,5,262,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="89,16,121,16,121,21,89,21"/>
</map>

View File

@@ -1 +0,0 @@
ddde92be19236f01bbb64a2f62bfb00a

View File

@@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: Trie::insert Pages: 1 -->
<svg width="201pt" height="27pt"
viewBox="0.00 0.00 200.50 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>Trie::insert</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="62.5,-19.25 0,-19.25 0,0 62.5,0 62.5,-19.25"/>
<text text-anchor="middle" x="31.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">Trie::insert</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="192.5,-19.25 98.5,-19.25 98.5,0 192.5,0 192.5,-19.25"/>
<text text-anchor="middle" x="145.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M62.92,-9.62C70.42,-9.62 78.69,-9.62 86.99,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="86.76,-13.13 96.76,-9.63 86.76,-6.13 86.76,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: Trie::insert Pages: 1 -->
<svg width="201pt" height="27pt"
viewBox="0.00 0.00 200.50 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>Trie::insert</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title=" ">
<polygon fill="#999999" stroke="#666666" points="62.5,-19.25 0,-19.25 0,0 62.5,0 62.5,-19.25"/>
<text text-anchor="middle" x="31.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">Trie::insert</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="192.5,-19.25 98.5,-19.25 98.5,0 192.5,0 192.5,-19.25"/>
<text text-anchor="middle" x="145.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M62.92,-9.62C70.42,-9.62 78.69,-9.62 86.99,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="86.76,-13.13 96.76,-9.63 86.76,-6.13 86.76,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB