Documentation for d7a9869dce

This commit is contained in:
github-actions
2023-06-16 21:50:29 +00:00
parent 50dd50ad98
commit 05a7efec3a
146 changed files with 5480 additions and 2185 deletions

View File

@@ -0,0 +1,702 @@
<!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.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: strings/boyer_moore.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @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&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d3/db2/boyer__moore_8cpp.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<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="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">boyer_moore.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>The <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm" target="_blank">BoyerMoore</a> algorithm searches for occurrences of pattern P in text T by performing explicit character comparisons at different alignments. Instead of a brute-force search of all alignments (of which there are n - m + 1), BoyerMoore uses information gained by preprocessing P to skip as many alignments as possible.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;climits&gt;</code><br />
<code>#include &lt;cstring&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for boyer_moore.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/db6/boyer__moore_8cpp__incl.svg" width="498" height="111"><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">
<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">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">strings::boyer_moore::pattern</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A structure representing all the data we need to search the preprocessed pattern in text. <a href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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:df/dcb/namespacestrings"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dcb/namespacestrings.html">strings</a></td></tr>
<tr class="memdesc:df/dcb/namespacestrings"><td class="mdescLeft">&#160;</td><td class="mdescRight">Algorithms with strings. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a77c872c08612d7b8861ba13bc9881cbd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#a77c872c08612d7b8861ba13bc9881cbd">APLHABET_SIZE</a>&#160;&#160;&#160;CHAR_MAX</td></tr>
<tr class="memdesc:a77c872c08612d7b8861ba13bc9881cbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of symbols in the alphabet we use <br /></td></tr>
<tr class="separator:a77c872c08612d7b8861ba13bc9881cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa709cf7fca02b7d3e1888423d5f739a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#aa709cf7fca02b7d3e1888423d5f739a1">strings::boyer_moore::init_good_suffix</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;str, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; size_t &gt; &amp;arg)</td></tr>
<tr class="memdesc:aa709cf7fca02b7d3e1888423d5f739a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">A function that preprocess the good suffix thable. <br /></td></tr>
<tr class="separator:aa709cf7fca02b7d3e1888423d5f739a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f6688c9bb3e692297a3aa09cebc1c00"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#a2f6688c9bb3e692297a3aa09cebc1c00">strings::boyer_moore::init_bad_char</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;str, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; size_t &gt; &amp;arg)</td></tr>
<tr class="memdesc:a2f6688c9bb3e692297a3aa09cebc1c00"><td class="mdescLeft">&#160;</td><td class="mdescRight">A function that preprocess the bad char table. <br /></td></tr>
<tr class="separator:a2f6688c9bb3e692297a3aa09cebc1c00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b165af1dc341289fd705be4c67728f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#a0b165af1dc341289fd705be4c67728f8">strings::boyer_moore::init_pattern</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;str, <a class="el" href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">pattern</a> &amp;arg)</td></tr>
<tr class="memdesc:a0b165af1dc341289fd705be4c67728f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">A function that initializes pattern. <br /></td></tr>
<tr class="separator:a0b165af1dc341289fd705be4c67728f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15703b553faed0d28202c10808cf9738"><td class="memItemLeft" align="right" valign="top"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; size_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#a15703b553faed0d28202c10808cf9738">strings::boyer_moore::search</a> (const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;str, const <a class="el" href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">pattern</a> &amp;arg)</td></tr>
<tr class="memdesc:a15703b553faed0d28202c10808cf9738"><td class="mdescLeft">&#160;</td><td class="mdescRight">A function that implements Boyer-Moore's algorithm. <br /></td></tr>
<tr class="separator:a15703b553faed0d28202c10808cf9738"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a056122c8fe8fb0f5fca6428d3f7b5c3a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#a056122c8fe8fb0f5fca6428d3f7b5c3a">strings::boyer_moore::is_prefix</a> (const char *str, const char *pat, size_t len)</td></tr>
<tr class="memdesc:a056122c8fe8fb0f5fca6428d3f7b5c3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if pat is prefix of str. <br /></td></tr>
<tr class="separator:a056122c8fe8fb0f5fca6428d3f7b5c3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb8f69e7901ee7459d98bd4b9dda79d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9">and_test</a> (const char *text)</td></tr>
<tr class="memdesc:acb8f69e7901ee7459d98bd4b9dda79d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">A test case in which we search for every appearance of the word 'and'. <br /></td></tr>
<tr class="separator:acb8f69e7901ee7459d98bd4b9dda79d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8fac0dd4b19973da103a434143a16d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2">pat_test</a> (const char *text)</td></tr>
<tr class="memdesc:ac8fac0dd4b19973da103a434143a16d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">A test case in which we search for every appearance of the word 'pat'. <br /></td></tr>
<tr class="separator:ac8fac0dd4b19973da103a434143a16d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a483bb8ccf42aaf7375a83e91490eda1e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a> ()</td></tr>
<tr class="memdesc:a483bb8ccf42aaf7375a83e91490eda1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Self-test implementations. <br /></td></tr>
<tr class="separator:a483bb8ccf42aaf7375a83e91490eda1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function. <br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm" target="_blank">BoyerMoore</a> algorithm searches for occurrences of pattern P in text T by performing explicit character comparisons at different alignments. Instead of a brute-force search of all alignments (of which there are n - m + 1), BoyerMoore uses information gained by preprocessing P to skip as many alignments as possible. </p>
<p>The key insight in this algorithm is that if the end of the pattern is compared to the text, then jumps along the text can be made rather than checking every character of the text. The reason that this works is that in lining up the pattern against the text, the last character of the pattern is compared to the character in the text.</p>
<p>If the characters do not match, there is no need to continue searching backwards along the text. This leaves us with two cases.</p>
<p>Case 1: If the character in the text does not match any of the characters in the pattern, then the next character in the text to check is located m characters farther along the text, where m is the length of the pattern.</p>
<p>Case 2: If the character in the text is in the pattern, then a partial shift of the pattern along the text is done to line up along the matching character and the process is repeated.</p>
<p>There are two shift rules:</p>
<p>[The bad character rule] (<a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm#The_bad_character_rule">https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm#The_bad_character_rule</a>)</p>
<p>[The good suffix rule] (<a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm#The_good_suffix_rule">https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm#The_good_suffix_rule</a>)</p>
<p>The shift rules are implemented as constant-time table lookups, using tables generated during the preprocessing of P. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/stoychoX" target="_blank">Stoycho Kyosev</a> </dd></dl>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a77c872c08612d7b8861ba13bc9881cbd" name="a77c872c08612d7b8861ba13bc9881cbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77c872c08612d7b8861ba13bc9881cbd">&#9670;&#160;</a></span>APLHABET_SIZE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define APLHABET_SIZE&#160;&#160;&#160;CHAR_MAX</td>
</tr>
</table>
</div><div class="memdoc">
<p>number of symbols in the alphabet we use </p>
<p>for assert for CHAR_MAX macro for strlen for IO operations for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> for <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a> </p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="acb8f69e7901ee7459d98bd4b9dda79d9" name="acb8f69e7901ee7459d98bd4b9dda79d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb8f69e7901ee7459d98bd4b9dda79d9">&#9670;&#160;</a></span>and_test()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void and_test </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>text</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A test case in which we search for every appearance of the word 'and'. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">text</td><td>The text in which we search for appearance of the word 'and' </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 218</span> {</div>
<div class="line"><span class="lineno"> 219</span> <a class="code hl_struct" href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">strings::boyer_moore::pattern</a> ands;</div>
<div class="line"><span class="lineno"> 220</span> <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#a0b165af1dc341289fd705be4c67728f8">strings::boyer_moore::init_pattern</a>(<span class="stringliteral">&quot;and&quot;</span>, ands);</div>
<div class="line"><span class="lineno"> 221</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;size_t&gt;</a> indexes = <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#a15703b553faed0d28202c10808cf9738">strings::boyer_moore::search</a>(text, ands);</div>
<div class="line"><span class="lineno"> 222</span> </div>
<div class="line"><span class="lineno"> 223</span> assert(indexes.<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"> 224</span> assert(strings::boyer_moore::is_prefix(text + indexes[0], <span class="stringliteral">&quot;and&quot;</span>, 3));</div>
<div class="line"><span class="lineno"> 225</span> assert(strings::boyer_moore::is_prefix(text + indexes[1], <span class="stringliteral">&quot;and&quot;</span>, 3));</div>
<div class="line"><span class="lineno"> 226</span>}</div>
<div class="ttc" id="aboyer__moore_8cpp_html_a0b165af1dc341289fd705be4c67728f8"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#a0b165af1dc341289fd705be4c67728f8">strings::boyer_moore::init_pattern</a></div><div class="ttdeci">void init_pattern(const std::string &amp;str, pattern &amp;arg)</div><div class="ttdoc">A function that initializes pattern.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:151</div></div>
<div class="ttc" id="aboyer__moore_8cpp_html_a15703b553faed0d28202c10808cf9738"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#a15703b553faed0d28202c10808cf9738">strings::boyer_moore::search</a></div><div class="ttdeci">std::vector&lt; size_t &gt; search(const std::string &amp;str, const pattern &amp;arg)</div><div class="ttdoc">A function that implements Boyer-Moore's algorithm.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:163</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="astructstrings_1_1boyer__moore_1_1pattern_html"><div class="ttname"><a href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">strings::boyer_moore::pattern</a></div><div class="ttdoc">A structure representing all the data we need to search the preprocessed pattern in text.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:68</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="../../d3/db2/boyer__moore_8cpp_acb8f69e7901ee7459d98bd4b9dda79d9_cgraph.svg" width="246" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="a2f6688c9bb3e692297a3aa09cebc1c00" name="a2f6688c9bb3e692297a3aa09cebc1c00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f6688c9bb3e692297a3aa09cebc1c00">&#9670;&#160;</a></span>init_bad_char()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void strings::boyer_moore::init_bad_char </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;&#160;</td>
<td class="paramname"><em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; size_t &gt; &amp;&#160;</td>
<td class="paramname"><em>arg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A function that preprocess the bad char table. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>The string being preprocessed </td></tr>
<tr><td class="paramname">arg</td><td>The bad char table </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 136</span> {</div>
<div class="line"><span class="lineno"> 137</span> arg.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(<a class="code hl_define" href="../../d3/db2/boyer__moore_8cpp.html#a77c872c08612d7b8861ba13bc9881cbd">APLHABET_SIZE</a>, str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>());</div>
<div class="line"><span class="lineno"> 138</span> </div>
<div class="line"><span class="lineno"> 139</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>(); i++) {</div>
<div class="line"><span class="lineno"> 140</span> arg[str[i]] = str.length() - i - 1;</div>
<div class="line"><span class="lineno"> 141</span> }</div>
<div class="line"><span class="lineno"> 142</span>}</div>
<div class="ttc" id="aboyer__moore_8cpp_html_a77c872c08612d7b8861ba13bc9881cbd"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#a77c872c08612d7b8861ba13bc9881cbd">APLHABET_SIZE</a></div><div class="ttdeci">#define APLHABET_SIZE</div><div class="ttdoc">number of symbols in the alphabet we use</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:50</div></div>
<div class="ttc" id="aresize_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/resize.html">std::vector::resize</a></div><div class="ttdeci">T resize(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/db2/boyer__moore_8cpp_a2f6688c9bb3e692297a3aa09cebc1c00_cgraph.svg" width="328" height="92"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="aa709cf7fca02b7d3e1888423d5f739a1" name="aa709cf7fca02b7d3e1888423d5f739a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa709cf7fca02b7d3e1888423d5f739a1">&#9670;&#160;</a></span>init_good_suffix()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void strings::boyer_moore::init_good_suffix </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;&#160;</td>
<td class="paramname"><em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; size_t &gt; &amp;&#160;</td>
<td class="paramname"><em>arg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A function that preprocess the good suffix thable. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>The string being preprocessed </td></tr>
<tr><td class="paramname">arg</td><td>The good suffix table </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 87</span> {</div>
<div class="line"><span class="lineno"> 88</span> arg.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/resize.html">resize</a>(str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, 0);</div>
<div class="line"><span class="lineno"> 89</span> </div>
<div class="line"><span class="lineno"> 90</span> <span class="comment">// border_pos[i] - the index of the longest proper suffix of str[i..] which</span></div>
<div class="line"><span class="lineno"> 91</span> <span class="comment">// is also a proper prefix.</span></div>
<div class="line"><span class="lineno"> 92</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;size_t&gt;</a> border_pos(str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() + 1, 0);</div>
<div class="line"><span class="lineno"> 93</span> </div>
<div class="line"><span class="lineno"> 94</span> <span class="keywordtype">size_t</span> current_char = str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>();</div>
<div class="line"><span class="lineno"> 95</span> </div>
<div class="line"><span class="lineno"> 96</span> <span class="keywordtype">size_t</span> border_index = str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>() + 1;</div>
<div class="line"><span class="lineno"> 97</span> </div>
<div class="line"><span class="lineno"> 98</span> border_pos[current_char] = border_index;</div>
<div class="line"><span class="lineno"> 99</span> </div>
<div class="line"><span class="lineno"> 100</span> <span class="keywordflow">while</span> (current_char &gt; 0) {</div>
<div class="line"><span class="lineno"> 101</span> <span class="keywordflow">while</span> (border_index &lt;= str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>() &amp;&amp;</div>
<div class="line"><span class="lineno"> 102</span> str[current_char - 1] != str[border_index - 1]) {</div>
<div class="line"><span class="lineno"> 103</span> <span class="keywordflow">if</span> (arg[border_index] == 0) {</div>
<div class="line"><span class="lineno"> 104</span> arg[border_index] = border_index - current_char;</div>
<div class="line"><span class="lineno"> 105</span> }</div>
<div class="line"><span class="lineno"> 106</span> </div>
<div class="line"><span class="lineno"> 107</span> border_index = border_pos[border_index];</div>
<div class="line"><span class="lineno"> 108</span> }</div>
<div class="line"><span class="lineno"> 109</span> </div>
<div class="line"><span class="lineno"> 110</span> current_char--;</div>
<div class="line"><span class="lineno"> 111</span> border_index--;</div>
<div class="line"><span class="lineno"> 112</span> border_pos[current_char] = border_index;</div>
<div class="line"><span class="lineno"> 113</span> }</div>
<div class="line"><span class="lineno"> 114</span> </div>
<div class="line"><span class="lineno"> 115</span> <span class="keywordtype">size_t</span> largest_border_index = border_pos[0];</div>
<div class="line"><span class="lineno"> 116</span> </div>
<div class="line"><span class="lineno"> 117</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>(); i++) {</div>
<div class="line"><span class="lineno"> 118</span> <span class="keywordflow">if</span> (arg[i] == 0) {</div>
<div class="line"><span class="lineno"> 119</span> arg[i] = largest_border_index;</div>
<div class="line"><span class="lineno"> 120</span> }</div>
<div class="line"><span class="lineno"> 121</span> </div>
<div class="line"><span class="lineno"> 122</span> <span class="comment">// If we go pass the largest border we find the next one as we iterate</span></div>
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">if</span> (i == largest_border_index) {</div>
<div class="line"><span class="lineno"> 124</span> largest_border_index = border_pos[largest_border_index];</div>
<div class="line"><span class="lineno"> 125</span> }</div>
<div class="line"><span class="lineno"> 126</span> }</div>
<div class="line"><span class="lineno"> 127</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/db2/boyer__moore_8cpp_aa709cf7fca02b7d3e1888423d5f739a1_cgraph.svg" width="328" height="118"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="a0b165af1dc341289fd705be4c67728f8" name="a0b165af1dc341289fd705be4c67728f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b165af1dc341289fd705be4c67728f8">&#9670;&#160;</a></span>init_pattern()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void strings::boyer_moore::init_pattern </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;&#160;</td>
<td class="paramname"><em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">pattern</a> &amp;&#160;</td>
<td class="paramname"><em>arg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A function that initializes pattern. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>Text used for initialization </td></tr>
<tr><td class="paramname">arg</td><td>Initialized structure </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 151</span> {</div>
<div class="line"><span class="lineno"> 152</span> arg.pat = str;</div>
<div class="line"><span class="lineno"> 153</span> <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#a2f6688c9bb3e692297a3aa09cebc1c00">init_bad_char</a>(str, arg.bad_char);</div>
<div class="line"><span class="lineno"> 154</span> <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#aa709cf7fca02b7d3e1888423d5f739a1">init_good_suffix</a>(str, arg.good_suffix);</div>
<div class="line"><span class="lineno"> 155</span>}</div>
<div class="ttc" id="aboyer__moore_8cpp_html_a2f6688c9bb3e692297a3aa09cebc1c00"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#a2f6688c9bb3e692297a3aa09cebc1c00">strings::boyer_moore::init_bad_char</a></div><div class="ttdeci">void init_bad_char(const std::string &amp;str, std::vector&lt; size_t &gt; &amp;arg)</div><div class="ttdoc">A function that preprocess the bad char table.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:136</div></div>
<div class="ttc" id="aboyer__moore_8cpp_html_aa709cf7fca02b7d3e1888423d5f739a1"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#aa709cf7fca02b7d3e1888423d5f739a1">strings::boyer_moore::init_good_suffix</a></div><div class="ttdeci">void init_good_suffix(const std::string &amp;str, std::vector&lt; size_t &gt; &amp;arg)</div><div class="ttdoc">A function that preprocess the good suffix thable.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:87</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="../../d3/db2/boyer__moore_8cpp_a0b165af1dc341289fd705be4c67728f8_cgraph.svg" width="520" height="166"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="a056122c8fe8fb0f5fca6428d3f7b5c3a" name="a056122c8fe8fb0f5fca6428d3f7b5c3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a056122c8fe8fb0f5fca6428d3f7b5c3a">&#9670;&#160;</a></span>is_prefix()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool strings::boyer_moore::is_prefix </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>pat</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>len</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if pat is prefix of str. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>pointer to some part of the input text. </td></tr>
<tr><td class="paramname">pat</td><td>the searched pattern. </td></tr>
<tr><td class="paramname">len</td><td>length of the searched pattern </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if pat IS prefix of str. </dd>
<dd>
<code>false</code> if pat is NOT a prefix of str. </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 198</span> {</div>
<div class="line"><span class="lineno"> 199</span> <span class="keywordflow">if</span> (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/strlen.html">strlen</a>(str) &lt; len) {</div>
<div class="line"><span class="lineno"> 200</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 201</span> }</div>
<div class="line"><span class="lineno"> 202</span> </div>
<div class="line"><span class="lineno"> 203</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; len; i++) {</div>
<div class="line"><span class="lineno"> 204</span> <span class="keywordflow">if</span> (str[i] != pat[i]) {</div>
<div class="line"><span class="lineno"> 205</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><span class="lineno"> 206</span> }</div>
<div class="line"><span class="lineno"> 207</span> }</div>
<div class="line"><span class="lineno"> 208</span> </div>
<div class="line"><span class="lineno"> 209</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 210</span>}</div>
<div class="ttc" id="astrlen_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/strlen.html">std::strlen</a></div><div class="ttdeci">T strlen(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/db2/boyer__moore_8cpp_a056122c8fe8fb0f5fca6428d3f7b5c3a_cgraph.svg" width="155" height="76"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 267</span> {</div>
<div class="line"><span class="lineno"> 268</span> <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><span class="lineno"> 269</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 270</span>}</div>
<div class="ttc" id="aboyer__moore_8cpp_html_a483bb8ccf42aaf7375a83e91490eda1e"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e">tests</a></div><div class="ttdeci">static void tests()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:248</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="../../d3/db2/boyer__moore_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="442" height="86"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="ac8fac0dd4b19973da103a434143a16d2" name="ac8fac0dd4b19973da103a434143a16d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8fac0dd4b19973da103a434143a16d2">&#9670;&#160;</a></span>pat_test()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void pat_test </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>text</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A test case in which we search for every appearance of the word 'pat'. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">text</td><td>The text in which we search for appearance of the word 'pat' </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 233</span> {</div>
<div class="line"><span class="lineno"> 234</span> <a class="code hl_struct" href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">strings::boyer_moore::pattern</a> pat;</div>
<div class="line"><span class="lineno"> 235</span> <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#a0b165af1dc341289fd705be4c67728f8">strings::boyer_moore::init_pattern</a>(<span class="stringliteral">&quot;pat&quot;</span>, pat);</div>
<div class="line"><span class="lineno"> 236</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;size_t&gt;</a> indexes = <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#a15703b553faed0d28202c10808cf9738">strings::boyer_moore::search</a>(text, pat);</div>
<div class="line"><span class="lineno"> 237</span> </div>
<div class="line"><span class="lineno"> 238</span> assert(indexes.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() == 6);</div>
<div class="line"><span class="lineno"> 239</span> </div>
<div class="line"><span class="lineno"> 240</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; currentIndex : indexes) {</div>
<div class="line"><span class="lineno"> 241</span> assert(strings::boyer_moore::is_prefix(text + currentIndex, <span class="stringliteral">&quot;pat&quot;</span>, 3));</div>
<div class="line"><span class="lineno"> 242</span> }</div>
<div class="line"><span class="lineno"> 243</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/db2/boyer__moore_8cpp_ac8fac0dd4b19973da103a434143a16d2_cgraph.svg" width="243" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="a15703b553faed0d28202c10808cf9738" name="a15703b553faed0d28202c10808cf9738"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15703b553faed0d28202c10808cf9738">&#9670;&#160;</a></span>search()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>&lt; size_t &gt; strings::boyer_moore::search </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &amp;&#160;</td>
<td class="paramname"><em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="../../dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html">pattern</a> &amp;&#160;</td>
<td class="paramname"><em>arg</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A function that implements Boyer-Moore's algorithm. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>Text we are seatching in. </td></tr>
<tr><td class="paramname">arg</td><td>pattern structure containing the preprocessed pattern </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Vector of indexes of the occurrences of pattern in text </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 163</span> {</div>
<div class="line"><span class="lineno"> 164</span> <span class="keywordtype">size_t</span> index_position = arg.pat.size() - 1;</div>
<div class="line"><span class="lineno"> 165</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt;size_t&gt;</a> index_storage;</div>
<div class="line"><span class="lineno"> 166</span> </div>
<div class="line"><span class="lineno"> 167</span> <span class="keywordflow">while</span> (index_position &lt; str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
<div class="line"><span class="lineno"> 168</span> <span class="keywordtype">size_t</span> index_string = index_position;</div>
<div class="line"><span class="lineno"> 169</span> <span class="keywordtype">int</span> index_pattern = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(arg.pat.size()) - 1;</div>
<div class="line"><span class="lineno"> 170</span> </div>
<div class="line"><span class="lineno"> 171</span> <span class="keywordflow">while</span> (index_pattern &gt;= 0 &amp;&amp;</div>
<div class="line"><span class="lineno"> 172</span> str[index_string] == arg.pat[index_pattern]) {</div>
<div class="line"><span class="lineno"> 173</span> --index_pattern;</div>
<div class="line"><span class="lineno"> 174</span> --index_string;</div>
<div class="line"><span class="lineno"> 175</span> }</div>
<div class="line"><span class="lineno"> 176</span> </div>
<div class="line"><span class="lineno"> 177</span> <span class="keywordflow">if</span> (index_pattern &lt; 0) {</div>
<div class="line"><span class="lineno"> 178</span> index_storage.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(index_position - arg.pat.length() + 1);</div>
<div class="line"><span class="lineno"> 179</span> index_position += arg.good_suffix[0];</div>
<div class="line"><span class="lineno"> 180</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><span class="lineno"> 181</span> index_position += <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(arg.bad_char[str[index_string]],</div>
<div class="line"><span class="lineno"> 182</span> arg.good_suffix[index_pattern + 1]);</div>
<div class="line"><span class="lineno"> 183</span> }</div>
<div class="line"><span class="lineno"> 184</span> }</div>
<div class="line"><span class="lineno"> 185</span> </div>
<div class="line"><span class="lineno"> 186</span> <span class="keywordflow">return</span> index_storage;</div>
<div class="line"><span class="lineno"> 187</span>}</div>
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
<div class="ttc" id="apush_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">std::vector::push_back</a></div><div class="ttdeci">T push_back(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/db2/boyer__moore_8cpp_a15703b553faed0d28202c10808cf9738_cgraph.svg" width="356" height="135"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="a483bb8ccf42aaf7375a83e91490eda1e" name="a483bb8ccf42aaf7375a83e91490eda1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a483bb8ccf42aaf7375a83e91490eda1e">&#9670;&#160;</a></span>tests()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void tests </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><span class="lineno"> 248</span> {</div>
<div class="line"><span class="lineno"> 249</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* text =</div>
<div class="line"><span class="lineno"> 250</span> <span class="stringliteral">&quot;When pat Mr. and Mrs. pat Dursley woke up on the dull, gray \</span></div>
<div class="line"><span class="lineno"> 251</span><span class="stringliteral"> Tuesday our story starts, \</span></div>
<div class="line"><span class="lineno"> 252</span><span class="stringliteral"> there was nothing about pat the cloudy sky outside to pat suggest that\</span></div>
<div class="line"><span class="lineno"> 253</span><span class="stringliteral"> strange and \</span></div>
<div class="line"><span class="lineno"> 254</span><span class="stringliteral"> mysterious things would pat soon be happening all pat over the \</span></div>
<div class="line"><span class="lineno"> 255</span><span class="stringliteral"> country.&quot;</span>;</div>
<div class="line"><span class="lineno"> 256</span> </div>
<div class="line"><span class="lineno"> 257</span> <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9">and_test</a>(text);</div>
<div class="line"><span class="lineno"> 258</span> <a class="code hl_function" href="../../d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2">pat_test</a>(text);</div>
<div class="line"><span class="lineno"> 259</span> </div>
<div class="line"><span class="lineno"> 260</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;All tests have successfully passed!\n&quot;</span>;</div>
<div class="line"><span class="lineno"> 261</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="aboyer__moore_8cpp_html_ac8fac0dd4b19973da103a434143a16d2"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2">pat_test</a></div><div class="ttdeci">void pat_test(const char *text)</div><div class="ttdoc">A test case in which we search for every appearance of the word 'pat'.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:233</div></div>
<div class="ttc" id="aboyer__moore_8cpp_html_acb8f69e7901ee7459d98bd4b9dda79d9"><div class="ttname"><a href="../../d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9">and_test</a></div><div class="ttdeci">void and_test(const char *text)</div><div class="ttdoc">A test case in which we search for every appearance of the word 'and'.</div><div class="ttdef"><b>Definition</b> boyer_moore.cpp:218</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="../../d3/db2/boyer__moore_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg" width="344" height="86"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
</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_73a3cc5065b223eb41b02873c0e19f0e.html">strings</a></li><li class="navelem"><a class="el" href="../../d3/db2/boyer__moore_8cpp.html">boyer_moore.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.9.7 </li>
</ul>
</div>
</body>
</html>

14
d3/db2/boyer__moore_8cpp.js vendored Normal file
View File

@@ -0,0 +1,14 @@
var boyer__moore_8cpp =
[
[ "strings::boyer_moore::pattern", "dd/d5a/structstrings_1_1boyer__moore_1_1pattern.html", "dd/d5a/structstrings_1_1boyer__moore_1_1pattern" ],
[ "APLHABET_SIZE", "d3/db2/boyer__moore_8cpp.html#a77c872c08612d7b8861ba13bc9881cbd", null ],
[ "and_test", "d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9", null ],
[ "init_bad_char", "d3/db2/boyer__moore_8cpp.html#a2f6688c9bb3e692297a3aa09cebc1c00", null ],
[ "init_good_suffix", "d3/db2/boyer__moore_8cpp.html#aa709cf7fca02b7d3e1888423d5f739a1", null ],
[ "init_pattern", "d3/db2/boyer__moore_8cpp.html#a0b165af1dc341289fd705be4c67728f8", null ],
[ "is_prefix", "d3/db2/boyer__moore_8cpp.html#a056122c8fe8fb0f5fca6428d3f7b5c3a", null ],
[ "main", "d3/db2/boyer__moore_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
[ "pat_test", "d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2", null ],
[ "search", "d3/db2/boyer__moore_8cpp.html#a15703b553faed0d28202c10808cf9738", null ],
[ "tests", "d3/db2/boyer__moore_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ]
];

View File

@@ -0,0 +1,4 @@
<map id="strings::boyer_moore::is_prefix" name="strings::boyer_moore::is_prefix">
<area shape="rect" id="Node000001" title="Check if pat is prefix of str." alt="" coords="5,29,149,70"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="49,29,48,20,52,11,62,5,77,3,93,5,103,12,100,16,91,10,77,8,64,10,56,14,53,20,54,28"/>
</map>

View File

@@ -0,0 +1 @@
2150952876937ec74c8f1cdcf011c50c

View File

@@ -0,0 +1,56 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::is_prefix Pages: 1 -->
<svg width="116pt" height="57pt"
viewBox="0.00 0.00 115.50 56.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" 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>
<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 52.5)">
<title>strings::boyer_moore::is_prefix</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Check if pat is prefix of str.">
<polygon fill="#999999" stroke="#666666" points="107.5,-30.5 0,-30.5 0,0 107.5,0 107.5,-30.5"/>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::is_prefix</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.7,-30.99C30.81,-40.06 37.16,-48.5 53.75,-48.5 63.08,-48.5 69.17,-45.83 72.02,-41.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-42.21 72.8,-31.99 68.6,-41.71 75.58,-42.21"/>
</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>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,31 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::is_prefix Pages: 1 -->
<svg width="116pt" height="57pt"
viewBox="0.00 0.00 115.50 56.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 52.5)">
<title>strings::boyer_moore::is_prefix</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Check if pat is prefix of str.">
<polygon fill="#999999" stroke="#666666" points="107.5,-30.5 0,-30.5 0,0 107.5,0 107.5,-30.5"/>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::is_prefix</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M34.7,-30.99C30.81,-40.06 37.16,-48.5 53.75,-48.5 63.08,-48.5 69.17,-45.83 72.02,-41.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.58,-42.21 72.8,-31.99 68.6,-41.71 75.58,-42.21"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,17 @@
<map id="strings::boyer_moore::init_pattern" name="strings::boyer_moore::init_pattern">
<area shape="rect" id="Node000001" title="A function that initializes pattern." alt="" coords="5,75,149,115"/>
<area shape="poly" id="edge10_Node000001_Node000001" title=" " alt="" coords="40,75,39,65,45,56,58,50,77,48,98,51,111,57,108,62,97,56,77,53,59,55,48,60,44,66,46,73"/>
<area shape="rect" id="Node000002" href="$d3/db2/boyer__moore_8cpp.html#a2f6688c9bb3e692297a3aa09cebc1c00" title="A function that preprocess the bad char table." alt="" coords="197,119,340,159"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="150,109,183,117,182,122,149,114"/>
<area shape="rect" id="Node000005" href="$d3/db2/boyer__moore_8cpp.html#aa709cf7fca02b7d3e1888423d5f739a1" title="A function that preprocess the good suffix thable." alt="" coords="197,29,340,70"/>
<area shape="poly" id="edge5_Node000001_Node000005" title=" " alt="" coords="148,75,182,67,183,73,150,81"/>
<area shape="poly" id="edge2_Node000002_Node000002" title=" " alt="" coords="233,119,232,109,237,100,250,94,268,92,289,95,301,101,298,106,287,100,268,97,251,99,241,104,237,110,239,118"/>
<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/size.html#" title=" " alt="" coords="390,37,512,63"/>
<area shape="poly" id="edge3_Node000002_Node000003" title=" " alt="" coords="311,116,409,67,411,72,313,120"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize.html#" title=" " alt="" coords="388,106,514,132"/>
<area shape="poly" id="edge4_Node000002_Node000004" title=" " alt="" coords="340,129,373,125,373,130,341,134"/>
<area shape="poly" id="edge7_Node000005_Node000003" title=" " alt="" coords="340,56,375,56,375,61,340,61"/>
<area shape="poly" id="edge9_Node000005_Node000003" title=" " alt="" coords="340,38,375,38,375,43,340,44"/>
<area shape="poly" id="edge8_Node000005_Node000004" title=" " alt="" coords="325,68,402,98,400,103,323,73"/>
<area shape="poly" id="edge6_Node000005_Node000005" title=" " alt="" coords="233,29,232,19,237,10,250,5,268,3,289,5,301,12,298,16,287,10,268,8,251,10,241,14,237,20,239,28"/>
</map>

View File

@@ -0,0 +1 @@
304c1d6bc9e25fd666861b19017f9ea7

View File

@@ -0,0 +1,175 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::init_pattern Pages: 1 -->
<svg width="390pt" height="124pt"
viewBox="0.00 0.00 389.75 123.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" 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>
<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 119.5)">
<title>strings::boyer_moore::init_pattern</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that initializes pattern.">
<polygon fill="#999999" stroke="#666666" points="107.5,-63.5 0,-63.5 0,-33 107.5,-33 107.5,-63.5"/>
<text text-anchor="start" x="8" y="-50" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-38.75" font-family="Helvetica,sans-Serif" font-size="10.00">::init_pattern</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge10_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge10_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M28.32,-63.99C23.13,-73.06 31.61,-81.5 53.75,-81.5 66.2,-81.5 74.34,-78.83 78.14,-74.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="81.72,-75.27 79.18,-64.99 74.75,-74.61 81.72,-75.27"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#a2f6688c9bb3e692297a3aa09cebc1c00" target="_top" xlink:title="A function that preprocess the bad char table.">
<polygon fill="white" stroke="#666666" points="251,-30.5 143.5,-30.5 143.5,0 251,0 251,-30.5"/>
<text text-anchor="start" x="151.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="197.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::init_bad_char</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.84,-35.87C116,-33.96 124.5,-31.98 132.86,-30.03"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.39,-33.27 142.33,-27.59 131.8,-26.45 133.39,-33.27"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#aa709cf7fca02b7d3e1888423d5f739a1" target="_top" xlink:title="A function that preprocess the good suffix thable.">
<polygon fill="white" stroke="#666666" points="251,-97.5 143.5,-97.5 143.5,-67 251,-67 251,-97.5"/>
<text text-anchor="start" x="151.5" y="-84" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="197.25" y="-72.75" font-family="Helvetica,sans-Serif" font-size="10.00">::init_good_suffix</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge5_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge5_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.84,-61.01C116,-62.97 124.5,-65.01 132.86,-67.02"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="131.79,-70.6 142.33,-69.53 133.43,-63.79 131.79,-70.6"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge2_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.95,-30.99C167.99,-40.06 176.09,-48.5 197.25,-48.5 209.15,-48.5 216.92,-45.83 220.56,-41.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.13,-42.26 221.55,-31.99 217.16,-41.63 224.13,-42.26"/>
</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/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="380.25,-91.88 288.5,-91.88 288.5,-72.62 380.25,-72.62 380.25,-91.88"/>
<text text-anchor="middle" x="334.38" y="-78.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge3_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge3_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M229.93,-30.96C252.15,-41.98 281.67,-56.61 303.49,-67.43"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="301.7,-70.95 312.21,-72.25 304.81,-64.67 301.7,-70.95"/>
</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/vector/resize.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="381.75,-39.88 287,-39.88 287,-20.62 381.75,-20.62 381.75,-39.88"/>
<text text-anchor="middle" x="334.38" y="-26.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge4_Node000002_Node000004" class="edge">
<title>Node2&#45;&gt;Node4</title>
<g id="a_edge4_Node000002_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.27,-21.14C259.3,-22.03 267.62,-22.95 275.74,-23.85"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="275.33,-27.44 285.65,-25.06 276.1,-20.48 275.33,-27.44"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node3 -->
<g id="edge7_Node000005_Node000003" class="edge">
<title>Node5&#45;&gt;Node3</title>
<g id="a_edge7_Node000005_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.27,-75.64C259.9,-75.47 268.86,-75.45 277.55,-75.59"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.3,-79.11 287.38,-75.85 277.46,-72.11 277.3,-79.11"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node3 -->
<g id="edge9_Node000005_Node000003" class="edge">
<title>Node5&#45;&gt;Node3</title>
<g id="a_edge9_Node000005_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.27,-88.86C259.9,-89.03 268.86,-89.05 277.55,-88.91"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.46,-92.39 287.38,-88.65 277.3,-85.39 277.46,-92.39"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node4 -->
<g id="edge8_Node000005_Node000004" class="edge">
<title>Node5&#45;&gt;Node4</title>
<g id="a_edge8_Node000005_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M239.16,-66.51C257.6,-59.41 279.2,-51.1 297.06,-44.23"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="298.01,-47.22 306.09,-40.37 295.5,-40.69 298.01,-47.22"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node5 -->
<g id="edge6_Node000005_Node000005" class="edge">
<title>Node5&#45;&gt;Node5</title>
<g id="a_edge6_Node000005_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.95,-97.99C167.99,-107.06 176.09,-115.5 197.25,-115.5 209.15,-115.5 216.92,-112.83 220.56,-108.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.13,-109.26 221.55,-98.99 217.16,-108.63 224.13,-109.26"/>
</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>

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -0,0 +1,150 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::init_pattern Pages: 1 -->
<svg width="390pt" height="124pt"
viewBox="0.00 0.00 389.75 123.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 119.5)">
<title>strings::boyer_moore::init_pattern</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that initializes pattern.">
<polygon fill="#999999" stroke="#666666" points="107.5,-63.5 0,-63.5 0,-33 107.5,-33 107.5,-63.5"/>
<text text-anchor="start" x="8" y="-50" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-38.75" font-family="Helvetica,sans-Serif" font-size="10.00">::init_pattern</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge10_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge10_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M28.32,-63.99C23.13,-73.06 31.61,-81.5 53.75,-81.5 66.2,-81.5 74.34,-78.83 78.14,-74.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="81.72,-75.27 79.18,-64.99 74.75,-74.61 81.72,-75.27"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#a2f6688c9bb3e692297a3aa09cebc1c00" target="_top" xlink:title="A function that preprocess the bad char table.">
<polygon fill="white" stroke="#666666" points="251,-30.5 143.5,-30.5 143.5,0 251,0 251,-30.5"/>
<text text-anchor="start" x="151.5" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="197.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">::init_bad_char</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.84,-35.87C116,-33.96 124.5,-31.98 132.86,-30.03"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.39,-33.27 142.33,-27.59 131.8,-26.45 133.39,-33.27"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#aa709cf7fca02b7d3e1888423d5f739a1" target="_top" xlink:title="A function that preprocess the good suffix thable.">
<polygon fill="white" stroke="#666666" points="251,-97.5 143.5,-97.5 143.5,-67 251,-67 251,-97.5"/>
<text text-anchor="start" x="151.5" y="-84" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="197.25" y="-72.75" font-family="Helvetica,sans-Serif" font-size="10.00">::init_good_suffix</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node5 -->
<g id="edge5_Node000001_Node000005" class="edge">
<title>Node1&#45;&gt;Node5</title>
<g id="a_edge5_Node000001_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.84,-61.01C116,-62.97 124.5,-65.01 132.86,-67.02"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="131.79,-70.6 142.33,-69.53 133.43,-63.79 131.79,-70.6"/>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node2 -->
<g id="edge2_Node000002_Node000002" class="edge">
<title>Node2&#45;&gt;Node2</title>
<g id="a_edge2_Node000002_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.95,-30.99C167.99,-40.06 176.09,-48.5 197.25,-48.5 209.15,-48.5 216.92,-45.83 220.56,-41.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.13,-42.26 221.55,-31.99 217.16,-41.63 224.13,-42.26"/>
</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/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="380.25,-91.88 288.5,-91.88 288.5,-72.62 380.25,-72.62 380.25,-91.88"/>
<text text-anchor="middle" x="334.38" y="-78.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge3_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge3_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M229.93,-30.96C252.15,-41.98 281.67,-56.61 303.49,-67.43"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="301.7,-70.95 312.21,-72.25 304.81,-64.67 301.7,-70.95"/>
</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/vector/resize.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="381.75,-39.88 287,-39.88 287,-20.62 381.75,-20.62 381.75,-39.88"/>
<text text-anchor="middle" x="334.38" y="-26.38" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node4 -->
<g id="edge4_Node000002_Node000004" class="edge">
<title>Node2&#45;&gt;Node4</title>
<g id="a_edge4_Node000002_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.27,-21.14C259.3,-22.03 267.62,-22.95 275.74,-23.85"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="275.33,-27.44 285.65,-25.06 276.1,-20.48 275.33,-27.44"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node3 -->
<g id="edge7_Node000005_Node000003" class="edge">
<title>Node5&#45;&gt;Node3</title>
<g id="a_edge7_Node000005_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.27,-75.64C259.9,-75.47 268.86,-75.45 277.55,-75.59"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.3,-79.11 287.38,-75.85 277.46,-72.11 277.3,-79.11"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node3 -->
<g id="edge9_Node000005_Node000003" class="edge">
<title>Node5&#45;&gt;Node3</title>
<g id="a_edge9_Node000005_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M251.27,-88.86C259.9,-89.03 268.86,-89.05 277.55,-88.91"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="277.46,-92.39 287.38,-88.65 277.3,-85.39 277.46,-92.39"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node4 -->
<g id="edge8_Node000005_Node000004" class="edge">
<title>Node5&#45;&gt;Node4</title>
<g id="a_edge8_Node000005_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M239.16,-66.51C257.6,-59.41 279.2,-51.1 297.06,-44.23"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="298.01,-47.22 306.09,-40.37 295.5,-40.69 298.01,-47.22"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node5 -->
<g id="edge6_Node000005_Node000005" class="edge">
<title>Node5&#45;&gt;Node5</title>
<g id="a_edge6_Node000005_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M172.95,-97.99C167.99,-107.06 176.09,-115.5 197.25,-115.5 209.15,-115.5 216.92,-112.83 220.56,-108.88"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.13,-109.26 221.55,-98.99 217.16,-108.63 224.13,-109.26"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -0,0 +1,10 @@
<map id="strings::boyer_moore::search" name="strings::boyer_moore::search">
<area shape="rect" id="Node000001" title="A function that implements Boyer&#45;Moore&#39;s algorithm." alt="" coords="5,23,149,64"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="213,5,335,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="149,40,213,32,214,37,149,46"/>
<area shape="poly" id="edge4_Node000001_Node000002" title=" " alt="" coords="149,23,198,16,198,22,149,28"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/max.html#" title=" " alt="" coords="238,55,310,80"/>
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="149,50,223,59,223,64,149,55"/>
<area shape="rect" id="Node000004" 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="197,104,351,130"/>
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="127,62,198,90,215,96,213,101,196,95,125,67"/>
</map>

View File

@@ -0,0 +1 @@
5b5eb95061452a40148727ff87187858

View File

@@ -0,0 +1,110 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::search Pages: 1 -->
<svg width="267pt" height="101pt"
viewBox="0.00 0.00 267.25 101.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" 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>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 97.25)">
<title>strings::boyer_moore::search</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that implements Boyer&#45;Moore&#39;s algorithm.">
<polygon fill="#999999" stroke="#666666" points="107.5,-79.88 0,-79.88 0,-49.38 107.5,-49.38 107.5,-79.88"/>
<text text-anchor="start" x="8" y="-66.38" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-55.12" font-family="Helvetica,sans-Serif" font-size="10.00">::search</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="247.25,-93.25 155.5,-93.25 155.5,-74 247.25,-74 247.25,-93.25"/>
<text text-anchor="middle" x="201.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.74,-65.02C123.7,-66.72 141.05,-69.08 156.36,-71.63"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="155.66,-75.23 166.11,-73.51 156.87,-68.34 155.66,-75.23"/>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge4_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge4_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.74,-78.06C119.69,-79.9 132.42,-81.58 144.49,-82.92"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="144.04,-86.49 154.35,-84.04 144.76,-79.53 144.04,-86.49"/>
</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/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="228.5,-56.25 174.25,-56.25 174.25,-37 228.5,-37 228.5,-56.25"/>
<text text-anchor="middle" x="201.38" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.74,-58.08C126.15,-55.8 146.39,-53.3 163.25,-51.21"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="163.28,-54.61 172.78,-49.91 162.43,-47.67 163.28,-54.61"/>
</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/vector/push_back.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="259.25,-19.25 143.5,-19.25 143.5,0 259.25,0 259.25,-19.25"/>
<text text-anchor="middle" x="201.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M90.31,-48.96C106.42,-42.08 125.78,-34.11 143.5,-27.62 147.71,-26.08 152.13,-24.55 156.56,-23.06"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="157.41,-26.14 165.83,-19.7 155.23,-19.49 157.41,-26.14"/>
</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>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,85 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::search Pages: 1 -->
<svg width="267pt" height="101pt"
viewBox="0.00 0.00 267.25 101.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 97.25)">
<title>strings::boyer_moore::search</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that implements Boyer&#45;Moore&#39;s algorithm.">
<polygon fill="#999999" stroke="#666666" points="107.5,-79.88 0,-79.88 0,-49.38 107.5,-49.38 107.5,-79.88"/>
<text text-anchor="start" x="8" y="-66.38" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-55.12" font-family="Helvetica,sans-Serif" font-size="10.00">::search</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="247.25,-93.25 155.5,-93.25 155.5,-74 247.25,-74 247.25,-93.25"/>
<text text-anchor="middle" x="201.38" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.74,-65.02C123.7,-66.72 141.05,-69.08 156.36,-71.63"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="155.66,-75.23 166.11,-73.51 156.87,-68.34 155.66,-75.23"/>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge4_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge4_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.74,-78.06C119.69,-79.9 132.42,-81.58 144.49,-82.92"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="144.04,-86.49 154.35,-84.04 144.76,-79.53 144.04,-86.49"/>
</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/algorithm/max.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="228.5,-56.25 174.25,-56.25 174.25,-37 228.5,-37 228.5,-56.25"/>
<text text-anchor="middle" x="201.38" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::max</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge2_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.74,-58.08C126.15,-55.8 146.39,-53.3 163.25,-51.21"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="163.28,-54.61 172.78,-49.91 162.43,-47.67 163.28,-54.61"/>
</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/vector/push_back.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="259.25,-19.25 143.5,-19.25 143.5,0 259.25,0 259.25,-19.25"/>
<text text-anchor="middle" x="201.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M90.31,-48.96C106.42,-42.08 125.78,-34.11 143.5,-27.62 147.71,-26.08 152.13,-24.55 156.56,-23.06"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="157.41,-26.14 165.83,-19.7 155.23,-19.49 157.41,-26.14"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,8 @@
<map id="strings::boyer_moore::init_bad_char" name="strings::boyer_moore::init_bad_char">
<area shape="rect" id="Node000001" title="A function that preprocess the bad char table." alt="" coords="5,29,149,70"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="42,29,40,19,46,10,58,5,77,3,98,5,109,12,107,16,96,10,77,8,60,10,49,14,46,20,47,28"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="199,12,321,37"/>
<area shape="poly" id="edge2_Node000001_Node000002" title=" " alt="" coords="149,37,184,32,184,37,149,42"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize.html#" title=" " alt="" coords="197,61,323,87"/>
<area shape="poly" id="edge3_Node000001_Node000003" title=" " alt="" coords="149,56,182,61,182,66,149,62"/>
</map>

View File

@@ -0,0 +1 @@
2974149438887cb82d1c50b12d09ffa5

View File

@@ -0,0 +1,92 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::init_bad_char Pages: 1 -->
<svg width="246pt" height="69pt"
viewBox="0.00 0.00 246.25 68.88" 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" 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>
<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 64.88)">
<title>strings::boyer_moore::init_bad_char</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that preprocess the bad char table.">
<polygon fill="#999999" stroke="#666666" points="107.5,-42.88 0,-42.88 0,-12.37 107.5,-12.37 107.5,-42.88"/>
<text text-anchor="start" x="8" y="-29.38" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-18.12" font-family="Helvetica,sans-Serif" font-size="10.00">::init_bad_char</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.45,-43.36C24.49,-52.43 32.59,-60.88 53.75,-60.88 65.65,-60.88 73.42,-58.2 77.06,-54.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="80.63,-54.64 78.05,-44.36 73.66,-54 80.63,-54.64"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="236.75,-56.25 145,-56.25 145,-37 236.75,-37 236.75,-56.25"/>
<text text-anchor="middle" x="190.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-35.08C116.4,-36.29 125.36,-37.55 134.05,-38.78"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.49,-42.37 143.88,-40.3 134.46,-35.44 133.49,-42.37"/>
</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/container/vector/resize.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="238.25,-19.25 143.5,-19.25 143.5,0 238.25,0 238.25,-19.25"/>
<text text-anchor="middle" x="190.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-20.56C115.89,-19.48 124.31,-18.36 132.52,-17.27"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="132.7,-20.64 142.15,-15.85 131.78,-13.7 132.7,-20.64"/>
</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>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1,67 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::init_bad_char Pages: 1 -->
<svg width="246pt" height="69pt"
viewBox="0.00 0.00 246.25 68.88" 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 64.88)">
<title>strings::boyer_moore::init_bad_char</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that preprocess the bad char table.">
<polygon fill="#999999" stroke="#666666" points="107.5,-42.88 0,-42.88 0,-12.37 107.5,-12.37 107.5,-42.88"/>
<text text-anchor="start" x="8" y="-29.38" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-18.12" font-family="Helvetica,sans-Serif" font-size="10.00">::init_bad_char</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.45,-43.36C24.49,-52.43 32.59,-60.88 53.75,-60.88 65.65,-60.88 73.42,-58.2 77.06,-54.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="80.63,-54.64 78.05,-44.36 73.66,-54 80.63,-54.64"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="236.75,-56.25 145,-56.25 145,-37 236.75,-37 236.75,-56.25"/>
<text text-anchor="middle" x="190.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-35.08C116.4,-36.29 125.36,-37.55 134.05,-38.78"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.49,-42.37 143.88,-40.3 134.46,-35.44 133.49,-42.37"/>
</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/container/vector/resize.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="238.25,-19.25 143.5,-19.25 143.5,0 238.25,0 238.25,-19.25"/>
<text text-anchor="middle" x="190.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-20.56C115.89,-19.48 124.31,-18.36 132.52,-17.27"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="132.7,-20.64 142.15,-15.85 131.78,-13.7 132.7,-20.64"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,10 @@
<map id="tests" name="tests">
<area shape="rect" id="Node000001" title="Self&#45;test implementations." alt="" coords="5,31,56,56"/>
<area shape="rect" id="Node000002" href="$d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9" title="A test case in which we search for every appearance of the word &#39;and&#39;." alt="" coords="104,5,175,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,35,88,27,90,32,57,40"/>
<area shape="rect" id="Node000004" href="$d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2" title="A test case in which we search for every appearance of the word &#39;pat&#39;." alt="" coords="105,55,174,80"/>
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="57,46,91,54,90,59,55,52"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="223,31,338,56"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="176,22,209,28,208,33,175,27"/>
<area shape="poly" id="edge4_Node000004_Node000003" title=" " alt="" coords="173,59,208,53,209,58,174,64"/>
</map>

View File

@@ -0,0 +1 @@
1d1e002573401f45a6341389936a84c1

View File

@@ -0,0 +1,109 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: tests Pages: 1 -->
<svg width="258pt" height="64pt"
viewBox="0.00 0.00 257.75 64.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" 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>
<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 60.25)">
<title>tests</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Self&#45;test implementations.">
<polygon fill="#999999" stroke="#666666" points="37.75,-37.25 0,-37.25 0,-18 37.75,-18 37.75,-37.25"/>
<text text-anchor="middle" x="18.88" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;and&#39;.">
<polygon fill="white" stroke="#666666" points="127.25,-56.25 73.75,-56.25 73.75,-37 127.25,-37 127.25,-56.25"/>
<text text-anchor="middle" x="100.5" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">and_test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.94,-31.94C45.3,-33.69 54.08,-35.79 62.68,-37.84"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.81,-41.47 72.35,-40.38 63.43,-34.66 61.81,-41.47"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;pat&#39;.">
<polygon fill="white" stroke="#666666" points="126.12,-19.25 74.88,-19.25 74.88,0 126.12,0 126.12,-19.25"/>
<text text-anchor="middle" x="100.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">pat_test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.94,-23.54C45.64,-21.8 54.9,-19.71 63.88,-17.68"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="64.58,-20.88 73.56,-15.26 63.04,-14.05 64.58,-20.88"/>
</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/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="249.75,-37.25 163.25,-37.25 163.25,-18 249.75,-18 249.75,-37.25"/>
<text text-anchor="middle" x="206.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M127.74,-41.83C135.27,-40.45 143.77,-38.9 152.31,-37.34"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="152.87,-40.62 162.08,-35.38 151.61,-33.73 152.87,-40.62"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node3 -->
<g id="edge4_Node000004_Node000003" class="edge">
<title>Node4&#45;&gt;Node3</title>
<g id="a_edge4_Node000004_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M126.41,-13.94C134.27,-15.3 143.28,-16.86 152.33,-18.42"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.47,-22 161.92,-20.25 152.66,-15.1 151.47,-22"/>
</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>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -0,0 +1,84 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: tests Pages: 1 -->
<svg width="258pt" height="64pt"
viewBox="0.00 0.00 257.75 64.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 60.25)">
<title>tests</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Self&#45;test implementations.">
<polygon fill="#999999" stroke="#666666" points="37.75,-37.25 0,-37.25 0,-18 37.75,-18 37.75,-37.25"/>
<text text-anchor="middle" x="18.88" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;and&#39;.">
<polygon fill="white" stroke="#666666" points="127.25,-56.25 73.75,-56.25 73.75,-37 127.25,-37 127.25,-56.25"/>
<text text-anchor="middle" x="100.5" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">and_test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.94,-31.94C45.3,-33.69 54.08,-35.79 62.68,-37.84"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.81,-41.47 72.35,-40.38 63.43,-34.66 61.81,-41.47"/>
</a>
</g>
</g>
<!-- Node4 -->
<g id="Node000004" class="node">
<title>Node4</title>
<g id="a_Node000004"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;pat&#39;.">
<polygon fill="white" stroke="#666666" points="126.12,-19.25 74.88,-19.25 74.88,0 126.12,0 126.12,-19.25"/>
<text text-anchor="middle" x="100.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">pat_test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node4 -->
<g id="edge3_Node000001_Node000004" class="edge">
<title>Node1&#45;&gt;Node4</title>
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.94,-23.54C45.64,-21.8 54.9,-19.71 63.88,-17.68"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="64.58,-20.88 73.56,-15.26 63.04,-14.05 64.58,-20.88"/>
</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/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="249.75,-37.25 163.25,-37.25 163.25,-18 249.75,-18 249.75,-37.25"/>
<text text-anchor="middle" x="206.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M127.74,-41.83C135.27,-40.45 143.77,-38.9 152.31,-37.34"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="152.87,-40.62 162.08,-35.38 151.61,-33.73 152.87,-40.62"/>
</a>
</g>
</g>
<!-- Node4&#45;&gt;Node3 -->
<g id="edge4_Node000004_Node000003" class="edge">
<title>Node4&#45;&gt;Node3</title>
<g id="a_edge4_Node000004_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M126.41,-13.94C134.27,-15.3 143.28,-16.86 152.33,-18.42"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="151.47,-22 161.92,-20.25 152.66,-15.1 151.47,-22"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,9 @@
<map id="strings::boyer_moore::init_good_suffix" name="strings::boyer_moore::init_good_suffix">
<area shape="rect" id="Node000001" title="A function that preprocess the good suffix thable." alt="" coords="5,29,149,70"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="42,29,40,19,46,10,58,5,77,3,98,5,109,12,107,16,96,10,77,8,60,10,49,14,46,20,47,28"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="199,37,321,63"/>
<area shape="poly" id="edge2_Node000001_Node000002" title=" " alt="" coords="149,56,184,56,184,61,149,61"/>
<area shape="poly" id="edge4_Node000001_Node000002" title=" " alt="" coords="149,38,184,38,184,43,149,44"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/resize.html#" title=" " alt="" coords="197,86,323,112"/>
<area shape="poly" id="edge3_Node000001_Node000003" title=" " alt="" coords="150,66,196,79,195,84,148,72"/>
</map>

View File

@@ -0,0 +1 @@
3dffba6d7561d4af1425319ca8997972

View File

@@ -0,0 +1,101 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::init_good_suffix Pages: 1 -->
<svg width="246pt" height="88pt"
viewBox="0.00 0.00 246.25 87.88" 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" 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>
<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 83.88)">
<title>strings::boyer_moore::init_good_suffix</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that preprocess the good suffix thable.">
<polygon fill="#999999" stroke="#666666" points="107.5,-61.88 0,-61.88 0,-31.38 107.5,-31.38 107.5,-61.88"/>
<text text-anchor="start" x="8" y="-48.38" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-37.12" font-family="Helvetica,sans-Serif" font-size="10.00">::init_good_suffix</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.45,-62.36C24.49,-71.43 32.59,-79.88 53.75,-79.88 65.65,-79.88 73.42,-77.2 77.06,-73.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="80.63,-73.64 78.05,-63.36 73.66,-73 80.63,-73.64"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="236.75,-56.25 145,-56.25 145,-37 236.75,-37 236.75,-56.25"/>
<text text-anchor="middle" x="190.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-40.02C116.4,-39.85 125.36,-39.83 134.05,-39.97"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.8,-43.48 143.88,-40.22 133.96,-36.49 133.8,-43.48"/>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge4_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge4_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-53.23C116.4,-53.4 125.36,-53.42 134.05,-53.28"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.96,-56.76 143.88,-53.03 133.8,-49.77 133.96,-56.76"/>
</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/container/vector/resize.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="238.25,-19.25 143.5,-19.25 143.5,0 238.25,0 238.25,-19.25"/>
<text text-anchor="middle" x="190.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-32.11C119.31,-28.95 131.45,-25.62 142.74,-22.53"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="143.55,-25.67 152.27,-19.65 141.7,-18.91 143.55,-25.67"/>
</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>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,76 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: strings::boyer_moore::init_good_suffix Pages: 1 -->
<svg width="246pt" height="88pt"
viewBox="0.00 0.00 246.25 87.88" 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 83.88)">
<title>strings::boyer_moore::init_good_suffix</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A function that preprocess the good suffix thable.">
<polygon fill="#999999" stroke="#666666" points="107.5,-61.88 0,-61.88 0,-31.38 107.5,-31.38 107.5,-61.88"/>
<text text-anchor="start" x="8" y="-48.38" font-family="Helvetica,sans-Serif" font-size="10.00">strings::boyer_moore</text>
<text text-anchor="middle" x="53.75" y="-37.12" font-family="Helvetica,sans-Serif" font-size="10.00">::init_good_suffix</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M29.45,-62.36C24.49,-71.43 32.59,-79.88 53.75,-79.88 65.65,-79.88 73.42,-77.2 77.06,-73.25"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="80.63,-73.64 78.05,-63.36 73.66,-73 80.63,-73.64"/>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="236.75,-56.25 145,-56.25 145,-37 236.75,-37 236.75,-56.25"/>
<text text-anchor="middle" x="190.88" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge2_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge2_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-40.02C116.4,-39.85 125.36,-39.83 134.05,-39.97"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.8,-43.48 143.88,-40.22 133.96,-36.49 133.8,-43.48"/>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge4_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge4_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-53.23C116.4,-53.4 125.36,-53.42 134.05,-53.28"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="133.96,-56.76 143.88,-53.03 133.8,-49.77 133.96,-56.76"/>
</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/container/vector/resize.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="238.25,-19.25 143.5,-19.25 143.5,0 238.25,0 238.25,-19.25"/>
<text text-anchor="middle" x="190.88" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::resize</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node3 -->
<g id="edge3_Node000001_Node000003" class="edge">
<title>Node1&#45;&gt;Node3</title>
<g id="a_edge3_Node000001_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M107.77,-32.11C119.31,-28.95 131.45,-25.62 142.74,-22.53"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="143.55,-25.67 152.27,-19.65 141.7,-18.91 143.55,-25.67"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,5 @@
<map id="pat_test" name="pat_test">
<area shape="rect" id="Node000001" title="A test case in which we search for every appearance of the word &#39;pat&#39;." alt="" coords="5,5,74,31"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="122,5,237,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="74,16,107,16,107,21,74,21"/>
</map>

View File

@@ -0,0 +1 @@
dda68a9a39c5b58786d161f8af005f2e

View File

@@ -0,0 +1,64 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: pat_test Pages: 1 -->
<svg width="182pt" height="27pt"
viewBox="0.00 0.00 181.75 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" 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>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>pat_test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A test case in which we search for every appearance of the word &#39;pat&#39;.">
<polygon fill="#999999" stroke="#666666" points="51.25,-19.25 0,-19.25 0,0 51.25,0 51.25,-19.25"/>
<text text-anchor="middle" x="25.62" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">pat_test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="173.75,-19.25 87.25,-19.25 87.25,0 173.75,0 173.75,-19.25"/>
<text text-anchor="middle" x="130.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M51.53,-9.62C58.97,-9.62 67.43,-9.62 75.97,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.76,-13.13 85.76,-9.62 75.76,-6.13 75.76,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.0.5 (20230430.1635)
-->
<!-- Title: pat_test Pages: 1 -->
<svg width="182pt" height="27pt"
viewBox="0.00 0.00 181.75 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>pat_test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A test case in which we search for every appearance of the word &#39;pat&#39;.">
<polygon fill="#999999" stroke="#666666" points="51.25,-19.25 0,-19.25 0,0 51.25,0 51.25,-19.25"/>
<text text-anchor="middle" x="25.62" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">pat_test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="173.75,-19.25 87.25,-19.25 87.25,0 173.75,0 173.75,-19.25"/>
<text text-anchor="middle" x="130.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M51.53,-9.62C58.97,-9.62 67.43,-9.62 75.97,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="75.76,-13.13 85.76,-9.62 75.76,-6.13 75.76,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,5 @@
<map id="and_test" name="and_test">
<area shape="rect" id="Node000001" title="A test case in which we search for every appearance of the word &#39;and&#39;." alt="" coords="5,5,77,31"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="125,5,240,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="77,16,110,16,110,21,77,21"/>
</map>

View File

@@ -0,0 +1 @@
9af08864580148e1f5c31673cb9d7e16

View File

@@ -0,0 +1,64 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: and_test Pages: 1 -->
<svg width="184pt" height="27pt"
viewBox="0.00 0.00 184.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" 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>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>and_test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A test case in which we search for every appearance of the word &#39;and&#39;.">
<polygon fill="#999999" stroke="#666666" points="53.5,-19.25 0,-19.25 0,0 53.5,0 53.5,-19.25"/>
<text text-anchor="middle" x="26.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">and_test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="176,-19.25 89.5,-19.25 89.5,0 176,0 176,-19.25"/>
<text text-anchor="middle" x="132.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M53.99,-9.62C61.52,-9.62 70.02,-9.62 78.56,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="78.33,-13.13 88.33,-9.62 78.33,-6.13 78.33,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.0.5 (20230430.1635)
-->
<!-- Title: and_test Pages: 1 -->
<svg width="184pt" height="27pt"
viewBox="0.00 0.00 184.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>and_test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="A test case in which we search for every appearance of the word &#39;and&#39;.">
<polygon fill="#999999" stroke="#666666" points="53.5,-19.25 0,-19.25 0,0 53.5,0 53.5,-19.25"/>
<text text-anchor="middle" x="26.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">and_test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="176,-19.25 89.5,-19.25 89.5,0 176,0 176,-19.25"/>
<text text-anchor="middle" x="132.75" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M53.99,-9.62C61.52,-9.62 70.02,-9.62 78.56,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="78.33,-13.13 88.33,-9.62 78.33,-6.13 78.33,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,12 @@
<map id="main" name="main">
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,31,55,56"/>
<area shape="rect" id="Node000002" href="$d3/db2/boyer__moore_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" title="Self&#45;test implementations." alt="" coords="103,31,153,56"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,41,88,41,88,46,55,46"/>
<area shape="rect" id="Node000003" href="$d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9" title="A test case in which we search for every appearance of the word &#39;and&#39;." alt="" coords="201,5,272,31"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="153,35,186,27,187,32,154,40"/>
<area shape="rect" id="Node000005" href="$d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2" title="A test case in which we search for every appearance of the word &#39;pat&#39;." alt="" coords="203,55,271,80"/>
<area shape="poly" id="edge4_Node000002_Node000005" title=" " alt="" coords="154,46,188,54,187,59,153,52"/>
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="320,31,436,56"/>
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="273,22,306,28,305,33,273,27"/>
<area shape="poly" id="edge5_Node000005_Node000004" title=" " alt="" coords="271,59,305,53,306,58,272,64"/>
</map>

View File

@@ -0,0 +1 @@
bc05f58de143f7b367ebe87747376ab5

View File

@@ -0,0 +1,127 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: main Pages: 1 -->
<svg width="331pt" height="64pt"
viewBox="0.00 0.00 330.75 64.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" 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>
<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 60.25)">
<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,-37.25 0,-37.25 0,-18 37,-18 37,-37.25"/>
<text text-anchor="middle" x="18.5" y="-23.75" 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="../../d3/db2/boyer__moore_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title="Self&#45;test implementations.">
<polygon fill="white" stroke="#666666" points="110.75,-37.25 73,-37.25 73,-18 110.75,-18 110.75,-37.25"/>
<text text-anchor="middle" x="91.88" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.14,-27.62C44.64,-27.62 53.57,-27.62 61.98,-27.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.94,-31.13 71.94,-27.62 61.94,-24.13 61.94,-31.13"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;and&#39;.">
<polygon fill="white" stroke="#666666" points="200.25,-56.25 146.75,-56.25 146.75,-37 200.25,-37 200.25,-56.25"/>
<text text-anchor="middle" x="173.5" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">and_test</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M110.94,-31.94C118.3,-33.69 127.08,-35.79 135.68,-37.84"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.81,-41.47 145.35,-40.38 136.43,-34.66 134.81,-41.47"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;pat&#39;.">
<polygon fill="white" stroke="#666666" points="199.12,-19.25 147.88,-19.25 147.88,0 199.12,0 199.12,-19.25"/>
<text text-anchor="middle" x="173.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">pat_test</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge4_Node000002_Node000005" class="edge">
<title>Node2&#45;&gt;Node5</title>
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M110.94,-23.54C118.64,-21.8 127.9,-19.71 136.88,-17.68"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="137.58,-20.88 146.56,-15.26 136.04,-14.05 137.58,-20.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/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="322.75,-37.25 236.25,-37.25 236.25,-18 322.75,-18 322.75,-37.25"/>
<text text-anchor="middle" x="279.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M200.74,-41.83C208.27,-40.45 216.77,-38.9 225.31,-37.34"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="225.87,-40.62 235.08,-35.38 224.61,-33.73 225.87,-40.62"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node4 -->
<g id="edge5_Node000005_Node000004" class="edge">
<title>Node5&#45;&gt;Node4</title>
<g id="a_edge5_Node000005_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M199.41,-13.94C207.27,-15.3 216.28,-16.86 225.33,-18.42"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.47,-22 234.92,-20.25 225.66,-15.1 224.47,-22"/>
</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>

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -0,0 +1,102 @@
<?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 8.0.5 (20230430.1635)
-->
<!-- Title: main Pages: 1 -->
<svg width="331pt" height="64pt"
viewBox="0.00 0.00 330.75 64.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 60.25)">
<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,-37.25 0,-37.25 0,-18 37,-18 37,-37.25"/>
<text text-anchor="middle" x="18.5" y="-23.75" 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="../../d3/db2/boyer__moore_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e" target="_top" xlink:title="Self&#45;test implementations.">
<polygon fill="white" stroke="#666666" points="110.75,-37.25 73,-37.25 73,-18 110.75,-18 110.75,-37.25"/>
<text text-anchor="middle" x="91.88" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">tests</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.14,-27.62C44.64,-27.62 53.57,-27.62 61.98,-27.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.94,-31.13 71.94,-27.62 61.94,-24.13 61.94,-31.13"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#acb8f69e7901ee7459d98bd4b9dda79d9" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;and&#39;.">
<polygon fill="white" stroke="#666666" points="200.25,-56.25 146.75,-56.25 146.75,-37 200.25,-37 200.25,-56.25"/>
<text text-anchor="middle" x="173.5" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">and_test</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M110.94,-31.94C118.3,-33.69 127.08,-35.79 135.68,-37.84"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="134.81,-41.47 145.35,-40.38 136.43,-34.66 134.81,-41.47"/>
</a>
</g>
</g>
<!-- Node5 -->
<g id="Node000005" class="node">
<title>Node5</title>
<g id="a_Node000005"><a xlink:href="../../d3/db2/boyer__moore_8cpp.html#ac8fac0dd4b19973da103a434143a16d2" target="_top" xlink:title="A test case in which we search for every appearance of the word &#39;pat&#39;.">
<polygon fill="white" stroke="#666666" points="199.12,-19.25 147.88,-19.25 147.88,0 199.12,0 199.12,-19.25"/>
<text text-anchor="middle" x="173.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">pat_test</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node5 -->
<g id="edge4_Node000002_Node000005" class="edge">
<title>Node2&#45;&gt;Node5</title>
<g id="a_edge4_Node000002_Node000005"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M110.94,-23.54C118.64,-21.8 127.9,-19.71 136.88,-17.68"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="137.58,-20.88 146.56,-15.26 136.04,-14.05 137.58,-20.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/vector/size.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="322.75,-37.25 236.25,-37.25 236.25,-18 322.75,-18 322.75,-37.25"/>
<text text-anchor="middle" x="279.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
</a>
</g>
</g>
<!-- Node3&#45;&gt;Node4 -->
<g id="edge3_Node000003_Node000004" class="edge">
<title>Node3&#45;&gt;Node4</title>
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M200.74,-41.83C208.27,-40.45 216.77,-38.9 225.31,-37.34"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="225.87,-40.62 235.08,-35.38 224.61,-33.73 225.87,-40.62"/>
</a>
</g>
</g>
<!-- Node5&#45;&gt;Node4 -->
<g id="edge5_Node000005_Node000004" class="edge">
<title>Node5&#45;&gt;Node4</title>
<g id="a_edge5_Node000005_Node000004"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M199.41,-13.94C207.27,-15.3 216.28,-16.86 225.33,-18.42"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.47,-22 234.92,-20.25 225.66,-15.1 224.47,-22"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB