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 unique_copy

boost::compute::unique_copy

Synopsis

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


template<typename InputIterator, typename OutputIterator, 
         typename BinaryPredicate> 
  OutputIterator 
  unique_copy(InputIterator first, InputIterator last, OutputIterator result, 
              BinaryPredicate op, 
              command_queue & queue = system::default_queue());

Description

Makes a copy of the range [first, last) and removes all consecutive duplicate elements (determined by op) from the copy. If op is not provided, the equality operator is used.

Space complexity: \Omega(4n)

See Also:

unique()

Parameters:

first

first element in the input range

last

last element in the input range

op

binary operator used to check for uniqueness

queue

command queue to perform the operation

result

first element in the result range

Returns:

OutputIterator to the end of the result range


PrevUpHomeNext