mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-23 21:32:09 +08:00
Documentation for 8a368240e2
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<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>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -11,9 +11,9 @@
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<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>
|
||||
@@ -43,18 +43,23 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<!-- 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');
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
@@ -73,7 +78,7 @@ $(function() {
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d5/d8a/trie__using__hashmap_8cpp.html','../../'); initResizable(); });
|
||||
$(function(){initNavTree('d5/d8a/trie__using__hashmap_8cpp.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
@@ -132,10 +137,10 @@ Classes</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr class="memitem:d5/d3c/namespacedata__structures" id="r_d5/d3c/namespacedata__structures"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></td></tr>
|
||||
<tr class="memdesc:d5/d3c/namespacedata__structures"><td class="mdescLeft"> </td><td class="mdescRight">for IO operations <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:d7/d0a/namespacetrie__using__hashmap" id="r_d7/d0a/namespacetrie__using__hashmap"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d0a/namespacetrie__using__hashmap.html">trie_using_hashmap</a></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d0a/namespacetrie__using__hashmap.html">trie_using_hashmap</a></td></tr>
|
||||
<tr class="memdesc:d7/d0a/namespacetrie__using__hashmap"><td class="mdescLeft"> </td><td class="mdescRight">Functions for <a href="https://en.wikipedia.org/wiki/Trie" target="_blank">Trie</a> data structure using hashmap implementation. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
@@ -162,7 +167,7 @@ Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"></span></td><td>)</td>
|
||||
<td class="paramtype">void</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -195,7 +200,7 @@ Here is the call graph for this function:</div>
|
||||
<tr>
|
||||
<td class="memname">static void test </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"></span></td><td>)</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -270,7 +275,7 @@ Here is the call graph for this function:</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"> 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.predict_words(<span class="stringliteral">"a"</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"> 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>
|
||||
@@ -281,7 +286,7 @@ Here is the call graph for this function:</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"> 292</span> }</div>
|
||||
<div class="line"><span class="lineno"> 293</span> </div>
|
||||
<div class="line"><span class="lineno"> 294</span> assert(pred_words.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 5);</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"> 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>
|
||||
@@ -289,7 +294,7 @@ Here is the call graph for this function:</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"> 300</span> }</div>
|
||||
<div class="line"><span class="lineno"> 301</span> </div>
|
||||
<div class="line"><span class="lineno"> 302</span> assert(pred_words.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 1);</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"> 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>
|
||||
@@ -297,7 +302,7 @@ Here is the call graph for this function:</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"> 308</span> }</div>
|
||||
<div class="line"><span class="lineno"> 309</span> </div>
|
||||
<div class="line"><span class="lineno"> 310</span> assert(pred_words.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 2);</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"> 312</span> </div>
|
||||
<div class="line"><span class="lineno"> 313</span> <span class="comment">// tests for delete method</span></div>
|
||||
@@ -310,7 +315,7 @@ Here is the call graph for this function:</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"> 322</span> }</div>
|
||||
<div class="line"><span class="lineno"> 323</span> assert(pred_words.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 4);</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"> 325</span> </div>
|
||||
<div class="line"><span class="lineno"> 326</span> <span class="comment">// test case for Chinese language</span></div>
|
||||
@@ -319,7 +324,7 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><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"><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.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 0);</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"> 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>
|
||||
@@ -338,7 +343,7 @@ Here is the call graph for this function:</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="568"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<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>
|
||||
@@ -349,7 +354,7 @@ Here is the call graph for this function:</div>
|
||||
<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.10.0 </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>
|
||||
|
||||
Reference in New Issue
Block a user