| Home | Libraries | People | FAQ | More

## 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: \Omega(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.