stl_algo.h File Reference

#include <bits/stl_heap.h>
#include <bits/stl_tempbuf.h>

Include dependency graph for stl_algo.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  std

Functions

template<typename Type>
const Type & std::__median (const Type &a, const Type &__b, const Type &c)
 Find the median of three values.
template<typename Type, typename Compare>
const Type & std::__median (const Type &a, const Type &__b, const Type &c, Compare comp)
 Find the median of three values using a predicate for comparison.
template<typename InputIter, typename Function>
Function std::for_each (InputIter first, InputIter last, Function __f)
 Apply a function to every element of a sequence.
template<typename InputIter, typename Type>
InputIter std::find (InputIter first, InputIter last, const Type &__val)
 Find the first occurrence of a value in a sequence.
template<typename InputIter, typename Predicate>
InputIter std::find_if (InputIter first, InputIter last, Predicate pred)
 Find the first element in a sequence for which a predicate is true.
template<typename ForwardIter>
ForwardIter std::adjacent_find (ForwardIter first, ForwardIter last)
 Find two adjacent values in a sequence that are equal.
template<typename ForwardIter, typename BinaryPredicate>
ForwardIter std::adjacent_find (ForwardIter first, ForwardIter last, BinaryPredicate __binary_pred)
 Find two adjacent values in a sequence using a predicate.
template<typename InputIter, typename Type>
iterator_traits< InputIter >
::difference_type 
std::count (InputIter first, InputIter last, const Type &value)
 Count the number of copies of a value in a sequence.
template<typename InputIter, typename Predicate>
iterator_traits< InputIter >
::difference_type 
std::count_if (InputIter first, InputIter last, Predicate pred)
 Count the elements of a sequence for which a predicate is true.
template<typename ForwardIter1, typename ForwardIter2>
ForwardIter1 std::search (ForwardIter1 first1, ForwardIter1 last1, ForwardIter2 first2, ForwardIter2 last2)
 Search a sequence for a matching sub-sequence.
template<typename ForwardIter1, typename ForwardIter2, typename BinaryPred>
ForwardIter1 std::search (ForwardIter1 first1, ForwardIter1 last1, ForwardIter2 first2, ForwardIter2 last2, BinaryPred predicate)
 Search a sequence for a matching sub-sequence using a predicate.
template<typename ForwardIter, typename Integer, typename Type>
ForwardIter std::search_n (ForwardIter first, ForwardIter last, Integer count, const Type &__val)
 Search a sequence for a number of consecutive values.
template<typename ForwardIter, typename Integer, typename Type, typename BinaryPred>
ForwardIter std::search_n (ForwardIter first, ForwardIter last, Integer count, const Type &__val, BinaryPred __binary_pred)
 Search a sequence for a number of consecutive values using a predicate.
template<typename ForwardIter1, typename ForwardIter2>
ForwardIter2 std::swap_ranges (ForwardIter1 first1, ForwardIter1 last1, ForwardIter2 first2)
 Swap the elements of two sequences.
template<typename InputIter, typename OutputIter, typename UnaryOperation>
OutputIter std::transform (InputIter first, InputIter last, OutputIter __result, UnaryOperation __unary_op)
 Perform an operation on a sequence.
template<typename InputIter1, typename InputIter2, typename OutputIter, typename BinaryOperation>
OutputIter std::transform (InputIter1 first1, InputIter1 last1, InputIter2 first2, OutputIter __result, BinaryOperation __binary_op)
 Perform an operation on corresponding elements of two sequences.
template<typename ForwardIter, typename Type>
void std::replace (ForwardIter first, ForwardIter last, const Type &__old_value, const Type &new_value)
 Replace each occurrence of one value in a sequence with another value.
template<typename ForwardIter, typename Predicate, typename Type>
void std::replace_if (ForwardIter first, ForwardIter last, Predicate pred, const Type &new_value)
 Replace each value in a sequence for which a predicate returns true with another value.
template<typename InputIter, typename OutputIter, typename Type>
OutputIter std::replace_copy (InputIter first, InputIter last, OutputIter __result, const Type &__old_value, const Type &new_value)
 Copy a sequence, replacing each element of one value with another value.
template<typename InputIter, typename OutputIter, typename Predicate, typename Type>
OutputIter std::replace_copy_if (InputIter first, InputIter last, OutputIter __result, Predicate pred, const Type &new_value)
 Copy a sequence, replacing each value for which a predicate returns true with another value.
template<typename ForwardIter, typename Generator>
void std::generate (ForwardIter first, ForwardIter last, Generator __gen)
 Assign the result of a function object to each value in a sequence.
template<typename OutputIter, typename Size, typename Generator>
OutputIter std::generate_n (OutputIter first, Size n, Generator __gen)
 Assign the result of a function object to each value in a sequence.
template<typename InputIter, typename OutputIter, typename Type>
OutputIter std::remove_copy (InputIter first, InputIter last, OutputIter __result, const Type &value)
 Copy a sequence, removing elements of a given value.
template<typename InputIter, typename OutputIter, typename Predicate>
OutputIter std::remove_copy_if (InputIter first, InputIter last, OutputIter __result, Predicate pred)
 Copy a sequence, removing elements for which a predicate is true.
template<typename ForwardIter, typename Type>
ForwardIter std::remove (ForwardIter first, ForwardIter last, const Type &value)
 Remove elements from a sequence.
template<typename ForwardIter, typename Predicate>
ForwardIter std::remove_if (ForwardIter first, ForwardIter last, Predicate pred)
 Remove elements from a sequence using a predicate.
template<typename InputIter, typename OutputIter>
OutputIter std::unique_copy (InputIter first, InputIter last, OutputIter __result)
 Copy a sequence, removing consecutive duplicate values.
template<typename InputIter, typename OutputIter, typename BinaryPredicate>
OutputIter std::unique_copy (InputIter first, InputIter last, OutputIter __result, BinaryPredicate __binary_pred)
 Copy a sequence, removing consecutive values using a predicate.
template<typename ForwardIter>
ForwardIter std::unique (ForwardIter first, ForwardIter last)
 Remove consecutive duplicate values from a sequence.
template<typename ForwardIter, typename BinaryPredicate>
ForwardIter std::unique (ForwardIter first, ForwardIter last, BinaryPredicate __binary_pred)
 Remove consecutive values from a sequence using a predicate.
template<typename BidirectionalIter>
void std::reverse (BidirectionalIter first, BidirectionalIter last)
 Reverse a sequence.
template<typename BidirectionalIter, typename OutputIter>
OutputIter std::reverse_copy (BidirectionalIter first, BidirectionalIter last, OutputIter __result)
 Copy a sequence, reversing its elements.
template<typename ForwardIter>
void std::rotate (ForwardIter first, ForwardIter __middle, ForwardIter last)
 Rotate the elements of a sequence.
template<typename ForwardIter, typename OutputIter>
OutputIter std::rotate_copy (ForwardIter first, ForwardIter __middle, ForwardIter last, OutputIter __result)
 Copy a sequence, rotating its elements.
template<typename RandomAccessIter>
void std::random_shuffle (RandomAccessIter first, RandomAccessIter last)
 Randomly shuffle the elements of a sequence.
template<typename RandomAccessIter, typename RandomNumberGenerator>
void std::random_shuffle (RandomAccessIter first, RandomAccessIter last, RandomNumberGenerator &__rand)
 Shuffle the elements of a sequence using a random number generator.
template<typename ForwardIter, typename Predicate>
ForwardIter std::partition (ForwardIter first, ForwardIter last, Predicate pred)
 Move elements for which a predicate is true to the beginning of a sequence.
template<typename ForwardIter, typename Predicate>
ForwardIter std::stable_partition (ForwardIter first, ForwardIter last, Predicate pred)
 Move elements for which a predicate is true to the beginning of a sequence, preserving relative ordering.
template<typename RandomAccessIter>
void std::sort (RandomAccessIter first, RandomAccessIter last)
 Sort the elements of a sequence.
template<typename RandomAccessIter, typename Compare>
void std::sort (RandomAccessIter first, RandomAccessIter last, Compare comp)
 Sort the elements of a sequence using a predicate for comparison.
template<typename RandomAccessIter>
void std::stable_sort (RandomAccessIter first, RandomAccessIter last)
 Sort the elements of a sequence, preserving the relative order of equivalent elements.
template<typename RandomAccessIter, typename Compare>
void std::stable_sort (RandomAccessIter first, RandomAccessIter last, Compare comp)
 Sort the elements of a sequence using a predicate for comparison, preserving the relative order of equivalent elements.
template<typename RandomAccessIter>
void std::partial_sort (RandomAccessIter first, RandomAccessIter __middle, RandomAccessIter last)
 Sort the smallest elements of a sequence.
template<typename RandomAccessIter, typename Compare>
void std::partial_sort (RandomAccessIter first, RandomAccessIter __middle, RandomAccessIter last, Compare comp)
 Sort the smallest elements of a sequence using a predicate for comparison.
template<typename InputIter, typename RandomAccessIter>
RandomAccessIter std::partial_sort_copy (InputIter first, InputIter last, RandomAccessIter __result_first, RandomAccessIter __result_last)
 Copy the smallest elements of a sequence.
template<typename InputIter, typename RandomAccessIter, typename Compare>
RandomAccessIter std::partial_sort_copy (InputIter first, InputIter last, RandomAccessIter __result_first, RandomAccessIter __result_last, Compare comp)
 Copy the smallest elements of a sequence using a predicate for comparison.
template<typename RandomAccessIter>
void std::nth_element (RandomAccessIter first, RandomAccessIter nth, RandomAccessIter last)
 Sort a sequence just enough to find a particular position.
template<typename RandomAccessIter, typename Compare>
void std::nth_element (RandomAccessIter first, RandomAccessIter nth, RandomAccessIter last, Compare comp)
 Sort a sequence just enough to find a particular position using a predicate for comparison.
template<typename ForwardIter, typename Type>
ForwardIter std::lower_bound (ForwardIter first, ForwardIter last, const Type &__val)
 Finds the first position in which val could be inserted without changing the ordering.
template<typename ForwardIter, typename Type, typename Compare>
ForwardIter std::lower_bound (ForwardIter first, ForwardIter last, const Type &__val, Compare comp)
 Finds the first position in which val could be inserted without changing the ordering.
template<typename ForwardIter, typename Type>
ForwardIter std::upper_bound (ForwardIter first, ForwardIter last, const Type &__val)
 Finds the last position in which val could be inserted without changing the ordering.
template<typename ForwardIter, typename Type, typename Compare>
ForwardIter std::upper_bound (ForwardIter first, ForwardIter last, const Type &__val, Compare comp)
 Finds the last position in which val could be inserted without changing the ordering.
template<typename ForwardIter, typename Type>
pair< ForwardIter, ForwardIter > std::equal_range (ForwardIter first, ForwardIter last, const Type &__val)
 Finds the largest subrange in which val could be inserted at any place in it without changing the ordering.
template<typename ForwardIter, typename Type, typename Compare>
pair< ForwardIter, ForwardIter > std::equal_range (ForwardIter first, ForwardIter last, const Type &__val, Compare comp)
 Finds the largest subrange in which val could be inserted at any place in it without changing the ordering.
template<typename ForwardIter, typename Type>
bool std::binary_search (ForwardIter first, ForwardIter last, const Type &__val)
 Determines whether an element exists in a range.
template<typename ForwardIter, typename Type, typename Compare>
bool std::binary_search (ForwardIter first, ForwardIter last, const Type &__val, Compare comp)
 Determines whether an element exists in a range.
template<typename InputIter1, typename InputIter2, typename OutputIter>
OutputIter std::merge (InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2 last2, OutputIter __result)
 Merges two sorted ranges.
template<typename InputIter1, typename InputIter2, typename OutputIter, typename Compare>
OutputIter std::merge (InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2 last2, OutputIter __result, Compare comp)
 Merges two sorted ranges.
template<typename BidirectionalIter>
void std::inplace_merge (BidirectionalIter first, BidirectionalIter __middle, BidirectionalIter last)
 Merges two sorted ranges in place.
template<typename BidirectionalIter, typename Compare>
void std::inplace_merge (BidirectionalIter first, BidirectionalIter __middle, BidirectionalIter last, Compare comp)
 Merges two sorted ranges in place.


Detailed Description

This is an internal header file, included by other library headers. You should not attempt to use it directly.

Definition in file stl_algo.h.


Generated on Thu May 8 08:58:29 2008 for libstdc++-v3 Source by  doxygen 1.5.5