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 set_union

boost::compute::set_union — Set union algorithm.

Synopsis

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


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

Description

Finds the union of the sorted range [first1, last1) with the sorted range [first2, last2) and stores it in range starting at result Space complexity: \Omega(2(distance(first1, last1) + distance(first2, last2)))

Parameters:

first1

Iterator pointing to start of first set

first2

Iterator pointing to start of second set

last1

Iterator pointing to end of first set

last2

Iterator pointing to end of second set

queue

Queue on which to execute

result

Iterator pointing to start of range in which the union will be stored

Returns:

Iterator pointing to end of union


PrevUpHomeNext