• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Function template is_permutation</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Compute">
8<link rel="up" href="../../boost_compute/reference.html#header.boost.compute.algorithm.is_permutation_hpp" title="Header &lt;boost/compute/algorithm/is_permutation.hpp&gt;">
9<link rel="prev" href="is_partitioned.html" title="Function template is_partitioned">
10<link rel="next" href="is_sorted.html" title="Function is_sorted">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="is_partitioned.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_compute/reference.html#header.boost.compute.algorithm.is_permutation_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_sorted.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="refentry">
26<a name="boost.compute.is_permutation"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Function template is_permutation</span></h2>
29<p>boost::compute::is_permutation — Permutation checking algorithm. </p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_compute/reference.html#header.boost.compute.algorithm.is_permutation_hpp" title="Header &lt;boost/compute/algorithm/is_permutation.hpp&gt;">boost/compute/algorithm/is_permutation.hpp</a>&gt;
33
34</span>
35<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator1<span class="special">,</span> <span class="keyword">typename</span> InputIterator2<span class="special">&gt;</span>
36  <span class="keyword">bool</span> <span class="identifier">is_permutation</span><span class="special">(</span><span class="identifier">InputIterator1</span> first1<span class="special">,</span> <span class="identifier">InputIterator1</span> last1<span class="special">,</span>
37                      <span class="identifier">InputIterator2</span> first2<span class="special">,</span> <span class="identifier">InputIterator2</span> last2<span class="special">,</span>
38                      <span class="identifier">command_queue</span> <span class="special">&amp;</span> queue <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">default_queue</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></div>
39<div class="refsect1">
40<a name="idm45849521305392"></a><h2>Description</h2>
41<p>Checks if the range [first1, last1) can be permuted into the range [first2, last2)
42
43Space complexity: \Omega(distance(<code class="computeroutput">first1</code>, <code class="computeroutput">last1</code>) + distance(<code class="computeroutput">first2</code>, <code class="computeroutput">last2</code>)) </p>
44<div class="variablelist"><table border="0" class="variablelist compact">
45<colgroup>
46<col align="left" valign="top">
47<col>
48</colgroup>
49<tbody>
50<tr>
51<td><p><span class="term">Parameters:</span></p></td>
52<td><div class="variablelist"><table border="0" class="variablelist compact">
53<colgroup>
54<col align="left" valign="top">
55<col>
56</colgroup>
57<tbody>
58<tr>
59<td><p><span class="term"><code class="computeroutput">first1</code></span></p></td>
60<td><p>Iterator pointing to start of first range </p></td>
61</tr>
62<tr>
63<td><p><span class="term"><code class="computeroutput">first2</code></span></p></td>
64<td><p>Iterator pointing to start of second range </p></td>
65</tr>
66<tr>
67<td><p><span class="term"><code class="computeroutput">last1</code></span></p></td>
68<td><p>Iterator pointing to end of first range </p></td>
69</tr>
70<tr>
71<td><p><span class="term"><code class="computeroutput">last2</code></span></p></td>
72<td><p>Iterator pointing to end of second range </p></td>
73</tr>
74<tr>
75<td><p><span class="term"><code class="computeroutput">queue</code></span></p></td>
76<td><p>Queue on which to execute</p></td>
77</tr>
78</tbody>
79</table></div></td>
80</tr>
81<tr>
82<td><p><span class="term">Returns:</span></p></td>
83<td><p>True, if it can be permuted. False, otherwise.</p></td>
84</tr>
85</tbody>
86</table></div>
87</div>
88</div>
89<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
90<td align="left"></td>
91<td align="right"><div class="copyright-footer">Copyright © 2013, 2014 Kyle Lutz<p>
92        Distributed under the Boost Software License, Version 1.0. (See accompanying
93        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
94      </p>
95</div></td>
96</tr></table>
97<hr>
98<div class="spirit-nav">
99<a accesskey="p" href="is_partitioned.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_compute/reference.html#header.boost.compute.algorithm.is_permutation_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_sorted.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
100</div>
101</body>
102</html>
103