Documentation for c26eea874d

This commit is contained in:
realstealthninja
2025-05-19 11:38:33 +00:00
parent c7a9a42397
commit 14583a2f33
2829 changed files with 30266 additions and 21669 deletions

View File

@@ -4,7 +4,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.12.0"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: string_search Namespace Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
@@ -60,7 +60,7 @@ window.MathJax = {
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
@@ -386,7 +386,7 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 54</span> <span class="keywordflow">if</span> (pattern.empty()) {</div>
<div class="line"><span class="lineno"> 55</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 56</span> }</div>
<div class="line"><span class="lineno"> 57</span> std::vector&lt;size_t&gt; failure = getFailureArray(pattern);</div>
<div class="line"><span class="lineno"> 57</span> std::vector&lt;size_t&gt; failure = <a class="code hl_function" href="#a83c72ff237cdf623e42d4295e0029bf9">getFailureArray</a>(pattern);</div>
<div class="line"><span class="lineno"> 58</span> <span class="keywordtype">size_t</span> text_length = text.size();</div>
<div class="line"><span class="lineno"> 59</span> <span class="keywordtype">size_t</span> pattern_length = pattern.size();</div>
<div class="line"><span class="lineno"> 60</span> <span class="keywordtype">size_t</span> k = 0;</div>
@@ -401,6 +401,7 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 69</span> <span class="keywordflow">return</span> std::string::npos;</div>
<div class="line"><span class="lineno"> 70</span>}</div>
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a1b74d828b33760094906797042b89442"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">numerical_methods::simpson_method::k</a></div><div class="ttdeci">double k(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition</b> <a href="../../d4/d18/composite__simpson__rule_8cpp_source.html#l00117">composite_simpson_rule.cpp:117</a></div></div>
<div class="ttc" id="anamespacestring__search_html_a83c72ff237cdf623e42d4295e0029bf9"><div class="ttname"><a href="#a83c72ff237cdf623e42d4295e0029bf9">string_search::getFailureArray</a></div><div class="ttdeci">std::vector&lt; size_t &gt; getFailureArray(const std::string &amp;pattern)</div><div class="ttdoc">Generate the partial match table aka failure function for a pattern to search.</div><div class="ttdef"><b>Definition</b> <a href="../../de/d6a/knuth__morris__pratt_8cpp_source.html#l00032">knuth_morris_pratt.cpp:32</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -445,13 +446,14 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 91</span> }</div>
<div class="line"><span class="lineno"> 92</span> <span class="keywordflow">if</span> (i &lt; str.size() - pat.size()) {</div>
<div class="line"><span class="lineno"> 93</span> str_hash =</div>
<div class="line"><span class="lineno"> 94</span> recalculate_hash(str, i, i + pat.size(), str_hash, pat.size());</div>
<div class="line"><span class="lineno"> 94</span> <a class="code hl_function" href="#aed769d565b705a9b3e0eb1ec74088893">recalculate_hash</a>(str, i, i + pat.size(), str_hash, pat.size());</div>
<div class="line"><span class="lineno"> 95</span> }</div>
<div class="line"><span class="lineno"> 96</span> }</div>
<div class="line"><span class="lineno"> 97</span> <span class="keywordflow">return</span> -1; <span class="comment">// return -1 if given pattern not found</span></div>
<div class="line"><span class="lineno"> 98</span>}</div>
<div class="ttc" id="anamespacestring__search_html_a8fb0bc932ba8b582c9f4c71338d050f8"><div class="ttname"><a href="#a8fb0bc932ba8b582c9f4c71338d050f8">string_search::create_hash</a></div><div class="ttdeci">int64_t create_hash(const std::string &amp;s, int n)</div><div class="ttdef"><b>Definition</b> <a href="../../d6/dce/rabin__karp_8cpp_source.html#l00025">rabin_karp.cpp:25</a></div></div>
<div class="ttc" id="anamespacestring__search_html_aebe07cea289a13142503d98be7df11fd"><div class="ttname"><a href="#aebe07cea289a13142503d98be7df11fd">string_search::check_if_equal</a></div><div class="ttdeci">bool check_if_equal(const std::string &amp;str1, const std::string &amp;str2, int start1, int end1, int start2, int end2)</div><div class="ttdef"><b>Definition</b> <a href="../../d6/dce/rabin__karp_8cpp_source.html#l00060">rabin_karp.cpp:60</a></div></div>
<div class="ttc" id="anamespacestring__search_html_aed769d565b705a9b3e0eb1ec74088893"><div class="ttname"><a href="#aed769d565b705a9b3e0eb1ec74088893">string_search::recalculate_hash</a></div><div class="ttdeci">int64_t recalculate_hash(const std::string &amp;s, int old_index, int new_index, int64_t old_hash, int patLength)</div><div class="ttdef"><b>Definition</b> <a href="../../d6/dce/rabin__karp_8cpp_source.html#l00042">rabin_karp.cpp:42</a></div></div>
</div><!-- fragment -->
</div>
</div>
@@ -516,7 +518,7 @@ Functions</h2></td></tr>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../d9/d03/namespacestring__search.html">string_search</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>
<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.13.2 </li>
</ul>
</div>
</body>