mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +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
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue