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 for the latest Boost documentation.
PrevUpHomeNext

Function template prev_permutation

boost::compute::prev_permutation — Permutation generating algorithm.

Synopsis

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


template<typename InputIterator> 
  bool prev_permutation(InputIterator first, InputIterator last, 
                        command_queue & queue = system::default_queue());

Description

Transforms the range [first, last) into the previous permutation from the set of all permutations arranged in lexicographic order Space complexity: \Omega(1)

Parameters:

first

Iterator pointing to start of range

last

Iterator pointing to end of range

queue

Queue on which to execute

Returns:

Boolean value signifying if the first permutation was crossed and the range was reset


PrevUpHomeNext