mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-02-04 21:33:56 +00:00
add doc: 4 non-modifying algorithms
This commit is contained in:
parent
b6835b636f
commit
5569c6d50c
20 changed files with 1271 additions and 31 deletions
45
docs/_sources/libs/sprout/algorithm/all_of_equal.txt
Normal file
45
docs/_sources/libs/sprout/algorithm/all_of_equal.txt
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-all_of_equal:
|
||||
###############################################################################
|
||||
all_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
all_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*true* if [first,last) is empty or if ``*i == value`` is true for every iterator i in the range [first,last), and *false* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/all_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal(begin(input), end(input), 1);
|
||||
static_assert(result, "all of input is equal to 1.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/all_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
45
docs/_sources/libs/sprout/algorithm/any_of_equal.txt
Normal file
45
docs/_sources/libs/sprout/algorithm/any_of_equal.txt
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-any_of_equal:
|
||||
###############################################################################
|
||||
any_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
any_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*false* if [first,last) is empty or if there is no iterator i in the range [first,last) such that ``*i == value`` is true, and *true* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/any_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal(begin(input), end(input), 1);
|
||||
static_assert(result, "any of input is equal to 1.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/any_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
|
@ -7,9 +7,13 @@ Sprout.Algorithm
|
|||
:hidden:
|
||||
|
||||
all_of
|
||||
all_of_equal
|
||||
any_of
|
||||
any_of_equal
|
||||
none_of
|
||||
none_of_equal
|
||||
one_of
|
||||
one_of_equal
|
||||
|
||||
.. _sprout-algorithm-non_modifying:
|
||||
*******************************************************************************
|
||||
|
@ -17,9 +21,84 @@ Non-modifying sequence operations
|
|||
*******************************************************************************
|
||||
|
||||
* :doc:`all_of <./all_of>`
|
||||
* :doc:`all_of_equal <./all_of_equal>`
|
||||
* :doc:`any_of <./any_of>`
|
||||
* :doc:`any_of_equal <./any_of_equal>`
|
||||
* :doc:`none_of <./none_of>`
|
||||
* :doc:`none_of_equal <./none_of_equal>`
|
||||
* :doc:`one_of <./one_of>`
|
||||
* :doc:`one_of_equal <./one_of_equal>`
|
||||
* :doc:`find <./find>`
|
||||
* :doc:`find_if <./find_if>`
|
||||
* :doc:`find_if_not <./find_if_not>`
|
||||
* :doc:`find_end <./find_end>`
|
||||
* :doc:`find_first_of <./find_first_of>`
|
||||
* :doc:`adjacent_find <./adjacent_find>`
|
||||
* :doc:`count <./count>`
|
||||
* :doc:`count_if <./count_if>`
|
||||
* :doc:`mismatch <./mismatch>`
|
||||
* :doc:`equal <./equal>`
|
||||
* :doc:`search <./search>`
|
||||
* :doc:`search_n <./search_n>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-sorting:
|
||||
Sorting
|
||||
========================================
|
||||
|
||||
* :doc:`is_sorted <./is_sorted>`
|
||||
* :doc:`is_sorted_until <./is_sorted_until>`
|
||||
* :doc:`is_increasing <./is_increasing>`
|
||||
* :doc:`is_decreasing <./is_decreasing>`
|
||||
* :doc:`is_strictly_increasing <./is_strictly_increasing>`
|
||||
* :doc:`is_strictly_decreasing <./is_strictly_decreasing>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-binary:
|
||||
Binary search
|
||||
========================================
|
||||
|
||||
* :doc:`lower_bound <./lower_bound>`
|
||||
* :doc:`upper_bound <./upper_bound>`
|
||||
* :doc:`equal_range <./equal_range>`
|
||||
* :doc:`binary_search <./binary_search>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-heap:
|
||||
Heap operations
|
||||
========================================
|
||||
|
||||
* :doc:`is_heap_until <./is_heap_until>`
|
||||
* :doc:`is_heap <./is_heap>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-minmax:
|
||||
Minimum and maximum
|
||||
========================================
|
||||
|
||||
* :doc:`min <./min>`
|
||||
* :doc:`max <./max>`
|
||||
* :doc:`minmax <./minmax>`
|
||||
* :doc:`min_element <./min_element>`
|
||||
* :doc:`max_element <./max_element>`
|
||||
* :doc:`minmax_element <./minmax_element>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-lexicographical:
|
||||
Lexicographical comparison
|
||||
========================================
|
||||
|
||||
* :doc:`lexicographical_compare <./lexicographical_compare>`
|
||||
* :doc:`tristate_lexicographical_compare <./tristate_lexicographical_compare>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-permutation:
|
||||
Permutation generators
|
||||
========================================
|
||||
|
||||
* :doc:`next_permutation <./next_permutation>`
|
||||
* :doc:`prev_permutation <./prev_permutation>`
|
||||
* :doc:`is_permutation <./is_permutation>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-clamp:
|
||||
Clamp algorithm
|
||||
========================================
|
||||
|
||||
* :doc:`clamp <./clamp>`
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
|
45
docs/_sources/libs/sprout/algorithm/none_of_equal.txt
Normal file
45
docs/_sources/libs/sprout/algorithm/none_of_equal.txt
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-none_of_equal:
|
||||
###############################################################################
|
||||
none_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
none_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*true* if [first,last) is empty or if ``*i == value`` is false for every iterator i in the range [first,last), and *false* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/none_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal(begin(input), end(input), 11);
|
||||
static_assert(result, "none of input is equal to 11.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/none_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
45
docs/_sources/libs/sprout/algorithm/one_of_equal.txt
Normal file
45
docs/_sources/libs/sprout/algorithm/one_of_equal.txt
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-one_of_equal:
|
||||
###############################################################################
|
||||
one_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
one_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*true* if [first,last) is not empty and there is only one iterator i in the range [first,last) such that ``*i == value`` is true, and *false* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/one_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal(begin(input), end(input), 1);
|
||||
static_assert(result, "one of input is equal to 1.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/one_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="next" title="any_of" href="any_of.html" />
|
||||
<link rel="next" title="all_of_equal" href="all_of_equal.html" />
|
||||
<link rel="prev" title="Sprout.Algorithm" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
<a href="all_of_equal.html" title="all_of_equal"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Sprout.Algorithm"
|
||||
|
@ -111,8 +111,8 @@
|
|||
<p class="topless"><a href="index.html"
|
||||
title="previous chapter">Sprout.Algorithm</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="any_of.html"
|
||||
title="next chapter">any_of</a></p>
|
||||
<p class="topless"><a href="all_of_equal.html"
|
||||
title="next chapter">all_of_equal</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/all_of.txt"
|
||||
|
@ -142,7 +142,7 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
<a href="all_of_equal.html" title="all_of_equal"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Sprout.Algorithm"
|
||||
|
|
160
docs/libs/sprout/algorithm/all_of_equal.html
Normal file
160
docs/libs/sprout/algorithm/all_of_equal.html
Normal file
|
@ -0,0 +1,160 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>all_of_equal — Sprout v1.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../../_static/default.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../../',
|
||||
VERSION: '1.0',
|
||||
COLLAPSE_MODINDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../../../_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="next" title="any_of" href="any_of.html" />
|
||||
<link rel="prev" title="all_of" href="all_of.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="all_of.html" title="all_of"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" accesskey="U">Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="all-of-equal">
|
||||
<h1>all_of_equal<a class="headerlink" href="#all-of-equal" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="interface">
|
||||
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o"><</span><span class="k">typename</span> <span class="n">InputIterator</span><span class="p">,</span> <span class="k">typename</span> <span class="n">T</span><span class="o">></span>
|
||||
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span>
|
||||
<span class="n">all_of_equal</span><span class="p">(</span><span class="n">InputIterator</span> <span class="n">first</span><span class="p">,</span> <span class="n">InputIterator</span> <span class="n">last</span><span class="p">,</span> <span class="n">T</span> <span class="k">const</span><span class="o">&</span> <span class="n">value</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="returns">
|
||||
<h2>Returns<a class="headerlink" href="#returns" title="Permalink to this headline">¶</a></h2>
|
||||
<p><em>true</em> if [first,last) is empty or if <tt class="docutils literal"><span class="pre">*i</span> <span class="pre">==</span> <span class="pre">value</span></tt> is true for every iterator i in the range [first,last), and <em>false</em> otherwise.</p>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include <sprout/algorithm/all_of_equal.hpp></span>
|
||||
<span class="cp">#include <sprout/array.hpp></span>
|
||||
<span class="cp">#include <sprout/container.hpp></span>
|
||||
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
|
||||
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">input</span> <span class="o">=</span> <span class="n">array</span><span class="o"><</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">></span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">}};</span>
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">sprout</span><span class="o">::</span><span class="n">all_of_equal</span><span class="p">(</span><span class="n">begin</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="n">end</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="mi">1</span><span class="p">);</span>
|
||||
<span class="n">static_assert</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s">"all of input is equal to 1."</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="complexity">
|
||||
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline">¶</a></h2>
|
||||
<p>At most <tt class="docutils literal"><span class="pre">last</span> <span class="pre">-</span> <span class="pre">first</span></tt> applications of the predicate.</p>
|
||||
<p>Recursive function invocations in <em>O(logN)</em> (logarithmic) depth.</p>
|
||||
</div>
|
||||
<div class="section" id="header">
|
||||
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline">¶</a></h2>
|
||||
<p><tt class="docutils literal"><span class="pre">sprout/algorithm/all_of_equal.hpp</span></tt></p>
|
||||
<p>Convenience header: <tt class="docutils literal"><span class="pre">sprout/algorithm.hpp</span></tt></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="../../../index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference external" href="#">all_of_equal</a><ul>
|
||||
<li><a class="reference external" href="#interface">Interface</a></li>
|
||||
<li><a class="reference external" href="#returns">Returns</a></li>
|
||||
<li><a class="reference external" href="#examples">Examples</a></li>
|
||||
<li><a class="reference external" href="#complexity">Complexity</a></li>
|
||||
<li><a class="reference external" href="#header">Header</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="all_of.html"
|
||||
title="previous chapter">all_of</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="any_of.html"
|
||||
title="next chapter">any_of</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/all_of_equal.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="../../../search.html" method="get">
|
||||
<input type="text" name="q" size="18" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="all_of.html" title="all_of"
|
||||
>previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" >Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2013, Bolero MURAKAMI.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -21,8 +21,8 @@
|
|||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="next" title="none_of" href="none_of.html" />
|
||||
<link rel="prev" title="all_of" href="all_of.html" />
|
||||
<link rel="next" title="any_of_equal" href="any_of_equal.html" />
|
||||
<link rel="prev" title="all_of_equal" href="all_of_equal.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
|
@ -32,10 +32,10 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
<a href="any_of_equal.html" title="any_of_equal"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="all_of.html" title="all_of"
|
||||
<a href="all_of_equal.html" title="all_of_equal"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
|
@ -108,11 +108,11 @@
|
|||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="all_of.html"
|
||||
title="previous chapter">all_of</a></p>
|
||||
<p class="topless"><a href="all_of_equal.html"
|
||||
title="previous chapter">all_of_equal</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="none_of.html"
|
||||
title="next chapter">none_of</a></p>
|
||||
<p class="topless"><a href="any_of_equal.html"
|
||||
title="next chapter">any_of_equal</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/any_of.txt"
|
||||
|
@ -142,10 +142,10 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
<a href="any_of_equal.html" title="any_of_equal"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="all_of.html" title="all_of"
|
||||
<a href="all_of_equal.html" title="all_of_equal"
|
||||
>previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
|
|
160
docs/libs/sprout/algorithm/any_of_equal.html
Normal file
160
docs/libs/sprout/algorithm/any_of_equal.html
Normal file
|
@ -0,0 +1,160 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>any_of_equal — Sprout v1.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../../_static/default.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../../',
|
||||
VERSION: '1.0',
|
||||
COLLAPSE_MODINDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../../../_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="next" title="none_of" href="none_of.html" />
|
||||
<link rel="prev" title="any_of" href="any_of.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" accesskey="U">Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="any-of-equal">
|
||||
<h1>any_of_equal<a class="headerlink" href="#any-of-equal" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="interface">
|
||||
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o"><</span><span class="k">typename</span> <span class="n">InputIterator</span><span class="p">,</span> <span class="k">typename</span> <span class="n">T</span><span class="o">></span>
|
||||
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span>
|
||||
<span class="n">any_of_equal</span><span class="p">(</span><span class="n">InputIterator</span> <span class="n">first</span><span class="p">,</span> <span class="n">InputIterator</span> <span class="n">last</span><span class="p">,</span> <span class="n">T</span> <span class="k">const</span><span class="o">&</span> <span class="n">value</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="returns">
|
||||
<h2>Returns<a class="headerlink" href="#returns" title="Permalink to this headline">¶</a></h2>
|
||||
<p><em>false</em> if [first,last) is empty or if there is no iterator i in the range [first,last) such that <tt class="docutils literal"><span class="pre">*i</span> <span class="pre">==</span> <span class="pre">value</span></tt> is true, and <em>true</em> otherwise.</p>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include <sprout/algorithm/any_of_equal.hpp></span>
|
||||
<span class="cp">#include <sprout/array.hpp></span>
|
||||
<span class="cp">#include <sprout/container.hpp></span>
|
||||
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
|
||||
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">input</span> <span class="o">=</span> <span class="n">array</span><span class="o"><</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">></span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">sprout</span><span class="o">::</span><span class="n">any_of_equal</span><span class="p">(</span><span class="n">begin</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="n">end</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="mi">1</span><span class="p">);</span>
|
||||
<span class="n">static_assert</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s">"any of input is equal to 1."</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="complexity">
|
||||
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline">¶</a></h2>
|
||||
<p>At most <tt class="docutils literal"><span class="pre">last</span> <span class="pre">-</span> <span class="pre">first</span></tt> applications of the predicate.</p>
|
||||
<p>Recursive function invocations in <em>O(logN)</em> (logarithmic) depth.</p>
|
||||
</div>
|
||||
<div class="section" id="header">
|
||||
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline">¶</a></h2>
|
||||
<p><tt class="docutils literal"><span class="pre">sprout/algorithm/any_of_equal.hpp</span></tt></p>
|
||||
<p>Convenience header: <tt class="docutils literal"><span class="pre">sprout/algorithm.hpp</span></tt></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="../../../index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference external" href="#">any_of_equal</a><ul>
|
||||
<li><a class="reference external" href="#interface">Interface</a></li>
|
||||
<li><a class="reference external" href="#returns">Returns</a></li>
|
||||
<li><a class="reference external" href="#examples">Examples</a></li>
|
||||
<li><a class="reference external" href="#complexity">Complexity</a></li>
|
||||
<li><a class="reference external" href="#header">Header</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="any_of.html"
|
||||
title="previous chapter">any_of</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="none_of.html"
|
||||
title="next chapter">none_of</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/any_of_equal.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="../../../search.html" method="get">
|
||||
<input type="text" name="q" size="18" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
>previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" >Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2013, Bolero MURAKAMI.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -54,10 +54,85 @@
|
|||
<h2>Non-modifying sequence operations<a class="headerlink" href="#non-modifying-sequence-operations" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="all_of.html"><em>all_of</em></a></li>
|
||||
<li><a class="reference external" href="all_of_equal.html"><em>all_of_equal</em></a></li>
|
||||
<li><a class="reference external" href="any_of.html"><em>any_of</em></a></li>
|
||||
<li><a class="reference external" href="any_of_equal.html"><em>any_of_equal</em></a></li>
|
||||
<li><a class="reference external" href="none_of.html"><em>none_of</em></a></li>
|
||||
<li><a class="reference external" href="none_of_equal.html"><em>none_of_equal</em></a></li>
|
||||
<li><a class="reference external" href="one_of.html"><em>one_of</em></a></li>
|
||||
<li><a class="reference external" href="one_of_equal.html"><em>one_of_equal</em></a></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">find</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">find_if</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">find_if_not</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">find_end</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">find_first_of</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">adjacent_find</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">count</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">count_if</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">mismatch</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">equal</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">search</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">search_n</span></tt></li>
|
||||
</ul>
|
||||
<div class="section" id="sorting">
|
||||
<h3>Sorting<a class="headerlink" href="#sorting" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_sorted</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_sorted_until</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_increasing</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_decreasing</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_strictly_increasing</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_strictly_decreasing</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="binary-search">
|
||||
<h3>Binary search<a class="headerlink" href="#binary-search" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><tt class="xref docutils literal"><span class="pre">lower_bound</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">upper_bound</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">equal_range</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">binary_search</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="heap-operations">
|
||||
<h3>Heap operations<a class="headerlink" href="#heap-operations" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_heap_until</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_heap</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="minimum-and-maximum">
|
||||
<h3>Minimum and maximum<a class="headerlink" href="#minimum-and-maximum" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><tt class="xref docutils literal"><span class="pre">min</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">max</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">minmax</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">min_element</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">max_element</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">minmax_element</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="lexicographical-comparison">
|
||||
<h3>Lexicographical comparison<a class="headerlink" href="#lexicographical-comparison" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><tt class="xref docutils literal"><span class="pre">lexicographical_compare</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">tristate_lexicographical_compare</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="permutation-generators">
|
||||
<h3>Permutation generators<a class="headerlink" href="#permutation-generators" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><tt class="xref docutils literal"><span class="pre">next_permutation</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">prev_permutation</span></tt></li>
|
||||
<li><tt class="xref docutils literal"><span class="pre">is_permutation</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="clamp-algorithm">
|
||||
<h3>Clamp algorithm<a class="headerlink" href="#clamp-algorithm" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><tt class="xref docutils literal"><span class="pre">clamp</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="header">
|
||||
<h3>Header<a class="headerlink" href="#header" title="Permalink to this headline">¶</a></h3>
|
||||
<p><tt class="docutils literal"><span class="pre">sprout/algorithm.hpp</span></tt></p>
|
||||
|
@ -75,6 +150,13 @@
|
|||
<ul>
|
||||
<li><a class="reference external" href="#">Sprout.Algorithm</a><ul>
|
||||
<li><a class="reference external" href="#non-modifying-sequence-operations">Non-modifying sequence operations</a><ul>
|
||||
<li><a class="reference external" href="#sorting">Sorting</a></li>
|
||||
<li><a class="reference external" href="#binary-search">Binary search</a></li>
|
||||
<li><a class="reference external" href="#heap-operations">Heap operations</a></li>
|
||||
<li><a class="reference external" href="#minimum-and-maximum">Minimum and maximum</a></li>
|
||||
<li><a class="reference external" href="#lexicographical-comparison">Lexicographical comparison</a></li>
|
||||
<li><a class="reference external" href="#permutation-generators">Permutation generators</a></li>
|
||||
<li><a class="reference external" href="#clamp-algorithm">Clamp algorithm</a></li>
|
||||
<li><a class="reference external" href="#header">Header</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="next" title="one_of" href="one_of.html" />
|
||||
<link rel="prev" title="any_of" href="any_of.html" />
|
||||
<link rel="next" title="none_of_equal" href="none_of_equal.html" />
|
||||
<link rel="prev" title="any_of_equal" href="any_of_equal.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
|
@ -32,10 +32,10 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="one_of.html" title="one_of"
|
||||
<a href="none_of_equal.html" title="none_of_equal"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
<a href="any_of_equal.html" title="any_of_equal"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
|
@ -108,11 +108,11 @@
|
|||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="any_of.html"
|
||||
title="previous chapter">any_of</a></p>
|
||||
<p class="topless"><a href="any_of_equal.html"
|
||||
title="previous chapter">any_of_equal</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="one_of.html"
|
||||
title="next chapter">one_of</a></p>
|
||||
<p class="topless"><a href="none_of_equal.html"
|
||||
title="next chapter">none_of_equal</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/none_of.txt"
|
||||
|
@ -142,10 +142,10 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="one_of.html" title="one_of"
|
||||
<a href="none_of_equal.html" title="none_of_equal"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="any_of.html" title="any_of"
|
||||
<a href="any_of_equal.html" title="any_of_equal"
|
||||
>previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
|
|
160
docs/libs/sprout/algorithm/none_of_equal.html
Normal file
160
docs/libs/sprout/algorithm/none_of_equal.html
Normal file
|
@ -0,0 +1,160 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>none_of_equal — Sprout v1.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../../_static/default.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../../',
|
||||
VERSION: '1.0',
|
||||
COLLAPSE_MODINDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../../../_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="next" title="one_of" href="one_of.html" />
|
||||
<link rel="prev" title="none_of" href="none_of.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="one_of.html" title="one_of"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" accesskey="U">Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="none-of-equal">
|
||||
<h1>none_of_equal<a class="headerlink" href="#none-of-equal" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="interface">
|
||||
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o"><</span><span class="k">typename</span> <span class="n">InputIterator</span><span class="p">,</span> <span class="k">typename</span> <span class="n">T</span><span class="o">></span>
|
||||
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span>
|
||||
<span class="n">none_of_equal</span><span class="p">(</span><span class="n">InputIterator</span> <span class="n">first</span><span class="p">,</span> <span class="n">InputIterator</span> <span class="n">last</span><span class="p">,</span> <span class="n">T</span> <span class="k">const</span><span class="o">&</span> <span class="n">value</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="returns">
|
||||
<h2>Returns<a class="headerlink" href="#returns" title="Permalink to this headline">¶</a></h2>
|
||||
<p><em>true</em> if [first,last) is empty or if <tt class="docutils literal"><span class="pre">*i</span> <span class="pre">==</span> <span class="pre">value</span></tt> is false for every iterator i in the range [first,last), and <em>false</em> otherwise.</p>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include <sprout/algorithm/none_of_equal.hpp></span>
|
||||
<span class="cp">#include <sprout/array.hpp></span>
|
||||
<span class="cp">#include <sprout/container.hpp></span>
|
||||
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
|
||||
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">input</span> <span class="o">=</span> <span class="n">array</span><span class="o"><</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">></span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">sprout</span><span class="o">::</span><span class="n">none_of_equal</span><span class="p">(</span><span class="n">begin</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="n">end</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="mi">11</span><span class="p">);</span>
|
||||
<span class="n">static_assert</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s">"none of input is equal to 11."</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="complexity">
|
||||
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline">¶</a></h2>
|
||||
<p>At most <tt class="docutils literal"><span class="pre">last</span> <span class="pre">-</span> <span class="pre">first</span></tt> applications of the predicate.</p>
|
||||
<p>Recursive function invocations in <em>O(logN)</em> (logarithmic) depth.</p>
|
||||
</div>
|
||||
<div class="section" id="header">
|
||||
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline">¶</a></h2>
|
||||
<p><tt class="docutils literal"><span class="pre">sprout/algorithm/none_of_equal.hpp</span></tt></p>
|
||||
<p>Convenience header: <tt class="docutils literal"><span class="pre">sprout/algorithm.hpp</span></tt></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="../../../index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference external" href="#">none_of_equal</a><ul>
|
||||
<li><a class="reference external" href="#interface">Interface</a></li>
|
||||
<li><a class="reference external" href="#returns">Returns</a></li>
|
||||
<li><a class="reference external" href="#examples">Examples</a></li>
|
||||
<li><a class="reference external" href="#complexity">Complexity</a></li>
|
||||
<li><a class="reference external" href="#header">Header</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="none_of.html"
|
||||
title="previous chapter">none_of</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="one_of.html"
|
||||
title="next chapter">one_of</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/none_of_equal.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="../../../search.html" method="get">
|
||||
<input type="text" name="q" size="18" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="one_of.html" title="one_of"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
>previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" >Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2013, Bolero MURAKAMI.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -21,7 +21,8 @@
|
|||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="prev" title="none_of" href="none_of.html" />
|
||||
<link rel="next" title="one_of_equal" href="one_of_equal.html" />
|
||||
<link rel="prev" title="none_of_equal" href="none_of_equal.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
|
@ -31,7 +32,10 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
<a href="one_of_equal.html" title="one_of_equal"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="none_of_equal.html" title="none_of_equal"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
|
@ -104,8 +108,11 @@
|
|||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="none_of.html"
|
||||
title="previous chapter">none_of</a></p>
|
||||
<p class="topless"><a href="none_of_equal.html"
|
||||
title="previous chapter">none_of_equal</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="one_of_equal.html"
|
||||
title="next chapter">one_of_equal</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/one_of.txt"
|
||||
|
@ -135,7 +142,10 @@
|
|||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="none_of.html" title="none_of"
|
||||
<a href="one_of_equal.html" title="one_of_equal"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="none_of_equal.html" title="none_of_equal"
|
||||
>previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
|
|
150
docs/libs/sprout/algorithm/one_of_equal.html
Normal file
150
docs/libs/sprout/algorithm/one_of_equal.html
Normal file
|
@ -0,0 +1,150 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>one_of_equal — Sprout v1.0 documentation</title>
|
||||
<link rel="stylesheet" href="../../../_static/default.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../../',
|
||||
VERSION: '1.0',
|
||||
COLLAPSE_MODINDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../../../_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
|
||||
<link rel="up" title="Sprout.Algorithm" href="index.html" />
|
||||
<link rel="prev" title="one_of" href="one_of.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="one_of.html" title="one_of"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" accesskey="U">Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="one-of-equal">
|
||||
<h1>one_of_equal<a class="headerlink" href="#one-of-equal" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="interface">
|
||||
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o"><</span><span class="k">typename</span> <span class="n">InputIterator</span><span class="p">,</span> <span class="k">typename</span> <span class="n">T</span><span class="o">></span>
|
||||
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span>
|
||||
<span class="n">one_of_equal</span><span class="p">(</span><span class="n">InputIterator</span> <span class="n">first</span><span class="p">,</span> <span class="n">InputIterator</span> <span class="n">last</span><span class="p">,</span> <span class="n">T</span> <span class="k">const</span><span class="o">&</span> <span class="n">value</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="returns">
|
||||
<h2>Returns<a class="headerlink" href="#returns" title="Permalink to this headline">¶</a></h2>
|
||||
<p><em>true</em> if [first,last) is not empty and there is only one iterator i in the range [first,last) such that <tt class="docutils literal"><span class="pre">*i</span> <span class="pre">==</span> <span class="pre">value</span></tt> is true, and <em>false</em> otherwise.</p>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include <sprout/algorithm/one_of_equal.hpp></span>
|
||||
<span class="cp">#include <sprout/array.hpp></span>
|
||||
<span class="cp">#include <sprout/container.hpp></span>
|
||||
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
|
||||
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">input</span> <span class="o">=</span> <span class="n">array</span><span class="o"><</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">></span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
|
||||
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">sprout</span><span class="o">::</span><span class="n">one_of_equal</span><span class="p">(</span><span class="n">begin</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="n">end</span><span class="p">(</span><span class="n">input</span><span class="p">),</span> <span class="mi">1</span><span class="p">);</span>
|
||||
<span class="n">static_assert</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s">"one of input is equal to 1."</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="complexity">
|
||||
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline">¶</a></h2>
|
||||
<p>At most <tt class="docutils literal"><span class="pre">last</span> <span class="pre">-</span> <span class="pre">first</span></tt> applications of the predicate.</p>
|
||||
<p>Recursive function invocations in <em>O(logN)</em> (logarithmic) depth.</p>
|
||||
</div>
|
||||
<div class="section" id="header">
|
||||
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline">¶</a></h2>
|
||||
<p><tt class="docutils literal"><span class="pre">sprout/algorithm/one_of_equal.hpp</span></tt></p>
|
||||
<p>Convenience header: <tt class="docutils literal"><span class="pre">sprout/algorithm.hpp</span></tt></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="../../../index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference external" href="#">one_of_equal</a><ul>
|
||||
<li><a class="reference external" href="#interface">Interface</a></li>
|
||||
<li><a class="reference external" href="#returns">Returns</a></li>
|
||||
<li><a class="reference external" href="#examples">Examples</a></li>
|
||||
<li><a class="reference external" href="#complexity">Complexity</a></li>
|
||||
<li><a class="reference external" href="#header">Header</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="one_of.html"
|
||||
title="previous chapter">one_of</a></p>
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../../../_sources/libs/sprout/algorithm/one_of_equal.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="../../../search.html" method="get">
|
||||
<input type="text" name="q" size="18" />
|
||||
<input type="submit" value="Go" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="../../../genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="one_of.html" title="one_of"
|
||||
>previous</a> |</li>
|
||||
<li><a href="../../../index.html">Sprout v1.0 documentation</a> »</li>
|
||||
<li><a href="../../index.html" >Sprout C++ Libraries</a> »</li>
|
||||
<li><a href="../../libraries.html" >Libraries</a> »</li>
|
||||
<li><a href="index.html" >Sprout.Algorithm</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2013, Bolero MURAKAMI.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1 +1 @@
|
|||
Search.setIndex({desctypes:{},terms:{typenam:[3,6,2,5,7,9],any_of:[0,2],all:9,sprout_noexcept_expr:[5,6],less:9,sprout:[0,1,2,3,4,5,6,7,9],random:4,rbegin:5,all_of:[0,9],through:4,size_t:[5,6],pointer:5,value_typ:5,content:1,onli:[5,7,4],"const":[5,6],miscellan:8,copyright:[1,4],fix:8,blog:4,mathemat:8,swap:[5,6],under:4,mail:4,arrai:[3,6,2,5,7,8,9],applic:[3,2,7,9],non:[0,6],license_1_0:4,"return":[3,2,7,9],greater:[3,2,7],murakami:4,fals:[3,2,7,9],auto:[3,2,7,9],"void":[5,6],clang:4,number:4,facebook:4,front:5,none_of:[0,3],recurs:[3,2,7,9],like:8,specif:8,list:8,synthes:[8,4],iter:[3,2,5,7,8,9],mode:4,contain:[3,2,4,7,8,9],path:4,page:[1,4],compil:[1,4],domain:8,twitter:4,back:5,predic:[3,2,7,9],logarithm:[3,2,7,9],see:4,result:[3,2,7,9],logn:[3,2,7,9],librari:[1,8,4],compat:8,index:1,slideshar:4,categori:8,version:4,const_point:5,net:4,size:[5,8],boost:4,refer:5,gener:8,static_assert:[3,2,7,9],cbegin:5,constexpr:4,base:4,preprocessor:8,org:4,modifi:[0,5],genyamurakami:4,valu:5,search:1,last:[3,2,7,9],arr:6,most:[3,2,7,9],ptrdiff_t:5,implement:5,com:4,support:[1,8,4],first:[3,2,7,9],oper:[0,5],softwar:4,rang:[3,2,7,9],declval:5,can:4,modul:1,genya:4,header:[0,3,2,4,6,7,5,9],empti:[3,5,2,7,9],linux:4,instal:[1,4],txt:4,inputiter:[3,2,7,9],bind2nd:[3,2,7,9],pred:[3,2,7,9],licens:4,contact:4,capac:5,construct:5,"class":[5,6,8],websit:4,compliant:8,bolero_murakami:4,includ:[3,2,7,9],interfac:[3,6,2,5,7,9],conveni:[3,5,2,7,9],type:5,const_reverse_iter:5,cend:5,"function":[3,6,2,5,7,8,9],namespac:[3,2,7,9],copi:[5,4],metaprogram:8,accompani:4,indic:1,c_arrai:5,input:[3,2,7,9],inlin:[3,6,2,7,9],"true":[3,2,7,9],than:[3,2,7,9],std:[5,6],none:3,stl:8,access:5,structur:8,project:[1,4],defin:5,sprout_constexpr:[3,6,2,5,7,9],store:8,www:4,crend:5,otherwis:[3,2,7,9],invoc:[3,2,7,9],bolero:4,constant:5,rend:5,"int":[3,2,7,9],to_arrai:6,ani:2,templat:[3,6,2,5,7,8,9],rai:[8,4],typedef:5,hatena:4,file:4,tabl:1,everi:[3,9],element:5,exposit:5,fill:5,gcc:4,end:[3,5,2,7,9],welcom:[1,4],lib:4,author:[1,4],alphabet:8,hpp:[0,3,2,6,7,5,9],static_s:5,data:[5,8],member:[5,6],other:4,complex:[3,2,7,9],bool:[3,5,2,7,9],difference_typ:5,document:1,const_refer:5,sprout_noexcept:5,begin:[3,5,2,7,9],http:4,distribut:4,trace:[8,4],sequenc:[0,8],object:8,size_typ:5,initi:5,max_siz:5,crbegin:5,const_iter:5,one_of:[0,7],github:4,algorithm:[0,3,2,4,7,8,9],reverse_iter:5,directori:4,descript:5,elem:5,assign:5,depth:[3,2,7,9],exampl:[3,2,7,9],thi:4,destroi:5,pars:[8,4],sprout_static_constexpr:[3,5,2,7,9]},titles:["Sprout.Algorithm","Welcome to Sprout’s documentation!","any_of","none_of","Sprout C++ Libraries","Class template array","Sprout.Array","one_of","Libraries","all_of"],modules:{},descrefs:{},filenames:["libs/sprout/algorithm/index","index","libs/sprout/algorithm/any_of","libs/sprout/algorithm/none_of","libs/index","libs/sprout/array/array/index","libs/sprout/array/index","libs/sprout/algorithm/one_of","libs/libraries","libs/sprout/algorithm/all_of"]})
|
||||
Search.setIndex({desctypes:{},terms:{logarithm:[3,2,6,8,9,10,12,13],any_of:[0,2],all:[6,13],c_arrai:5,less:13,sprout:[0,1,2,3,4,5,6,7,8,9,10,12,13],random:4,rbegin:5,all_of:[0,13],through:4,minmax:0,pointer:5,find:0,find_if:0,is_strictly_increas:0,content:1,onli:[5,9,12,4],"const":[7,5,6,8,10,12],miscellan:11,copyright:[1,4],is_sort:0,fix:11,binary_search:0,blog:4,mathemat:11,swap:[5,7],under:4,mail:4,is_strictly_decreas:0,arrai:[3,7,2,12,5,6,8,9,10,11,13],applic:[3,2,6,8,9,10,12,13],non:[0,7],license_1_0:4,"return":[3,2,6,8,9,10,12,13],greater:[3,2,9],murakami:4,fals:[3,2,6,8,9,10,12,13],auto:[3,2,6,8,9,10,12,13],is_sorted_until:0,clang:4,number:4,facebook:4,front:5,none_of:[0,3],recurs:[3,2,6,8,9,10,12,13],min_el:0,lexicographical_compar:0,document:1,like:11,specif:11,one_of_equ:[0,12],list:11,synthes:[11,4],iter:[3,2,12,5,6,8,9,10,11,13],const_refer:5,stl:11,mode:4,contain:[3,2,12,4,6,8,9,10,11,13],pars:[11,4],path:4,page:[1,4],compil:[1,4],adjacent_find:0,domain:11,find_end:0,twitter:4,is_permut:0,back:5,predic:[3,2,6,8,9,10,12,13],size_t:[5,7],see:4,result:[3,2,6,8,9,10,12,13],none_of_equ:[0,10],logn:[3,2,6,8,9,10,12,13],any_of_equ:[0,8],librari:[1,11,4],compat:11,index:1,txt:4,slideshar:4,all_of_equ:[0,6],categori:11,version:4,const_point:5,sequenc:[0,11],net:4,size:[5,11],boost:4,refer:5,next_permut:0,value_typ:5,gener:[0,11],tristate_lexicographical_compar:0,cbegin:5,constexpr:4,base:4,preprocessor:11,org:4,modifi:[0,5],genyamurakami:4,valu:[5,6,10,8,12],comparison:0,search:[0,1],last:[3,2,6,8,9,10,12,13],arr:7,most:[3,2,6,8,9,10,12,13],equal:[0,6,10,8,12],static_assert:[3,2,6,8,9,10,12,13],is_heap_until:0,ptrdiff_t:5,implement:5,com:4,support:[1,11,4],first:[3,2,6,8,9,10,12,13],oper:[0,5],softwar:4,rang:[3,2,6,8,9,10,12,13],declval:5,can:4,modul:1,genya:4,header:[0,3,2,4,5,6,7,8,9,10,12,13],permut:0,empti:[3,2,5,6,8,9,10,12,13],linux:4,max_el:0,instal:[1,4],minmax_el:0,lexicograph:0,inputiter:[3,2,6,8,9,10,12,13],bind2nd:[3,2,9,13],pred:[3,2,9,13],licens:4,contact:4,capac:5,construct:5,bool:[3,2,5,6,8,9,10,12,13],websit:4,compliant:11,bolero_murakami:4,includ:[3,2,6,8,9,10,12,13],find_first_of:0,interfac:[3,7,2,5,6,8,9,10,12,13],conveni:[3,2,5,6,8,9,10,12,13],type:5,const_reverse_iter:5,cend:5,"function":[3,7,2,12,5,6,8,9,10,11,13],project:[1,4],namespac:[3,2,6,8,9,10,12,13],copi:[5,4],mismatch:0,metaprogram:11,std:[5,7],accompani:4,indic:1,sprout_noexcept_expr:[5,7],input:[3,2,6,8,9,10,12,13],inlin:[3,7,2,6,8,9,10,12,13],"true":[3,2,6,8,9,10,12,13],than:[3,2,9,13],count:0,none:[3,10],upper_bound:0,prev_permut:0,directori:4,access:5,maximum:0,structur:11,is_decreas:0,defin:5,sprout_constexpr:[3,7,2,5,6,8,9,10,12,13],minimum:0,store:11,www:4,crend:5,otherwis:[3,2,6,8,9,10,12,13],invoc:[3,2,6,8,9,10,12,13],other:4,bolero:4,sort:0,constant:5,rend:5,"int":[3,2,6,8,9,10,12,13],to_arrai:7,ani:[2,8],templat:[3,7,2,12,5,6,8,9,10,11,13],rai:[11,4],typedef:5,hatena:4,file:4,tabl:1,everi:[3,6,10,13],clamp:0,element:5,exposit:5,fill:5,gcc:4,end:[3,2,5,6,8,9,10,12,13],welcom:[1,4],lib:4,author:[1,4],alphabet:11,hpp:[0,3,2,7,6,8,9,5,10,12,13],depth:[3,2,6,8,9,10,12,13],static_s:5,data:[5,11],member:[5,7],binari:0,complex:[3,2,6,8,9,10,12,13],find_if_not:0,lower_bound:0,difference_typ:5,equal_rang:0,"void":[5,7],sprout_noexcept:5,begin:[3,2,5,6,8,9,10,12,13],http:4,distribut:4,trace:[11,4],max:0,"class":[5,7,11],object:11,size_typ:5,initi:5,max_siz:5,typenam:[3,7,2,5,6,8,9,10,12,13],crbegin:5,const_iter:5,one_of:[0,9],heap:0,github:4,algorithm:[0,3,2,12,4,6,8,9,10,11,13],reverse_iter:5,count_if:0,min:0,descript:5,elem:5,assign:5,is_heap:0,exampl:[3,2,6,8,9,10,12,13],thi:4,destroi:5,is_increas:0,sprout_static_constexpr:[3,2,5,6,8,9,10,12,13],search_n:0},titles:["Sprout.Algorithm","Welcome to Sprout’s documentation!","any_of","none_of","Sprout C++ Libraries","Class template array","all_of_equal","Sprout.Array","any_of_equal","one_of","none_of_equal","Libraries","one_of_equal","all_of"],modules:{},descrefs:{},filenames:["libs/sprout/algorithm/index","index","libs/sprout/algorithm/any_of","libs/sprout/algorithm/none_of","libs/index","libs/sprout/array/array/index","libs/sprout/algorithm/all_of_equal","libs/sprout/array/index","libs/sprout/algorithm/any_of_equal","libs/sprout/algorithm/one_of","libs/sprout/algorithm/none_of_equal","libs/libraries","libs/sprout/algorithm/one_of_equal","libs/sprout/algorithm/all_of"]})
|
45
source/libs/sprout/algorithm/all_of_equal.rst
Normal file
45
source/libs/sprout/algorithm/all_of_equal.rst
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-all_of_equal:
|
||||
###############################################################################
|
||||
all_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
all_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*true* if [first,last) is empty or if ``*i == value`` is true for every iterator i in the range [first,last), and *false* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/all_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal(begin(input), end(input), 1);
|
||||
static_assert(result, "all of input is equal to 1.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/all_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
45
source/libs/sprout/algorithm/any_of_equal.rst
Normal file
45
source/libs/sprout/algorithm/any_of_equal.rst
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-any_of_equal:
|
||||
###############################################################################
|
||||
any_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
any_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*false* if [first,last) is empty or if there is no iterator i in the range [first,last) such that ``*i == value`` is true, and *true* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/any_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal(begin(input), end(input), 1);
|
||||
static_assert(result, "any of input is equal to 1.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/any_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
|
@ -7,9 +7,13 @@ Sprout.Algorithm
|
|||
:hidden:
|
||||
|
||||
all_of
|
||||
all_of_equal
|
||||
any_of
|
||||
any_of_equal
|
||||
none_of
|
||||
none_of_equal
|
||||
one_of
|
||||
one_of_equal
|
||||
|
||||
.. _sprout-algorithm-non_modifying:
|
||||
*******************************************************************************
|
||||
|
@ -17,9 +21,84 @@ Non-modifying sequence operations
|
|||
*******************************************************************************
|
||||
|
||||
* :doc:`all_of <./all_of>`
|
||||
* :doc:`all_of_equal <./all_of_equal>`
|
||||
* :doc:`any_of <./any_of>`
|
||||
* :doc:`any_of_equal <./any_of_equal>`
|
||||
* :doc:`none_of <./none_of>`
|
||||
* :doc:`none_of_equal <./none_of_equal>`
|
||||
* :doc:`one_of <./one_of>`
|
||||
* :doc:`one_of_equal <./one_of_equal>`
|
||||
* :doc:`find <./find>`
|
||||
* :doc:`find_if <./find_if>`
|
||||
* :doc:`find_if_not <./find_if_not>`
|
||||
* :doc:`find_end <./find_end>`
|
||||
* :doc:`find_first_of <./find_first_of>`
|
||||
* :doc:`adjacent_find <./adjacent_find>`
|
||||
* :doc:`count <./count>`
|
||||
* :doc:`count_if <./count_if>`
|
||||
* :doc:`mismatch <./mismatch>`
|
||||
* :doc:`equal <./equal>`
|
||||
* :doc:`search <./search>`
|
||||
* :doc:`search_n <./search_n>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-sorting:
|
||||
Sorting
|
||||
========================================
|
||||
|
||||
* :doc:`is_sorted <./is_sorted>`
|
||||
* :doc:`is_sorted_until <./is_sorted_until>`
|
||||
* :doc:`is_increasing <./is_increasing>`
|
||||
* :doc:`is_decreasing <./is_decreasing>`
|
||||
* :doc:`is_strictly_increasing <./is_strictly_increasing>`
|
||||
* :doc:`is_strictly_decreasing <./is_strictly_decreasing>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-binary:
|
||||
Binary search
|
||||
========================================
|
||||
|
||||
* :doc:`lower_bound <./lower_bound>`
|
||||
* :doc:`upper_bound <./upper_bound>`
|
||||
* :doc:`equal_range <./equal_range>`
|
||||
* :doc:`binary_search <./binary_search>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-heap:
|
||||
Heap operations
|
||||
========================================
|
||||
|
||||
* :doc:`is_heap_until <./is_heap_until>`
|
||||
* :doc:`is_heap <./is_heap>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-minmax:
|
||||
Minimum and maximum
|
||||
========================================
|
||||
|
||||
* :doc:`min <./min>`
|
||||
* :doc:`max <./max>`
|
||||
* :doc:`minmax <./minmax>`
|
||||
* :doc:`min_element <./min_element>`
|
||||
* :doc:`max_element <./max_element>`
|
||||
* :doc:`minmax_element <./minmax_element>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-lexicographical:
|
||||
Lexicographical comparison
|
||||
========================================
|
||||
|
||||
* :doc:`lexicographical_compare <./lexicographical_compare>`
|
||||
* :doc:`tristate_lexicographical_compare <./tristate_lexicographical_compare>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-permutation:
|
||||
Permutation generators
|
||||
========================================
|
||||
|
||||
* :doc:`next_permutation <./next_permutation>`
|
||||
* :doc:`prev_permutation <./prev_permutation>`
|
||||
* :doc:`is_permutation <./is_permutation>`
|
||||
|
||||
.. _sprout-algorithm-non_modifying-clamp:
|
||||
Clamp algorithm
|
||||
========================================
|
||||
|
||||
* :doc:`clamp <./clamp>`
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
|
45
source/libs/sprout/algorithm/none_of_equal.rst
Normal file
45
source/libs/sprout/algorithm/none_of_equal.rst
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-none_of_equal:
|
||||
###############################################################################
|
||||
none_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
none_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*true* if [first,last) is empty or if ``*i == value`` is false for every iterator i in the range [first,last), and *false* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/none_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal(begin(input), end(input), 11);
|
||||
static_assert(result, "none of input is equal to 11.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/none_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
45
source/libs/sprout/algorithm/one_of_equal.rst
Normal file
45
source/libs/sprout/algorithm/one_of_equal.rst
Normal file
|
@ -0,0 +1,45 @@
|
|||
.. _sprout-algorithm-one_of_equal:
|
||||
###############################################################################
|
||||
one_of_equal
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<typename InputIterator, typename T>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
one_of_equal(InputIterator first, InputIterator last, T const& value);
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
*true* if [first,last) is not empty and there is only one iterator i in the range [first,last) such that ``*i == value`` is true, and *false* otherwise.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/algorithm/one_of_equal.hpp>
|
||||
#include <sprout/array.hpp>
|
||||
#include <sprout/container.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
|
||||
SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal(begin(input), end(input), 1);
|
||||
static_assert(result, "one of input is equal to 1.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
At most ``last - first`` applications of the predicate.
|
||||
|
||||
Recursive function invocations in *O(logN)* (logarithmic) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
``sprout/algorithm/one_of_equal.hpp``
|
||||
|
||||
Convenience header: ``sprout/algorithm.hpp``
|
||||
|
Loading…
Add table
Reference in a new issue