Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template is_permutation

boost::compute::is_permutation — Permutation checking algorithm.

Synopsis

// In header: <boost/compute/algorithm/is_permutation.hpp>


template<typename InputIterator1, typename InputIterator2> 
  bool is_permutation(InputIterator1 first1, InputIterator1 last1, 
                      InputIterator2 first2, InputIterator2 last2, 
                      command_queue & queue = system::default_queue());

Description

Checks if the range [first1, last1) can be permuted into the range [first2, last2) Space complexity: (distance(first1, last1) + distance(first2, last2))

Parameters:

first1

Iterator pointing to start of first range

first2

Iterator pointing to start of second range

last1

Iterator pointing to end of first range

last2

Iterator pointing to end of second range

queue

Queue on which to execute

Returns:

True, if it can be permuted. False, otherwise.


PrevUpHomeNext