Algorithm(3)

Algorithm(3) Library Functions Manual Algorithm(3)

NAME

Algorithm - The Algorithm class.

SYNOPSIS

#include <Algorithm.h>

Static Public Member Functions


template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type> static InputIt parallelFind (InputIt start, InputIt end, const T &val)
template<class InputIt, class UnaryPred> static InputIt parallelFindIf (InputIt start, InputIt end, UnaryPred predicate)
template<class InputIt, class UnaryPred> static void parallelSort (InputIt start, InputIt end, UnaryPred predicate)
template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type> static InputIt parallelRemove (InputIt start, InputIt end, const T &val)
template<class InputIt, class UnaryPred, class T = typename std::iterator_traits<InputIt>::value_type> static InputIt parallelRemoveIf (InputIt start, InputIt end, UnaryPred predicate)

Detailed Description

The Algorithm class.

This class contains some parallelized algorithms for standard containers.

Member Function Documentation

template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type> InputIt Algorithm::parallelFind (InputIt start, InputIt end, const T & val) [inline], [static]

Acts like std::find.

Note

OMP_CANCELLATION system variable should be set to true before program start to achieve maximum effectiveness.

Parameters

start Begin iterator.
end End iterator.
val Value to be found.

Returns

Iterarator pointing to found object or end iterator.

template<class InputIt, class UnaryPred> InputIt Algorithm::parallelFindIf (InputIt start, InputIt end, UnaryPred predicate) [inline], [static]

Acts like std::find_if.

Note

OMP_CANCELLATION system variable should be set to true before program start to achieve maximum effectiveness.

Parameters

start Begin iterator.
end End iterator.
predicate Method used to check conditions.

Returns

Iterator pointing to found element or end iterator.

template<class InputIt, class T = typename std::iterator_traits<InputIt>::value_type> InputIt Algorithm::parallelRemove (InputIt start, InputIt end, const T & val) [inline], [static]

Acts like std::remove.

Parameters

start Begin iterator.
end End iterator.
val Value of element to be removed.

Returns

Past-the-end iterator for the new range of values (if this is not end, then it points to an unspecified value, and so do iterators to any values between this iterator and end).

template<class InputIt, class UnaryPred, class T = typename std::iterator_traits<InputIt>::value_type> InputIt Algorithm::parallelRemoveIf (InputIt start, InputIt end, UnaryPred predicate) [inline], [static]

Acts like std::remove_if.

Parameters

start Begin iterator.
end End iterator.
predicate Method to check conditions.

Returns

Past-the-end iterator for the new range of values (if this is not end, then it points to an unspecified value, and so do iterators to any values between this iterator and end).

template<class InputIt, class UnaryPred> void Algorithm::parallelSort (InputIt start, InputIt end, UnaryPred predicate) [inline], [static]

Acts like std::sort. Uses quicksort algorithm.

Parameters

start Begin iterator.
end End iterator.
predicate Method used to compare elements.

Author

Generated automatically by Doxygen for LibUDB from the source code.

Version 1.0.1 LibUDB