123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
- <title>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 Algorithm Library">
- <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="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>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 © 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="index.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="the_boost_algorithm_library/Searching/BoyerMooreHorspool.html">Boyer-Moore-Horspool
- Search</a></span></dt>
- <dt><span class="section"><a href="the_boost_algorithm_library/Searching/KnuthMorrisPratt.html">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#algorithm.CXX11.CXX11_inner_algorithms"></a></span></dt>
- <dd><dl>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.all_of">all_of</a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.any_of">any_of</a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.none_of">none_of</a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.one_of">one_of</a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.is_sorted">is_sorted
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.is_partitioned">is_partitioned
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.is_permutation">is_permutation
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#the_boost_algorithm_library.CXX11.CXX11_inner_algorithms.partition_point">partition_point
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#algorithm.CXX11.CXX11_inner_algorithms.partition_copy">partition_copy
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#algorithm.CXX11.CXX11_inner_algorithms.copy_if">copy_if
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#algorithm.CXX11.CXX11_inner_algorithms.copy_n">copy_n
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX11.html#algorithm.CXX11.CXX11_inner_algorithms.iota">iota
- </a></span></dt>
- </dl></dd>
- </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#algorithm.CXX14.CXX14_inner_algorithms"></a></span></dt>
- <dd><dl>
- <dt><span class="section"><a href="algorithm/CXX14.html#the_boost_algorithm_library.CXX14.CXX14_inner_algorithms.equal">equal
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/CXX14.html#the_boost_algorithm_library.CXX14.CXX14_inner_algorithms.mismatch">mismatch
- </a></span></dt>
- </dl></dd>
- </dl></dd>
- <dt><span class="section"><a href="algorithm/CXX17.html">C++17 Algorithms</a></span></dt>
- <dd><dl>
- <dt><span class="section"><a href="algorithm/CXX17.html#algorithm.CXX17.CXX17_inner_algorithms"></a></span></dt>
- <dd><dl><dt><span class="section"><a href="algorithm/CXX17.html#algorithm.CXX17.CXX17_inner_algorithms.for_each_n">for_each_n</a></span></dt></dl></dd>
- </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#algorithm.Misc.misc_inner_algorithms"></a></span></dt>
- <dd><dl>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.none_of_equal">none_of_equal
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.one_of_equal">one_of_equal
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.is_decreasing">is_decreasing
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.is_increasing">is_increasing
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.is_strictly_decreasing">is_strictly_decreasing
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.is_strictly_increasing">is_strictly_increasing
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.clamp">clamp</a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.clamp_range">clamp_range
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.find_not">find_not
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.find_backward">find_backward
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.find_not_backward">find_not_backward
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.find_if_backward">find_if_backward
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.find_if_not">find_if_not
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.find_if_not_backward">find_if_not_backward
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.gather">gather</a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.hex">hex</a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.unhex">unhex
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.hex_lower">hex_lower
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.is_palindrome">is_palindrome</a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.is_partitioned_until">is_partitioned_until
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.apply_reverse_permutation">apply_reverse_permutation
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#the_boost_algorithm_library.Misc.misc_inner_algorithms.apply_permutation">apply_permutation</a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.copy_until">copy_until
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.copy_while">copy_while
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.iota_n">iota_n
- </a></span></dt>
- <dt><span class="section"><a href="algorithm/Misc.html#algorithm.Misc.misc_inner_algorithms.power">power
- </a></span></dt>
- </dl></dd>
- </dl></dd>
- <dt><span class="section"><a href="algorithm/not_yet_documented_cxx17_algos.html">Not-yet-documented
- C++17 Algorithms</a></span></dt>
- <dt><span class="section"><a href="algorithm/not_yet_documented_other_algos.html">Not-yet-documented
- Other Algorithms</a></span></dt>
- <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 <boost/algorithm/algorithm.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/apply_permutation_hpp.html">Header <boost/algorithm/apply_permutation.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/clamp_hpp.html">Header <boost/algorithm/clamp.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/all_of_hpp.html">Header <boost/algorithm/cxx11/all_of.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/any_of_hpp.html">Header <boost/algorithm/cxx11/any_of.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/copy_if_hpp.html">Header <boost/algorithm/cxx11/copy_if.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/copy_n_hpp.html">Header <boost/algorithm/cxx11/copy_n.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/find_if_not_hpp.html">Header <boost/algorithm/cxx11/find_if_not.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/iota_hpp.html">Header <boost/algorithm/cxx11/iota.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/is_partitioned_hpp.html">Header <boost/algorithm/cxx11/is_partitioned.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/is_permutation_hpp.html">Header <boost/algorithm/cxx11/is_permutation.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx14/is_permutation_hpp.html">Header <boost/algorithm/cxx14/is_permutation.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/is_sorted_hpp.html">Header <boost/algorithm/cxx11/is_sorted.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/none_of_hpp.html">Header <boost/algorithm/cxx11/none_of.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/one_of_hpp.html">Header <boost/algorithm/cxx11/one_of.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/partition_copy_hpp.html">Header <boost/algorithm/cxx11/partition_copy.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx11/partition_point_hpp.html">Header <boost/algorithm/cxx11/partition_point.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx14/equal_hpp.html">Header <boost/algorithm/cxx14/equal.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx14/mismatch_hpp.html">Header <boost/algorithm/cxx14/mismatch.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx17/exclusive_scan_hpp.html">Header <boost/algorithm/cxx17/exclusive_scan.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/cxx17/for_each_n_hpp.html">Header <boost/algorithm/cxx17/for_each_n.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/cxx17/inclusive_scan_hpp.html">Header <boost/algorithm/cxx17/inclusive_scan.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/cxx17/reduce_hpp.html">Header <boost/algorithm/cxx17/reduce.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/cxx17/transform_exclusive_scan_hpp.html">Header <boost/algorithm/cxx17/transform_exclusive_scan.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/cxx17/transform_inclusive_scan_hpp.html">Header <boost/algorithm/cxx17/transform_inclusive_scan.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/cxx17/transform_reduce_hpp.html">Header <boost/algorithm/cxx17/transform_reduce.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/find_backward_hpp.html">Header <boost/algorithm/find_backward.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/find_not_hpp.html">Header <boost/algorithm/find_not.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/gather_hpp.html">Header <boost/algorithm/gather.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/hex_hpp.html">Header <boost/algorithm/hex.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/is_palindrome_hpp.html">Header <boost/algorithm/is_palindrome.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/is_partitioned_until_hpp.html">Header <boost/algorithm/is_partitioned_until.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/minmax_hpp.html">Header <boost/algorithm/minmax.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/minmax_element_hpp.html">Header <boost/algorithm/minmax_element.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/searching/boyer_moore_hpp.html">Header <boost/algorithm/searching/boyer_moore.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/searching/boyer_moore_horspool_hpp.html">Header <boost/algorithm/searching/boyer_moore_horspool.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/searching/knuth_morris_pratt_hpp.html">Header <boost/algorithm/searching/knuth_morris_pratt.hpp></a></span></dt>
- <dd><dl></dl></dd>
- <dt><span class="section"><a href="header/boost/algorithm/sort_subrange_hpp.html">Header <boost/algorithm/sort_subrange.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/string_hpp.html">Header <boost/algorithm/string.hpp></a></span></dt>
- <dt><span class="section"><a href="header/boost/algorithm/string_regex_hpp.html">Header <boost/algorithm/string_regex.hpp></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="index.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="index.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="index.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="index.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: December 10, 2019 at 00:25:31 GMT</small></p></td>
- <td align="right"><div class="copyright-footer"></div></td>
- </tr></table>
- <hr>
- <div class="spirit-nav"><a accesskey="n" href="algorithm/Searching.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
- </body>
- </html>
|