mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-07-16 11:32:44 +08:00
Documentation for 8b1eab204b
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- HTML header for doxygen 1.12.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
@@ -5,10 +6,15 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: others::postfix_expression::Stack Class Reference</title>
|
||||
<title>TheAlgorithms/C++: others::postfix_expression::Stack 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"> 1.0.0</span>
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -121,16 +138,17 @@ Collaboration diagram for others::postfix_expression::Stack:</div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||||
Public Attributes</h2></td></tr>
|
||||
<tr class="memitem:af06360122e20ce2ba32c574a27a20ba1" id="r_af06360122e20ce2ba32c574a27a20ba1"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a>< float, 20 > </td><td class="memItemRight" valign="bottom"><a class="el" href="#af06360122e20ce2ba32c574a27a20ba1">stack</a> {}</td></tr>
|
||||
<tr class="memitem:af06360122e20ce2ba32c574a27a20ba1" id="r_af06360122e20ce2ba32c574a27a20ba1"><td class="memItemLeft" align="right" valign="top">std::array< float, 20 > </td><td class="memItemRight" valign="bottom"><a class="el" href="#af06360122e20ce2ba32c574a27a20ba1">stack</a> {}</td></tr>
|
||||
<tr class="memdesc:af06360122e20ce2ba32c574a27a20ba1"><td class="mdescLeft"> </td><td class="mdescRight">Array which will be used to store numbers in the input. <br /></td></tr>
|
||||
<tr class="separator:af06360122e20ce2ba32c574a27a20ba1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6ae98710503b894b843d01cb69d5490c" id="r_a6ae98710503b894b843d01cb69d5490c"><td class="memItemLeft" align="right" valign="top"><a id="a6ae98710503b894b843d01cb69d5490c" name="a6ae98710503b894b843d01cb69d5490c"></a>
|
||||
int </td><td class="memItemRight" valign="bottom"><b>stackTop</b> = -1</td></tr>
|
||||
<tr class="memdesc:a6ae98710503b894b843d01cb69d5490c"><td class="mdescLeft"> </td><td class="mdescRight">Represents the index of the last value added to array. -1 means array is empty. <br /></td></tr>
|
||||
<tr class="memitem:a6ae98710503b894b843d01cb69d5490c" id="r_a6ae98710503b894b843d01cb69d5490c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a6ae98710503b894b843d01cb69d5490c">stackTop</a> = -1</td></tr>
|
||||
<tr class="memdesc:a6ae98710503b894b843d01cb69d5490c"><td class="mdescLeft"> </td><td class="mdescRight">Represents the index of the last value added to array. -1 means array is empty. <br /></td></tr>
|
||||
<tr class="separator:a6ae98710503b894b843d01cb69d5490c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Creates an array to be used as stack for storing values. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d7/d75/postfix__evaluation_8cpp_source.html#l00032">32</a> of file <a class="el" href="../../d7/d75/postfix__evaluation_8cpp_source.html">postfix_evaluation.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Member Data Documentation</h2>
|
||||
<a id="af06360122e20ce2ba32c574a27a20ba1" name="af06360122e20ce2ba32c574a27a20ba1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af06360122e20ce2ba32c574a27a20ba1">◆ </a></span>stack</h2>
|
||||
@@ -139,18 +157,38 @@ int </td><td class="memItemRight" valign="bottom"><b>stackTop</b> = -1</td>
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a><float, 20> others::postfix_expression::Stack::stack {}</td>
|
||||
<td class="memname">std::array<float, 20> others::postfix_expression::Stack::stack {}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Array which will be used to store numbers in the input. </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 34</span>{}; <span class="comment">///< Array which will be used to store numbers in the input</span></div>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d7/d75/postfix__evaluation_8cpp_source.html#l00034">34</a> of file <a class="el" href="../../d7/d75/postfix__evaluation_8cpp_source.html">postfix_evaluation.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 34</span>{}; </div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a6ae98710503b894b843d01cb69d5490c" name="a6ae98710503b894b843d01cb69d5490c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a6ae98710503b894b843d01cb69d5490c">◆ </a></span>stackTop</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int others::postfix_expression::Stack::stackTop = -1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Represents the index of the last value added to array. -1 means array is empty. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d7/d75/postfix__evaluation_8cpp_source.html#l00035">35</a> of file <a class="el" href="../../d7/d75/postfix__evaluation_8cpp_source.html">postfix_evaluation.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>others/<a class="el" href="../../d7/d75/postfix__evaluation_8cpp.html">postfix_evaluation.cpp</a></li>
|
||||
<li>others/<a class="el" href="../../d7/d75/postfix__evaluation_8cpp_source.html">postfix_evaluation.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
@@ -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++: data_structures/trie_using_hashmap.cpp File Reference</title>
|
||||
<title>TheAlgorithms/C++: data_structures/trie_using_hashmap.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
@@ -18,14 +24,24 @@
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
<script type="text/javascript">
|
||||
window.MathJax = {
|
||||
options: {
|
||||
ignoreHtmlClass: 'tex2jax_ignore',
|
||||
processHtmlClass: 'tex2jax_process'
|
||||
},
|
||||
loader: {
|
||||
load: ['[tex]/ams']
|
||||
},
|
||||
tex: {
|
||||
macros: {},
|
||||
packages: ['base','configmacros','ams']
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -125,7 +142,9 @@ Include dependency graph for trie_using_hashmap.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/dfd/trie__using__hashmap_8cpp__incl.svg" width="556" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
</div>
|
||||
<p><a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></td></tr>
|
||||
@@ -157,6 +176,8 @@ Functions</h2></td></tr>
|
||||
<div class="textblock"><p>Implementation of <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure using HashMap for different characters and method for predicting words based on prefix. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/bharath000" target="_blank">Venkata Bharath</a></dd></dl>
|
||||
<p>The <a class="el" href="../../dd/d2f/class_trie.html">Trie</a> data structure is implemented using unordered map to use memory optimally, predict_words method is developed to recommend words based on a given prefix along with other methods insert, delete, search, startwith in trie. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dc/d93/trie__modern_8cpp.html" title="A basic implementation of trie class to store only lower-case strings.">trie_modern.cpp</a> for difference </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp_source.html">trie_using_hashmap.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">◆ </a></span>main()</h2>
|
||||
@@ -175,17 +196,14 @@ Functions</h2></td></tr>
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00342">342</a> of file <a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp_source.html">trie_using_hashmap.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 342</span> {</div>
|
||||
<div class="line"><span class="lineno"> 343</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementaions</span></div>
|
||||
<div class="line"><span class="lineno"> 344</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 345</span>}</div>
|
||||
<div class="ttc" id="atrie__using__hashmap_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> trie_using_hashmap.cpp:221</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/d8a/trie__using__hashmap_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
||||
</div>
|
||||
|
||||
<div class="ttc" id="atrie__using__hashmap_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00221">trie_using_hashmap.cpp:221</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
|
||||
@@ -213,6 +231,8 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Self-test implementations. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00221">221</a> of file <a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp_source.html">trie_using_hashmap.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 221</span> {</div>
|
||||
<div class="line"><span class="lineno"> 222</span> <a class="code hl_class" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a> obj;</div>
|
||||
<div class="line"><span class="lineno"> 223</span> <span class="comment">// Inserting data into trie using the insert</span></div>
|
||||
@@ -231,10 +251,10 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 236</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"Bounce"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 237</span> </div>
|
||||
<div class="line"><span class="lineno"> 238</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"appy"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 239</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"appy is not a word in trie"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 239</span> std::cout << <span class="stringliteral">"appy is not a word in trie"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 240</span> </div>
|
||||
<div class="line"><span class="lineno"> 241</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"car"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 242</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"car is not a word in trie"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 242</span> std::cout << <span class="stringliteral">"car is not a word in trie"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 243</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"app"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 244</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"apple"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 245</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"apples"</span>));</div>
|
||||
@@ -248,7 +268,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 253</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"Bounce"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 254</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"Apple"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 255</span> </div>
|
||||
<div class="line"><span class="lineno"> 256</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All the Inserted words are present in the trie"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 256</span> std::cout << <span class="stringliteral">"All the Inserted words are present in the trie"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><span class="lineno"> 258</span> <span class="comment">// test for startwith prefix method</span></div>
|
||||
<div class="line"><span class="lineno"> 259</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"approachs"</span>));</div>
|
||||
@@ -269,54 +289,54 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 274</span> </div>
|
||||
<div class="line"><span class="lineno"> 275</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"C"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 276</span> </div>
|
||||
<div class="line"><span class="lineno"> 277</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All the tests passed for startwith method"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 277</span> std::cout << <span class="stringliteral">"All the tests passed for startwith method"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 278</span> </div>
|
||||
<div class="line"><span class="lineno"> 279</span> <span class="comment">// test for predict_words/recommendation of words based on a given prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 280</span> </div>
|
||||
<div class="line"><span class="lineno"> 281</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<std::string></a> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"a"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 281</span> std::vector<std::string> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"a"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 282</span> </div>
|
||||
<div class="line"><span class="lineno"> 283</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& str : obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"a"</span>)) {</div>
|
||||
<div class="line"><span class="lineno"> 284</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << str << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 283</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"a"</span>)) {</div>
|
||||
<div class="line"><span class="lineno"> 284</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 285</span> }</div>
|
||||
<div class="line"><span class="lineno"> 286</span> assert(pred_words.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 8);</div>
|
||||
<div class="line"><span class="lineno"> 287</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Returned all words that start with prefix a "</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 286</span> assert(pred_words.size() == 8);</div>
|
||||
<div class="line"><span class="lineno"> 287</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix a "</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 288</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"app"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 289</span> </div>
|
||||
<div class="line"><span class="lineno"> 290</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 291</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << str << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 290</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 291</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 292</span> }</div>
|
||||
<div class="line"><span class="lineno"> 293</span> </div>
|
||||
<div class="line"><span class="lineno"> 294</span> assert(pred_words.size() == 5);</div>
|
||||
<div class="line"><span class="lineno"> 295</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Returned all words that start with prefix app "</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 295</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix app "</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 296</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"A"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 297</span> </div>
|
||||
<div class="line"><span class="lineno"> 298</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 299</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << str << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 298</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 299</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 300</span> }</div>
|
||||
<div class="line"><span class="lineno"> 301</span> </div>
|
||||
<div class="line"><span class="lineno"> 302</span> assert(pred_words.size() == 1);</div>
|
||||
<div class="line"><span class="lineno"> 303</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Returned all words that start with prefix A "</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 303</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix A "</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 304</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"bu"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 305</span> </div>
|
||||
<div class="line"><span class="lineno"> 306</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 307</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << str << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 306</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 307</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 308</span> }</div>
|
||||
<div class="line"><span class="lineno"> 309</span> </div>
|
||||
<div class="line"><span class="lineno"> 310</span> assert(pred_words.size() == 2);</div>
|
||||
<div class="line"><span class="lineno"> 311</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Returned all words that start with prefix bu "</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 311</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix bu "</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 312</span> </div>
|
||||
<div class="line"><span class="lineno"> 313</span> <span class="comment">// tests for delete method</span></div>
|
||||
<div class="line"><span class="lineno"> 314</span> </div>
|
||||
<div class="line"><span class="lineno"> 315</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">delete_word</a>(<span class="stringliteral">"app"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 316</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"app"</span>));</div>
|
||||
<div class="line"><span class="lineno"> 317</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"word app is deleted sucessful"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 317</span> std::cout << <span class="stringliteral">"word app is deleted sucessful"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 318</span> </div>
|
||||
<div class="line"><span class="lineno"> 319</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"app"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 320</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 321</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << str << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 320</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><span class="lineno"> 321</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 322</span> }</div>
|
||||
<div class="line"><span class="lineno"> 323</span> assert(pred_words.size() == 4);</div>
|
||||
<div class="line"><span class="lineno"> 324</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"app is deleted sucessful"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 324</span> std::cout << <span class="stringliteral">"app is deleted sucessful"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 325</span> </div>
|
||||
<div class="line"><span class="lineno"> 326</span> <span class="comment">// test case for Chinese language</span></div>
|
||||
<div class="line"><span class="lineno"> 327</span> </div>
|
||||
@@ -325,27 +345,17 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 330</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"h"</span>);</div>
|
||||
<div class="line"><span class="lineno"> 331</span> </div>
|
||||
<div class="line"><span class="lineno"> 332</span> assert(pred_words.size() == 0);</div>
|
||||
<div class="line"><span class="lineno"> 333</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"No word starts with prefix h in trie"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 333</span> std::cout << <span class="stringliteral">"No word starts with prefix h in trie"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 334</span> </div>
|
||||
<div class="line"><span class="lineno"> 335</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All tests passed"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 335</span> std::cout << <span class="stringliteral">"All tests passed"</span> << std::endl;</div>
|
||||
<div class="line"><span class="lineno"> 336</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="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="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></div><div class="ttdoc">Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t...</div><div class="ttdef"><b>Definition</b> trie_using_hashmap.cpp:39</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_abcae0a4456e7f583ce716e3ef466dfd2"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">data_structures::trie_using_hashmap::Trie::insert</a></div><div class="ttdeci">void insert(const std::string &word)</div><div class="ttdoc">insert the string into the trie</div><div class="ttdef"><b>Definition</b> trie_using_hashmap.cpp:62</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ac0bf3d6791cba144b3f539835d835e75"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">data_structures::trie_using_hashmap::Trie::delete_word</a></div><div class="ttdeci">void delete_word(std::string word)</div><div class="ttdoc">delete a word/string from a trie</div><div class="ttdef"><b>Definition</b> trie_using_hashmap.cpp:122</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ad71eb24207c28b546631802dba97310f"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">data_structures::trie_using_hashmap::Trie::search</a></div><div class="ttdeci">bool search(const std::string &word)</div><div class="ttdoc">search a word/string inside the trie</div><div class="ttdef"><b>Definition</b> trie_using_hashmap.cpp:82</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ae15fdc7f2b5023992d87a711d78566c4"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">data_structures::trie_using_hashmap::Trie::predict_words</a></div><div class="ttdeci">std::vector< std::string > predict_words(const std::string &prefix)</div><div class="ttdoc">predict/recommend a word that starts with a given prefix</div><div class="ttdef"><b>Definition</b> trie_using_hashmap.cpp:188</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_af3aee573fbabd2c1510c0f74f842dd17"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">data_structures::trie_using_hashmap::Trie::startwith</a></div><div class="ttdeci">bool startwith(const std::string &prefix)</div><div class="ttdoc">search a word/string that starts with a given prefix</div><div class="ttdef"><b>Definition</b> trie_using_hashmap.cpp:107</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="asize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/size.html">std::vector::size</a></div><div class="ttdeci">T size(T... args)</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></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="../../d5/d8a/trie__using__hashmap_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="651" height="592"><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="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></div><div class="ttdoc">Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t...</div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00039">trie_using_hashmap.cpp:39</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_abcae0a4456e7f583ce716e3ef466dfd2"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">data_structures::trie_using_hashmap::Trie::insert</a></div><div class="ttdeci">void insert(const std::string &word)</div><div class="ttdoc">insert the string into the trie</div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00062">trie_using_hashmap.cpp:62</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ac0bf3d6791cba144b3f539835d835e75"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">data_structures::trie_using_hashmap::Trie::delete_word</a></div><div class="ttdeci">void delete_word(std::string word)</div><div class="ttdoc">delete a word/string from a trie</div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00122">trie_using_hashmap.cpp:122</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ad71eb24207c28b546631802dba97310f"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">data_structures::trie_using_hashmap::Trie::search</a></div><div class="ttdeci">bool search(const std::string &word)</div><div class="ttdoc">search a word/string inside the trie</div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00082">trie_using_hashmap.cpp:82</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ae15fdc7f2b5023992d87a711d78566c4"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">data_structures::trie_using_hashmap::Trie::predict_words</a></div><div class="ttdeci">std::vector< std::string > predict_words(const std::string &prefix)</div><div class="ttdoc">predict/recommend a word that starts with a given prefix</div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00188">trie_using_hashmap.cpp:188</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_af3aee573fbabd2c1510c0f74f842dd17"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">data_structures::trie_using_hashmap::Trie::startwith</a></div><div class="ttdeci">bool startwith(const std::string &prefix)</div><div class="ttdoc">search a word/string that starts with a given prefix</div><div class="ttdef"><b>Definition</b> <a href="../../d5/d8a/trie__using__hashmap_8cpp_source.html#l00107">trie_using_hashmap.cpp:107</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<map id="test" name="test">
|
||||
<area shape="rect" id="Node000001" title="Self-test implementations." alt="" coords="5,335,49,360"/>
|
||||
<area shape="rect" id="Node000002" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" title="delete a word/string from a trie" alt="" coords="97,100,246,155"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="28,333,49,262,68,217,95,175,105,164,109,167,99,178,73,219,54,264,33,335"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="136,189,207,215"/>
|
||||
<area shape="poly" id="edge7_Node000001_Node000008" title=" " alt="" coords="30,333,52,281,71,252,95,225,119,211,122,216,98,230,75,255,57,284,35,335"/>
|
||||
<area shape="rect" id="Node000009" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" title="insert the string into the trie" alt="" coords="97,240,246,295"/>
|
||||
<area shape="poly" id="edge8_Node000001_Node000009" title=" " alt="" coords="48,333,95,305,103,301,106,306,98,310,51,337"/>
|
||||
<area shape="rect" id="Node000011" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" title="predict/recommend a word that starts with a given prefix" alt="" coords="97,320,246,375"/>
|
||||
<area shape="poly" id="edge10_Node000001_Node000011" title=" " alt="" coords="49,345,81,345,81,350,49,350"/>
|
||||
<area shape="rect" id="Node000014" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" title="search a word/string inside the trie" alt="" coords="97,400,246,455"/>
|
||||
<area shape="poly" id="edge15_Node000001_Node000014" title=" " alt="" coords="51,358,98,385,106,389,103,394,95,390,48,362"/>
|
||||
<area shape="rect" id="Node000015" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="114,480,229,506"/>
|
||||
<area shape="poly" id="edge16_Node000001_Node000015" title=" " alt="" coords="35,360,57,411,75,440,98,466,105,470,101,474,95,469,71,443,52,414,30,362"/>
|
||||
<area shape="rect" id="Node000016" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" title="search a word/string that starts with a given prefix" alt="" coords="97,530,246,586"/>
|
||||
<area shape="poly" id="edge17_Node000001_Node000016" title=" " alt="" coords="33,360,52,432,71,476,99,517,100,518,96,522,95,520,67,479,47,434,28,361"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/back.html#" title=" " alt="" coords="311,5,426,31"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="205,97,246,67,293,40,304,35,306,39,295,45,249,72,209,101"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/pop.html#" title=" " alt="" coords="314,55,423,80"/>
|
||||
<area shape="poly" id="edge3_Node000002_Node000004" title=" " alt="" coords="245,102,308,83,310,88,247,107"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/pop_back.html#" title=" " alt="" coords="497,200,640,226"/>
|
||||
<area shape="poly" id="edge4_Node000002_Node000005" title=" " alt="" coords="247,120,342,123,394,130,444,141,495,162,538,189,536,193,493,167,443,146,393,135,341,128,246,126"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/push.html#" title=" " alt="" coords="311,156,426,182"/>
|
||||
<area shape="poly" id="edge5_Node000002_Node000006" title=" " alt="" coords="247,141,297,151,296,156,246,146"/>
|
||||
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/top.html#" title=" " alt="" coords="316,205,421,231"/>
|
||||
<area shape="poly" id="edge6_Node000002_Node000007" title=" " alt="" coords="221,154,295,192,309,197,307,202,293,197,218,158"/>
|
||||
<area shape="rect" id="Node000010" 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="306,255,431,280"/>
|
||||
<area shape="poly" id="edge9_Node000009_Node000010" title=" " alt="" coords="246,265,291,265,291,270,246,270"/>
|
||||
<area shape="rect" id="Node000012" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" title="helper function to predict/recommend words that starts with a given prefix from the end of prefix's n..." alt="" coords="294,329,443,385"/>
|
||||
<area shape="poly" id="edge11_Node000011_Node000012" title=" " alt="" coords="246,348,279,350,278,355,246,354"/>
|
||||
<area shape="poly" id="edge13_Node000012_Node000005" title=" " alt="" coords="407,326,535,233,539,237,411,331"/>
|
||||
<area shape="poly" id="edge12_Node000012_Node000012" title=" " alt="" coords="330,328,330,319,337,310,350,304,369,302,390,305,402,312,400,317,388,310,369,308,351,309,340,314,335,321,335,329"/>
|
||||
<area shape="rect" id="Node000013" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="491,344,646,370"/>
|
||||
<area shape="poly" id="edge14_Node000012_Node000013" title=" " alt="" coords="444,354,475,354,475,360,444,360"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
1e8da73b66afc80a5ad64f1f35a9935c
|
||||
@@ -1,347 +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: test Pages: 1 -->
|
||||
<svg width="488pt" height="444pt"
|
||||
viewBox="0.00 0.00 488.25 443.50" 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 439.5)">
|
||||
<title>test</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Self-test implementations.">
|
||||
<polygon fill="#999999" stroke="#666666" points="32.5,-188.5 0,-188.5 0,-169.25 32.5,-169.25 32.5,-188.5"/>
|
||||
<text text-anchor="middle" x="16.25" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" target="_top" xlink:title="delete a word/string from a trie">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-364.75 68.5,-364.75 68.5,-323 180.5,-323 180.5,-364.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-351.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-340" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-328.75" font-family="Helvetica,sans-Serif" font-size="10.00">::delete_word</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M19.14,-188.88C23.91,-211.89 38.26,-269.45 68.5,-306.88 70.92,-309.87 73.66,-312.72 76.57,-315.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="74.09,-317.89 84.02,-321.57 78.55,-312.5 74.09,-317.89"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="151.25,-297.5 97.75,-297.5 97.75,-278.25 151.25,-278.25 151.25,-297.5"/>
|
||||
<text text-anchor="middle" x="124.5" y="-284" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M20.28,-188.8C26.39,-207.22 41.94,-246.82 68.5,-268.88 73.78,-273.26 80.13,-276.65 86.6,-279.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="85.44,-282.57 96.03,-282.5 87.71,-275.95 85.44,-282.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" target="_top" xlink:title="insert the string into the trie">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-259.75 68.5,-259.75 68.5,-218 180.5,-218 180.5,-259.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-246.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-223.75" font-family="Helvetica,sans-Serif" font-size="10.00">::insert</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node9 -->
|
||||
<g id="edge8_Node000001_Node000009" class="edge">
|
||||
<title>Node1->Node9</title>
|
||||
<g id="a_edge8_Node000001_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.88,-188.19C43,-194.18 56.47,-202.08 68.5,-208.88 70.38,-209.94 72.3,-211.02 74.25,-212.1"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="72.3,-215.03 82.74,-216.82 75.69,-208.9 72.3,-215.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-199.75 68.5,-199.75 68.5,-158 180.5,-158 180.5,-199.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-186.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-163.75" font-family="Helvetica,sans-Serif" font-size="10.00">::predict_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node11 -->
|
||||
<g id="edge10_Node000001_Node000011" class="edge">
|
||||
<title>Node1->Node11</title>
|
||||
<g id="a_edge10_Node000001_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.93,-178.88C39.67,-178.88 48.04,-178.88 56.95,-178.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="56.93,-182.38 66.93,-178.88 56.93,-175.38 56.93,-182.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" target="_top" xlink:title="search a word/string inside the trie">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-139.75 68.5,-139.75 68.5,-98 180.5,-98 180.5,-139.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node14 -->
|
||||
<g id="edge15_Node000001_Node000014" class="edge">
|
||||
<title>Node1->Node14</title>
|
||||
<g id="a_edge15_Node000001_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.88,-169.56C43,-163.57 56.47,-155.67 68.5,-148.88 70.38,-147.81 72.3,-146.73 74.25,-145.65"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.69,-148.85 82.74,-140.93 72.3,-142.72 75.69,-148.85"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="167.75,-79.5 81.25,-79.5 81.25,-60.25 167.75,-60.25 167.75,-79.5"/>
|
||||
<text text-anchor="middle" x="124.5" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node15 -->
|
||||
<g id="edge16_Node000001_Node000015" class="edge">
|
||||
<title>Node1->Node15</title>
|
||||
<g id="a_edge16_Node000001_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M20.28,-168.95C26.39,-150.53 41.94,-110.93 68.5,-88.88 70,-87.63 71.58,-86.47 73.23,-85.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="74.79,-88.52 81.89,-80.65 71.43,-82.37 74.79,-88.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" target="_top" xlink:title="search a word/string that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-41.75 68.5,-41.75 68.5,0 180.5,0 180.5,-41.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::startwith</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge17_Node000001_Node000016" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<g id="a_edge17_Node000001_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M18.84,-169.02C23.05,-145.82 36.39,-87.03 68.5,-50.88 68.85,-50.48 69.21,-50.09 69.58,-49.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="71.76,-52.44 76.88,-43.17 67.09,-47.22 71.76,-52.44"/>
|
||||
</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/string/basic_string/back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="315.75,-435.5 229.25,-435.5 229.25,-416.25 315.75,-416.25 315.75,-435.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-422" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M151.26,-365.12C168.8,-378.78 193.02,-396.11 216.5,-407.88 219.19,-409.22 222,-410.5 224.86,-411.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="223.38,-414.88 233.97,-415.21 225.89,-408.35 223.38,-414.88"/>
|
||||
</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/container/stack/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="313.12,-398.5 231.88,-398.5 231.88,-379.25 313.12,-379.25 313.12,-398.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-385" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge3_Node000002_Node000004" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-360.89C196.27,-365.69 212.99,-370.84 227.79,-375.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.65,-378.71 237.23,-378.31 228.71,-372.02 226.65,-378.71"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/pop_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="476.12,-289.5 368.62,-289.5 368.62,-270.25 476.12,-270.25 476.12,-289.5"/>
|
||||
<text text-anchor="middle" x="422.38" y="-276" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::pop_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4_Node000002_Node000005" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.92,-347.21C222.38,-348.14 280.05,-346.06 328.5,-331.88 354.27,-324.33 380.7,-308.6 398.75,-296.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="400.65,-299.35 406.85,-290.76 396.64,-293.61 400.65,-299.35"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="315.75,-322.5 229.25,-322.5 229.25,-303.25 315.75,-303.25 315.75,-322.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-309" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node6 -->
|
||||
<g id="edge5_Node000002_Node000006" class="edge">
|
||||
<title>Node2->Node6</title>
|
||||
<g id="a_edge5_Node000002_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-332.16C192.94,-329.56 205.89,-326.81 218.06,-324.22"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.44,-327.72 227.49,-322.22 216.98,-320.87 218.44,-327.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="312,-285.5 233,-285.5 233,-266.25 312,-266.25 312,-285.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-272" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node7 -->
|
||||
<g id="edge6_Node000002_Node000007" class="edge">
|
||||
<title>Node2->Node7</title>
|
||||
<g id="a_edge6_Node000002_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M160.6,-322.59C177.19,-313.05 197.48,-302.13 216.5,-293.88 219.82,-292.44 223.29,-291.04 226.81,-289.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="227.72,-293.11 235.96,-286.45 225.37,-286.52 227.72,-293.11"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="319.5,-248.5 225.5,-248.5 225.5,-229.25 319.5,-229.25 319.5,-248.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge9_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-238.88C191.6,-238.88 203.08,-238.88 214.06,-238.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="213.76,-242.38 223.76,-238.88 213.76,-235.38 213.76,-242.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix's n...">
|
||||
<polygon fill="white" stroke="#666666" points="328.5,-192.75 216.5,-192.75 216.5,-151 328.5,-151 328.5,-192.75"/>
|
||||
<text text-anchor="start" x="224.5" y="-179.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="224.5" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="272.5" y="-156.75" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node12 -->
|
||||
<g id="edge11_Node000011_Node000012" class="edge">
|
||||
<title>Node11->Node12</title>
|
||||
<g id="a_edge11_Node000011_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-176.23C188.6,-175.85 196.8,-175.46 204.89,-175.07"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="204.89,-178.57 214.71,-174.6 204.56,-171.58 204.89,-178.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node5 -->
|
||||
<g id="edge13_Node000012_Node000005" class="edge">
|
||||
<title>Node12->Node5</title>
|
||||
<g id="a_edge13_Node000012_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M302.72,-193.21C330.93,-213.82 373.05,-244.58 398.79,-263.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="396.42,-265.98 406.56,-269.06 400.55,-260.33 396.42,-265.98"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node12 -->
|
||||
<g id="edge12_Node000012_Node000012" class="edge">
|
||||
<title>Node12->Node12</title>
|
||||
<g id="a_edge12_Node000012_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M245.18,-193.07C242.58,-202.55 251.69,-210.75 272.5,-210.75 284.53,-210.75 292.65,-208.01 296.86,-203.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="300.15,-205.1 299.42,-194.53 293.4,-203.25 300.15,-205.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="480.25,-181.5 364.5,-181.5 364.5,-162.25 480.25,-162.25 480.25,-181.5"/>
|
||||
<text text-anchor="middle" x="422.38" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge14_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge14_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M328.98,-171.88C336.69,-171.88 344.69,-171.88 352.6,-171.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="352.59,-175.38 362.59,-171.88 352.59,-168.38 352.59,-175.38"/>
|
||||
</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: 17 KiB |
@@ -1,321 +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: test Pages: 1 -->
|
||||
<svg width="488pt" height="444pt"
|
||||
viewBox="0.00 0.00 488.25 443.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 439.5)">
|
||||
<title>test</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Self-test implementations.">
|
||||
<polygon fill="#999999" stroke="#666666" points="32.5,-188.5 0,-188.5 0,-169.25 32.5,-169.25 32.5,-188.5"/>
|
||||
<text text-anchor="middle" x="16.25" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" target="_top" xlink:title="delete a word/string from a trie">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-364.75 68.5,-364.75 68.5,-323 180.5,-323 180.5,-364.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-351.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-340" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-328.75" font-family="Helvetica,sans-Serif" font-size="10.00">::delete_word</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M19.14,-188.88C23.91,-211.89 38.26,-269.45 68.5,-306.88 70.92,-309.87 73.66,-312.72 76.57,-315.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="74.09,-317.89 84.02,-321.57 78.55,-312.5 74.09,-317.89"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="151.25,-297.5 97.75,-297.5 97.75,-278.25 151.25,-278.25 151.25,-297.5"/>
|
||||
<text text-anchor="middle" x="124.5" y="-284" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M20.28,-188.8C26.39,-207.22 41.94,-246.82 68.5,-268.88 73.78,-273.26 80.13,-276.65 86.6,-279.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="85.44,-282.57 96.03,-282.5 87.71,-275.95 85.44,-282.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" target="_top" xlink:title="insert the string into the trie">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-259.75 68.5,-259.75 68.5,-218 180.5,-218 180.5,-259.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-246.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-223.75" font-family="Helvetica,sans-Serif" font-size="10.00">::insert</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node9 -->
|
||||
<g id="edge8_Node000001_Node000009" class="edge">
|
||||
<title>Node1->Node9</title>
|
||||
<g id="a_edge8_Node000001_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.88,-188.19C43,-194.18 56.47,-202.08 68.5,-208.88 70.38,-209.94 72.3,-211.02 74.25,-212.1"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="72.3,-215.03 82.74,-216.82 75.69,-208.9 72.3,-215.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-199.75 68.5,-199.75 68.5,-158 180.5,-158 180.5,-199.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-186.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-163.75" font-family="Helvetica,sans-Serif" font-size="10.00">::predict_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node11 -->
|
||||
<g id="edge10_Node000001_Node000011" class="edge">
|
||||
<title>Node1->Node11</title>
|
||||
<g id="a_edge10_Node000001_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.93,-178.88C39.67,-178.88 48.04,-178.88 56.95,-178.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="56.93,-182.38 66.93,-178.88 56.93,-175.38 56.93,-182.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" target="_top" xlink:title="search a word/string inside the trie">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-139.75 68.5,-139.75 68.5,-98 180.5,-98 180.5,-139.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node14 -->
|
||||
<g id="edge15_Node000001_Node000014" class="edge">
|
||||
<title>Node1->Node14</title>
|
||||
<g id="a_edge15_Node000001_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M32.88,-169.56C43,-163.57 56.47,-155.67 68.5,-148.88 70.38,-147.81 72.3,-146.73 74.25,-145.65"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.69,-148.85 82.74,-140.93 72.3,-142.72 75.69,-148.85"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="167.75,-79.5 81.25,-79.5 81.25,-60.25 167.75,-60.25 167.75,-79.5"/>
|
||||
<text text-anchor="middle" x="124.5" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node15 -->
|
||||
<g id="edge16_Node000001_Node000015" class="edge">
|
||||
<title>Node1->Node15</title>
|
||||
<g id="a_edge16_Node000001_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M20.28,-168.95C26.39,-150.53 41.94,-110.93 68.5,-88.88 70,-87.63 71.58,-86.47 73.23,-85.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="74.79,-88.52 81.89,-80.65 71.43,-82.37 74.79,-88.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" target="_top" xlink:title="search a word/string that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="180.5,-41.75 68.5,-41.75 68.5,0 180.5,0 180.5,-41.75"/>
|
||||
<text text-anchor="start" x="76.5" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="76.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="124.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::startwith</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node16 -->
|
||||
<g id="edge17_Node000001_Node000016" class="edge">
|
||||
<title>Node1->Node16</title>
|
||||
<g id="a_edge17_Node000001_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M18.84,-169.02C23.05,-145.82 36.39,-87.03 68.5,-50.88 68.85,-50.48 69.21,-50.09 69.58,-49.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="71.76,-52.44 76.88,-43.17 67.09,-47.22 71.76,-52.44"/>
|
||||
</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/string/basic_string/back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="315.75,-435.5 229.25,-435.5 229.25,-416.25 315.75,-416.25 315.75,-435.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-422" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M151.26,-365.12C168.8,-378.78 193.02,-396.11 216.5,-407.88 219.19,-409.22 222,-410.5 224.86,-411.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="223.38,-414.88 233.97,-415.21 225.89,-408.35 223.38,-414.88"/>
|
||||
</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/container/stack/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="313.12,-398.5 231.88,-398.5 231.88,-379.25 313.12,-379.25 313.12,-398.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-385" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node4 -->
|
||||
<g id="edge3_Node000002_Node000004" class="edge">
|
||||
<title>Node2->Node4</title>
|
||||
<g id="a_edge3_Node000002_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-360.89C196.27,-365.69 212.99,-370.84 227.79,-375.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="226.65,-378.71 237.23,-378.31 228.71,-372.02 226.65,-378.71"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/pop_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="476.12,-289.5 368.62,-289.5 368.62,-270.25 476.12,-270.25 476.12,-289.5"/>
|
||||
<text text-anchor="middle" x="422.38" y="-276" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::pop_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node5 -->
|
||||
<g id="edge4_Node000002_Node000005" class="edge">
|
||||
<title>Node2->Node5</title>
|
||||
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.92,-347.21C222.38,-348.14 280.05,-346.06 328.5,-331.88 354.27,-324.33 380.7,-308.6 398.75,-296.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="400.65,-299.35 406.85,-290.76 396.64,-293.61 400.65,-299.35"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="315.75,-322.5 229.25,-322.5 229.25,-303.25 315.75,-303.25 315.75,-322.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-309" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node6 -->
|
||||
<g id="edge5_Node000002_Node000006" class="edge">
|
||||
<title>Node2->Node6</title>
|
||||
<g id="a_edge5_Node000002_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-332.16C192.94,-329.56 205.89,-326.81 218.06,-324.22"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.44,-327.72 227.49,-322.22 216.98,-320.87 218.44,-327.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="312,-285.5 233,-285.5 233,-266.25 312,-266.25 312,-285.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-272" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node7 -->
|
||||
<g id="edge6_Node000002_Node000007" class="edge">
|
||||
<title>Node2->Node7</title>
|
||||
<g id="a_edge6_Node000002_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M160.6,-322.59C177.19,-313.05 197.48,-302.13 216.5,-293.88 219.82,-292.44 223.29,-291.04 226.81,-289.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="227.72,-293.11 235.96,-286.45 225.37,-286.52 227.72,-293.11"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><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="319.5,-248.5 225.5,-248.5 225.5,-229.25 319.5,-229.25 319.5,-248.5"/>
|
||||
<text text-anchor="middle" x="272.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9->Node10 -->
|
||||
<g id="edge9_Node000009_Node000010" class="edge">
|
||||
<title>Node9->Node10</title>
|
||||
<g id="a_edge9_Node000009_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-238.88C191.6,-238.88 203.08,-238.88 214.06,-238.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="213.76,-242.38 223.76,-238.88 213.76,-235.38 213.76,-242.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix's n...">
|
||||
<polygon fill="white" stroke="#666666" points="328.5,-192.75 216.5,-192.75 216.5,-151 328.5,-151 328.5,-192.75"/>
|
||||
<text text-anchor="start" x="224.5" y="-179.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="224.5" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="272.5" y="-156.75" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node12 -->
|
||||
<g id="edge11_Node000011_Node000012" class="edge">
|
||||
<title>Node11->Node12</title>
|
||||
<g id="a_edge11_Node000011_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M180.7,-176.23C188.6,-175.85 196.8,-175.46 204.89,-175.07"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="204.89,-178.57 214.71,-174.6 204.56,-171.58 204.89,-178.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node5 -->
|
||||
<g id="edge13_Node000012_Node000005" class="edge">
|
||||
<title>Node12->Node5</title>
|
||||
<g id="a_edge13_Node000012_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M302.72,-193.21C330.93,-213.82 373.05,-244.58 398.79,-263.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="396.42,-265.98 406.56,-269.06 400.55,-260.33 396.42,-265.98"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node12 -->
|
||||
<g id="edge12_Node000012_Node000012" class="edge">
|
||||
<title>Node12->Node12</title>
|
||||
<g id="a_edge12_Node000012_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M245.18,-193.07C242.58,-202.55 251.69,-210.75 272.5,-210.75 284.53,-210.75 292.65,-208.01 296.86,-203.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="300.15,-205.1 299.42,-194.53 293.4,-203.25 300.15,-205.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="480.25,-181.5 364.5,-181.5 364.5,-162.25 480.25,-162.25 480.25,-181.5"/>
|
||||
<text text-anchor="middle" x="422.38" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge14_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge14_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M328.98,-171.88C336.69,-171.88 344.69,-171.88 352.6,-171.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="352.59,-175.38 362.59,-171.88 352.59,-168.38 352.59,-175.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 17 KiB |
@@ -1,37 +0,0 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,335,55,360"/>
|
||||
<area shape="rect" id="Node000002" href="$d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self-test implementations." alt="" coords="103,335,146,360"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,345,87,345,87,350,55,350"/>
|
||||
<area shape="rect" id="Node000003" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" title="delete a word/string from a trie" alt="" coords="194,100,343,155"/>
|
||||
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="126,333,146,262,165,217,192,175,203,164,207,167,196,178,170,219,151,264,131,335"/>
|
||||
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="233,189,304,215"/>
|
||||
<area shape="poly" id="edge8_Node000002_Node000009" title=" " alt="" coords="127,333,149,281,168,252,192,225,217,211,219,216,196,230,172,255,154,284,132,335"/>
|
||||
<area shape="rect" id="Node000010" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" title="insert the string into the trie" alt="" coords="194,240,343,295"/>
|
||||
<area shape="poly" id="edge9_Node000002_Node000010" title=" " alt="" coords="145,333,193,305,200,301,203,306,195,310,148,337"/>
|
||||
<area shape="rect" id="Node000012" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" title="predict/recommend a word that starts with a given prefix" alt="" coords="194,320,343,375"/>
|
||||
<area shape="poly" id="edge11_Node000002_Node000012" title=" " alt="" coords="147,345,179,345,179,350,147,350"/>
|
||||
<area shape="rect" id="Node000015" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" title="search a word/string inside the trie" alt="" coords="194,400,343,455"/>
|
||||
<area shape="poly" id="edge16_Node000002_Node000015" title=" " alt="" coords="148,358,195,385,203,389,200,394,193,390,145,362"/>
|
||||
<area shape="rect" id="Node000016" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="211,480,326,506"/>
|
||||
<area shape="poly" id="edge17_Node000002_Node000016" title=" " alt="" coords="132,360,154,411,172,440,196,466,202,470,199,474,192,469,168,443,149,414,127,362"/>
|
||||
<area shape="rect" id="Node000017" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" title="search a word/string that starts with a given prefix" alt="" coords="194,530,343,586"/>
|
||||
<area shape="poly" id="edge18_Node000002_Node000017" title=" " alt="" coords="130,360,149,432,169,476,196,517,197,518,193,522,192,520,164,479,144,434,125,361"/>
|
||||
<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/back.html#" title=" " alt="" coords="408,5,524,31"/>
|
||||
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="303,97,343,67,390,40,401,35,404,39,393,45,346,72,306,101"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/pop.html#" title=" " alt="" coords="412,55,520,80"/>
|
||||
<area shape="poly" id="edge4_Node000003_Node000005" title=" " alt="" coords="343,102,406,83,407,88,344,107"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/pop_back.html#" title=" " alt="" coords="594,200,738,226"/>
|
||||
<area shape="poly" id="edge5_Node000003_Node000006" title=" " alt="" coords="344,120,439,123,491,130,541,141,593,162,636,189,633,193,590,167,540,146,490,135,439,128,344,126"/>
|
||||
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/push.html#" title=" " alt="" coords="408,156,524,182"/>
|
||||
<area shape="poly" id="edge6_Node000003_Node000007" title=" " alt="" coords="344,141,394,151,393,156,343,146"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/stack/top.html#" title=" " alt="" coords="413,205,519,231"/>
|
||||
<area shape="poly" id="edge7_Node000003_Node000008" title=" " alt="" coords="318,154,392,192,406,197,404,202,390,197,316,158"/>
|
||||
<area shape="rect" id="Node000011" 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="403,255,529,280"/>
|
||||
<area shape="poly" id="edge10_Node000010_Node000011" title=" " alt="" coords="344,265,388,265,388,270,344,270"/>
|
||||
<area shape="rect" id="Node000013" href="$d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" title="helper function to predict/recommend words that starts with a given prefix from the end of prefix's n..." alt="" coords="391,329,541,385"/>
|
||||
<area shape="poly" id="edge12_Node000012_Node000013" title=" " alt="" coords="344,348,376,350,376,355,343,354"/>
|
||||
<area shape="poly" id="edge14_Node000013_Node000006" title=" " alt="" coords="505,326,633,233,636,237,508,331"/>
|
||||
<area shape="poly" id="edge13_Node000013_Node000013" title=" " alt="" coords="427,328,427,319,434,310,447,304,466,302,487,305,500,312,497,317,485,310,466,308,449,309,438,314,432,321,432,329"/>
|
||||
<area shape="rect" id="Node000014" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="589,344,743,370"/>
|
||||
<area shape="poly" id="edge15_Node000013_Node000014" title=" " alt="" coords="541,354,573,354,573,360,541,360"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
844bc27b3f11120f54de131666dd007f
|
||||
@@ -1,422 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<!--zoomable 444 -->
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" onload="init(evt)">
|
||||
|
||||
<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>
|
||||
|
||||
<defs>
|
||||
<circle id="rim" cx="0" cy="0" r="7"/>
|
||||
<circle id="rim2" cx="0" cy="0" r="3.5"/>
|
||||
<g id="zoomPlus">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomplus.mouseover" end="zoomplus.mouseout"/></use>
|
||||
<path d="M-4,0h8M0,-4v8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="zoomMin">
|
||||
<use xlink:href="#rim" fill="#404040"><set attributeName="fill" to="#808080" begin="zoomminus.mouseover" end="zoomminus.mouseout"/></use>
|
||||
<path d="M-4,0h8" fill="none" stroke="white" stroke-width="1.5" pointer-events="none"/>
|
||||
</g>
|
||||
<g id="arrowUp" transform="translate(30 24)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowRight" transform="rotate(90) translate(36 -43)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowDown" transform="rotate(180) translate(-30 -48)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="arrowLeft" transform="rotate(270) translate(-36 17)">
|
||||
<use xlink:href="#rim"/>
|
||||
<path pointer-events="none" fill="none" stroke="white" stroke-width="1.5" d="M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5"/>
|
||||
</g>
|
||||
<g id="resetDef">
|
||||
<use xlink:href="#rim2" fill="#404040"><set attributeName="fill" to="#808080" begin="reset.mouseover" end="reset.mouseout"/></use>
|
||||
</g>
|
||||
</defs>
|
||||
<script type="application/ecmascript">
|
||||
var viewWidth = 561;
|
||||
var viewHeight = 444;
|
||||
var sectionId = 'dynsection-1';
|
||||
</script>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="viewport">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Main function.">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-188.5 0,-188.5 0,-169.25 37,-169.25 37,-188.5"/>
|
||||
<text text-anchor="middle" x="18.5" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self-test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="105.5,-188.5 73,-188.5 73,-169.25 105.5,-169.25 105.5,-188.5"/>
|
||||
<text text-anchor="middle" x="89.25" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-178.88C44.58,-178.88 53.31,-178.88 61.45,-178.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-182.38 71.2,-178.88 61.2,-175.38 61.2,-182.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" target="_top" xlink:title="delete a word/string from a trie">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-364.75 141.5,-364.75 141.5,-323 253.5,-323 253.5,-364.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-351.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-340" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-328.75" font-family="Helvetica,sans-Serif" font-size="10.00">::delete_word</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M92.14,-188.88C96.91,-211.89 111.26,-269.45 141.5,-306.88 143.92,-309.87 146.66,-312.72 149.57,-315.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.09,-317.89 157.02,-321.57 151.55,-312.5 147.09,-317.89"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="224.25,-297.5 170.75,-297.5 170.75,-278.25 224.25,-278.25 224.25,-297.5"/>
|
||||
<text text-anchor="middle" x="197.5" y="-284" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node9 -->
|
||||
<g id="edge8_Node000002_Node000009" class="edge">
|
||||
<title>Node2->Node9</title>
|
||||
<g id="a_edge8_Node000002_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M93.28,-188.8C99.39,-207.22 114.94,-246.82 141.5,-268.88 146.78,-273.26 153.13,-276.65 159.6,-279.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.44,-282.57 169.03,-282.5 160.71,-275.95 158.44,-282.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" target="_top" xlink:title="insert the string into the trie">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-259.75 141.5,-259.75 141.5,-218 253.5,-218 253.5,-259.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-246.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-223.75" font-family="Helvetica,sans-Serif" font-size="10.00">::insert</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node10 -->
|
||||
<g id="edge9_Node000002_Node000010" class="edge">
|
||||
<title>Node2->Node10</title>
|
||||
<g id="a_edge9_Node000002_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.88,-188.19C116,-194.18 129.47,-202.08 141.5,-208.88 143.38,-209.94 145.3,-211.02 147.25,-212.1"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.3,-215.03 155.74,-216.82 148.69,-208.9 145.3,-215.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-199.75 141.5,-199.75 141.5,-158 253.5,-158 253.5,-199.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-186.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-163.75" font-family="Helvetica,sans-Serif" font-size="10.00">::predict_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node12 -->
|
||||
<g id="edge11_Node000002_Node000012" class="edge">
|
||||
<title>Node2->Node12</title>
|
||||
<g id="a_edge11_Node000002_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.93,-178.88C112.67,-178.88 121.04,-178.88 129.95,-178.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.93,-182.38 139.93,-178.88 129.93,-175.38 129.93,-182.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" target="_top" xlink:title="search a word/string inside the trie">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-139.75 141.5,-139.75 141.5,-98 253.5,-98 253.5,-139.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node15 -->
|
||||
<g id="edge16_Node000002_Node000015" class="edge">
|
||||
<title>Node2->Node15</title>
|
||||
<g id="a_edge16_Node000002_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.88,-169.56C116,-163.57 129.47,-155.67 141.5,-148.88 143.38,-147.81 145.3,-146.73 147.25,-145.65"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.69,-148.85 155.74,-140.93 145.3,-142.72 148.69,-148.85"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="240.75,-79.5 154.25,-79.5 154.25,-60.25 240.75,-60.25 240.75,-79.5"/>
|
||||
<text text-anchor="middle" x="197.5" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node16 -->
|
||||
<g id="edge17_Node000002_Node000016" class="edge">
|
||||
<title>Node2->Node16</title>
|
||||
<g id="a_edge17_Node000002_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M93.28,-168.95C99.39,-150.53 114.94,-110.93 141.5,-88.88 143,-87.63 144.58,-86.47 146.23,-85.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.79,-88.52 154.89,-80.65 144.43,-82.37 147.79,-88.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" target="_top" xlink:title="search a word/string that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-41.75 141.5,-41.75 141.5,0 253.5,0 253.5,-41.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::startwith</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node17 -->
|
||||
<g id="edge18_Node000002_Node000017" class="edge">
|
||||
<title>Node2->Node17</title>
|
||||
<g id="a_edge18_Node000002_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M91.84,-169.02C96.05,-145.82 109.39,-87.03 141.5,-50.88 141.85,-50.48 142.21,-50.09 142.58,-49.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="144.76,-52.44 149.88,-43.17 140.09,-47.22 144.76,-52.44"/>
|
||||
</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/back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="388.75,-435.5 302.25,-435.5 302.25,-416.25 388.75,-416.25 388.75,-435.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-422" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M224.26,-365.12C241.8,-378.78 266.02,-396.11 289.5,-407.88 292.19,-409.22 295,-410.5 297.86,-411.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="296.38,-414.88 306.97,-415.21 298.89,-408.35 296.38,-414.88"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="386.12,-398.5 304.88,-398.5 304.88,-379.25 386.12,-379.25 386.12,-398.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-385" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-360.89C269.27,-365.69 285.99,-370.84 300.79,-375.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="299.65,-378.71 310.23,-378.31 301.71,-372.02 299.65,-378.71"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/pop_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="549.12,-289.5 441.62,-289.5 441.62,-270.25 549.12,-270.25 549.12,-289.5"/>
|
||||
<text text-anchor="middle" x="495.38" y="-276" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::pop_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.92,-347.21C295.38,-348.14 353.05,-346.06 401.5,-331.88 427.27,-324.33 453.7,-308.6 471.75,-296.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="473.65,-299.35 479.85,-290.76 469.64,-293.61 473.65,-299.35"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="388.75,-322.5 302.25,-322.5 302.25,-303.25 388.75,-303.25 388.75,-322.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-309" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6_Node000003_Node000007" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-332.16C265.94,-329.56 278.89,-326.81 291.06,-324.22"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="291.44,-327.72 300.49,-322.22 289.98,-320.87 291.44,-327.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="385,-285.5 306,-285.5 306,-266.25 385,-266.25 385,-285.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-272" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M233.6,-322.59C250.19,-313.05 270.48,-302.13 289.5,-293.88 292.82,-292.44 296.29,-291.04 299.81,-289.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="300.72,-293.11 308.96,-286.45 298.37,-286.52 300.72,-293.11"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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="392.5,-248.5 298.5,-248.5 298.5,-229.25 392.5,-229.25 392.5,-248.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node11 -->
|
||||
<g id="edge10_Node000010_Node000011" class="edge">
|
||||
<title>Node10->Node11</title>
|
||||
<g id="a_edge10_Node000010_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-238.88C264.6,-238.88 276.08,-238.88 287.06,-238.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="286.76,-242.38 296.76,-238.88 286.76,-235.38 286.76,-242.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix's n...">
|
||||
<polygon fill="white" stroke="#666666" points="401.5,-192.75 289.5,-192.75 289.5,-151 401.5,-151 401.5,-192.75"/>
|
||||
<text text-anchor="start" x="297.5" y="-179.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="297.5" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="345.5" y="-156.75" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge12_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge12_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-176.23C261.6,-175.85 269.8,-175.46 277.89,-175.07"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.89,-178.57 287.71,-174.6 277.56,-171.58 277.89,-178.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node6 -->
|
||||
<g id="edge14_Node000013_Node000006" class="edge">
|
||||
<title>Node13->Node6</title>
|
||||
<g id="a_edge14_Node000013_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M375.72,-193.21C403.93,-213.82 446.05,-244.58 471.79,-263.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="469.42,-265.98 479.56,-269.06 473.55,-260.33 469.42,-265.98"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node13 -->
|
||||
<g id="edge13_Node000013_Node000013" class="edge">
|
||||
<title>Node13->Node13</title>
|
||||
<g id="a_edge13_Node000013_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M318.18,-193.07C315.58,-202.55 324.69,-210.75 345.5,-210.75 357.53,-210.75 365.65,-208.01 369.86,-203.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="373.15,-205.1 372.42,-194.53 366.4,-203.25 373.15,-205.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="553.25,-181.5 437.5,-181.5 437.5,-162.25 553.25,-162.25 553.25,-181.5"/>
|
||||
<text text-anchor="middle" x="495.38" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge15_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge15_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M401.98,-171.88C409.69,-171.88 417.69,-171.88 425.6,-171.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="425.59,-175.38 435.59,-171.88 425.59,-168.38 425.59,-175.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<g id="navigator" transform="translate(0 0)" fill="#404254">
|
||||
<rect fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width=".5" x="0" y="0" width="60" height="60"/>
|
||||
<use id="zoomplus" xlink:href="#zoomPlus" x="17" y="9" onmousedown="handleZoom(evt,'in')"/>
|
||||
<use id="zoomminus" xlink:href="#zoomMin" x="42" y="9" onmousedown="handleZoom(evt,'out')"/>
|
||||
<use id="reset" xlink:href="#resetDef" x="30" y="36" onmousedown="handleReset()"/>
|
||||
<use id="arrowup" xlink:href="#arrowUp" x="0" y="0" onmousedown="handlePan(0,-1)"/>
|
||||
<use id="arrowright" xlink:href="#arrowRight" x="0" y="0" onmousedown="handlePan(1,0)"/>
|
||||
<use id="arrowdown" xlink:href="#arrowDown" x="0" y="0" onmousedown="handlePan(0,1)"/>
|
||||
<use id="arrowleft" xlink:href="#arrowLeft" x="0" y="0" onmousedown="handlePan(-1,0)"/>
|
||||
</g>
|
||||
<svg viewBox="0 0 15 15" width="100%" height="30px" preserveAspectRatio="xMaxYMin meet">
|
||||
<g id="arrow_out" transform="scale(0.3 0.3)">
|
||||
<a xlink:href="trie__using__hashmap_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg" target="_base">
|
||||
<rect id="button" ry="5" rx="5" y="6" x="6" height="38" width="38"
|
||||
fill="#f2f5e9" fill-opacity="0.5" stroke="#606060" stroke-width="1.0"/>
|
||||
<path id="arrow"
|
||||
d="M 11.500037,31.436501 C 11.940474,20.09759 22.043105,11.32322 32.158766,21.979434 L 37.068811,17.246167 C 37.068811,17.246167 37.088388,32 37.088388,32 L 22.160133,31.978069 C 22.160133,31.978069 26.997745,27.140456 26.997745,27.140456 C 18.528582,18.264221 13.291696,25.230495 11.500037,31.436501 z"
|
||||
style="fill:#404040;"/>
|
||||
</a>
|
||||
</g>
|
||||
</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: 21 KiB |
@@ -1,339 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="561pt" height="444pt"
|
||||
viewBox="0.00 0.00 561.25 443.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 439.5)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Main function.">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-188.5 0,-188.5 0,-169.25 37,-169.25 37,-188.5"/>
|
||||
<text text-anchor="middle" x="18.5" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a xlink:href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self-test implementations.">
|
||||
<polygon fill="white" stroke="#666666" points="105.5,-188.5 73,-188.5 73,-169.25 105.5,-169.25 105.5,-188.5"/>
|
||||
<text text-anchor="middle" x="89.25" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.2,-178.88C44.58,-178.88 53.31,-178.88 61.45,-178.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-182.38 71.2,-178.88 61.2,-175.38 61.2,-182.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75" target="_top" xlink:title="delete a word/string from a trie">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-364.75 141.5,-364.75 141.5,-323 253.5,-323 253.5,-364.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-351.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-340" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-328.75" font-family="Helvetica,sans-Serif" font-size="10.00">::delete_word</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node3 -->
|
||||
<g id="edge2_Node000002_Node000003" class="edge">
|
||||
<title>Node2->Node3</title>
|
||||
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M92.14,-188.88C96.91,-211.89 111.26,-269.45 141.5,-306.88 143.92,-309.87 146.66,-312.72 149.57,-315.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.09,-317.89 157.02,-321.57 151.55,-312.5 147.09,-317.89"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="224.25,-297.5 170.75,-297.5 170.75,-278.25 224.25,-278.25 224.25,-297.5"/>
|
||||
<text text-anchor="middle" x="197.5" y="-284" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node9 -->
|
||||
<g id="edge8_Node000002_Node000009" class="edge">
|
||||
<title>Node2->Node9</title>
|
||||
<g id="a_edge8_Node000002_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M93.28,-188.8C99.39,-207.22 114.94,-246.82 141.5,-268.88 146.78,-273.26 153.13,-276.65 159.6,-279.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="158.44,-282.57 169.03,-282.5 160.71,-275.95 158.44,-282.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2" target="_top" xlink:title="insert the string into the trie">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-259.75 141.5,-259.75 141.5,-218 253.5,-218 253.5,-259.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-246.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-223.75" font-family="Helvetica,sans-Serif" font-size="10.00">::insert</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node10 -->
|
||||
<g id="edge9_Node000002_Node000010" class="edge">
|
||||
<title>Node2->Node10</title>
|
||||
<g id="a_edge9_Node000002_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.88,-188.19C116,-194.18 129.47,-202.08 141.5,-208.88 143.38,-209.94 145.3,-211.02 147.25,-212.1"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.3,-215.03 155.74,-216.82 148.69,-208.9 145.3,-215.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4" target="_top" xlink:title="predict/recommend a word that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-199.75 141.5,-199.75 141.5,-158 253.5,-158 253.5,-199.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-186.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-163.75" font-family="Helvetica,sans-Serif" font-size="10.00">::predict_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node12 -->
|
||||
<g id="edge11_Node000002_Node000012" class="edge">
|
||||
<title>Node2->Node12</title>
|
||||
<g id="a_edge11_Node000002_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.93,-178.88C112.67,-178.88 121.04,-178.88 129.95,-178.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.93,-182.38 139.93,-178.88 129.93,-175.38 129.93,-182.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node15 -->
|
||||
<g id="Node000015" class="node">
|
||||
<title>Node15</title>
|
||||
<g id="a_Node000015"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f" target="_top" xlink:title="search a word/string inside the trie">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-139.75 141.5,-139.75 141.5,-98 253.5,-98 253.5,-139.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-126.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-115" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-103.75" font-family="Helvetica,sans-Serif" font-size="10.00">::search</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node15 -->
|
||||
<g id="edge16_Node000002_Node000015" class="edge">
|
||||
<title>Node2->Node15</title>
|
||||
<g id="a_edge16_Node000002_Node000015"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.88,-169.56C116,-163.57 129.47,-155.67 141.5,-148.88 143.38,-147.81 145.3,-146.73 147.25,-145.65"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="148.69,-148.85 155.74,-140.93 145.3,-142.72 148.69,-148.85"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node16 -->
|
||||
<g id="Node000016" class="node">
|
||||
<title>Node16</title>
|
||||
<g id="a_Node000016"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="240.75,-79.5 154.25,-79.5 154.25,-60.25 240.75,-60.25 240.75,-79.5"/>
|
||||
<text text-anchor="middle" x="197.5" y="-66" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node16 -->
|
||||
<g id="edge17_Node000002_Node000016" class="edge">
|
||||
<title>Node2->Node16</title>
|
||||
<g id="a_edge17_Node000002_Node000016"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M93.28,-168.95C99.39,-150.53 114.94,-110.93 141.5,-88.88 143,-87.63 144.58,-86.47 146.23,-85.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.79,-88.52 154.89,-80.65 144.43,-82.37 147.79,-88.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node17 -->
|
||||
<g id="Node000017" class="node">
|
||||
<title>Node17</title>
|
||||
<g id="a_Node000017"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17" target="_top" xlink:title="search a word/string that starts with a given prefix">
|
||||
<polygon fill="white" stroke="#666666" points="253.5,-41.75 141.5,-41.75 141.5,0 253.5,0 253.5,-41.75"/>
|
||||
<text text-anchor="start" x="149.5" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="149.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="197.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::startwith</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node17 -->
|
||||
<g id="edge18_Node000002_Node000017" class="edge">
|
||||
<title>Node2->Node17</title>
|
||||
<g id="a_edge18_Node000002_Node000017"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M91.84,-169.02C96.05,-145.82 109.39,-87.03 141.5,-50.88 141.85,-50.48 142.21,-50.09 142.58,-49.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="144.76,-52.44 149.88,-43.17 140.09,-47.22 144.76,-52.44"/>
|
||||
</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/back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="388.75,-435.5 302.25,-435.5 302.25,-416.25 388.75,-416.25 388.75,-435.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-422" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M224.26,-365.12C241.8,-378.78 266.02,-396.11 289.5,-407.88 292.19,-409.22 295,-410.5 297.86,-411.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="296.38,-414.88 306.97,-415.21 298.89,-408.35 296.38,-414.88"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="386.12,-398.5 304.88,-398.5 304.88,-379.25 386.12,-379.25 386.12,-398.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-385" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-360.89C269.27,-365.69 285.99,-370.84 300.79,-375.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="299.65,-378.71 310.23,-378.31 301.71,-372.02 299.65,-378.71"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/pop_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="549.12,-289.5 441.62,-289.5 441.62,-270.25 549.12,-270.25 549.12,-289.5"/>
|
||||
<text text-anchor="middle" x="495.38" y="-276" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::pop_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.92,-347.21C295.38,-348.14 353.05,-346.06 401.5,-331.88 427.27,-324.33 453.7,-308.6 471.75,-296.41"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="473.65,-299.35 479.85,-290.76 469.64,-293.61 473.65,-299.35"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="388.75,-322.5 302.25,-322.5 302.25,-303.25 388.75,-303.25 388.75,-322.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-309" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node7 -->
|
||||
<g id="edge6_Node000003_Node000007" class="edge">
|
||||
<title>Node3->Node7</title>
|
||||
<g id="a_edge6_Node000003_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-332.16C265.94,-329.56 278.89,-326.81 291.06,-324.22"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="291.44,-327.72 300.49,-322.22 289.98,-320.87 291.44,-327.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/stack/top.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="385,-285.5 306,-285.5 306,-266.25 385,-266.25 385,-285.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-272" font-family="Helvetica,sans-Serif" font-size="10.00">std::stack::top</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M233.6,-322.59C250.19,-313.05 270.48,-302.13 289.5,-293.88 292.82,-292.44 296.29,-291.04 299.81,-289.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="300.72,-293.11 308.96,-286.45 298.37,-286.52 300.72,-293.11"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><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="392.5,-248.5 298.5,-248.5 298.5,-229.25 392.5,-229.25 392.5,-248.5"/>
|
||||
<text text-anchor="middle" x="345.5" y="-235" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_shared</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10->Node11 -->
|
||||
<g id="edge10_Node000010_Node000011" class="edge">
|
||||
<title>Node10->Node11</title>
|
||||
<g id="a_edge10_Node000010_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-238.88C264.6,-238.88 276.08,-238.88 287.06,-238.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="286.76,-242.38 296.76,-238.88 286.76,-235.38 286.76,-242.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a xlink:href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd" target="_top" xlink:title="helper function to predict/recommend words that starts with a given prefix from the end of prefix's n...">
|
||||
<polygon fill="white" stroke="#666666" points="401.5,-192.75 289.5,-192.75 289.5,-151 401.5,-151 401.5,-192.75"/>
|
||||
<text text-anchor="start" x="297.5" y="-179.25" font-family="Helvetica,sans-Serif" font-size="10.00">data_structures::trie</text>
|
||||
<text text-anchor="start" x="297.5" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">_using_hashmap::Trie</text>
|
||||
<text text-anchor="middle" x="345.5" y="-156.75" font-family="Helvetica,sans-Serif" font-size="10.00">::get_all_words</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge12_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge12_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M253.7,-176.23C261.6,-175.85 269.8,-175.46 277.89,-175.07"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.89,-178.57 287.71,-174.6 277.56,-171.58 277.89,-178.57"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node6 -->
|
||||
<g id="edge14_Node000013_Node000006" class="edge">
|
||||
<title>Node13->Node6</title>
|
||||
<g id="a_edge14_Node000013_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M375.72,-193.21C403.93,-213.82 446.05,-244.58 471.79,-263.38"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="469.42,-265.98 479.56,-269.06 473.55,-260.33 469.42,-265.98"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node13 -->
|
||||
<g id="edge13_Node000013_Node000013" class="edge">
|
||||
<title>Node13->Node13</title>
|
||||
<g id="a_edge13_Node000013_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M318.18,-193.07C315.58,-202.55 324.69,-210.75 345.5,-210.75 357.53,-210.75 365.65,-208.01 369.86,-203.86"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="373.15,-205.1 372.42,-194.53 366.4,-203.25 373.15,-205.1"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="553.25,-181.5 437.5,-181.5 437.5,-162.25 553.25,-162.25 553.25,-181.5"/>
|
||||
<text text-anchor="middle" x="495.38" y="-168" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13->Node14 -->
|
||||
<g id="edge15_Node000013_Node000014" class="edge">
|
||||
<title>Node13->Node14</title>
|
||||
<g id="a_edge15_Node000013_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M401.98,-171.88C409.69,-171.88 417.69,-171.88 425.6,-171.88"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="425.59,-175.38 435.59,-171.88 425.59,-168.38 425.59,-175.38"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 18 KiB |
445
d5/d8a/trie__using__hashmap_8cpp_source.html
Normal file
445
d5/d8a/trie__using__hashmap_8cpp_source.html
Normal file
@@ -0,0 +1,445 @@
|
||||
<!-- HTML header for doxygen 1.12.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: data_structures/trie_using_hashmap.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
window.MathJax = {
|
||||
options: {
|
||||
ignoreHtmlClass: 'tex2jax_ignore',
|
||||
processHtmlClass: 'tex2jax_process'
|
||||
},
|
||||
loader: {
|
||||
load: ['[tex]/ams']
|
||||
},
|
||||
tex: {
|
||||
macros: {},
|
||||
packages: ['base','configmacros','ams']
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
|
||||
<td id="projectalign">
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d5/d8a/trie__using__hashmap_8cpp_source.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">trie_using_hashmap.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../d5/d8a/trie__using__hashmap_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include <cassert></span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <iostream></span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <memory></span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <stack></span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <unordered_map></span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <vector></span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d5/d3c/namespacedata__structures.html">data_structures</a> {</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d7/d0a/namespacetrie__using__hashmap.html">trie_using_hashmap</a> {</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
||||
<div class="foldopen" id="foldopen00039" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html"> 39</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">Trie</a> {</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">private</span>:</div>
|
||||
<div class="foldopen" id="foldopen00044" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html"> 44</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">Node</a> {</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> std::unordered_map<char16_t, std::shared_ptr<Node>></div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a08212cdc99164b59da91b81f45e2f88e"> 46</a></span> <a class="code hl_variable" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a08212cdc99164b59da91b81f45e2f88e">children</a>; </div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a3cdb077745d3dc97212d693132371219"> 48</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a3cdb077745d3dc97212d693132371219">word_end</a> = <span class="keyword">false</span>; </div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> };</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248"> 51</a></span> std::shared_ptr<Node> <a class="code hl_variable" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a> =</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> std::make_shared<Node>(); </div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a092d0805a9e647c2048777dbe67b35ab"> 56</a></span> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a092d0805a9e647c2048777dbe67b35ab">Trie</a>() = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
|
||||
<div class="foldopen" id="foldopen00062" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2"> 62</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="keyword">const</span> std::string& word) {</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> std::shared_ptr<Node> curr = <a class="code hl_variable" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a>;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">for</span> (<span class="keywordtype">char</span> ch : word) {</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">if</span> (curr->children.find(ch) == curr->children.end()) {</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> curr->children[ch] = std::make_shared<Node>();</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> }</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> curr = curr->children[ch];</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">if</span> (!curr->word_end && curr != <a class="code hl_variable" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a>) {</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> curr->word_end = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
|
||||
<div class="foldopen" id="foldopen00082" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f"> 82</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="keyword">const</span> std::string& word) {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> std::shared_ptr<Node> curr = <a class="code hl_variable" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a>;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">for</span> (<span class="keywordtype">char</span> ch : word) {</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (curr->children.find(ch) == curr->children.end()) {</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> }</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> curr = curr->children[ch];</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">if</span> (!curr) {</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> }</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">if</span> (curr->word_end) {</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
||||
<div class="foldopen" id="foldopen00107" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17"> 107</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="keyword">const</span> std::string& prefix) {</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> std::shared_ptr<Node> curr = <a class="code hl_variable" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a>;</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">for</span> (<span class="keywordtype">char</span> ch : prefix) {</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">if</span> (curr->children.find(ch) == curr->children.end()) {</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> }</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> curr = curr->children[ch];</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
|
||||
<div class="foldopen" id="foldopen00122" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75"> 122</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">delete_word</a>(std::string word) {</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> std::shared_ptr<Node> curr = <a class="code hl_variable" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a>;</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> std::stack<std::shared_ptr<Node>> nodes;</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">int</span> cnt = 0;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">for</span> (<span class="keywordtype">char</span> ch : word) {</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">if</span> (curr->children.find(ch) == curr->children.end()) {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">if</span> (curr->word_end) {</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> cnt++;</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> }</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> nodes.push(curr->children[ch]);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> curr = curr->children[ch];</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="comment">// Delete only when it's a word, and it has children after</span></div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="comment">// or prefix in the line</span></div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">if</span> (nodes.top()->word_end) {</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> nodes.top()->word_end = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">// Delete only when it has no children after</span></div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// and also no prefix in the line</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">while</span> (!(nodes.top()->word_end) && nodes.top()->children.empty()) {</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> nodes.pop();</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> nodes.top()->children.erase(word.back());</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> word.pop_back();</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> }</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
|
||||
<div class="foldopen" id="foldopen00160" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd"> 160</a></span> std::vector<std::string> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd">get_all_words</a>(std::vector<std::string> results,</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keyword">const</span> std::shared_ptr<Node>& element,</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> std::string prefix) {</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordflow">if</span> (element->word_end) {</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> results.push_back(prefix);</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> }</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">if</span> (element->children.empty()) {</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">return</span> results;</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> }</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& x : element->children) {</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> std::string key = <span class="stringliteral">""</span>;</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> key = x.first;</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> prefix += key;</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> results =</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd">get_all_words</a>(results, element->children[x.first], prefix);</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> prefix.pop_back();</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> }</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">return</span> results;</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
|
||||
<div class="foldopen" id="foldopen00188" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4"> 188</a></span> std::vector<std::string> <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="keyword">const</span> std::string& prefix) {</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> std::vector<std::string> result;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> std::shared_ptr<Node> curr = <a class="code hl_variable" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">root_node</a>;</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="comment">// traversing until the end of the given prefix in trie</span></div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">for</span> (<span class="keywordtype">char</span> ch : prefix) {</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordflow">if</span> (curr->children.find(ch) == curr->children.end()) {</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> }</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> curr = curr->children[ch];</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> }</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> </div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="comment">// if the given prefix is the only word without children</span></div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">if</span> (curr->word_end && curr->children.empty()) {</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> result.push_back(prefix);</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> }</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> </div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> result = <a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd">get_all_words</a>(</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> result, curr,</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> prefix); </div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> </div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span>} <span class="comment">// namespace trie_using_hashmap</span></div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span>} <span class="comment">// namespace data_structures</span></div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
|
||||
<div class="foldopen" id="foldopen00221" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 221</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <a class="code hl_class" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a> obj;</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="comment">// Inserting data into trie using the insert</span></div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="comment">// method and testing it with search method</span></div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"app"</span>);</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"abscond"</span>);</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"about"</span>);</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"apps"</span>);</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"apen"</span>);</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"apples"</span>);</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"apple"</span>);</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"approach"</span>);</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"bus"</span>);</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"buses"</span>);</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"Apple"</span>);</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"Bounce"</span>);</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> </div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"appy"</span>));</div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> std::cout << <span class="stringliteral">"appy is not a word in trie"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> </div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"car"</span>));</div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> std::cout << <span class="stringliteral">"car is not a word in trie"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"app"</span>));</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"apple"</span>));</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"apples"</span>));</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"apps"</span>));</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"apen"</span>));</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"approach"</span>));</div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"about"</span>));</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"abscond"</span>));</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"bus"</span>));</div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"buses"</span>));</div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"Bounce"</span>));</div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"Apple"</span>));</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> </div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> std::cout << <span class="stringliteral">"All the Inserted words are present in the trie"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="comment">// test for startwith prefix method</span></div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"approachs"</span>));</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"approach"</span>));</div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"about"</span>));</div>
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"appy"</span>));</div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"abscond"</span>));</div>
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"bus"</span>));</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"buses"</span>));</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"Bounce"</span>));</div>
|
||||
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"Apple"</span>));</div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"abs"</span>));</div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"b"</span>));</div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"bus"</span>));</div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"Bo"</span>));</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"A"</span>));</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"Ca"</span>));</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> </div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"C"</span>));</div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> </div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> std::cout << <span class="stringliteral">"All the tests passed for startwith method"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> </div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="comment">// test for predict_words/recommendation of words based on a given prefix</span></div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> </div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> std::vector<std::string> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"a"</span>);</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> </div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"a"</span>)) {</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> }</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> assert(pred_words.size() == 8);</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix a "</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"app"</span>);</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> }</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> </div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> assert(pred_words.size() == 5);</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix app "</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"A"</span>);</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> </div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> }</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> </div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> assert(pred_words.size() == 1);</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix A "</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"bu"</span>);</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> </div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> }</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> </div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> assert(pred_words.size() == 2);</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> std::cout << <span class="stringliteral">"Returned all words that start with prefix bu "</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> </div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <span class="comment">// tests for delete method</span></div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> </div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">delete_word</a>(<span class="stringliteral">"app"</span>);</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> assert(!obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">search</a>(<span class="stringliteral">"app"</span>));</div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> std::cout << <span class="stringliteral">"word app is deleted sucessful"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> </div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"app"</span>);</div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& str : pred_words) {</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> std::cout << str << std::endl;</div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> }</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> assert(pred_words.size() == 4);</div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> std::cout << <span class="stringliteral">"app is deleted sucessful"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> </div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="comment">// test case for Chinese language</span></div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> </div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">insert</a>(<span class="stringliteral">"苹果"</span>);</div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> assert(obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">startwith</a>(<span class="stringliteral">"苹"</span>));</div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> pred_words = obj.<a class="code hl_function" href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">predict_words</a>(<span class="stringliteral">"h"</span>);</div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
|
||||
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> assert(pred_words.size() == 0);</div>
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> std::cout << <span class="stringliteral">"No word starts with prefix h in trie"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> </div>
|
||||
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> std::cout << <span class="stringliteral">"All tests passed"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> </div>
|
||||
<div class="foldopen" id="foldopen00342" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"><a class="line" href="../../d5/d8a/trie__using__hashmap_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 342</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d5/d8a/trie__using__hashmap_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <a class="code hl_function" href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementaions</span></div>
|
||||
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html">data_structures::trie_using_hashmap::Trie</a></div><div class="ttdoc">Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t...</div><div class="ttdef"><b>Definition</b> <a href="#l00039">trie_using_hashmap.cpp:39</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_a092d0805a9e647c2048777dbe67b35ab"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a092d0805a9e647c2048777dbe67b35ab">data_structures::trie_using_hashmap::Trie::Trie</a></div><div class="ttdeci">Trie()=default</div><div class="ttdoc">< Constructor</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_a7bbe538c8015e8ce158e7ed43f605ebd"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a7bbe538c8015e8ce158e7ed43f605ebd">data_structures::trie_using_hashmap::Trie::get_all_words</a></div><div class="ttdeci">std::vector< std::string > get_all_words(std::vector< std::string > results, const std::shared_ptr< Node > &element, std::string prefix)</div><div class="ttdoc">helper function to predict/recommend words that starts with a given prefix from the end of prefix's n...</div><div class="ttdef"><b>Definition</b> <a href="#l00160">trie_using_hashmap.cpp:160</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_a832072498abeaa52ad43c4fc99cba248"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#a832072498abeaa52ad43c4fc99cba248">data_structures::trie_using_hashmap::Trie::root_node</a></div><div class="ttdeci">std::shared_ptr< Node > root_node</div><div class="ttdoc">declaring root node of trie</div><div class="ttdef"><b>Definition</b> <a href="#l00051">trie_using_hashmap.cpp:51</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_abcae0a4456e7f583ce716e3ef466dfd2"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#abcae0a4456e7f583ce716e3ef466dfd2">data_structures::trie_using_hashmap::Trie::insert</a></div><div class="ttdeci">void insert(const std::string &word)</div><div class="ttdoc">insert the string into the trie</div><div class="ttdef"><b>Definition</b> <a href="#l00062">trie_using_hashmap.cpp:62</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ac0bf3d6791cba144b3f539835d835e75"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ac0bf3d6791cba144b3f539835d835e75">data_structures::trie_using_hashmap::Trie::delete_word</a></div><div class="ttdeci">void delete_word(std::string word)</div><div class="ttdoc">delete a word/string from a trie</div><div class="ttdef"><b>Definition</b> <a href="#l00122">trie_using_hashmap.cpp:122</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ad71eb24207c28b546631802dba97310f"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ad71eb24207c28b546631802dba97310f">data_structures::trie_using_hashmap::Trie::search</a></div><div class="ttdeci">bool search(const std::string &word)</div><div class="ttdoc">search a word/string inside the trie</div><div class="ttdef"><b>Definition</b> <a href="#l00082">trie_using_hashmap.cpp:82</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_ae15fdc7f2b5023992d87a711d78566c4"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#ae15fdc7f2b5023992d87a711d78566c4">data_structures::trie_using_hashmap::Trie::predict_words</a></div><div class="ttdeci">std::vector< std::string > predict_words(const std::string &prefix)</div><div class="ttdoc">predict/recommend a word that starts with a given prefix</div><div class="ttdef"><b>Definition</b> <a href="#l00188">trie_using_hashmap.cpp:188</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie__using__hashmap_1_1_trie_html_af3aee573fbabd2c1510c0f74f842dd17"><div class="ttname"><a href="../../d3/d26/classdata__structures_1_1trie__using__hashmap_1_1_trie.html#af3aee573fbabd2c1510c0f74f842dd17">data_structures::trie_using_hashmap::Trie::startwith</a></div><div class="ttdeci">bool startwith(const std::string &prefix)</div><div class="ttdoc">search a word/string that starts with a given prefix</div><div class="ttdef"><b>Definition</b> <a href="#l00107">trie_using_hashmap.cpp:107</a></div></div>
|
||||
<div class="ttc" id="anamespacedata__structures_html"><div class="ttname"><a href="../../d5/d3c/namespacedata__structures.html">data_structures</a></div><div class="ttdoc">for IO operations</div></div>
|
||||
<div class="ttc" id="anamespacetrie__using__hashmap_html"><div class="ttname"><a href="../../d7/d0a/namespacetrie__using__hashmap.html">trie_using_hashmap</a></div><div class="ttdoc">Functions for Trie data structure using hashmap implementation.</div></div>
|
||||
<div class="ttc" id="astructdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node_html"><div class="ttname"><a href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">data_structures::trie_using_hashmap::Trie::Node</a></div><div class="ttdoc">struct representing a trie node.</div><div class="ttdef"><b>Definition</b> <a href="#l00044">trie_using_hashmap.cpp:44</a></div></div>
|
||||
<div class="ttc" id="astructdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node_html_a08212cdc99164b59da91b81f45e2f88e"><div class="ttname"><a href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a08212cdc99164b59da91b81f45e2f88e">data_structures::trie_using_hashmap::Trie::Node::children</a></div><div class="ttdeci">std::unordered_map< char16_t, std::shared_ptr< Node > > children</div><div class="ttdef"><b>Definition</b> <a href="#l00046">trie_using_hashmap.cpp:46</a></div></div>
|
||||
<div class="ttc" id="astructdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node_html_a3cdb077745d3dc97212d693132371219"><div class="ttname"><a href="../../d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html#a3cdb077745d3dc97212d693132371219">data_structures::trie_using_hashmap::Trie::Node::word_end</a></div><div class="ttdeci">bool word_end</div><div class="ttdoc">boolean variable to represent the node end</div><div class="ttdef"><b>Definition</b> <a href="#l00048">trie_using_hashmap.cpp:48</a></div></div>
|
||||
<div class="ttc" id="atrie__using__hashmap_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d5/d8a/trie__using__hashmap_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> <a href="#l00221">trie_using_hashmap.cpp:221</a></div></div>
|
||||
<div class="ttc" id="atrie__using__hashmap_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d5/d8a/trie__using__hashmap_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="#l00342">trie_using_hashmap.cpp:342</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d5/d8a/trie__using__hashmap_8cpp.html">trie_using_hashmap.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user