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 a snapshot of the develop branch, built from commit 163ccb9650.
PrevUpHomeNext

Function template nth_element

boost::compute::nth_element

Synopsis

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


template<typename Iterator, typename Compare> 
  void nth_element(Iterator first, Iterator nth, Iterator last, 
                   Compare compare, 
                   command_queue & queue = system::default_queue());

Description

Rearranges the elements in the range [first, last) such that the nth element would be in that position in a sorted sequence.

Space complexity: \Omega(3n)


PrevUpHomeNext