summaryrefslogtreecommitdiff
path: root/doc/html/algorithm.html
blob: 72bebb52f67d5a08f695c726e8e9a5f78d8db14f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;3.&#160;The Boost Algorithm Library</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part&#160;I.&#160;The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="string_algo/credits.html" title="Credits">
<link rel="next" href="algorithm/Searching.html" title="Searching Algorithms">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.html">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="string_algo/credits.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm/Searching.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="algorithm"></a>Chapter&#160;3.&#160;The Boost Algorithm Library</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Marshall</span> <span class="surname">Clow</span>
</h3></div></div>
<div><p class="copyright">Copyright &#169; 2010-2012 Marshall Clow</p></div>
<div><div class="legalnotice">
<a name="algorithm.legal"></a><p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="algorithm.html#algorithm.description_and_rationale">Description and Rationale</a></span></dt>
<dt><span class="section"><a href="algorithm/Searching.html">Searching Algorithms</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="algorithm/Searching.html#the_boost_algorithm_library.Searching.BoyerMoore">Boyer-Moore
      Search</a></span></dt>
<dt><span class="section"><a href="algorithm/Searching.html#the_boost_algorithm_library.Searching.BoyerMooreHorspool">Boyer-Moore-Horspool
      Search</a></span></dt>
<dt><span class="section"><a href="algorithm/Searching.html#the_boost_algorithm_library.Searching.KnuthMorrisPratt">Knuth-Morris-Pratt
      Search</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="algorithm/CXX11.html">C++11 Algorithms</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.all_of">all_of</a></span></dt>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.any_of">any_of</a></span></dt>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.none_of">none_of</a></span></dt>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.one_of">one_of</a></span></dt>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.is_sorted">is_sorted
      </a></span></dt>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.is_partitioned">is_partitioned
      </a></span></dt>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.is_permutation">is_permutation
      </a></span></dt>
<dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.partition_point">partition_point
      </a></span></dt>
</dl></dd>
<dt><span class="section"><a href="algorithm/CXX14.html">C++14 Algorithms</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="algorithm/CXX14.html#the_boost_algorithm_library.CXX14.equal">equal </a></span></dt>
<dt><span class="section"><a href="algorithm/CXX14.html#the_boost_algorithm_library.CXX14.mismatch">mismatch
      </a></span></dt>
</dl></dd>
<dt><span class="section"><a href="algorithm/Misc.html">Other Algorithms</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.clamp">clamp</a></span></dt>
<dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.gather">gather</a></span></dt>
<dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.hex">hex</a></span></dt>
<dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.is_palindrome">is_palindrome</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="algorithm/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.algorithm_hpp">Header &lt;boost/algorithm/algorithm.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.clamp_hpp">Header &lt;boost/algorithm/clamp.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.all_of_hpp">Header &lt;boost/algorithm/cxx11/all_of.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.any_of_hpp">Header &lt;boost/algorithm/cxx11/any_of.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.copy_if_hpp">Header &lt;boost/algorithm/cxx11/copy_if.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.copy_n_hpp">Header &lt;boost/algorithm/cxx11/copy_n.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.find_if_not_hpp">Header &lt;boost/algorithm/cxx11/find_if_not.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.iota_hpp">Header &lt;boost/algorithm/cxx11/iota.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.is_partitioned_hpp">Header &lt;boost/algorithm/cxx11/is_partitioned.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.is_permutation_hpp">Header &lt;boost/algorithm/cxx11/is_permutation.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx14.is_permutation_hpp">Header &lt;boost/algorithm/cxx14/is_permutation.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.is_sorted_hpp">Header &lt;boost/algorithm/cxx11/is_sorted.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.none_of_hpp">Header &lt;boost/algorithm/cxx11/none_of.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.one_of_hpp">Header &lt;boost/algorithm/cxx11/one_of.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.partition_copy_hpp">Header &lt;boost/algorithm/cxx11/partition_copy.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx11.partition_point_hpp">Header &lt;boost/algorithm/cxx11/partition_point.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx14.equal_hpp">Header &lt;boost/algorithm/cxx14/equal.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.cxx14.mismatch_hpp">Header &lt;boost/algorithm/cxx14/mismatch.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.gather_hpp">Header &lt;boost/algorithm/gather.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.hex_hpp">Header &lt;boost/algorithm/hex.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.is_palindrome_hpp">Header &lt;boost/algorithm/is_palindrome.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.minmax_hpp">Header &lt;boost/algorithm/minmax.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.minmax_element_hpp">Header &lt;boost/algorithm/minmax_element.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.searching.boyer_moore_hpp">Header &lt;boost/algorithm/searching/boyer_moore.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.searching.boyer_moore_horspool_hpp">Header &lt;boost/algorithm/searching/boyer_moore_horspool.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.searching.knuth_morris_pratt_hpp">Header &lt;boost/algorithm/searching/knuth_morris_pratt.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.sort_subrange_hpp">Header &lt;boost/algorithm/sort_subrange.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.string_hpp">Header &lt;boost/algorithm/string.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="algorithm/reference.html#header.boost.algorithm.string_regex_hpp">Header &lt;boost/algorithm/string_regex.hpp&gt;</a></span></dt>
</dl></dd>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="algorithm.description_and_rationale"></a><a class="link" href="algorithm.html#algorithm.description_and_rationale" title="Description and Rationale">Description and Rationale</a>
</h2></div></div></div>
<p>
      Boost.Algorithm is a collection of general purpose algorithms. While Boost
      contains many libraries of data structures, there is no single library for
      general purpose algorithms. Even though the algorithms are generally useful,
      many tend to be thought of as "too small" for Boost.
    </p>
<p>
      An implementation of Boyer-Moore searching, for example, might take a developer
      a week or so to implement, including test cases and documentation. However,
      scheduling a review to include that code into Boost might take several months,
      and run into resistance because "it is too small". Nevertheless,
      a library of tested, reviewed, documented algorithms can make the developer's
      life much easier, and that is the purpose of this library.
    </p>
<h4>
<a name="algorithm.description_and_rationale.h0"></a>
      <span class="phrase"><a name="algorithm.description_and_rationale.future_plans"></a></span><a class="link" href="algorithm.html#algorithm.description_and_rationale.future_plans">Future
      plans</a>
    </h4>
<p>
      I will be soliciting submissions from other developers, as well as looking
      through the literature for existing algorithms to include. The Adobe Source
      Library, for example, contains many useful algorithms that already have documentation
      and test cases. Knuth's <span class="underline">The Art of Computer Programming</span>
      is chock-full of algorithm descriptions, too.
    </p>
<p>
      My goal is to run regular algorithm reviews, similar to the Boost library review
      process, but with smaller chunks of code.
    </p>
<h4>
<a name="algorithm.description_and_rationale.h1"></a>
      <span class="phrase"><a name="algorithm.description_and_rationale.dependencies"></a></span><a class="link" href="algorithm.html#algorithm.description_and_rationale.dependencies">Dependencies</a>
    </h4>
<p>
      Boost.Algorithm uses Boost.Range, Boost.Assert, Boost.Array, Boost.TypeTraits,
      and Boost.StaticAssert.
    </p>
<h4>
<a name="algorithm.description_and_rationale.h2"></a>
      <span class="phrase"><a name="algorithm.description_and_rationale.acknowledgements"></a></span><a class="link" href="algorithm.html#algorithm.description_and_rationale.acknowledgements">Acknowledgements</a>
    </h4>
<p>
      Thanks to all the people who have reviewed this library and made suggestions
      for improvements. Steven Watanabe and Sean Parent, in particular, have provided
      a great deal of help.
    </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: April 17, 2017 at 02:30:28 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="string_algo/credits.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm/Searching.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>