<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Boyer-Moore-Horspool Search</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../index.html" title="The Boost Algorithm Library">
<link rel="up" href="../../algorithm/Searching.html" title="Searching Algorithms">
<link rel="prev" href="../../algorithm/Searching.html" title="Searching Algorithms">
</h3></div></div></div>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h0"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.overview"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.overview">Overview</a>
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.overview"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.overview">Overview</a>
</h5>
<p>
- The header file 'boyer_moore_horspool.hpp' contains an an implementation
- of the Boyer-Moore-Horspool algorithm for searching sequences of values.
+ The header file 'boyer_moore_horspool.hpp' contains an implementation of
+ the Boyer-Moore-Horspool algorithm for searching sequences of values.
</p>
<p>
The Boyer-Moore-Horspool search algorithm was published by Nigel Horspool
</p>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h1"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.interface"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.interface">Interface</a>
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.interface"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.interface">Interface</a>
</h5>
<p>
Nomenclature: I refer to the sequence being searched for as the "pattern",
and the sequence being searched in as the "corpus".
</p>
<p>
- For flexibility, the Boyer-Moore-Horspool algorithm has has two interfaces;
- an object-based interface and a procedural one. The object-based interface
- builds the tables in the constructor, and uses operator () to perform the
- search. The procedural interface builds the table and does the search all
- in one step. If you are going to be searching for the same pattern in multiple
- corpora, then you should use the object interface, and only build the tables
- once.
+ For flexibility, the Boyer-Moore-Horspool algorithm has two interfaces; an
+ object-based interface and a procedural one. The object-based interface builds
+ the tables in the constructor, and uses operator () to perform the search.
+ The procedural interface builds the table and does the search all in one
+ step. If you are going to be searching for the same pattern in multiple corpora,
+ then you should use the object interface, and only build the tables once.
</p>
<p>
Here is the object interface:
</p>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h2"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.performance"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.performance">Performance</a>
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.performance"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.performance">Performance</a>
</h5>
<p>
The execution time of the Boyer-Moore-Horspool algorithm is linear in the
</p>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h3"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.memory_use"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.memory_use">Memory
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.memory_use"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.memory_use">Memory
Use</a>
</h5>
<p>
</p>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h4"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.complexity"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.complexity">Complexity</a>
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.complexity"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.complexity">Complexity</a>
</h5>
<p>
The worst-case performance is <span class="emphasis"><em>O(m x n)</em></span>, where <span class="emphasis"><em>m</em></span>
</p>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h5"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.exception_safety"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.exception_safety">Exception
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.exception_safety"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.exception_safety">Exception
Safety</a>
</h5>
<p>
</p>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h6"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.notes"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.notes">Notes</a>
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.notes"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.notes">Notes</a>
</h5>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
When using the object-based interface, the pattern must remain unchanged
for during the searches; i.e, from the time the object is constructed
</ul></div>
<h5>
<a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.h7"></a>
- <span><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.customization_points"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.customization_points">Customization
+ <span class="phrase"><a name="the_boost_algorithm_library.Searching.BoyerMooreHorspool.customization_points"></a></span><a class="link" href="BoyerMooreHorspool.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool.customization_points">Customization
points</a>
</h5>
<p>